Contact Form 7 Skins - Version 2.1

Version Description

  • 2019-02-25 =

  • FEATURE: Change type of CF7 Tag

  • FEATURE: Copy visual form data option

  • FIX: Remove duplicate from ReCAPTCHA and Submit fields

  • TWEAK: CF7 acceptance tag options modified

  • TWEAK: Add surrounding LIST-LI to additional CF7 Tag

  • TWEAK: Visual form tab expandable

  • TWEAK: Pro Tips added

Download this release

Release Info

Developer buzztone
Plugin Icon 128x128 Contact Form 7 Skins
Version 2.1
Comparing to
See all releases

Code changes from version 2.0.2 to 2.1

Files changed (5) hide show
  1. css/admin.css +1 -1
  2. includes/admin-visual.php +67 -16
  3. index.php +4 -3
  4. js/init.js +3264 -0
  5. js/visual.js +11768 -10992
css/admin.css CHANGED
@@ -116,7 +116,7 @@
116
  height: 31px;
117
  line-height: 31px;
118
  }
119
- #cf7s .dashicons:hover {
120
  color: #2ea2cc;
121
  }
122
  #tab-template .filters-group {
116
  height: 31px;
117
  line-height: 31px;
118
  }
119
+ .cf7s .dashicons:hover {
120
  color: #2ea2cc;
121
  }
122
  #tab-template .filters-group {
includes/admin-visual.php CHANGED
@@ -22,7 +22,9 @@ Class CF7_Skins_Admin_Visual {
22
 
23
  // For debugging purpose, should be deleted for live
24
  // Add in .htaccess file php_flag display_errors 1
25
- ini_set( 'display_errors', 1 );
 
 
26
 
27
  $this->nonce = CF7SKINS_OPTIONS;
28
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
@@ -202,23 +204,23 @@ Class CF7_Skins_Admin_Visual {
202
 
203
  foreach( $items as $item ) {
204
  $parent = $this->create_element( $item ); // parent item
 
205
 
206
  if ( isset( $item->children ) && $item->children ) {
207
  $this->loop_children( $item, $parent );
208
  }
209
-
210
- $dom->appendChild( $parent );
211
  }
212
 
213
- // Replace two spaces to single tab and save XML
214
  $xml = preg_replace_callback( '/^( +)</m', function( $a ) {
215
  return str_repeat( "\t", intval( strlen( $a[1]) / 2 ) ) . '<';
216
- }, $dom->saveXML( $dom, LIBXML_NOEMPTYTAG ) );
217
 
218
  $xml = preg_replace( "|<\?xml(.+?)\?>[\n\r]?|i", "", $xml ); // remove XML declaration
 
219
  $xml = str_replace( array("<tag>","</tag>"), "", $xml ); // remove <tag> helper
220
- $xml = preg_replace( "/<cf7content>\s*|\s*<\/cf7content>/", "", $xml ); // remove <tag> helper
221
-
222
  return $xml;
223
  }
224
 
@@ -237,8 +239,13 @@ Class CF7_Skins_Admin_Visual {
237
  if ( isset( $child->children ) ) {
238
  $this->loop_children( $child, $_item );
239
  }
240
-
241
- $parent->appendChild( $_item );
 
 
 
 
 
242
  }
243
  }
244
 
@@ -301,9 +308,16 @@ Class CF7_Skins_Admin_Visual {
301
  case 'fieldset':
302
  $skin_item = $dom->createElement( 'fieldset' );
303
  $label = isset( $item->cf7sLabel ) ? wp_strip_all_tags( $item->cf7sLabel ) : ''; // validate, set default to empty
 
 
 
 
 
 
 
304
  $legend = $dom->createElement( 'legend', $label );
305
  $skin_item->appendChild( $legend );
306
- break;
307
 
308
  case 'paragraph':
309
  $skin_item = $dom->createElement( 'p' );
@@ -350,6 +364,12 @@ Class CF7_Skins_Admin_Visual {
350
  $label = 'submit' != $item->cf7sType && isset( $item->cf7sLabel ) ? esc_attr( $item->cf7sLabel ) . ' ' : '';
351
  $tags = $label . $this->create_cf7_tags( $item );
352
 
 
 
 
 
 
 
353
  // Create tag helper, will be removed before saving
354
  // Inserted as a child node rather than text for formatting
355
  $skin_item = $dom->createElement( 'tag', $tags );
@@ -370,7 +390,7 @@ Class CF7_Skins_Admin_Visual {
370
  break;
371
 
372
  default :
373
- $skin_item = $dom->createElement( 'div' ); // create <div></div> element
374
  break;
375
  }
376
 
@@ -382,7 +402,7 @@ Class CF7_Skins_Admin_Visual {
382
  *
383
  * @since 2.0.0
384
  */
385
- return apply_filters( 'cf7skins_create_element', $skin_item, $item );
386
  }
387
 
388
  /**
@@ -423,6 +443,7 @@ Class CF7_Skins_Admin_Visual {
423
  $arr[] = $cf7ClassAttribute;
424
  $arr[] = (bool) $item->cf7DefaultOn ? "default:on" : null;
425
  $arr[] = (bool) $item->cf7Invert ? "invert" : null;
 
426
  break;
427
 
428
  case 'checkbox': // [checkbox* checkbox-991 id:my-id class:my-class label_first use_label_element exclusive "option 1" "option 2" "option 3"]
@@ -698,9 +719,13 @@ Class CF7_Skins_Admin_Visual {
698
  return;
699
  }
700
 
 
 
 
 
701
  wp_enqueue_script( 'visual',
702
  $this->url . 'js/visual.js',
703
- array( 'wpcf7-admin' ), $this->version, true ); // added after 'wpcf7-admin'
704
 
705
  // Current contact form 7 object, null for non valid post ID
706
  $cf7 = wpcf7_get_current_contact_form();
@@ -716,6 +741,7 @@ Class CF7_Skins_Admin_Visual {
716
  $options = array();
717
  $cf7s_option = get_option( CF7SKINS_OPTIONS );
718
  $options['showName'] = isset( $cf7s_option['show_name'] ) && $cf7s_option['show_name'] ? true : false;
 
719
 
720
  // Add integration @since 0.5.4
721
  $integration = array();
@@ -726,9 +752,16 @@ Class CF7_Skins_Admin_Visual {
726
  $integration['reCAPTCHA'] = $recaptcha->is_active();
727
  }
728
 
729
- // Output visual items as a JS var
730
- wp_localize_script( 'visual', 'cf7svisual', array(
 
 
 
 
 
 
731
  'ajaxurl' => admin_url('admin-ajax.php'),
 
732
  'nonce' => wp_create_nonce( $this->nonce ), // generate a nonce for security checking
733
  'update' => 'cf7skins_visual_update', // post action for saving
734
  'l10n' => array(
@@ -740,7 +773,11 @@ Class CF7_Skins_Admin_Visual {
740
  'title' => $cf7 ? $cf7->title() : '',
741
  'items' => $items,
742
  'integration' => $integration,
 
743
  ) );
 
 
 
744
  }
745
 
746
  /**
@@ -765,6 +802,14 @@ Class CF7_Skins_Admin_Visual {
765
  * @since 2.0.0
766
  */
767
  function setting_fields( $fields ) {
 
 
 
 
 
 
 
 
768
  $fields['show_name'] = array(
769
  'section' => 'advanced',
770
  'label' => __( 'Show Name', $this->textdomain ),
@@ -782,7 +827,13 @@ Class CF7_Skins_Admin_Visual {
782
  * @since 2.0.0
783
  */
784
  function log_scripts() {
785
- if ( ! CF7_Skins_Admin::edit_page() ) { // return if this is not CF7 editing page
 
 
 
 
 
 
786
  return;
787
  }
788
  ?>
22
 
23
  // For debugging purpose, should be deleted for live
24
  // Add in .htaccess file php_flag display_errors 1
25
+ if ( 'development' === CF7SKINS_ENV ) {
26
+ ini_set( 'display_errors', 1 );
27
+ }
28
 
29
  $this->nonce = CF7SKINS_OPTIONS;
30
  $this->textdomain = CF7SKINS_TEXTDOMAIN;
204
 
205
  foreach( $items as $item ) {
206
  $parent = $this->create_element( $item ); // parent item
207
+ $dom->appendChild( $parent ); // insert to DOM
208
 
209
  if ( isset( $item->children ) && $item->children ) {
210
  $this->loop_children( $item, $parent );
211
  }
 
 
212
  }
213
 
214
+ // Replace two spaces to single tab @since 0.6.7 and save XML
215
  $xml = preg_replace_callback( '/^( +)</m', function( $a ) {
216
  return str_repeat( "\t", intval( strlen( $a[1]) / 2 ) ) . '<';
217
+ }, $dom->saveXML( $dom ) );
218
 
219
  $xml = preg_replace( "|<\?xml(.+?)\?>[\n\r]?|i", "", $xml ); // remove XML declaration
220
+ $xml = str_replace( "cf7s&amp;", "&", $xml ); // replace "cf7s&amp;" helper back to "&" @since 0.7.0
221
  $xml = str_replace( array("<tag>","</tag>"), "", $xml ); // remove <tag> helper
222
+ $xml = preg_replace( "/<cf7content>\s*|\s*<\/cf7content>/", "", $xml ); // remove <cf7content> helper
223
+ $xml = preg_replace( "/<cf7content\/>/", "", $xml ); // remove <cf7content/> helper
224
  return $xml;
225
  }
226
 
239
  if ( isset( $child->children ) ) {
240
  $this->loop_children( $child, $_item );
241
  }
242
+
243
+ // If item uses selfClosing, append nested children next to it @since 2.1
244
+ if ( isset( $item->selfClosing ) && $item->selfClosing ) {
245
+ $parent->ownerDocument->appendChild( $_item ); // insert after parent
246
+ } else {
247
+ $parent->appendChild( $_item ); // insert to parent
248
+ }
249
  }
250
  }
251
 
308
  case 'fieldset':
309
  $skin_item = $dom->createElement( 'fieldset' );
310
  $label = isset( $item->cf7sLabel ) ? wp_strip_all_tags( $item->cf7sLabel ) : ''; // validate, set default to empty
311
+
312
+ // Replace "&" to "cf7s&amp;" to avoid "Unterminated Entity Reference" issue,
313
+ // and will be replaced back in extract_visual().
314
+ // @link https://bugs.php.net/bug.php?id=39521
315
+ // @since 0.7.2
316
+ $label = str_replace( '&', 'cf7s&amp;', $label );
317
+
318
  $legend = $dom->createElement( 'legend', $label );
319
  $skin_item->appendChild( $legend );
320
+ break;
321
 
322
  case 'paragraph':
323
  $skin_item = $dom->createElement( 'p' );
364
  $label = 'submit' != $item->cf7sType && isset( $item->cf7sLabel ) ? esc_attr( $item->cf7sLabel ) . ' ' : '';
365
  $tags = $label . $this->create_cf7_tags( $item );
366
 
367
+ // Replace "&" to "cf7s&amp;" to avoid "Unterminated Entity Reference" issue,
368
+ // and will be replaced back in extract_visual().
369
+ // @link https://bugs.php.net/bug.php?id=39521
370
+ // @since 0.7.0
371
+ $tags = str_replace( '&', 'cf7s&amp;', $tags );
372
+
373
  // Create tag helper, will be removed before saving
374
  // Inserted as a child node rather than text for formatting
375
  $skin_item = $dom->createElement( 'tag', $tags );
390
  break;
391
 
392
  default :
393
+ $skin_item = $dom->createElement( 'cf7content' );
394
  break;
395
  }
396
 
402
  *
403
  * @since 2.0.0
404
  */
405
+ return apply_filters( 'cf7skins_create_element', $skin_item, $item, $this );
406
  }
407
 
408
  /**
443
  $arr[] = $cf7ClassAttribute;
444
  $arr[] = (bool) $item->cf7DefaultOn ? "default:on" : null;
445
  $arr[] = (bool) $item->cf7Invert ? "invert" : null;
446
+ $arr[] = (bool) $item->cf7Optional ? "optional" : null; // @since 2.1
447
  break;
448
 
449
  case 'checkbox': // [checkbox* checkbox-991 id:my-id class:my-class label_first use_label_element exclusive "option 1" "option 2" "option 3"]
719
  return;
720
  }
721
 
722
+ wp_enqueue_script( 'visual-init',
723
+ $this->url . 'js/init.js',
724
+ array( 'wpcf7-admin' ), $this->version, true ); // added after 'wpcf7-admin' @since 2.1
725
+
726
  wp_enqueue_script( 'visual',
727
  $this->url . 'js/visual.js',
728
+ array( 'visual-init' ), $this->version, true ); // added after 'wpcf7-admin'
729
 
730
  // Current contact form 7 object, null for non valid post ID
731
  $cf7 = wpcf7_get_current_contact_form();
741
  $options = array();
742
  $cf7s_option = get_option( CF7SKINS_OPTIONS );
743
  $options['showName'] = isset( $cf7s_option['show_name'] ) && $cf7s_option['show_name'] ? true : false;
744
+ $options['showCopyPaste'] = isset( $cf7s_option['show_copy_paste'] ) && $cf7s_option['show_copy_paste'] ? true : false;
745
 
746
  // Add integration @since 0.5.4
747
  $integration = array();
752
  $integration['reCAPTCHA'] = $recaptcha->is_active();
753
  }
754
 
755
+ // Add versions @since 2.1
756
+ global $wp_version;
757
+ $versions = array();
758
+ $versions['wp'] = $wp_version;
759
+ $versions['cf7'] = WPCF7_VERSION;
760
+
761
+ // Localize script filter since 0.2
762
+ $localize = apply_filters( 'cf7svisual_localize_script', array(
763
  'ajaxurl' => admin_url('admin-ajax.php'),
764
+ 'versions' => $versions, // @since 2.1
765
  'nonce' => wp_create_nonce( $this->nonce ), // generate a nonce for security checking
766
  'update' => 'cf7skins_visual_update', // post action for saving
767
  'l10n' => array(
773
  'title' => $cf7 ? $cf7->title() : '',
774
  'items' => $items,
775
  'integration' => $integration,
776
+ 'environment' => defined('CF7SKINS_ENV') ? CF7SKINS_ENV : null, // @since 2.1
777
  ) );
778
+
779
+ // Output visual items as a JS var
780
+ wp_localize_script( 'visual-init', 'cf7svisual', $localize );
781
  }
782
 
783
  /**
802
  * @since 2.0.0
803
  */
804
  function setting_fields( $fields ) {
805
+ $fields['show_copy_paste'] = array( // @ since 2.1
806
+ 'section' => 'advanced',
807
+ 'label' => __( 'Visual Copy/Paste', $this->textdomain ),
808
+ 'type' => 'checkbox',
809
+ 'default' => false,
810
+ 'detail' => __( 'Show Copy/Paste visual data options', $this->textdomain ),
811
+ );
812
+
813
  $fields['show_name'] = array(
814
  'section' => 'advanced',
815
  'label' => __( 'Show Name', $this->textdomain ),
827
  * @since 2.0.0
828
  */
829
  function log_scripts() {
830
+ // Return if this is not CF7 editing page
831
+ if ( ! CF7_Skins_Admin::edit_page() || ! defined('CF7SKINS_ENV') ) {
832
+ return;
833
+ }
834
+
835
+ // Return if is not in development environment (production) // @since 0.7.0
836
+ if ( 'development' !== CF7SKINS_ENV ) {
837
  return;
838
  }
839
  ?>
index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form 7 Skins
4
  * Plugin URI: http://cf7skins.com
5
  * Description: Adds drag & drop Visual Editor with Templates & Styles to Contact Form 7. Requires Contact Form 7.
6
- * Version: 2.0.2
7
  * Author: Neil Murray
8
  * Author URI: http://cf7skins.com
9
  * License: GPL-2.0+
@@ -30,7 +30,7 @@ if ( ! defined( 'ABSPATH' ) ) {
30
  *
31
  * @since 0.1.0
32
  */
33
- define( 'CF7SKINS_VERSION', '2.0.2' );
34
  define( 'CF7SKINS_OPTIONS', 'cf7skins' ); // Database option names
35
  define( 'CF7SKINS_TEXTDOMAIN', 'contact-form-7-skins' );
36
  define( 'CF7SKINS_FEATURE_FILTER', false ); // @since 0.4.0
@@ -40,7 +40,8 @@ define( 'CF7SKINS_STYLES_PATH', CF7SKINS_PATH . 'skins/styles/' );
40
  define( 'CF7SKINS_STYLES_URL', CF7SKINS_URL . 'skins/styles/' );
41
  define( 'CF7SKINS_TEMPLATES_PATH', CF7SKINS_PATH . 'skins/templates/' );
42
  define( 'CF7SKINS_TEMPLATES_URL', CF7SKINS_URL . 'skins/templates/' );
43
- define( 'CF7SKINS_UPDATE_URL', 'http://cf7skins.com' ); // @since 0.7.0
 
44
 
45
  /**
46
  * WP Options & Metas.
3
  * Plugin Name: Contact Form 7 Skins
4
  * Plugin URI: http://cf7skins.com
5
  * Description: Adds drag & drop Visual Editor with Templates & Styles to Contact Form 7. Requires Contact Form 7.
6
+ * Version: 2.1
7
  * Author: Neil Murray
8
  * Author URI: http://cf7skins.com
9
  * License: GPL-2.0+
30
  *
31
  * @since 0.1.0
32
  */
33
+ define( 'CF7SKINS_VERSION', '2.1' );
34
  define( 'CF7SKINS_OPTIONS', 'cf7skins' ); // Database option names
35
  define( 'CF7SKINS_TEXTDOMAIN', 'contact-form-7-skins' );
36
  define( 'CF7SKINS_FEATURE_FILTER', false ); // @since 0.4.0
40
  define( 'CF7SKINS_STYLES_URL', CF7SKINS_URL . 'skins/styles/' );
41
  define( 'CF7SKINS_TEMPLATES_PATH', CF7SKINS_PATH . 'skins/templates/' );
42
  define( 'CF7SKINS_TEMPLATES_URL', CF7SKINS_URL . 'skins/templates/' );
43
+ define( 'CF7SKINS_UPDATE_URL', 'https://cf7skins.com' ); // @since 0.7.0
44
+ define( 'CF7SKINS_ENV', 'production' ); // environment: production or development @since 2.1
45
 
46
  /**
47
  * WP Options & Metas.
js/init.js ADDED
@@ -0,0 +1,3264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /******/ (function(modules) { // webpackBootstrap
2
+ /******/ // install a JSONP callback for chunk loading
3
+ /******/ var parentJsonpFunction = window["webpackJsonp"];
4
+ /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5
+ /******/ // add "moreModules" to the modules object,
6
+ /******/ // then flag all "chunkIds" as loaded and fire callback
7
+ /******/ var moduleId, chunkId, i = 0, resolves = [], result;
8
+ /******/ for(;i < chunkIds.length; i++) {
9
+ /******/ chunkId = chunkIds[i];
10
+ /******/ if(installedChunks[chunkId]) {
11
+ /******/ resolves.push(installedChunks[chunkId][0]);
12
+ /******/ }
13
+ /******/ installedChunks[chunkId] = 0;
14
+ /******/ }
15
+ /******/ for(moduleId in moreModules) {
16
+ /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17
+ /******/ modules[moduleId] = moreModules[moduleId];
18
+ /******/ }
19
+ /******/ }
20
+ /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21
+ /******/ while(resolves.length) {
22
+ /******/ resolves.shift()();
23
+ /******/ }
24
+ /******/ if(executeModules) {
25
+ /******/ for(i=0; i < executeModules.length; i++) {
26
+ /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
27
+ /******/ }
28
+ /******/ }
29
+ /******/ return result;
30
+ /******/ };
31
+ /******/
32
+ /******/ // The module cache
33
+ /******/ var installedModules = {};
34
+ /******/
35
+ /******/ // objects to store loaded and loading chunks
36
+ /******/ var installedChunks = {
37
+ /******/ 4: 0
38
+ /******/ };
39
+ /******/
40
+ /******/ // The require function
41
+ /******/ function __webpack_require__(moduleId) {
42
+ /******/
43
+ /******/ // Check if module is in cache
44
+ /******/ if(installedModules[moduleId]) {
45
+ /******/ return installedModules[moduleId].exports;
46
+ /******/ }
47
+ /******/ // Create a new module (and put it into the cache)
48
+ /******/ var module = installedModules[moduleId] = {
49
+ /******/ i: moduleId,
50
+ /******/ l: false,
51
+ /******/ exports: {}
52
+ /******/ };
53
+ /******/
54
+ /******/ // Execute the module function
55
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
56
+ /******/
57
+ /******/ // Flag the module as loaded
58
+ /******/ module.l = true;
59
+ /******/
60
+ /******/ // Return the exports of the module
61
+ /******/ return module.exports;
62
+ /******/ }
63
+ /******/
64
+ /******/ // This file contains only the entry chunk.
65
+ /******/ // The chunk loading function for additional chunks
66
+ /******/ __webpack_require__.e = function requireEnsure(chunkId) {
67
+ /******/ var installedChunkData = installedChunks[chunkId];
68
+ /******/ if(installedChunkData === 0) {
69
+ /******/ return new Promise(function(resolve) { resolve(); });
70
+ /******/ }
71
+ /******/
72
+ /******/ // a Promise means "currently loading".
73
+ /******/ if(installedChunkData) {
74
+ /******/ return installedChunkData[2];
75
+ /******/ }
76
+ /******/
77
+ /******/ // setup Promise in chunk cache
78
+ /******/ var promise = new Promise(function(resolve, reject) {
79
+ /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
80
+ /******/ });
81
+ /******/ installedChunkData[2] = promise;
82
+ /******/
83
+ /******/ // start chunk loading
84
+ /******/ var head = document.getElementsByTagName('head')[0];
85
+ /******/ var script = document.createElement('script');
86
+ /******/ script.type = 'text/javascript';
87
+ /******/ script.charset = 'utf-8';
88
+ /******/ script.async = true;
89
+ /******/ script.timeout = 120000;
90
+ /******/
91
+ /******/ if (__webpack_require__.nc) {
92
+ /******/ script.setAttribute("nonce", __webpack_require__.nc);
93
+ /******/ }
94
+ /******/ script.src = __webpack_require__.p + "dist/" + chunkId + ".js";
95
+ /******/ var timeout = setTimeout(onScriptComplete, 120000);
96
+ /******/ script.onerror = script.onload = onScriptComplete;
97
+ /******/ function onScriptComplete() {
98
+ /******/ // avoid mem leaks in IE.
99
+ /******/ script.onerror = script.onload = null;
100
+ /******/ clearTimeout(timeout);
101
+ /******/ var chunk = installedChunks[chunkId];
102
+ /******/ if(chunk !== 0) {
103
+ /******/ if(chunk) {
104
+ /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
105
+ /******/ }
106
+ /******/ installedChunks[chunkId] = undefined;
107
+ /******/ }
108
+ /******/ };
109
+ /******/ head.appendChild(script);
110
+ /******/
111
+ /******/ return promise;
112
+ /******/ };
113
+ /******/
114
+ /******/ // expose the modules object (__webpack_modules__)
115
+ /******/ __webpack_require__.m = modules;
116
+ /******/
117
+ /******/ // expose the module cache
118
+ /******/ __webpack_require__.c = installedModules;
119
+ /******/
120
+ /******/ // define getter function for harmony exports
121
+ /******/ __webpack_require__.d = function(exports, name, getter) {
122
+ /******/ if(!__webpack_require__.o(exports, name)) {
123
+ /******/ Object.defineProperty(exports, name, {
124
+ /******/ configurable: false,
125
+ /******/ enumerable: true,
126
+ /******/ get: getter
127
+ /******/ });
128
+ /******/ }
129
+ /******/ };
130
+ /******/
131
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
132
+ /******/ __webpack_require__.n = function(module) {
133
+ /******/ var getter = module && module.__esModule ?
134
+ /******/ function getDefault() { return module['default']; } :
135
+ /******/ function getModuleExports() { return module; };
136
+ /******/ __webpack_require__.d(getter, 'a', getter);
137
+ /******/ return getter;
138
+ /******/ };
139
+ /******/
140
+ /******/ // Object.prototype.hasOwnProperty.call
141
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
142
+ /******/
143
+ /******/ // __webpack_public_path__
144
+ /******/ __webpack_require__.p = "";
145
+ /******/
146
+ /******/ // on error function for async loading
147
+ /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
148
+ /******/ })
149
+ /************************************************************************/
150
+ /******/ ({
151
+
152
+ /***/ 1:
153
+ /***/ (function(module, exports, __webpack_require__) {
154
+
155
+ "use strict";
156
+ /* WEBPACK VAR INJECTION */(function(process) {
157
+
158
+ if (process.env.NODE_ENV === 'production') {
159
+ module.exports = __webpack_require__(233);
160
+ } else {
161
+ module.exports = __webpack_require__(234);
162
+ }
163
+
164
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
165
+
166
+ /***/ }),
167
+
168
+ /***/ 108:
169
+ /***/ (function(module, exports) {
170
+
171
+ module.exports = function (it) {
172
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
173
+ return it;
174
+ };
175
+
176
+
177
+ /***/ }),
178
+
179
+ /***/ 109:
180
+ /***/ (function(module, exports, __webpack_require__) {
181
+
182
+ module.exports = !__webpack_require__(20) && !__webpack_require__(26)(function () {
183
+ return Object.defineProperty(__webpack_require__(130)('div'), 'a', { get: function () { return 7; } }).a != 7;
184
+ });
185
+
186
+
187
+ /***/ }),
188
+
189
+ /***/ 11:
190
+ /***/ (function(module, exports, __webpack_require__) {
191
+
192
+ var store = __webpack_require__(66)('wks');
193
+ var uid = __webpack_require__(46);
194
+ var Symbol = __webpack_require__(13).Symbol;
195
+ var USE_SYMBOL = typeof Symbol == 'function';
196
+
197
+ var $exports = module.exports = function (name) {
198
+ return store[name] || (store[name] =
199
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
200
+ };
201
+
202
+ $exports.store = store;
203
+
204
+
205
+ /***/ }),
206
+
207
+ /***/ 110:
208
+ /***/ (function(module, exports, __webpack_require__) {
209
+
210
+ module.exports = __webpack_require__(35);
211
+
212
+
213
+ /***/ }),
214
+
215
+ /***/ 111:
216
+ /***/ (function(module, exports, __webpack_require__) {
217
+
218
+ var has = __webpack_require__(23);
219
+ var toIObject = __webpack_require__(24);
220
+ var arrayIndexOf = __webpack_require__(251)(false);
221
+ var IE_PROTO = __webpack_require__(132)('IE_PROTO');
222
+
223
+ module.exports = function (object, names) {
224
+ var O = toIObject(object);
225
+ var i = 0;
226
+ var result = [];
227
+ var key;
228
+ for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
229
+ // Don't enum bug & hidden keys
230
+ while (names.length > i) if (has(O, key = names[i++])) {
231
+ ~arrayIndexOf(result, key) || result.push(key);
232
+ }
233
+ return result;
234
+ };
235
+
236
+
237
+ /***/ }),
238
+
239
+ /***/ 112:
240
+ /***/ (function(module, exports, __webpack_require__) {
241
+
242
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
243
+ var cof = __webpack_require__(37);
244
+ // eslint-disable-next-line no-prototype-builtins
245
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
246
+ return cof(it) == 'String' ? it.split('') : Object(it);
247
+ };
248
+
249
+
250
+ /***/ }),
251
+
252
+ /***/ 113:
253
+ /***/ (function(module, exports, __webpack_require__) {
254
+
255
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
256
+ var has = __webpack_require__(23);
257
+ var toObject = __webpack_require__(32);
258
+ var IE_PROTO = __webpack_require__(132)('IE_PROTO');
259
+ var ObjectProto = Object.prototype;
260
+
261
+ module.exports = Object.getPrototypeOf || function (O) {
262
+ O = toObject(O);
263
+ if (has(O, IE_PROTO)) return O[IE_PROTO];
264
+ if (typeof O.constructor == 'function' && O instanceof O.constructor) {
265
+ return O.constructor.prototype;
266
+ } return O instanceof Object ? ObjectProto : null;
267
+ };
268
+
269
+
270
+ /***/ }),
271
+
272
+ /***/ 12:
273
+ /***/ (function(module, exports, __webpack_require__) {
274
+
275
+ var global = __webpack_require__(13);
276
+ var core = __webpack_require__(3);
277
+ var ctx = __webpack_require__(44);
278
+ var hide = __webpack_require__(35);
279
+ var PROTOTYPE = 'prototype';
280
+
281
+ var $export = function (type, name, source) {
282
+ var IS_FORCED = type & $export.F;
283
+ var IS_GLOBAL = type & $export.G;
284
+ var IS_STATIC = type & $export.S;
285
+ var IS_PROTO = type & $export.P;
286
+ var IS_BIND = type & $export.B;
287
+ var IS_WRAP = type & $export.W;
288
+ var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
289
+ var expProto = exports[PROTOTYPE];
290
+ var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
291
+ var key, own, out;
292
+ if (IS_GLOBAL) source = name;
293
+ for (key in source) {
294
+ // contains in native
295
+ own = !IS_FORCED && target && target[key] !== undefined;
296
+ if (own && key in exports) continue;
297
+ // export native or passed
298
+ out = own ? target[key] : source[key];
299
+ // prevent global pollution for namespaces
300
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
301
+ // bind timers to global for call from export context
302
+ : IS_BIND && own ? ctx(out, global)
303
+ // wrap global constructors for prevent change them in library
304
+ : IS_WRAP && target[key] == out ? (function (C) {
305
+ var F = function (a, b, c) {
306
+ if (this instanceof C) {
307
+ switch (arguments.length) {
308
+ case 0: return new C();
309
+ case 1: return new C(a);
310
+ case 2: return new C(a, b);
311
+ } return new C(a, b, c);
312
+ } return C.apply(this, arguments);
313
+ };
314
+ F[PROTOTYPE] = C[PROTOTYPE];
315
+ return F;
316
+ // make static versions for prototype methods
317
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
318
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
319
+ if (IS_PROTO) {
320
+ (exports.virtual || (exports.virtual = {}))[key] = out;
321
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
322
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
323
+ }
324
+ }
325
+ };
326
+ // type bitmap
327
+ $export.F = 1; // forced
328
+ $export.G = 2; // global
329
+ $export.S = 4; // static
330
+ $export.P = 8; // proto
331
+ $export.B = 16; // bind
332
+ $export.W = 32; // wrap
333
+ $export.U = 64; // safe
334
+ $export.R = 128; // real proto method for `library`
335
+ module.exports = $export;
336
+
337
+
338
+ /***/ }),
339
+
340
+ /***/ 128:
341
+ /***/ (function(module, exports) {
342
+
343
+ // 7.1.4 ToInteger
344
+ var ceil = Math.ceil;
345
+ var floor = Math.floor;
346
+ module.exports = function (it) {
347
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
348
+ };
349
+
350
+
351
+ /***/ }),
352
+
353
+ /***/ 129:
354
+ /***/ (function(module, exports) {
355
+
356
+ // 7.2.1 RequireObjectCoercible(argument)
357
+ module.exports = function (it) {
358
+ if (it == undefined) throw TypeError("Can't call method on " + it);
359
+ return it;
360
+ };
361
+
362
+
363
+ /***/ }),
364
+
365
+ /***/ 13:
366
+ /***/ (function(module, exports) {
367
+
368
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
369
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
370
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
371
+ // eslint-disable-next-line no-new-func
372
+ : Function('return this')();
373
+ if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
374
+
375
+
376
+ /***/ }),
377
+
378
+ /***/ 130:
379
+ /***/ (function(module, exports, __webpack_require__) {
380
+
381
+ var isObject = __webpack_require__(19);
382
+ var document = __webpack_require__(13).document;
383
+ // typeof document.createElement is 'object' in old IE
384
+ var is = isObject(document) && isObject(document.createElement);
385
+ module.exports = function (it) {
386
+ return is ? document.createElement(it) : {};
387
+ };
388
+
389
+
390
+ /***/ }),
391
+
392
+ /***/ 131:
393
+ /***/ (function(module, exports, __webpack_require__) {
394
+
395
+ // 7.1.15 ToLength
396
+ var toInteger = __webpack_require__(128);
397
+ var min = Math.min;
398
+ module.exports = function (it) {
399
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
400
+ };
401
+
402
+
403
+ /***/ }),
404
+
405
+ /***/ 132:
406
+ /***/ (function(module, exports, __webpack_require__) {
407
+
408
+ var shared = __webpack_require__(66)('keys');
409
+ var uid = __webpack_require__(46);
410
+ module.exports = function (key) {
411
+ return shared[key] || (shared[key] = uid(key));
412
+ };
413
+
414
+
415
+ /***/ }),
416
+
417
+ /***/ 14:
418
+ /***/ (function(module, exports, __webpack_require__) {
419
+
420
+ var anObject = __webpack_require__(18);
421
+ var IE8_DOM_DEFINE = __webpack_require__(109);
422
+ var toPrimitive = __webpack_require__(50);
423
+ var dP = Object.defineProperty;
424
+
425
+ exports.f = __webpack_require__(20) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
426
+ anObject(O);
427
+ P = toPrimitive(P, true);
428
+ anObject(Attributes);
429
+ if (IE8_DOM_DEFINE) try {
430
+ return dP(O, P, Attributes);
431
+ } catch (e) { /* empty */ }
432
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
433
+ if ('value' in Attributes) O[P] = Attributes.value;
434
+ return O;
435
+ };
436
+
437
+
438
+ /***/ }),
439
+
440
+ /***/ 166:
441
+ /***/ (function(module, exports, __webpack_require__) {
442
+
443
+ "use strict";
444
+
445
+ var LIBRARY = __webpack_require__(43);
446
+ var $export = __webpack_require__(12);
447
+ var redefine = __webpack_require__(110);
448
+ var hide = __webpack_require__(35);
449
+ var has = __webpack_require__(23);
450
+ var Iterators = __webpack_require__(45);
451
+ var $iterCreate = __webpack_require__(249);
452
+ var setToStringTag = __webpack_require__(57);
453
+ var getPrototypeOf = __webpack_require__(113);
454
+ var ITERATOR = __webpack_require__(11)('iterator');
455
+ var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
456
+ var FF_ITERATOR = '@@iterator';
457
+ var KEYS = 'keys';
458
+ var VALUES = 'values';
459
+
460
+ var returnThis = function () { return this; };
461
+
462
+ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
463
+ $iterCreate(Constructor, NAME, next);
464
+ var getMethod = function (kind) {
465
+ if (!BUGGY && kind in proto) return proto[kind];
466
+ switch (kind) {
467
+ case KEYS: return function keys() { return new Constructor(this, kind); };
468
+ case VALUES: return function values() { return new Constructor(this, kind); };
469
+ } return function entries() { return new Constructor(this, kind); };
470
+ };
471
+ var TAG = NAME + ' Iterator';
472
+ var DEF_VALUES = DEFAULT == VALUES;
473
+ var VALUES_BUG = false;
474
+ var proto = Base.prototype;
475
+ var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
476
+ var $default = (!BUGGY && $native) || getMethod(DEFAULT);
477
+ var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
478
+ var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
479
+ var methods, key, IteratorPrototype;
480
+ // Fix native
481
+ if ($anyNative) {
482
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
483
+ if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
484
+ // Set @@toStringTag to native iterators
485
+ setToStringTag(IteratorPrototype, TAG, true);
486
+ // fix for some old engines
487
+ if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
488
+ }
489
+ }
490
+ // fix Array#{values, @@iterator}.name in V8 / FF
491
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
492
+ VALUES_BUG = true;
493
+ $default = function values() { return $native.call(this); };
494
+ }
495
+ // Define iterator
496
+ if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
497
+ hide(proto, ITERATOR, $default);
498
+ }
499
+ // Plug for library
500
+ Iterators[NAME] = $default;
501
+ Iterators[TAG] = returnThis;
502
+ if (DEFAULT) {
503
+ methods = {
504
+ values: DEF_VALUES ? $default : getMethod(VALUES),
505
+ keys: IS_SET ? $default : getMethod(KEYS),
506
+ entries: $entries
507
+ };
508
+ if (FORCED) for (key in methods) {
509
+ if (!(key in proto)) redefine(proto, key, methods[key]);
510
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
511
+ }
512
+ return methods;
513
+ };
514
+
515
+
516
+ /***/ }),
517
+
518
+ /***/ 167:
519
+ /***/ (function(module, exports, __webpack_require__) {
520
+
521
+ var document = __webpack_require__(13).document;
522
+ module.exports = document && document.documentElement;
523
+
524
+
525
+ /***/ }),
526
+
527
+ /***/ 18:
528
+ /***/ (function(module, exports, __webpack_require__) {
529
+
530
+ var isObject = __webpack_require__(19);
531
+ module.exports = function (it) {
532
+ if (!isObject(it)) throw TypeError(it + ' is not an object!');
533
+ return it;
534
+ };
535
+
536
+
537
+ /***/ }),
538
+
539
+ /***/ 19:
540
+ /***/ (function(module, exports) {
541
+
542
+ module.exports = function (it) {
543
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
544
+ };
545
+
546
+
547
+ /***/ }),
548
+
549
+ /***/ 20:
550
+ /***/ (function(module, exports, __webpack_require__) {
551
+
552
+ // Thank's IE8 for his funny defineProperty
553
+ module.exports = !__webpack_require__(26)(function () {
554
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
555
+ });
556
+
557
+
558
+ /***/ }),
559
+
560
+ /***/ 23:
561
+ /***/ (function(module, exports) {
562
+
563
+ var hasOwnProperty = {}.hasOwnProperty;
564
+ module.exports = function (it, key) {
565
+ return hasOwnProperty.call(it, key);
566
+ };
567
+
568
+
569
+ /***/ }),
570
+
571
+ /***/ 233:
572
+ /***/ (function(module, exports, __webpack_require__) {
573
+
574
+ "use strict";
575
+ /** @license React v16.5.2
576
+ * react.production.min.js
577
+ *
578
+ * Copyright (c) Facebook, Inc. and its affiliates.
579
+ *
580
+ * This source code is licensed under the MIT license found in the
581
+ * LICENSE file in the root directory of this source tree.
582
+ */
583
+
584
+ var m=__webpack_require__(42),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.async_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112;n&&Symbol.for("react.placeholder");
585
+ var z="function"===typeof Symbol&&Symbol.iterator;function A(a,b,d,c,e,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[d,c,e,g,h,f],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
586
+ function B(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);A(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D={};
587
+ function E(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}E.prototype.isReactComponent={};E.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?B("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,d){this.props=a;this.context=b;this.refs=D;this.updater=d||C}var H=G.prototype=new F;
588
+ H.constructor=G;m(H,E.prototype);H.isPureReactComponent=!0;var I={current:null,currentDispatcher:null},J=Object.prototype.hasOwnProperty,K={key:!0,ref:!0,__self:!0,__source:!0};
589
+ function L(a,b,d){var c=void 0,e={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(g=""+b.key),b)J.call(b,c)&&!K.hasOwnProperty(c)&&(e[c]=b[c]);var f=arguments.length-2;if(1===f)e.children=d;else if(1<f){for(var k=Array(f),l=0;l<f;l++)k[l]=arguments[l+2];e.children=k}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===e[c]&&(e[c]=f[c]);return{$$typeof:p,type:a,key:g,ref:h,props:e,_owner:I.current}}
590
+ function M(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,d,c){if(P.length){var e=P.pop();e.result=a;e.keyPrefix=b;e.func=d;e.context=c;e.count=0;return e}return{result:a,keyPrefix:b,func:d,context:c,count:0}}
591
+ function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
592
+ function S(a,b,d,c){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return d(c,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var h=0;h<a.length;h++){e=a[h];var f=b+T(e,h);g+=S(e,f,d,c)}else if(null===a||"object"!==typeof a?f=null:(f=z&&a[z]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),h=
593
+ 0;!(e=a.next()).done;)e=e.value,f=b+T(e,h++),g+=S(e,f,d,c);else"object"===e&&(d=""+a,B("31","[object Object]"===d?"object with keys {"+Object.keys(a).join(", ")+"}":d,""));return g}function U(a,b,d){return null==a?0:S(a,"",b,d)}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function V(a,b){a.func.call(a.context,b,a.count++)}
594
+ function aa(a,b,d){var c=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?W(a,c,d,function(a){return a}):null!=a&&(N(a)&&(a=M(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+d)),c.push(a))}function W(a,b,d,c,e){var g="";null!=d&&(g=(""+d).replace(O,"$&/")+"/");b=Q(b,g,c,e);U(a,aa,b);R(b)}function ba(a,b){var d=I.currentDispatcher;null===d?B("277"):void 0;return d.readContext(a,b)}
595
+ var X={Children:{map:function(a,b,d){if(null==a)return a;var c=[];W(a,c,null,b,d);return c},forEach:function(a,b,d){if(null==a)return a;b=Q(null,null,b,d);U(a,V,b);R(b)},count:function(a){return U(a,function(){return null},null)},toArray:function(a){var b=[];W(a,b,null,function(a){return a});return b},only:function(a){N(a)?void 0:B("143");return a}},createRef:function(){return{current:null}},Component:E,PureComponent:G,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
596
+ _currentValue:a,_currentValue2:a,Provider:null,Consumer:null,unstable_read:null};a.Provider={$$typeof:v,_context:a};a.Consumer=a;a.unstable_read=ba.bind(null,a);return a},forwardRef:function(a){return{$$typeof:y,render:a}},Fragment:r,StrictMode:t,unstable_AsyncMode:x,unstable_Profiler:u,createElement:L,cloneElement:function(a,b,d){null===a||void 0===a?B("267",a):void 0;var c=void 0,e=m({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=I.current);void 0!==b.key&&(g=""+b.key);
597
+ var k=void 0;a.type&&a.type.defaultProps&&(k=a.type.defaultProps);for(c in b)J.call(b,c)&&!K.hasOwnProperty(c)&&(e[c]=void 0===b[c]&&void 0!==k?k[c]:b[c])}c=arguments.length-2;if(1===c)e.children=d;else if(1<c){k=Array(c);for(var l=0;l<c;l++)k[l]=arguments[l+2];e.children=k}return{$$typeof:p,type:a.type,key:g,ref:h,props:e,_owner:f}},createFactory:function(a){var b=L.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.5.2",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,
598
+ assign:m}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
599
+
600
+
601
+ /***/ }),
602
+
603
+ /***/ 234:
604
+ /***/ (function(module, exports, __webpack_require__) {
605
+
606
+ "use strict";
607
+ /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.5.2
608
+ * react.development.js
609
+ *
610
+ * Copyright (c) Facebook, Inc. and its affiliates.
611
+ *
612
+ * This source code is licensed under the MIT license found in the
613
+ * LICENSE file in the root directory of this source tree.
614
+ */
615
+
616
+
617
+
618
+
619
+
620
+ if (process.env.NODE_ENV !== "production") {
621
+ (function() {
622
+ 'use strict';
623
+
624
+ var _assign = __webpack_require__(42);
625
+ var checkPropTypes = __webpack_require__(235);
626
+
627
+ // TODO: this is special because it gets imported during build.
628
+
629
+ var ReactVersion = '16.5.2';
630
+
631
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
632
+ // nor polyfill, then a plain number is used for performance.
633
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
634
+
635
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
636
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
637
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
638
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
639
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
640
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
641
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
642
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
643
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
644
+ var REACT_PLACEHOLDER_TYPE = hasSymbol ? Symbol.for('react.placeholder') : 0xead1;
645
+
646
+ var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
647
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
648
+
649
+ function getIteratorFn(maybeIterable) {
650
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
651
+ return null;
652
+ }
653
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
654
+ if (typeof maybeIterator === 'function') {
655
+ return maybeIterator;
656
+ }
657
+ return null;
658
+ }
659
+
660
+ // Exports ReactDOM.createRoot
661
+
662
+
663
+ // Experimental error-boundary API that can recover from errors within a single
664
+ // render phase
665
+
666
+ // Suspense
667
+ var enableSuspense = false;
668
+ // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
669
+
670
+
671
+ // In some cases, StrictMode should also double-render lifecycles.
672
+ // This can be confusing for tests though,
673
+ // And it can be bad for performance in production.
674
+ // This feature flag can be used to control the behavior:
675
+
676
+
677
+ // To preserve the "Pause on caught exceptions" behavior of the debugger, we
678
+ // replay the begin phase of a failed component inside invokeGuardedCallback.
679
+
680
+
681
+ // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
682
+
683
+
684
+ // Warn about legacy context API
685
+
686
+
687
+ // Gather advanced timing metrics for Profiler subtrees.
688
+
689
+
690
+ // Trace which interactions trigger each commit.
691
+
692
+
693
+ // Only used in www builds.
694
+
695
+
696
+ // Only used in www builds.
697
+
698
+
699
+ // React Fire: prevent the value and checked attributes from syncing
700
+ // with their related DOM properties
701
+
702
+ /**
703
+ * Use invariant() to assert state which your program assumes to be true.
704
+ *
705
+ * Provide sprintf-style format (only %s is supported) and arguments
706
+ * to provide information about what broke and what you were
707
+ * expecting.
708
+ *
709
+ * The invariant message will be stripped in production, but the invariant
710
+ * will remain to ensure logic does not differ in production.
711
+ */
712
+
713
+ var validateFormat = function () {};
714
+
715
+ {
716
+ validateFormat = function (format) {
717
+ if (format === undefined) {
718
+ throw new Error('invariant requires an error message argument');
719
+ }
720
+ };
721
+ }
722
+
723
+ function invariant(condition, format, a, b, c, d, e, f) {
724
+ validateFormat(format);
725
+
726
+ if (!condition) {
727
+ var error = void 0;
728
+ if (format === undefined) {
729
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
730
+ } else {
731
+ var args = [a, b, c, d, e, f];
732
+ var argIndex = 0;
733
+ error = new Error(format.replace(/%s/g, function () {
734
+ return args[argIndex++];
735
+ }));
736
+ error.name = 'Invariant Violation';
737
+ }
738
+
739
+ error.framesToPop = 1; // we don't care about invariant's own frame
740
+ throw error;
741
+ }
742
+ }
743
+
744
+ // Relying on the `invariant()` implementation lets us
745
+ // preserve the format and params in the www builds.
746
+
747
+ /**
748
+ * Forked from fbjs/warning:
749
+ * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
750
+ *
751
+ * Only change is we use console.warn instead of console.error,
752
+ * and do nothing when 'console' is not supported.
753
+ * This really simplifies the code.
754
+ * ---
755
+ * Similar to invariant but only logs a warning if the condition is not met.
756
+ * This can be used to log issues in development environments in critical
757
+ * paths. Removing the logging code for production environments will keep the
758
+ * same logic and follow the same code paths.
759
+ */
760
+
761
+ var lowPriorityWarning = function () {};
762
+
763
+ {
764
+ var printWarning = function (format) {
765
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
766
+ args[_key - 1] = arguments[_key];
767
+ }
768
+
769
+ var argIndex = 0;
770
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
771
+ return args[argIndex++];
772
+ });
773
+ if (typeof console !== 'undefined') {
774
+ console.warn(message);
775
+ }
776
+ try {
777
+ // --- Welcome to debugging React ---
778
+ // This error was thrown as a convenience so that you can use this stack
779
+ // to find the callsite that caused this warning to fire.
780
+ throw new Error(message);
781
+ } catch (x) {}
782
+ };
783
+
784
+ lowPriorityWarning = function (condition, format) {
785
+ if (format === undefined) {
786
+ throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
787
+ }
788
+ if (!condition) {
789
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
790
+ args[_key2 - 2] = arguments[_key2];
791
+ }
792
+
793
+ printWarning.apply(undefined, [format].concat(args));
794
+ }
795
+ };
796
+ }
797
+
798
+ var lowPriorityWarning$1 = lowPriorityWarning;
799
+
800
+ /**
801
+ * Similar to invariant but only logs a warning if the condition is not met.
802
+ * This can be used to log issues in development environments in critical
803
+ * paths. Removing the logging code for production environments will keep the
804
+ * same logic and follow the same code paths.
805
+ */
806
+
807
+ var warningWithoutStack = function () {};
808
+
809
+ {
810
+ warningWithoutStack = function (condition, format) {
811
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
812
+ args[_key - 2] = arguments[_key];
813
+ }
814
+
815
+ if (format === undefined) {
816
+ throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
817
+ }
818
+ if (args.length > 8) {
819
+ // Check before the condition to catch violations early.
820
+ throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
821
+ }
822
+ if (condition) {
823
+ return;
824
+ }
825
+ if (typeof console !== 'undefined') {
826
+ var _args$map = args.map(function (item) {
827
+ return '' + item;
828
+ }),
829
+ a = _args$map[0],
830
+ b = _args$map[1],
831
+ c = _args$map[2],
832
+ d = _args$map[3],
833
+ e = _args$map[4],
834
+ f = _args$map[5],
835
+ g = _args$map[6],
836
+ h = _args$map[7];
837
+
838
+ var message = 'Warning: ' + format;
839
+
840
+ // We intentionally don't use spread (or .apply) because it breaks IE9:
841
+ // https://github.com/facebook/react/issues/13610
842
+ switch (args.length) {
843
+ case 0:
844
+ console.error(message);
845
+ break;
846
+ case 1:
847
+ console.error(message, a);
848
+ break;
849
+ case 2:
850
+ console.error(message, a, b);
851
+ break;
852
+ case 3:
853
+ console.error(message, a, b, c);
854
+ break;
855
+ case 4:
856
+ console.error(message, a, b, c, d);
857
+ break;
858
+ case 5:
859
+ console.error(message, a, b, c, d, e);
860
+ break;
861
+ case 6:
862
+ console.error(message, a, b, c, d, e, f);
863
+ break;
864
+ case 7:
865
+ console.error(message, a, b, c, d, e, f, g);
866
+ break;
867
+ case 8:
868
+ console.error(message, a, b, c, d, e, f, g, h);
869
+ break;
870
+ default:
871
+ throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
872
+ }
873
+ }
874
+ try {
875
+ // --- Welcome to debugging React ---
876
+ // This error was thrown as a convenience so that you can use this stack
877
+ // to find the callsite that caused this warning to fire.
878
+ var argIndex = 0;
879
+ var _message = 'Warning: ' + format.replace(/%s/g, function () {
880
+ return args[argIndex++];
881
+ });
882
+ throw new Error(_message);
883
+ } catch (x) {}
884
+ };
885
+ }
886
+
887
+ var warningWithoutStack$1 = warningWithoutStack;
888
+
889
+ var didWarnStateUpdateForUnmountedComponent = {};
890
+
891
+ function warnNoop(publicInstance, callerName) {
892
+ {
893
+ var _constructor = publicInstance.constructor;
894
+ var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
895
+ var warningKey = componentName + '.' + callerName;
896
+ if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
897
+ return;
898
+ }
899
+ warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
900
+ didWarnStateUpdateForUnmountedComponent[warningKey] = true;
901
+ }
902
+ }
903
+
904
+ /**
905
+ * This is the abstract API for an update queue.
906
+ */
907
+ var ReactNoopUpdateQueue = {
908
+ /**
909
+ * Checks whether or not this composite component is mounted.
910
+ * @param {ReactClass} publicInstance The instance we want to test.
911
+ * @return {boolean} True if mounted, false otherwise.
912
+ * @protected
913
+ * @final
914
+ */
915
+ isMounted: function (publicInstance) {
916
+ return false;
917
+ },
918
+
919
+ /**
920
+ * Forces an update. This should only be invoked when it is known with
921
+ * certainty that we are **not** in a DOM transaction.
922
+ *
923
+ * You may want to call this when you know that some deeper aspect of the
924
+ * component's state has changed but `setState` was not called.
925
+ *
926
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
927
+ * `componentWillUpdate` and `componentDidUpdate`.
928
+ *
929
+ * @param {ReactClass} publicInstance The instance that should rerender.
930
+ * @param {?function} callback Called after component is updated.
931
+ * @param {?string} callerName name of the calling function in the public API.
932
+ * @internal
933
+ */
934
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
935
+ warnNoop(publicInstance, 'forceUpdate');
936
+ },
937
+
938
+ /**
939
+ * Replaces all of the state. Always use this or `setState` to mutate state.
940
+ * You should treat `this.state` as immutable.
941
+ *
942
+ * There is no guarantee that `this.state` will be immediately updated, so
943
+ * accessing `this.state` after calling this method may return the old value.
944
+ *
945
+ * @param {ReactClass} publicInstance The instance that should rerender.
946
+ * @param {object} completeState Next state.
947
+ * @param {?function} callback Called after component is updated.
948
+ * @param {?string} callerName name of the calling function in the public API.
949
+ * @internal
950
+ */
951
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
952
+ warnNoop(publicInstance, 'replaceState');
953
+ },
954
+
955
+ /**
956
+ * Sets a subset of the state. This only exists because _pendingState is
957
+ * internal. This provides a merging strategy that is not available to deep
958
+ * properties which is confusing. TODO: Expose pendingState or don't use it
959
+ * during the merge.
960
+ *
961
+ * @param {ReactClass} publicInstance The instance that should rerender.
962
+ * @param {object} partialState Next partial state to be merged with state.
963
+ * @param {?function} callback Called after component is updated.
964
+ * @param {?string} Name of the calling function in the public API.
965
+ * @internal
966
+ */
967
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
968
+ warnNoop(publicInstance, 'setState');
969
+ }
970
+ };
971
+
972
+ var emptyObject = {};
973
+ {
974
+ Object.freeze(emptyObject);
975
+ }
976
+
977
+ /**
978
+ * Base class helpers for the updating state of a component.
979
+ */
980
+ function Component(props, context, updater) {
981
+ this.props = props;
982
+ this.context = context;
983
+ // If a component has string refs, we will assign a different object later.
984
+ this.refs = emptyObject;
985
+ // We initialize the default updater but the real one gets injected by the
986
+ // renderer.
987
+ this.updater = updater || ReactNoopUpdateQueue;
988
+ }
989
+
990
+ Component.prototype.isReactComponent = {};
991
+
992
+ /**
993
+ * Sets a subset of the state. Always use this to mutate
994
+ * state. You should treat `this.state` as immutable.
995
+ *
996
+ * There is no guarantee that `this.state` will be immediately updated, so
997
+ * accessing `this.state` after calling this method may return the old value.
998
+ *
999
+ * There is no guarantee that calls to `setState` will run synchronously,
1000
+ * as they may eventually be batched together. You can provide an optional
1001
+ * callback that will be executed when the call to setState is actually
1002
+ * completed.
1003
+ *
1004
+ * When a function is provided to setState, it will be called at some point in
1005
+ * the future (not synchronously). It will be called with the up to date
1006
+ * component arguments (state, props, context). These values can be different
1007
+ * from this.* because your function may be called after receiveProps but before
1008
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
1009
+ * assigned to this.
1010
+ *
1011
+ * @param {object|function} partialState Next partial state or function to
1012
+ * produce next partial state to be merged with current state.
1013
+ * @param {?function} callback Called after state is updated.
1014
+ * @final
1015
+ * @protected
1016
+ */
1017
+ Component.prototype.setState = function (partialState, callback) {
1018
+ !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
1019
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
1020
+ };
1021
+
1022
+ /**
1023
+ * Forces an update. This should only be invoked when it is known with
1024
+ * certainty that we are **not** in a DOM transaction.
1025
+ *
1026
+ * You may want to call this when you know that some deeper aspect of the
1027
+ * component's state has changed but `setState` was not called.
1028
+ *
1029
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
1030
+ * `componentWillUpdate` and `componentDidUpdate`.
1031
+ *
1032
+ * @param {?function} callback Called after update is complete.
1033
+ * @final
1034
+ * @protected
1035
+ */
1036
+ Component.prototype.forceUpdate = function (callback) {
1037
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
1038
+ };
1039
+
1040
+ /**
1041
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
1042
+ * we would like to deprecate them, we're not going to move them over to this
1043
+ * modern base class. Instead, we define a getter that warns if it's accessed.
1044
+ */
1045
+ {
1046
+ var deprecatedAPIs = {
1047
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1048
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1049
+ };
1050
+ var defineDeprecationWarning = function (methodName, info) {
1051
+ Object.defineProperty(Component.prototype, methodName, {
1052
+ get: function () {
1053
+ lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
1054
+ return undefined;
1055
+ }
1056
+ });
1057
+ };
1058
+ for (var fnName in deprecatedAPIs) {
1059
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
1060
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1061
+ }
1062
+ }
1063
+ }
1064
+
1065
+ function ComponentDummy() {}
1066
+ ComponentDummy.prototype = Component.prototype;
1067
+
1068
+ /**
1069
+ * Convenience component with default shallow equality check for sCU.
1070
+ */
1071
+ function PureComponent(props, context, updater) {
1072
+ this.props = props;
1073
+ this.context = context;
1074
+ // If a component has string refs, we will assign a different object later.
1075
+ this.refs = emptyObject;
1076
+ this.updater = updater || ReactNoopUpdateQueue;
1077
+ }
1078
+
1079
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
1080
+ pureComponentPrototype.constructor = PureComponent;
1081
+ // Avoid an extra prototype jump for these methods.
1082
+ _assign(pureComponentPrototype, Component.prototype);
1083
+ pureComponentPrototype.isPureReactComponent = true;
1084
+
1085
+ // an immutable object with a single mutable value
1086
+ function createRef() {
1087
+ var refObject = {
1088
+ current: null
1089
+ };
1090
+ {
1091
+ Object.seal(refObject);
1092
+ }
1093
+ return refObject;
1094
+ }
1095
+
1096
+ /**
1097
+ * Keeps track of the current owner.
1098
+ *
1099
+ * The current owner is the component who should own any components that are
1100
+ * currently being constructed.
1101
+ */
1102
+ var ReactCurrentOwner = {
1103
+ /**
1104
+ * @internal
1105
+ * @type {ReactComponent}
1106
+ */
1107
+ current: null,
1108
+ currentDispatcher: null
1109
+ };
1110
+
1111
+ var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
1112
+
1113
+ var describeComponentFrame = function (name, source, ownerName) {
1114
+ var sourceInfo = '';
1115
+ if (source) {
1116
+ var path = source.fileName;
1117
+ var fileName = path.replace(BEFORE_SLASH_RE, '');
1118
+ {
1119
+ // In DEV, include code for a common special case:
1120
+ // prefer "folder/index.js" instead of just "index.js".
1121
+ if (/^index\./.test(fileName)) {
1122
+ var match = path.match(BEFORE_SLASH_RE);
1123
+ if (match) {
1124
+ var pathBeforeSlash = match[1];
1125
+ if (pathBeforeSlash) {
1126
+ var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
1127
+ fileName = folderName + '/' + fileName;
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
1133
+ } else if (ownerName) {
1134
+ sourceInfo = ' (created by ' + ownerName + ')';
1135
+ }
1136
+ return '\n in ' + (name || 'Unknown') + sourceInfo;
1137
+ };
1138
+
1139
+ var Resolved = 1;
1140
+
1141
+
1142
+
1143
+
1144
+ function refineResolvedThenable(thenable) {
1145
+ return thenable._reactStatus === Resolved ? thenable._reactResult : null;
1146
+ }
1147
+
1148
+ function getComponentName(type) {
1149
+ if (type == null) {
1150
+ // Host root, text node or just invalid type.
1151
+ return null;
1152
+ }
1153
+ {
1154
+ if (typeof type.tag === 'number') {
1155
+ warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
1156
+ }
1157
+ }
1158
+ if (typeof type === 'function') {
1159
+ return type.displayName || type.name || null;
1160
+ }
1161
+ if (typeof type === 'string') {
1162
+ return type;
1163
+ }
1164
+ switch (type) {
1165
+ case REACT_ASYNC_MODE_TYPE:
1166
+ return 'AsyncMode';
1167
+ case REACT_FRAGMENT_TYPE:
1168
+ return 'Fragment';
1169
+ case REACT_PORTAL_TYPE:
1170
+ return 'Portal';
1171
+ case REACT_PROFILER_TYPE:
1172
+ return 'Profiler';
1173
+ case REACT_STRICT_MODE_TYPE:
1174
+ return 'StrictMode';
1175
+ case REACT_PLACEHOLDER_TYPE:
1176
+ return 'Placeholder';
1177
+ }
1178
+ if (typeof type === 'object') {
1179
+ switch (type.$$typeof) {
1180
+ case REACT_CONTEXT_TYPE:
1181
+ return 'Context.Consumer';
1182
+ case REACT_PROVIDER_TYPE:
1183
+ return 'Context.Provider';
1184
+ case REACT_FORWARD_REF_TYPE:
1185
+ var renderFn = type.render;
1186
+ var functionName = renderFn.displayName || renderFn.name || '';
1187
+ return type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
1188
+ }
1189
+ if (typeof type.then === 'function') {
1190
+ var thenable = type;
1191
+ var resolvedThenable = refineResolvedThenable(thenable);
1192
+ if (resolvedThenable) {
1193
+ return getComponentName(resolvedThenable);
1194
+ }
1195
+ }
1196
+ }
1197
+ return null;
1198
+ }
1199
+
1200
+ var ReactDebugCurrentFrame = {};
1201
+
1202
+ var currentlyValidatingElement = null;
1203
+
1204
+ function setCurrentlyValidatingElement(element) {
1205
+ {
1206
+ currentlyValidatingElement = element;
1207
+ }
1208
+ }
1209
+
1210
+ {
1211
+ // Stack implementation injected by the current renderer.
1212
+ ReactDebugCurrentFrame.getCurrentStack = null;
1213
+
1214
+ ReactDebugCurrentFrame.getStackAddendum = function () {
1215
+ var stack = '';
1216
+
1217
+ // Add an extra top frame while an element is being validated
1218
+ if (currentlyValidatingElement) {
1219
+ var name = getComponentName(currentlyValidatingElement.type);
1220
+ var owner = currentlyValidatingElement._owner;
1221
+ stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
1222
+ }
1223
+
1224
+ // Delegate to the injected renderer-specific implementation
1225
+ var impl = ReactDebugCurrentFrame.getCurrentStack;
1226
+ if (impl) {
1227
+ stack += impl() || '';
1228
+ }
1229
+
1230
+ return stack;
1231
+ };
1232
+ }
1233
+
1234
+ var ReactSharedInternals = {
1235
+ ReactCurrentOwner: ReactCurrentOwner,
1236
+ // Used by renderers to avoid bundling object-assign twice in UMD bundles:
1237
+ assign: _assign
1238
+ };
1239
+
1240
+ {
1241
+ _assign(ReactSharedInternals, {
1242
+ // These should not be included in production.
1243
+ ReactDebugCurrentFrame: ReactDebugCurrentFrame,
1244
+ // Shim for React DOM 16.0.0 which still destructured (but not used) this.
1245
+ // TODO: remove in React 17.0.
1246
+ ReactComponentTreeHook: {}
1247
+ });
1248
+ }
1249
+
1250
+ /**
1251
+ * Similar to invariant but only logs a warning if the condition is not met.
1252
+ * This can be used to log issues in development environments in critical
1253
+ * paths. Removing the logging code for production environments will keep the
1254
+ * same logic and follow the same code paths.
1255
+ */
1256
+
1257
+ var warning = warningWithoutStack$1;
1258
+
1259
+ {
1260
+ warning = function (condition, format) {
1261
+ if (condition) {
1262
+ return;
1263
+ }
1264
+ var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
1265
+ var stack = ReactDebugCurrentFrame.getStackAddendum();
1266
+ // eslint-disable-next-line react-internal/warning-and-invariant-args
1267
+
1268
+ for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1269
+ args[_key - 2] = arguments[_key];
1270
+ }
1271
+
1272
+ warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
1273
+ };
1274
+ }
1275
+
1276
+ var warning$1 = warning;
1277
+
1278
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1279
+
1280
+ var RESERVED_PROPS = {
1281
+ key: true,
1282
+ ref: true,
1283
+ __self: true,
1284
+ __source: true
1285
+ };
1286
+
1287
+ var specialPropKeyWarningShown = void 0;
1288
+ var specialPropRefWarningShown = void 0;
1289
+
1290
+ function hasValidRef(config) {
1291
+ {
1292
+ if (hasOwnProperty.call(config, 'ref')) {
1293
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
1294
+ if (getter && getter.isReactWarning) {
1295
+ return false;
1296
+ }
1297
+ }
1298
+ }
1299
+ return config.ref !== undefined;
1300
+ }
1301
+
1302
+ function hasValidKey(config) {
1303
+ {
1304
+ if (hasOwnProperty.call(config, 'key')) {
1305
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
1306
+ if (getter && getter.isReactWarning) {
1307
+ return false;
1308
+ }
1309
+ }
1310
+ }
1311
+ return config.key !== undefined;
1312
+ }
1313
+
1314
+ function defineKeyPropWarningGetter(props, displayName) {
1315
+ var warnAboutAccessingKey = function () {
1316
+ if (!specialPropKeyWarningShown) {
1317
+ specialPropKeyWarningShown = true;
1318
+ warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
1319
+ }
1320
+ };
1321
+ warnAboutAccessingKey.isReactWarning = true;
1322
+ Object.defineProperty(props, 'key', {
1323
+ get: warnAboutAccessingKey,
1324
+ configurable: true
1325
+ });
1326
+ }
1327
+
1328
+ function defineRefPropWarningGetter(props, displayName) {
1329
+ var warnAboutAccessingRef = function () {
1330
+ if (!specialPropRefWarningShown) {
1331
+ specialPropRefWarningShown = true;
1332
+ warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
1333
+ }
1334
+ };
1335
+ warnAboutAccessingRef.isReactWarning = true;
1336
+ Object.defineProperty(props, 'ref', {
1337
+ get: warnAboutAccessingRef,
1338
+ configurable: true
1339
+ });
1340
+ }
1341
+
1342
+ /**
1343
+ * Factory method to create a new React element. This no longer adheres to
1344
+ * the class pattern, so do not use new to call it. Also, no instanceof check
1345
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
1346
+ * if something is a React Element.
1347
+ *
1348
+ * @param {*} type
1349
+ * @param {*} key
1350
+ * @param {string|object} ref
1351
+ * @param {*} self A *temporary* helper to detect places where `this` is
1352
+ * different from the `owner` when React.createElement is called, so that we
1353
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
1354
+ * functions, and as long as `this` and owner are the same, there will be no
1355
+ * change in behavior.
1356
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
1357
+ * indicating filename, line number, and/or other information.
1358
+ * @param {*} owner
1359
+ * @param {*} props
1360
+ * @internal
1361
+ */
1362
+ var ReactElement = function (type, key, ref, self, source, owner, props) {
1363
+ var element = {
1364
+ // This tag allows us to uniquely identify this as a React Element
1365
+ $$typeof: REACT_ELEMENT_TYPE,
1366
+
1367
+ // Built-in properties that belong on the element
1368
+ type: type,
1369
+ key: key,
1370
+ ref: ref,
1371
+ props: props,
1372
+
1373
+ // Record the component responsible for creating this element.
1374
+ _owner: owner
1375
+ };
1376
+
1377
+ {
1378
+ // The validation flag is currently mutative. We put it on
1379
+ // an external backing store so that we can freeze the whole object.
1380
+ // This can be replaced with a WeakMap once they are implemented in
1381
+ // commonly used development environments.
1382
+ element._store = {};
1383
+
1384
+ // To make comparing ReactElements easier for testing purposes, we make
1385
+ // the validation flag non-enumerable (where possible, which should
1386
+ // include every environment we run tests in), so the test framework
1387
+ // ignores it.
1388
+ Object.defineProperty(element._store, 'validated', {
1389
+ configurable: false,
1390
+ enumerable: false,
1391
+ writable: true,
1392
+ value: false
1393
+ });
1394
+ // self and source are DEV only properties.
1395
+ Object.defineProperty(element, '_self', {
1396
+ configurable: false,
1397
+ enumerable: false,
1398
+ writable: false,
1399
+ value: self
1400
+ });
1401
+ // Two elements created in two different places should be considered
1402
+ // equal for testing purposes and therefore we hide it from enumeration.
1403
+ Object.defineProperty(element, '_source', {
1404
+ configurable: false,
1405
+ enumerable: false,
1406
+ writable: false,
1407
+ value: source
1408
+ });
1409
+ if (Object.freeze) {
1410
+ Object.freeze(element.props);
1411
+ Object.freeze(element);
1412
+ }
1413
+ }
1414
+
1415
+ return element;
1416
+ };
1417
+
1418
+ /**
1419
+ * Create and return a new ReactElement of the given type.
1420
+ * See https://reactjs.org/docs/react-api.html#createelement
1421
+ */
1422
+ function createElement(type, config, children) {
1423
+ var propName = void 0;
1424
+
1425
+ // Reserved names are extracted
1426
+ var props = {};
1427
+
1428
+ var key = null;
1429
+ var ref = null;
1430
+ var self = null;
1431
+ var source = null;
1432
+
1433
+ if (config != null) {
1434
+ if (hasValidRef(config)) {
1435
+ ref = config.ref;
1436
+ }
1437
+ if (hasValidKey(config)) {
1438
+ key = '' + config.key;
1439
+ }
1440
+
1441
+ self = config.__self === undefined ? null : config.__self;
1442
+ source = config.__source === undefined ? null : config.__source;
1443
+ // Remaining properties are added to a new props object
1444
+ for (propName in config) {
1445
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1446
+ props[propName] = config[propName];
1447
+ }
1448
+ }
1449
+ }
1450
+
1451
+ // Children can be more than one argument, and those are transferred onto
1452
+ // the newly allocated props object.
1453
+ var childrenLength = arguments.length - 2;
1454
+ if (childrenLength === 1) {
1455
+ props.children = children;
1456
+ } else if (childrenLength > 1) {
1457
+ var childArray = Array(childrenLength);
1458
+ for (var i = 0; i < childrenLength; i++) {
1459
+ childArray[i] = arguments[i + 2];
1460
+ }
1461
+ {
1462
+ if (Object.freeze) {
1463
+ Object.freeze(childArray);
1464
+ }
1465
+ }
1466
+ props.children = childArray;
1467
+ }
1468
+
1469
+ // Resolve default props
1470
+ if (type && type.defaultProps) {
1471
+ var defaultProps = type.defaultProps;
1472
+ for (propName in defaultProps) {
1473
+ if (props[propName] === undefined) {
1474
+ props[propName] = defaultProps[propName];
1475
+ }
1476
+ }
1477
+ }
1478
+ {
1479
+ if (key || ref) {
1480
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1481
+ if (key) {
1482
+ defineKeyPropWarningGetter(props, displayName);
1483
+ }
1484
+ if (ref) {
1485
+ defineRefPropWarningGetter(props, displayName);
1486
+ }
1487
+ }
1488
+ }
1489
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1490
+ }
1491
+
1492
+ /**
1493
+ * Return a function that produces ReactElements of a given type.
1494
+ * See https://reactjs.org/docs/react-api.html#createfactory
1495
+ */
1496
+
1497
+
1498
+ function cloneAndReplaceKey(oldElement, newKey) {
1499
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1500
+
1501
+ return newElement;
1502
+ }
1503
+
1504
+ /**
1505
+ * Clone and return a new ReactElement using element as the starting point.
1506
+ * See https://reactjs.org/docs/react-api.html#cloneelement
1507
+ */
1508
+ function cloneElement(element, config, children) {
1509
+ !!(element === null || element === undefined) ? invariant(false, 'React.cloneElement(...): The argument must be a React element, but you passed %s.', element) : void 0;
1510
+
1511
+ var propName = void 0;
1512
+
1513
+ // Original props are copied
1514
+ var props = _assign({}, element.props);
1515
+
1516
+ // Reserved names are extracted
1517
+ var key = element.key;
1518
+ var ref = element.ref;
1519
+ // Self is preserved since the owner is preserved.
1520
+ var self = element._self;
1521
+ // Source is preserved since cloneElement is unlikely to be targeted by a
1522
+ // transpiler, and the original source is probably a better indicator of the
1523
+ // true owner.
1524
+ var source = element._source;
1525
+
1526
+ // Owner will be preserved, unless ref is overridden
1527
+ var owner = element._owner;
1528
+
1529
+ if (config != null) {
1530
+ if (hasValidRef(config)) {
1531
+ // Silently steal the ref from the parent.
1532
+ ref = config.ref;
1533
+ owner = ReactCurrentOwner.current;
1534
+ }
1535
+ if (hasValidKey(config)) {
1536
+ key = '' + config.key;
1537
+ }
1538
+
1539
+ // Remaining properties override existing props
1540
+ var defaultProps = void 0;
1541
+ if (element.type && element.type.defaultProps) {
1542
+ defaultProps = element.type.defaultProps;
1543
+ }
1544
+ for (propName in config) {
1545
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1546
+ if (config[propName] === undefined && defaultProps !== undefined) {
1547
+ // Resolve default props
1548
+ props[propName] = defaultProps[propName];
1549
+ } else {
1550
+ props[propName] = config[propName];
1551
+ }
1552
+ }
1553
+ }
1554
+ }
1555
+
1556
+ // Children can be more than one argument, and those are transferred onto
1557
+ // the newly allocated props object.
1558
+ var childrenLength = arguments.length - 2;
1559
+ if (childrenLength === 1) {
1560
+ props.children = children;
1561
+ } else if (childrenLength > 1) {
1562
+ var childArray = Array(childrenLength);
1563
+ for (var i = 0; i < childrenLength; i++) {
1564
+ childArray[i] = arguments[i + 2];
1565
+ }
1566
+ props.children = childArray;
1567
+ }
1568
+
1569
+ return ReactElement(element.type, key, ref, self, source, owner, props);
1570
+ }
1571
+
1572
+ /**
1573
+ * Verifies the object is a ReactElement.
1574
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1575
+ * @param {?object} object
1576
+ * @return {boolean} True if `object` is a ReactElement.
1577
+ * @final
1578
+ */
1579
+ function isValidElement(object) {
1580
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1581
+ }
1582
+
1583
+ var SEPARATOR = '.';
1584
+ var SUBSEPARATOR = ':';
1585
+
1586
+ /**
1587
+ * Escape and wrap key so it is safe to use as a reactid
1588
+ *
1589
+ * @param {string} key to be escaped.
1590
+ * @return {string} the escaped key.
1591
+ */
1592
+ function escape(key) {
1593
+ var escapeRegex = /[=:]/g;
1594
+ var escaperLookup = {
1595
+ '=': '=0',
1596
+ ':': '=2'
1597
+ };
1598
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
1599
+ return escaperLookup[match];
1600
+ });
1601
+
1602
+ return '$' + escapedString;
1603
+ }
1604
+
1605
+ /**
1606
+ * TODO: Test that a single child and an array with one item have the same key
1607
+ * pattern.
1608
+ */
1609
+
1610
+ var didWarnAboutMaps = false;
1611
+
1612
+ var userProvidedKeyEscapeRegex = /\/+/g;
1613
+ function escapeUserProvidedKey(text) {
1614
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
1615
+ }
1616
+
1617
+ var POOL_SIZE = 10;
1618
+ var traverseContextPool = [];
1619
+ function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
1620
+ if (traverseContextPool.length) {
1621
+ var traverseContext = traverseContextPool.pop();
1622
+ traverseContext.result = mapResult;
1623
+ traverseContext.keyPrefix = keyPrefix;
1624
+ traverseContext.func = mapFunction;
1625
+ traverseContext.context = mapContext;
1626
+ traverseContext.count = 0;
1627
+ return traverseContext;
1628
+ } else {
1629
+ return {
1630
+ result: mapResult,
1631
+ keyPrefix: keyPrefix,
1632
+ func: mapFunction,
1633
+ context: mapContext,
1634
+ count: 0
1635
+ };
1636
+ }
1637
+ }
1638
+
1639
+ function releaseTraverseContext(traverseContext) {
1640
+ traverseContext.result = null;
1641
+ traverseContext.keyPrefix = null;
1642
+ traverseContext.func = null;
1643
+ traverseContext.context = null;
1644
+ traverseContext.count = 0;
1645
+ if (traverseContextPool.length < POOL_SIZE) {
1646
+ traverseContextPool.push(traverseContext);
1647
+ }
1648
+ }
1649
+
1650
+ /**
1651
+ * @param {?*} children Children tree container.
1652
+ * @param {!string} nameSoFar Name of the key path so far.
1653
+ * @param {!function} callback Callback to invoke with each child found.
1654
+ * @param {?*} traverseContext Used to pass information throughout the traversal
1655
+ * process.
1656
+ * @return {!number} The number of children in this subtree.
1657
+ */
1658
+ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
1659
+ var type = typeof children;
1660
+
1661
+ if (type === 'undefined' || type === 'boolean') {
1662
+ // All of the above are perceived as null.
1663
+ children = null;
1664
+ }
1665
+
1666
+ var invokeCallback = false;
1667
+
1668
+ if (children === null) {
1669
+ invokeCallback = true;
1670
+ } else {
1671
+ switch (type) {
1672
+ case 'string':
1673
+ case 'number':
1674
+ invokeCallback = true;
1675
+ break;
1676
+ case 'object':
1677
+ switch (children.$$typeof) {
1678
+ case REACT_ELEMENT_TYPE:
1679
+ case REACT_PORTAL_TYPE:
1680
+ invokeCallback = true;
1681
+ }
1682
+ }
1683
+ }
1684
+
1685
+ if (invokeCallback) {
1686
+ callback(traverseContext, children,
1687
+ // If it's the only child, treat the name as if it was wrapped in an array
1688
+ // so that it's consistent if the number of children grows.
1689
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
1690
+ return 1;
1691
+ }
1692
+
1693
+ var child = void 0;
1694
+ var nextName = void 0;
1695
+ var subtreeCount = 0; // Count of children found in the current subtree.
1696
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1697
+
1698
+ if (Array.isArray(children)) {
1699
+ for (var i = 0; i < children.length; i++) {
1700
+ child = children[i];
1701
+ nextName = nextNamePrefix + getComponentKey(child, i);
1702
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1703
+ }
1704
+ } else {
1705
+ var iteratorFn = getIteratorFn(children);
1706
+ if (typeof iteratorFn === 'function') {
1707
+ {
1708
+ // Warn about using Maps as children
1709
+ if (iteratorFn === children.entries) {
1710
+ !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
1711
+ didWarnAboutMaps = true;
1712
+ }
1713
+ }
1714
+
1715
+ var iterator = iteratorFn.call(children);
1716
+ var step = void 0;
1717
+ var ii = 0;
1718
+ while (!(step = iterator.next()).done) {
1719
+ child = step.value;
1720
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
1721
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1722
+ }
1723
+ } else if (type === 'object') {
1724
+ var addendum = '';
1725
+ {
1726
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
1727
+ }
1728
+ var childrenString = '' + children;
1729
+ invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
1730
+ }
1731
+ }
1732
+
1733
+ return subtreeCount;
1734
+ }
1735
+
1736
+ /**
1737
+ * Traverses children that are typically specified as `props.children`, but
1738
+ * might also be specified through attributes:
1739
+ *
1740
+ * - `traverseAllChildren(this.props.children, ...)`
1741
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1742
+ *
1743
+ * The `traverseContext` is an optional argument that is passed through the
1744
+ * entire traversal. It can be used to store accumulations or anything else that
1745
+ * the callback might find relevant.
1746
+ *
1747
+ * @param {?*} children Children tree object.
1748
+ * @param {!function} callback To invoke upon traversing each child.
1749
+ * @param {?*} traverseContext Context for traversal.
1750
+ * @return {!number} The number of children in this subtree.
1751
+ */
1752
+ function traverseAllChildren(children, callback, traverseContext) {
1753
+ if (children == null) {
1754
+ return 0;
1755
+ }
1756
+
1757
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
1758
+ }
1759
+
1760
+ /**
1761
+ * Generate a key string that identifies a component within a set.
1762
+ *
1763
+ * @param {*} component A component that could contain a manual key.
1764
+ * @param {number} index Index that is used if a manual key is not provided.
1765
+ * @return {string}
1766
+ */
1767
+ function getComponentKey(component, index) {
1768
+ // Do some typechecking here since we call this blindly. We want to ensure
1769
+ // that we don't block potential future ES APIs.
1770
+ if (typeof component === 'object' && component !== null && component.key != null) {
1771
+ // Explicit key
1772
+ return escape(component.key);
1773
+ }
1774
+ // Implicit key determined by the index in the set
1775
+ return index.toString(36);
1776
+ }
1777
+
1778
+ function forEachSingleChild(bookKeeping, child, name) {
1779
+ var func = bookKeeping.func,
1780
+ context = bookKeeping.context;
1781
+
1782
+ func.call(context, child, bookKeeping.count++);
1783
+ }
1784
+
1785
+ /**
1786
+ * Iterates through children that are typically specified as `props.children`.
1787
+ *
1788
+ * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
1789
+ *
1790
+ * The provided forEachFunc(child, index) will be called for each
1791
+ * leaf child.
1792
+ *
1793
+ * @param {?*} children Children tree container.
1794
+ * @param {function(*, int)} forEachFunc
1795
+ * @param {*} forEachContext Context for forEachContext.
1796
+ */
1797
+ function forEachChildren(children, forEachFunc, forEachContext) {
1798
+ if (children == null) {
1799
+ return children;
1800
+ }
1801
+ var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
1802
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
1803
+ releaseTraverseContext(traverseContext);
1804
+ }
1805
+
1806
+ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
1807
+ var result = bookKeeping.result,
1808
+ keyPrefix = bookKeeping.keyPrefix,
1809
+ func = bookKeeping.func,
1810
+ context = bookKeeping.context;
1811
+
1812
+
1813
+ var mappedChild = func.call(context, child, bookKeeping.count++);
1814
+ if (Array.isArray(mappedChild)) {
1815
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
1816
+ return c;
1817
+ });
1818
+ } else if (mappedChild != null) {
1819
+ if (isValidElement(mappedChild)) {
1820
+ mappedChild = cloneAndReplaceKey(mappedChild,
1821
+ // Keep both the (mapped) and old keys if they differ, just as
1822
+ // traverseAllChildren used to do for objects as children
1823
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
1824
+ }
1825
+ result.push(mappedChild);
1826
+ }
1827
+ }
1828
+
1829
+ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
1830
+ var escapedPrefix = '';
1831
+ if (prefix != null) {
1832
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
1833
+ }
1834
+ var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
1835
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
1836
+ releaseTraverseContext(traverseContext);
1837
+ }
1838
+
1839
+ /**
1840
+ * Maps children that are typically specified as `props.children`.
1841
+ *
1842
+ * See https://reactjs.org/docs/react-api.html#reactchildrenmap
1843
+ *
1844
+ * The provided mapFunction(child, key, index) will be called for each
1845
+ * leaf child.
1846
+ *
1847
+ * @param {?*} children Children tree container.
1848
+ * @param {function(*, int)} func The map function.
1849
+ * @param {*} context Context for mapFunction.
1850
+ * @return {object} Object containing the ordered map of results.
1851
+ */
1852
+ function mapChildren(children, func, context) {
1853
+ if (children == null) {
1854
+ return children;
1855
+ }
1856
+ var result = [];
1857
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
1858
+ return result;
1859
+ }
1860
+
1861
+ /**
1862
+ * Count the number of children that are typically specified as
1863
+ * `props.children`.
1864
+ *
1865
+ * See https://reactjs.org/docs/react-api.html#reactchildrencount
1866
+ *
1867
+ * @param {?*} children Children tree container.
1868
+ * @return {number} The number of children.
1869
+ */
1870
+ function countChildren(children) {
1871
+ return traverseAllChildren(children, function () {
1872
+ return null;
1873
+ }, null);
1874
+ }
1875
+
1876
+ /**
1877
+ * Flatten a children object (typically specified as `props.children`) and
1878
+ * return an array with appropriately re-keyed children.
1879
+ *
1880
+ * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
1881
+ */
1882
+ function toArray(children) {
1883
+ var result = [];
1884
+ mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
1885
+ return child;
1886
+ });
1887
+ return result;
1888
+ }
1889
+
1890
+ /**
1891
+ * Returns the first child in a collection of children and verifies that there
1892
+ * is only one child in the collection.
1893
+ *
1894
+ * See https://reactjs.org/docs/react-api.html#reactchildrenonly
1895
+ *
1896
+ * The current implementation of this function assumes that a single child gets
1897
+ * passed without a wrapper, but the purpose of this helper function is to
1898
+ * abstract away the particular structure of children.
1899
+ *
1900
+ * @param {?object} children Child collection structure.
1901
+ * @return {ReactElement} The first and only `ReactElement` contained in the
1902
+ * structure.
1903
+ */
1904
+ function onlyChild(children) {
1905
+ !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
1906
+ return children;
1907
+ }
1908
+
1909
+ function readContext(context, observedBits) {
1910
+ var dispatcher = ReactCurrentOwner.currentDispatcher;
1911
+ !(dispatcher !== null) ? invariant(false, 'Context.unstable_read(): Context can only be read while React is rendering, e.g. inside the render method or getDerivedStateFromProps.') : void 0;
1912
+ return dispatcher.readContext(context, observedBits);
1913
+ }
1914
+
1915
+ function createContext(defaultValue, calculateChangedBits) {
1916
+ if (calculateChangedBits === undefined) {
1917
+ calculateChangedBits = null;
1918
+ } else {
1919
+ {
1920
+ !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
1921
+ }
1922
+ }
1923
+
1924
+ var context = {
1925
+ $$typeof: REACT_CONTEXT_TYPE,
1926
+ _calculateChangedBits: calculateChangedBits,
1927
+ // As a workaround to support multiple concurrent renderers, we categorize
1928
+ // some renderers as primary and others as secondary. We only expect
1929
+ // there to be two concurrent renderers at most: React Native (primary) and
1930
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
1931
+ // Secondary renderers store their context values on separate fields.
1932
+ _currentValue: defaultValue,
1933
+ _currentValue2: defaultValue,
1934
+ // These are circular
1935
+ Provider: null,
1936
+ Consumer: null,
1937
+ unstable_read: null
1938
+ };
1939
+
1940
+ context.Provider = {
1941
+ $$typeof: REACT_PROVIDER_TYPE,
1942
+ _context: context
1943
+ };
1944
+ context.Consumer = context;
1945
+ context.unstable_read = readContext.bind(null, context);
1946
+
1947
+ {
1948
+ context._currentRenderer = null;
1949
+ context._currentRenderer2 = null;
1950
+ }
1951
+
1952
+ return context;
1953
+ }
1954
+
1955
+ function lazy(ctor) {
1956
+ var thenable = null;
1957
+ return {
1958
+ then: function (resolve, reject) {
1959
+ if (thenable === null) {
1960
+ // Lazily create thenable by wrapping in an extra thenable.
1961
+ thenable = ctor();
1962
+ ctor = null;
1963
+ }
1964
+ return thenable.then(resolve, reject);
1965
+ },
1966
+
1967
+ // React uses these fields to store the result.
1968
+ _reactStatus: -1,
1969
+ _reactResult: null
1970
+ };
1971
+ }
1972
+
1973
+ function forwardRef(render) {
1974
+ {
1975
+ if (typeof render !== 'function') {
1976
+ warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
1977
+ } else {
1978
+ !(
1979
+ // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
1980
+ render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
1981
+ }
1982
+
1983
+ if (render != null) {
1984
+ !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
1985
+ }
1986
+ }
1987
+
1988
+ return {
1989
+ $$typeof: REACT_FORWARD_REF_TYPE,
1990
+ render: render
1991
+ };
1992
+ }
1993
+
1994
+ function isValidElementType(type) {
1995
+ return typeof type === 'string' || typeof type === 'function' ||
1996
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1997
+ type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_PLACEHOLDER_TYPE || typeof type === 'object' && type !== null && (typeof type.then === 'function' || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
1998
+ }
1999
+
2000
+ /**
2001
+ * ReactElementValidator provides a wrapper around a element factory
2002
+ * which validates the props passed to the element. This is intended to be
2003
+ * used only in DEV and could be replaced by a static type checker for languages
2004
+ * that support it.
2005
+ */
2006
+
2007
+ var propTypesMisspellWarningShown = void 0;
2008
+
2009
+ {
2010
+ propTypesMisspellWarningShown = false;
2011
+ }
2012
+
2013
+ function getDeclarationErrorAddendum() {
2014
+ if (ReactCurrentOwner.current) {
2015
+ var name = getComponentName(ReactCurrentOwner.current.type);
2016
+ if (name) {
2017
+ return '\n\nCheck the render method of `' + name + '`.';
2018
+ }
2019
+ }
2020
+ return '';
2021
+ }
2022
+
2023
+ function getSourceInfoErrorAddendum(elementProps) {
2024
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
2025
+ var source = elementProps.__source;
2026
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2027
+ var lineNumber = source.lineNumber;
2028
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2029
+ }
2030
+ return '';
2031
+ }
2032
+
2033
+ /**
2034
+ * Warn if there's no key explicitly set on dynamic arrays of children or
2035
+ * object keys are not valid. This allows us to keep track of children between
2036
+ * updates.
2037
+ */
2038
+ var ownerHasKeyUseWarning = {};
2039
+
2040
+ function getCurrentComponentErrorInfo(parentType) {
2041
+ var info = getDeclarationErrorAddendum();
2042
+
2043
+ if (!info) {
2044
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
2045
+ if (parentName) {
2046
+ info = '\n\nCheck the top-level render call using <' + parentName + '>.';
2047
+ }
2048
+ }
2049
+ return info;
2050
+ }
2051
+
2052
+ /**
2053
+ * Warn if the element doesn't have an explicit key assigned to it.
2054
+ * This element is in an array. The array could grow and shrink or be
2055
+ * reordered. All children that haven't already been validated are required to
2056
+ * have a "key" property assigned to it. Error statuses are cached so a warning
2057
+ * will only be shown once.
2058
+ *
2059
+ * @internal
2060
+ * @param {ReactElement} element Element that requires a key.
2061
+ * @param {*} parentType element's parent's type.
2062
+ */
2063
+ function validateExplicitKey(element, parentType) {
2064
+ if (!element._store || element._store.validated || element.key != null) {
2065
+ return;
2066
+ }
2067
+ element._store.validated = true;
2068
+
2069
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2070
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2071
+ return;
2072
+ }
2073
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2074
+
2075
+ // Usually the current owner is the offender, but if it accepts children as a
2076
+ // property, it may be the creator of the child that's responsible for
2077
+ // assigning it a key.
2078
+ var childOwner = '';
2079
+ if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
2080
+ // Give the component that originally created this child.
2081
+ childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
2082
+ }
2083
+
2084
+ setCurrentlyValidatingElement(element);
2085
+ {
2086
+ warning$1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
2087
+ }
2088
+ setCurrentlyValidatingElement(null);
2089
+ }
2090
+
2091
+ /**
2092
+ * Ensure that every element either is passed in a static location, in an
2093
+ * array with an explicit keys property defined, or in an object literal
2094
+ * with valid key property.
2095
+ *
2096
+ * @internal
2097
+ * @param {ReactNode} node Statically passed child of any type.
2098
+ * @param {*} parentType node's parent's type.
2099
+ */
2100
+ function validateChildKeys(node, parentType) {
2101
+ if (typeof node !== 'object') {
2102
+ return;
2103
+ }
2104
+ if (Array.isArray(node)) {
2105
+ for (var i = 0; i < node.length; i++) {
2106
+ var child = node[i];
2107
+ if (isValidElement(child)) {
2108
+ validateExplicitKey(child, parentType);
2109
+ }
2110
+ }
2111
+ } else if (isValidElement(node)) {
2112
+ // This element was passed in a valid location.
2113
+ if (node._store) {
2114
+ node._store.validated = true;
2115
+ }
2116
+ } else if (node) {
2117
+ var iteratorFn = getIteratorFn(node);
2118
+ if (typeof iteratorFn === 'function') {
2119
+ // Entry iterators used to provide implicit keys,
2120
+ // but now we print a separate warning for them later.
2121
+ if (iteratorFn !== node.entries) {
2122
+ var iterator = iteratorFn.call(node);
2123
+ var step = void 0;
2124
+ while (!(step = iterator.next()).done) {
2125
+ if (isValidElement(step.value)) {
2126
+ validateExplicitKey(step.value, parentType);
2127
+ }
2128
+ }
2129
+ }
2130
+ }
2131
+ }
2132
+ }
2133
+
2134
+ /**
2135
+ * Given an element, validate that its props follow the propTypes definition,
2136
+ * provided by the type.
2137
+ *
2138
+ * @param {ReactElement} element
2139
+ */
2140
+ function validatePropTypes(element) {
2141
+ var type = element.type;
2142
+ var name = void 0,
2143
+ propTypes = void 0;
2144
+ if (typeof type === 'function') {
2145
+ // Class or functional component
2146
+ name = type.displayName || type.name;
2147
+ propTypes = type.propTypes;
2148
+ } else if (typeof type === 'object' && type !== null && type.$$typeof === REACT_FORWARD_REF_TYPE) {
2149
+ // ForwardRef
2150
+ var functionName = type.render.displayName || type.render.name || '';
2151
+ name = type.displayName || (functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef');
2152
+ propTypes = type.propTypes;
2153
+ } else {
2154
+ return;
2155
+ }
2156
+ if (propTypes) {
2157
+ setCurrentlyValidatingElement(element);
2158
+ checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
2159
+ setCurrentlyValidatingElement(null);
2160
+ } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
2161
+ propTypesMisspellWarningShown = true;
2162
+ warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
2163
+ }
2164
+ if (typeof type.getDefaultProps === 'function') {
2165
+ !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
2166
+ }
2167
+ }
2168
+
2169
+ /**
2170
+ * Given a fragment, validate that it can only be provided with fragment props
2171
+ * @param {ReactElement} fragment
2172
+ */
2173
+ function validateFragmentProps(fragment) {
2174
+ setCurrentlyValidatingElement(fragment);
2175
+
2176
+ var keys = Object.keys(fragment.props);
2177
+ for (var i = 0; i < keys.length; i++) {
2178
+ var key = keys[i];
2179
+ if (key !== 'children' && key !== 'key') {
2180
+ warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
2181
+ break;
2182
+ }
2183
+ }
2184
+
2185
+ if (fragment.ref !== null) {
2186
+ warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
2187
+ }
2188
+
2189
+ setCurrentlyValidatingElement(null);
2190
+ }
2191
+
2192
+ function createElementWithValidation(type, props, children) {
2193
+ var validType = isValidElementType(type);
2194
+
2195
+ // We warn in this case but don't throw. We expect the element creation to
2196
+ // succeed and there will likely be errors in render.
2197
+ if (!validType) {
2198
+ var info = '';
2199
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
2200
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
2201
+ }
2202
+
2203
+ var sourceInfo = getSourceInfoErrorAddendum(props);
2204
+ if (sourceInfo) {
2205
+ info += sourceInfo;
2206
+ } else {
2207
+ info += getDeclarationErrorAddendum();
2208
+ }
2209
+
2210
+ var typeString = void 0;
2211
+ if (type === null) {
2212
+ typeString = 'null';
2213
+ } else if (Array.isArray(type)) {
2214
+ typeString = 'array';
2215
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
2216
+ typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
2217
+ info = ' Did you accidentally export a JSX literal instead of a component?';
2218
+ } else {
2219
+ typeString = typeof type;
2220
+ }
2221
+
2222
+ warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
2223
+ }
2224
+
2225
+ var element = createElement.apply(this, arguments);
2226
+
2227
+ // The result can be nullish if a mock or a custom function is used.
2228
+ // TODO: Drop this when these are no longer allowed as the type argument.
2229
+ if (element == null) {
2230
+ return element;
2231
+ }
2232
+
2233
+ // Skip key warning if the type isn't valid since our key validation logic
2234
+ // doesn't expect a non-string/function type and can throw confusing errors.
2235
+ // We don't want exception behavior to differ between dev and prod.
2236
+ // (Rendering will throw with a helpful message and as soon as the type is
2237
+ // fixed, the key warnings will appear.)
2238
+ if (validType) {
2239
+ for (var i = 2; i < arguments.length; i++) {
2240
+ validateChildKeys(arguments[i], type);
2241
+ }
2242
+ }
2243
+
2244
+ if (type === REACT_FRAGMENT_TYPE) {
2245
+ validateFragmentProps(element);
2246
+ } else {
2247
+ validatePropTypes(element);
2248
+ }
2249
+
2250
+ return element;
2251
+ }
2252
+
2253
+ function createFactoryWithValidation(type) {
2254
+ var validatedFactory = createElementWithValidation.bind(null, type);
2255
+ validatedFactory.type = type;
2256
+ // Legacy hook: remove it
2257
+ {
2258
+ Object.defineProperty(validatedFactory, 'type', {
2259
+ enumerable: false,
2260
+ get: function () {
2261
+ lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
2262
+ Object.defineProperty(this, 'type', {
2263
+ value: type
2264
+ });
2265
+ return type;
2266
+ }
2267
+ });
2268
+ }
2269
+
2270
+ return validatedFactory;
2271
+ }
2272
+
2273
+ function cloneElementWithValidation(element, props, children) {
2274
+ var newElement = cloneElement.apply(this, arguments);
2275
+ for (var i = 2; i < arguments.length; i++) {
2276
+ validateChildKeys(arguments[i], newElement.type);
2277
+ }
2278
+ validatePropTypes(newElement);
2279
+ return newElement;
2280
+ }
2281
+
2282
+ var React = {
2283
+ Children: {
2284
+ map: mapChildren,
2285
+ forEach: forEachChildren,
2286
+ count: countChildren,
2287
+ toArray: toArray,
2288
+ only: onlyChild
2289
+ },
2290
+
2291
+ createRef: createRef,
2292
+ Component: Component,
2293
+ PureComponent: PureComponent,
2294
+
2295
+ createContext: createContext,
2296
+ forwardRef: forwardRef,
2297
+
2298
+ Fragment: REACT_FRAGMENT_TYPE,
2299
+ StrictMode: REACT_STRICT_MODE_TYPE,
2300
+ unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
2301
+ unstable_Profiler: REACT_PROFILER_TYPE,
2302
+
2303
+ createElement: createElementWithValidation,
2304
+ cloneElement: cloneElementWithValidation,
2305
+ createFactory: createFactoryWithValidation,
2306
+ isValidElement: isValidElement,
2307
+
2308
+ version: ReactVersion,
2309
+
2310
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
2311
+ };
2312
+
2313
+ if (enableSuspense) {
2314
+ React.Placeholder = REACT_PLACEHOLDER_TYPE;
2315
+ React.lazy = lazy;
2316
+ }
2317
+
2318
+
2319
+
2320
+ var React$2 = Object.freeze({
2321
+ default: React
2322
+ });
2323
+
2324
+ var React$3 = ( React$2 && React ) || React$2;
2325
+
2326
+ // TODO: decide on the top-level export form.
2327
+ // This is hacky but makes it work with both Rollup and Jest.
2328
+ var react = React$3.default || React$3;
2329
+
2330
+ module.exports = react;
2331
+ })();
2332
+ }
2333
+
2334
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
2335
+
2336
+ /***/ }),
2337
+
2338
+ /***/ 235:
2339
+ /***/ (function(module, exports, __webpack_require__) {
2340
+
2341
+ "use strict";
2342
+ /* WEBPACK VAR INJECTION */(function(process) {/**
2343
+ * Copyright (c) 2013-present, Facebook, Inc.
2344
+ *
2345
+ * This source code is licensed under the MIT license found in the
2346
+ * LICENSE file in the root directory of this source tree.
2347
+ */
2348
+
2349
+
2350
+
2351
+ var printWarning = function() {};
2352
+
2353
+ if (process.env.NODE_ENV !== 'production') {
2354
+ var ReactPropTypesSecret = __webpack_require__(236);
2355
+ var loggedTypeFailures = {};
2356
+
2357
+ printWarning = function(text) {
2358
+ var message = 'Warning: ' + text;
2359
+ if (typeof console !== 'undefined') {
2360
+ console.error(message);
2361
+ }
2362
+ try {
2363
+ // --- Welcome to debugging React ---
2364
+ // This error was thrown as a convenience so that you can use this stack
2365
+ // to find the callsite that caused this warning to fire.
2366
+ throw new Error(message);
2367
+ } catch (x) {}
2368
+ };
2369
+ }
2370
+
2371
+ /**
2372
+ * Assert that the values match with the type specs.
2373
+ * Error messages are memorized and will only be shown once.
2374
+ *
2375
+ * @param {object} typeSpecs Map of name to a ReactPropType
2376
+ * @param {object} values Runtime values that need to be type-checked
2377
+ * @param {string} location e.g. "prop", "context", "child context"
2378
+ * @param {string} componentName Name of the component for error messages.
2379
+ * @param {?Function} getStack Returns the component stack.
2380
+ * @private
2381
+ */
2382
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2383
+ if (process.env.NODE_ENV !== 'production') {
2384
+ for (var typeSpecName in typeSpecs) {
2385
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
2386
+ var error;
2387
+ // Prop type validation may throw. In case they do, we don't want to
2388
+ // fail the render phase where it didn't fail before. So we log it.
2389
+ // After these have been cleaned up, we'll let them throw.
2390
+ try {
2391
+ // This is intentionally an invariant that gets caught. It's the same
2392
+ // behavior as without this statement except with a better message.
2393
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
2394
+ var err = Error(
2395
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
2396
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
2397
+ );
2398
+ err.name = 'Invariant Violation';
2399
+ throw err;
2400
+ }
2401
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2402
+ } catch (ex) {
2403
+ error = ex;
2404
+ }
2405
+ if (error && !(error instanceof Error)) {
2406
+ printWarning(
2407
+ (componentName || 'React class') + ': type specification of ' +
2408
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
2409
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
2410
+ 'You may have forgotten to pass an argument to the type checker ' +
2411
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
2412
+ 'shape all require an argument).'
2413
+ )
2414
+
2415
+ }
2416
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2417
+ // Only monitor this failure once because there tends to be a lot of the
2418
+ // same error.
2419
+ loggedTypeFailures[error.message] = true;
2420
+
2421
+ var stack = getStack ? getStack() : '';
2422
+
2423
+ printWarning(
2424
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
2425
+ );
2426
+ }
2427
+ }
2428
+ }
2429
+ }
2430
+ }
2431
+
2432
+ module.exports = checkPropTypes;
2433
+
2434
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
2435
+
2436
+ /***/ }),
2437
+
2438
+ /***/ 236:
2439
+ /***/ (function(module, exports, __webpack_require__) {
2440
+
2441
+ "use strict";
2442
+ /**
2443
+ * Copyright (c) 2013-present, Facebook, Inc.
2444
+ *
2445
+ * This source code is licensed under the MIT license found in the
2446
+ * LICENSE file in the root directory of this source tree.
2447
+ */
2448
+
2449
+
2450
+
2451
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2452
+
2453
+ module.exports = ReactPropTypesSecret;
2454
+
2455
+
2456
+ /***/ }),
2457
+
2458
+ /***/ 24:
2459
+ /***/ (function(module, exports, __webpack_require__) {
2460
+
2461
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
2462
+ var IObject = __webpack_require__(112);
2463
+ var defined = __webpack_require__(129);
2464
+ module.exports = function (it) {
2465
+ return IObject(defined(it));
2466
+ };
2467
+
2468
+
2469
+ /***/ }),
2470
+
2471
+ /***/ 248:
2472
+ /***/ (function(module, exports, __webpack_require__) {
2473
+
2474
+ var toInteger = __webpack_require__(128);
2475
+ var defined = __webpack_require__(129);
2476
+ // true -> String#at
2477
+ // false -> String#codePointAt
2478
+ module.exports = function (TO_STRING) {
2479
+ return function (that, pos) {
2480
+ var s = String(defined(that));
2481
+ var i = toInteger(pos);
2482
+ var l = s.length;
2483
+ var a, b;
2484
+ if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
2485
+ a = s.charCodeAt(i);
2486
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
2487
+ ? TO_STRING ? s.charAt(i) : a
2488
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
2489
+ };
2490
+ };
2491
+
2492
+
2493
+ /***/ }),
2494
+
2495
+ /***/ 249:
2496
+ /***/ (function(module, exports, __webpack_require__) {
2497
+
2498
+ "use strict";
2499
+
2500
+ var create = __webpack_require__(51);
2501
+ var descriptor = __webpack_require__(36);
2502
+ var setToStringTag = __webpack_require__(57);
2503
+ var IteratorPrototype = {};
2504
+
2505
+ // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
2506
+ __webpack_require__(35)(IteratorPrototype, __webpack_require__(11)('iterator'), function () { return this; });
2507
+
2508
+ module.exports = function (Constructor, NAME, next) {
2509
+ Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
2510
+ setToStringTag(Constructor, NAME + ' Iterator');
2511
+ };
2512
+
2513
+
2514
+ /***/ }),
2515
+
2516
+ /***/ 250:
2517
+ /***/ (function(module, exports, __webpack_require__) {
2518
+
2519
+ var dP = __webpack_require__(14);
2520
+ var anObject = __webpack_require__(18);
2521
+ var getKeys = __webpack_require__(27);
2522
+
2523
+ module.exports = __webpack_require__(20) ? Object.defineProperties : function defineProperties(O, Properties) {
2524
+ anObject(O);
2525
+ var keys = getKeys(Properties);
2526
+ var length = keys.length;
2527
+ var i = 0;
2528
+ var P;
2529
+ while (length > i) dP.f(O, P = keys[i++], Properties[P]);
2530
+ return O;
2531
+ };
2532
+
2533
+
2534
+ /***/ }),
2535
+
2536
+ /***/ 251:
2537
+ /***/ (function(module, exports, __webpack_require__) {
2538
+
2539
+ // false -> Array#indexOf
2540
+ // true -> Array#includes
2541
+ var toIObject = __webpack_require__(24);
2542
+ var toLength = __webpack_require__(131);
2543
+ var toAbsoluteIndex = __webpack_require__(252);
2544
+ module.exports = function (IS_INCLUDES) {
2545
+ return function ($this, el, fromIndex) {
2546
+ var O = toIObject($this);
2547
+ var length = toLength(O.length);
2548
+ var index = toAbsoluteIndex(fromIndex, length);
2549
+ var value;
2550
+ // Array#includes uses SameValueZero equality algorithm
2551
+ // eslint-disable-next-line no-self-compare
2552
+ if (IS_INCLUDES && el != el) while (length > index) {
2553
+ value = O[index++];
2554
+ // eslint-disable-next-line no-self-compare
2555
+ if (value != value) return true;
2556
+ // Array#indexOf ignores holes, Array#includes - not
2557
+ } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
2558
+ if (O[index] === el) return IS_INCLUDES || index || 0;
2559
+ } return !IS_INCLUDES && -1;
2560
+ };
2561
+ };
2562
+
2563
+
2564
+ /***/ }),
2565
+
2566
+ /***/ 252:
2567
+ /***/ (function(module, exports, __webpack_require__) {
2568
+
2569
+ var toInteger = __webpack_require__(128);
2570
+ var max = Math.max;
2571
+ var min = Math.min;
2572
+ module.exports = function (index, length) {
2573
+ index = toInteger(index);
2574
+ return index < 0 ? max(index + length, 0) : min(index, length);
2575
+ };
2576
+
2577
+
2578
+ /***/ }),
2579
+
2580
+ /***/ 255:
2581
+ /***/ (function(module, exports, __webpack_require__) {
2582
+
2583
+ "use strict";
2584
+
2585
+ var addToUnscopables = __webpack_require__(256);
2586
+ var step = __webpack_require__(257);
2587
+ var Iterators = __webpack_require__(45);
2588
+ var toIObject = __webpack_require__(24);
2589
+
2590
+ // 22.1.3.4 Array.prototype.entries()
2591
+ // 22.1.3.13 Array.prototype.keys()
2592
+ // 22.1.3.29 Array.prototype.values()
2593
+ // 22.1.3.30 Array.prototype[@@iterator]()
2594
+ module.exports = __webpack_require__(166)(Array, 'Array', function (iterated, kind) {
2595
+ this._t = toIObject(iterated); // target
2596
+ this._i = 0; // next index
2597
+ this._k = kind; // kind
2598
+ // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
2599
+ }, function () {
2600
+ var O = this._t;
2601
+ var kind = this._k;
2602
+ var index = this._i++;
2603
+ if (!O || index >= O.length) {
2604
+ this._t = undefined;
2605
+ return step(1);
2606
+ }
2607
+ if (kind == 'keys') return step(0, index);
2608
+ if (kind == 'values') return step(0, O[index]);
2609
+ return step(0, [index, O[index]]);
2610
+ }, 'values');
2611
+
2612
+ // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
2613
+ Iterators.Arguments = Iterators.Array;
2614
+
2615
+ addToUnscopables('keys');
2616
+ addToUnscopables('values');
2617
+ addToUnscopables('entries');
2618
+
2619
+
2620
+ /***/ }),
2621
+
2622
+ /***/ 256:
2623
+ /***/ (function(module, exports) {
2624
+
2625
+ module.exports = function () { /* empty */ };
2626
+
2627
+
2628
+ /***/ }),
2629
+
2630
+ /***/ 257:
2631
+ /***/ (function(module, exports) {
2632
+
2633
+ module.exports = function (done, value) {
2634
+ return { value: value, done: !!done };
2635
+ };
2636
+
2637
+
2638
+ /***/ }),
2639
+
2640
+ /***/ 26:
2641
+ /***/ (function(module, exports) {
2642
+
2643
+ module.exports = function (exec) {
2644
+ try {
2645
+ return !!exec();
2646
+ } catch (e) {
2647
+ return true;
2648
+ }
2649
+ };
2650
+
2651
+
2652
+ /***/ }),
2653
+
2654
+ /***/ 27:
2655
+ /***/ (function(module, exports, __webpack_require__) {
2656
+
2657
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
2658
+ var $keys = __webpack_require__(111);
2659
+ var enumBugKeys = __webpack_require__(67);
2660
+
2661
+ module.exports = Object.keys || function keys(O) {
2662
+ return $keys(O, enumBugKeys);
2663
+ };
2664
+
2665
+
2666
+ /***/ }),
2667
+
2668
+ /***/ 28:
2669
+ /***/ (function(module, exports) {
2670
+
2671
+ exports.f = {}.propertyIsEnumerable;
2672
+
2673
+
2674
+ /***/ }),
2675
+
2676
+ /***/ 3:
2677
+ /***/ (function(module, exports) {
2678
+
2679
+ var core = module.exports = { version: '2.5.3' };
2680
+ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
2681
+
2682
+
2683
+ /***/ }),
2684
+
2685
+ /***/ 32:
2686
+ /***/ (function(module, exports, __webpack_require__) {
2687
+
2688
+ // 7.1.13 ToObject(argument)
2689
+ var defined = __webpack_require__(129);
2690
+ module.exports = function (it) {
2691
+ return Object(defined(it));
2692
+ };
2693
+
2694
+
2695
+ /***/ }),
2696
+
2697
+ /***/ 34:
2698
+ /***/ (function(module, exports, __webpack_require__) {
2699
+
2700
+ "use strict";
2701
+
2702
+ var $at = __webpack_require__(248)(true);
2703
+
2704
+ // 21.1.3.27 String.prototype[@@iterator]()
2705
+ __webpack_require__(166)(String, 'String', function (iterated) {
2706
+ this._t = String(iterated); // target
2707
+ this._i = 0; // next index
2708
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
2709
+ }, function () {
2710
+ var O = this._t;
2711
+ var index = this._i;
2712
+ var point;
2713
+ if (index >= O.length) return { value: undefined, done: true };
2714
+ point = $at(O, index);
2715
+ this._i += point.length;
2716
+ return { value: point, done: false };
2717
+ });
2718
+
2719
+
2720
+ /***/ }),
2721
+
2722
+ /***/ 35:
2723
+ /***/ (function(module, exports, __webpack_require__) {
2724
+
2725
+ var dP = __webpack_require__(14);
2726
+ var createDesc = __webpack_require__(36);
2727
+ module.exports = __webpack_require__(20) ? function (object, key, value) {
2728
+ return dP.f(object, key, createDesc(1, value));
2729
+ } : function (object, key, value) {
2730
+ object[key] = value;
2731
+ return object;
2732
+ };
2733
+
2734
+
2735
+ /***/ }),
2736
+
2737
+ /***/ 36:
2738
+ /***/ (function(module, exports) {
2739
+
2740
+ module.exports = function (bitmap, value) {
2741
+ return {
2742
+ enumerable: !(bitmap & 1),
2743
+ configurable: !(bitmap & 2),
2744
+ writable: !(bitmap & 4),
2745
+ value: value
2746
+ };
2747
+ };
2748
+
2749
+
2750
+ /***/ }),
2751
+
2752
+ /***/ 37:
2753
+ /***/ (function(module, exports) {
2754
+
2755
+ var toString = {}.toString;
2756
+
2757
+ module.exports = function (it) {
2758
+ return toString.call(it).slice(8, -1);
2759
+ };
2760
+
2761
+
2762
+ /***/ }),
2763
+
2764
+ /***/ 38:
2765
+ /***/ (function(module, exports) {
2766
+
2767
+ exports.f = Object.getOwnPropertySymbols;
2768
+
2769
+
2770
+ /***/ }),
2771
+
2772
+ /***/ 42:
2773
+ /***/ (function(module, exports, __webpack_require__) {
2774
+
2775
+ "use strict";
2776
+ /*
2777
+ object-assign
2778
+ (c) Sindre Sorhus
2779
+ @license MIT
2780
+ */
2781
+
2782
+
2783
+ /* eslint-disable no-unused-vars */
2784
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2785
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2786
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2787
+
2788
+ function toObject(val) {
2789
+ if (val === null || val === undefined) {
2790
+ throw new TypeError('Object.assign cannot be called with null or undefined');
2791
+ }
2792
+
2793
+ return Object(val);
2794
+ }
2795
+
2796
+ function shouldUseNative() {
2797
+ try {
2798
+ if (!Object.assign) {
2799
+ return false;
2800
+ }
2801
+
2802
+ // Detect buggy property enumeration order in older V8 versions.
2803
+
2804
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
2805
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
2806
+ test1[5] = 'de';
2807
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
2808
+ return false;
2809
+ }
2810
+
2811
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2812
+ var test2 = {};
2813
+ for (var i = 0; i < 10; i++) {
2814
+ test2['_' + String.fromCharCode(i)] = i;
2815
+ }
2816
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
2817
+ return test2[n];
2818
+ });
2819
+ if (order2.join('') !== '0123456789') {
2820
+ return false;
2821
+ }
2822
+
2823
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
2824
+ var test3 = {};
2825
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
2826
+ test3[letter] = letter;
2827
+ });
2828
+ if (Object.keys(Object.assign({}, test3)).join('') !==
2829
+ 'abcdefghijklmnopqrst') {
2830
+ return false;
2831
+ }
2832
+
2833
+ return true;
2834
+ } catch (err) {
2835
+ // We don't expect any of the above to throw, but better to be safe.
2836
+ return false;
2837
+ }
2838
+ }
2839
+
2840
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2841
+ var from;
2842
+ var to = toObject(target);
2843
+ var symbols;
2844
+
2845
+ for (var s = 1; s < arguments.length; s++) {
2846
+ from = Object(arguments[s]);
2847
+
2848
+ for (var key in from) {
2849
+ if (hasOwnProperty.call(from, key)) {
2850
+ to[key] = from[key];
2851
+ }
2852
+ }
2853
+
2854
+ if (getOwnPropertySymbols) {
2855
+ symbols = getOwnPropertySymbols(from);
2856
+ for (var i = 0; i < symbols.length; i++) {
2857
+ if (propIsEnumerable.call(from, symbols[i])) {
2858
+ to[symbols[i]] = from[symbols[i]];
2859
+ }
2860
+ }
2861
+ }
2862
+ }
2863
+
2864
+ return to;
2865
+ };
2866
+
2867
+
2868
+ /***/ }),
2869
+
2870
+ /***/ 43:
2871
+ /***/ (function(module, exports) {
2872
+
2873
+ module.exports = true;
2874
+
2875
+
2876
+ /***/ }),
2877
+
2878
+ /***/ 44:
2879
+ /***/ (function(module, exports, __webpack_require__) {
2880
+
2881
+ // optional / simple context binding
2882
+ var aFunction = __webpack_require__(108);
2883
+ module.exports = function (fn, that, length) {
2884
+ aFunction(fn);
2885
+ if (that === undefined) return fn;
2886
+ switch (length) {
2887
+ case 1: return function (a) {
2888
+ return fn.call(that, a);
2889
+ };
2890
+ case 2: return function (a, b) {
2891
+ return fn.call(that, a, b);
2892
+ };
2893
+ case 3: return function (a, b, c) {
2894
+ return fn.call(that, a, b, c);
2895
+ };
2896
+ }
2897
+ return function (/* ...args */) {
2898
+ return fn.apply(that, arguments);
2899
+ };
2900
+ };
2901
+
2902
+
2903
+ /***/ }),
2904
+
2905
+ /***/ 45:
2906
+ /***/ (function(module, exports) {
2907
+
2908
+ module.exports = {};
2909
+
2910
+
2911
+ /***/ }),
2912
+
2913
+ /***/ 46:
2914
+ /***/ (function(module, exports) {
2915
+
2916
+ var id = 0;
2917
+ var px = Math.random();
2918
+ module.exports = function (key) {
2919
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
2920
+ };
2921
+
2922
+
2923
+ /***/ }),
2924
+
2925
+ /***/ 47:
2926
+ /***/ (function(module, exports, __webpack_require__) {
2927
+
2928
+ __webpack_require__(255);
2929
+ var global = __webpack_require__(13);
2930
+ var hide = __webpack_require__(35);
2931
+ var Iterators = __webpack_require__(45);
2932
+ var TO_STRING_TAG = __webpack_require__(11)('toStringTag');
2933
+
2934
+ var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
2935
+ 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
2936
+ 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
2937
+ 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
2938
+ 'TextTrackList,TouchList').split(',');
2939
+
2940
+ for (var i = 0; i < DOMIterables.length; i++) {
2941
+ var NAME = DOMIterables[i];
2942
+ var Collection = global[NAME];
2943
+ var proto = Collection && Collection.prototype;
2944
+ if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
2945
+ Iterators[NAME] = Iterators.Array;
2946
+ }
2947
+
2948
+
2949
+ /***/ }),
2950
+
2951
+ /***/ 50:
2952
+ /***/ (function(module, exports, __webpack_require__) {
2953
+
2954
+ // 7.1.1 ToPrimitive(input [, PreferredType])
2955
+ var isObject = __webpack_require__(19);
2956
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
2957
+ // and the second argument - flag - preferred type is a string
2958
+ module.exports = function (it, S) {
2959
+ if (!isObject(it)) return it;
2960
+ var fn, val;
2961
+ if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
2962
+ if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
2963
+ if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
2964
+ throw TypeError("Can't convert object to primitive value");
2965
+ };
2966
+
2967
+
2968
+ /***/ }),
2969
+
2970
+ /***/ 51:
2971
+ /***/ (function(module, exports, __webpack_require__) {
2972
+
2973
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
2974
+ var anObject = __webpack_require__(18);
2975
+ var dPs = __webpack_require__(250);
2976
+ var enumBugKeys = __webpack_require__(67);
2977
+ var IE_PROTO = __webpack_require__(132)('IE_PROTO');
2978
+ var Empty = function () { /* empty */ };
2979
+ var PROTOTYPE = 'prototype';
2980
+
2981
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
2982
+ var createDict = function () {
2983
+ // Thrash, waste and sodomy: IE GC bug
2984
+ var iframe = __webpack_require__(130)('iframe');
2985
+ var i = enumBugKeys.length;
2986
+ var lt = '<';
2987
+ var gt = '>';
2988
+ var iframeDocument;
2989
+ iframe.style.display = 'none';
2990
+ __webpack_require__(167).appendChild(iframe);
2991
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
2992
+ // createDict = iframe.contentWindow.Object;
2993
+ // html.removeChild(iframe);
2994
+ iframeDocument = iframe.contentWindow.document;
2995
+ iframeDocument.open();
2996
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
2997
+ iframeDocument.close();
2998
+ createDict = iframeDocument.F;
2999
+ while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
3000
+ return createDict();
3001
+ };
3002
+
3003
+ module.exports = Object.create || function create(O, Properties) {
3004
+ var result;
3005
+ if (O !== null) {
3006
+ Empty[PROTOTYPE] = anObject(O);
3007
+ result = new Empty();
3008
+ Empty[PROTOTYPE] = null;
3009
+ // add "__proto__" for Object.getPrototypeOf polyfill
3010
+ result[IE_PROTO] = O;
3011
+ } else result = createDict();
3012
+ return Properties === undefined ? result : dPs(result, Properties);
3013
+ };
3014
+
3015
+
3016
+ /***/ }),
3017
+
3018
+ /***/ 57:
3019
+ /***/ (function(module, exports, __webpack_require__) {
3020
+
3021
+ var def = __webpack_require__(14).f;
3022
+ var has = __webpack_require__(23);
3023
+ var TAG = __webpack_require__(11)('toStringTag');
3024
+
3025
+ module.exports = function (it, tag, stat) {
3026
+ if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
3027
+ };
3028
+
3029
+
3030
+ /***/ }),
3031
+
3032
+ /***/ 60:
3033
+ /***/ (function(module, exports, __webpack_require__) {
3034
+
3035
+ // most Object methods by ES6 should accept primitives
3036
+ var $export = __webpack_require__(12);
3037
+ var core = __webpack_require__(3);
3038
+ var fails = __webpack_require__(26);
3039
+ module.exports = function (KEY, exec) {
3040
+ var fn = (core.Object || {})[KEY] || Object[KEY];
3041
+ var exp = {};
3042
+ exp[KEY] = exec(fn);
3043
+ $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
3044
+ };
3045
+
3046
+
3047
+ /***/ }),
3048
+
3049
+ /***/ 66:
3050
+ /***/ (function(module, exports, __webpack_require__) {
3051
+
3052
+ var global = __webpack_require__(13);
3053
+ var SHARED = '__core-js_shared__';
3054
+ var store = global[SHARED] || (global[SHARED] = {});
3055
+ module.exports = function (key) {
3056
+ return store[key] || (store[key] = {});
3057
+ };
3058
+
3059
+
3060
+ /***/ }),
3061
+
3062
+ /***/ 67:
3063
+ /***/ (function(module, exports) {
3064
+
3065
+ // IE 8- don't enum bug keys
3066
+ module.exports = (
3067
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
3068
+ ).split(',');
3069
+
3070
+
3071
+ /***/ }),
3072
+
3073
+ /***/ 8:
3074
+ /***/ (function(module, exports) {
3075
+
3076
+ // shim for using process in browser
3077
+ var process = module.exports = {};
3078
+
3079
+ // cached from whatever global is present so that test runners that stub it
3080
+ // don't break things. But we need to wrap it in a try catch in case it is
3081
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
3082
+ // function because try/catches deoptimize in certain engines.
3083
+
3084
+ var cachedSetTimeout;
3085
+ var cachedClearTimeout;
3086
+
3087
+ function defaultSetTimout() {
3088
+ throw new Error('setTimeout has not been defined');
3089
+ }
3090
+ function defaultClearTimeout () {
3091
+ throw new Error('clearTimeout has not been defined');
3092
+ }
3093
+ (function () {
3094
+ try {
3095
+ if (typeof setTimeout === 'function') {
3096
+ cachedSetTimeout = setTimeout;
3097
+ } else {
3098
+ cachedSetTimeout = defaultSetTimout;
3099
+ }
3100
+ } catch (e) {
3101
+ cachedSetTimeout = defaultSetTimout;
3102
+ }
3103
+ try {
3104
+ if (typeof clearTimeout === 'function') {
3105
+ cachedClearTimeout = clearTimeout;
3106
+ } else {
3107
+ cachedClearTimeout = defaultClearTimeout;
3108
+ }
3109
+ } catch (e) {
3110
+ cachedClearTimeout = defaultClearTimeout;
3111
+ }
3112
+ } ())
3113
+ function runTimeout(fun) {
3114
+ if (cachedSetTimeout === setTimeout) {
3115
+ //normal enviroments in sane situations
3116
+ return setTimeout(fun, 0);
3117
+ }
3118
+ // if setTimeout wasn't available but was latter defined
3119
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
3120
+ cachedSetTimeout = setTimeout;
3121
+ return setTimeout(fun, 0);
3122
+ }
3123
+ try {
3124
+ // when when somebody has screwed with setTimeout but no I.E. maddness
3125
+ return cachedSetTimeout(fun, 0);
3126
+ } catch(e){
3127
+ try {
3128
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3129
+ return cachedSetTimeout.call(null, fun, 0);
3130
+ } catch(e){
3131
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
3132
+ return cachedSetTimeout.call(this, fun, 0);
3133
+ }
3134
+ }
3135
+
3136
+
3137
+ }
3138
+ function runClearTimeout(marker) {
3139
+ if (cachedClearTimeout === clearTimeout) {
3140
+ //normal enviroments in sane situations
3141
+ return clearTimeout(marker);
3142
+ }
3143
+ // if clearTimeout wasn't available but was latter defined
3144
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
3145
+ cachedClearTimeout = clearTimeout;
3146
+ return clearTimeout(marker);
3147
+ }
3148
+ try {
3149
+ // when when somebody has screwed with setTimeout but no I.E. maddness
3150
+ return cachedClearTimeout(marker);
3151
+ } catch (e){
3152
+ try {
3153
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3154
+ return cachedClearTimeout.call(null, marker);
3155
+ } catch (e){
3156
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
3157
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
3158
+ return cachedClearTimeout.call(this, marker);
3159
+ }
3160
+ }
3161
+
3162
+
3163
+
3164
+ }
3165
+ var queue = [];
3166
+ var draining = false;
3167
+ var currentQueue;
3168
+ var queueIndex = -1;
3169
+
3170
+ function cleanUpNextTick() {
3171
+ if (!draining || !currentQueue) {
3172
+ return;
3173
+ }
3174
+ draining = false;
3175
+ if (currentQueue.length) {
3176
+ queue = currentQueue.concat(queue);
3177
+ } else {
3178
+ queueIndex = -1;
3179
+ }
3180
+ if (queue.length) {
3181
+ drainQueue();
3182
+ }
3183
+ }
3184
+
3185
+ function drainQueue() {
3186
+ if (draining) {
3187
+ return;
3188
+ }
3189
+ var timeout = runTimeout(cleanUpNextTick);
3190
+ draining = true;
3191
+
3192
+ var len = queue.length;
3193
+ while(len) {
3194
+ currentQueue = queue;
3195
+ queue = [];
3196
+ while (++queueIndex < len) {
3197
+ if (currentQueue) {
3198
+ currentQueue[queueIndex].run();
3199
+ }
3200
+ }
3201
+ queueIndex = -1;
3202
+ len = queue.length;
3203
+ }
3204
+ currentQueue = null;
3205
+ draining = false;
3206
+ runClearTimeout(timeout);
3207
+ }
3208
+
3209
+ process.nextTick = function (fun) {
3210
+ var args = new Array(arguments.length - 1);
3211
+ if (arguments.length > 1) {
3212
+ for (var i = 1; i < arguments.length; i++) {
3213
+ args[i - 1] = arguments[i];
3214
+ }
3215
+ }
3216
+ queue.push(new Item(fun, args));
3217
+ if (queue.length === 1 && !draining) {
3218
+ runTimeout(drainQueue);
3219
+ }
3220
+ };
3221
+
3222
+ // v8 likes predictible objects
3223
+ function Item(fun, array) {
3224
+ this.fun = fun;
3225
+ this.array = array;
3226
+ }
3227
+ Item.prototype.run = function () {
3228
+ this.fun.apply(null, this.array);
3229
+ };
3230
+ process.title = 'browser';
3231
+ process.browser = true;
3232
+ process.env = {};
3233
+ process.argv = [];
3234
+ process.version = ''; // empty string to avoid regexp issues
3235
+ process.versions = {};
3236
+
3237
+ function noop() {}
3238
+
3239
+ process.on = noop;
3240
+ process.addListener = noop;
3241
+ process.once = noop;
3242
+ process.off = noop;
3243
+ process.removeListener = noop;
3244
+ process.removeAllListeners = noop;
3245
+ process.emit = noop;
3246
+ process.prependListener = noop;
3247
+ process.prependOnceListener = noop;
3248
+
3249
+ process.listeners = function (name) { return [] }
3250
+
3251
+ process.binding = function (name) {
3252
+ throw new Error('process.binding is not supported');
3253
+ };
3254
+
3255
+ process.cwd = function () { return '/' };
3256
+ process.chdir = function (dir) {
3257
+ throw new Error('process.chdir is not supported');
3258
+ };
3259
+ process.umask = function() { return 0; };
3260
+
3261
+
3262
+ /***/ })
3263
+
3264
+ /******/ });
js/visual.js CHANGED
@@ -1,156 +1,4 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // install a JSONP callback for chunk loading
3
- /******/ var parentJsonpFunction = window["webpackJsonp"];
4
- /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5
- /******/ // add "moreModules" to the modules object,
6
- /******/ // then flag all "chunkIds" as loaded and fire callback
7
- /******/ var moduleId, chunkId, i = 0, resolves = [], result;
8
- /******/ for(;i < chunkIds.length; i++) {
9
- /******/ chunkId = chunkIds[i];
10
- /******/ if(installedChunks[chunkId]) {
11
- /******/ resolves.push(installedChunks[chunkId][0]);
12
- /******/ }
13
- /******/ installedChunks[chunkId] = 0;
14
- /******/ }
15
- /******/ for(moduleId in moreModules) {
16
- /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17
- /******/ modules[moduleId] = moreModules[moduleId];
18
- /******/ }
19
- /******/ }
20
- /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21
- /******/ while(resolves.length) {
22
- /******/ resolves.shift()();
23
- /******/ }
24
- /******/ if(executeModules) {
25
- /******/ for(i=0; i < executeModules.length; i++) {
26
- /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
27
- /******/ }
28
- /******/ }
29
- /******/ return result;
30
- /******/ };
31
- /******/
32
- /******/ // The module cache
33
- /******/ var installedModules = {};
34
- /******/
35
- /******/ // objects to store loaded and loading chunks
36
- /******/ var installedChunks = {
37
- /******/ 1: 0
38
- /******/ };
39
- /******/
40
- /******/ // The require function
41
- /******/ function __webpack_require__(moduleId) {
42
- /******/
43
- /******/ // Check if module is in cache
44
- /******/ if(installedModules[moduleId]) {
45
- /******/ return installedModules[moduleId].exports;
46
- /******/ }
47
- /******/ // Create a new module (and put it into the cache)
48
- /******/ var module = installedModules[moduleId] = {
49
- /******/ i: moduleId,
50
- /******/ l: false,
51
- /******/ exports: {}
52
- /******/ };
53
- /******/
54
- /******/ // Execute the module function
55
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
56
- /******/
57
- /******/ // Flag the module as loaded
58
- /******/ module.l = true;
59
- /******/
60
- /******/ // Return the exports of the module
61
- /******/ return module.exports;
62
- /******/ }
63
- /******/
64
- /******/ // This file contains only the entry chunk.
65
- /******/ // The chunk loading function for additional chunks
66
- /******/ __webpack_require__.e = function requireEnsure(chunkId) {
67
- /******/ var installedChunkData = installedChunks[chunkId];
68
- /******/ if(installedChunkData === 0) {
69
- /******/ return new Promise(function(resolve) { resolve(); });
70
- /******/ }
71
- /******/
72
- /******/ // a Promise means "currently loading".
73
- /******/ if(installedChunkData) {
74
- /******/ return installedChunkData[2];
75
- /******/ }
76
- /******/
77
- /******/ // setup Promise in chunk cache
78
- /******/ var promise = new Promise(function(resolve, reject) {
79
- /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
80
- /******/ });
81
- /******/ installedChunkData[2] = promise;
82
- /******/
83
- /******/ // start chunk loading
84
- /******/ var head = document.getElementsByTagName('head')[0];
85
- /******/ var script = document.createElement('script');
86
- /******/ script.type = 'text/javascript';
87
- /******/ script.charset = 'utf-8';
88
- /******/ script.async = true;
89
- /******/ script.timeout = 120000;
90
- /******/
91
- /******/ if (__webpack_require__.nc) {
92
- /******/ script.setAttribute("nonce", __webpack_require__.nc);
93
- /******/ }
94
- /******/ script.src = __webpack_require__.p + "dist/" + chunkId + ".js";
95
- /******/ var timeout = setTimeout(onScriptComplete, 120000);
96
- /******/ script.onerror = script.onload = onScriptComplete;
97
- /******/ function onScriptComplete() {
98
- /******/ // avoid mem leaks in IE.
99
- /******/ script.onerror = script.onload = null;
100
- /******/ clearTimeout(timeout);
101
- /******/ var chunk = installedChunks[chunkId];
102
- /******/ if(chunk !== 0) {
103
- /******/ if(chunk) {
104
- /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
105
- /******/ }
106
- /******/ installedChunks[chunkId] = undefined;
107
- /******/ }
108
- /******/ };
109
- /******/ head.appendChild(script);
110
- /******/
111
- /******/ return promise;
112
- /******/ };
113
- /******/
114
- /******/ // expose the modules object (__webpack_modules__)
115
- /******/ __webpack_require__.m = modules;
116
- /******/
117
- /******/ // expose the module cache
118
- /******/ __webpack_require__.c = installedModules;
119
- /******/
120
- /******/ // define getter function for harmony exports
121
- /******/ __webpack_require__.d = function(exports, name, getter) {
122
- /******/ if(!__webpack_require__.o(exports, name)) {
123
- /******/ Object.defineProperty(exports, name, {
124
- /******/ configurable: false,
125
- /******/ enumerable: true,
126
- /******/ get: getter
127
- /******/ });
128
- /******/ }
129
- /******/ };
130
- /******/
131
- /******/ // getDefaultExport function for compatibility with non-harmony modules
132
- /******/ __webpack_require__.n = function(module) {
133
- /******/ var getter = module && module.__esModule ?
134
- /******/ function getDefault() { return module['default']; } :
135
- /******/ function getModuleExports() { return module; };
136
- /******/ __webpack_require__.d(getter, 'a', getter);
137
- /******/ return getter;
138
- /******/ };
139
- /******/
140
- /******/ // Object.prototype.hasOwnProperty.call
141
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
142
- /******/
143
- /******/ // __webpack_public_path__
144
- /******/ __webpack_require__.p = "";
145
- /******/
146
- /******/ // on error function for async loading
147
- /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
148
- /******/
149
- /******/ // Load entry module and return exports
150
- /******/ return __webpack_require__(__webpack_require__.s = 193);
151
- /******/ })
152
- /************************************************************************/
153
- /******/ ([
154
  /* 0 */
155
  /***/ (function(module, exports, __webpack_require__) {
156
 
@@ -176,31 +24,17 @@ if (process.env.NODE_ENV !== 'production') {
176
  // By explicitly using `prop-types` you are opting into new development behavior.
177
  // http://fb.me/prop-types-in-prod
178
  var throwOnDirectAccess = true;
179
- module.exports = __webpack_require__(249)(isValidElement, throwOnDirectAccess);
180
  } else {
181
  // By explicitly using `prop-types` you are opting into new production behavior.
182
  // http://fb.me/prop-types-in-prod
183
- module.exports = __webpack_require__(250)();
184
  }
185
 
186
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
187
-
188
- /***/ }),
189
- /* 1 */
190
- /***/ (function(module, exports, __webpack_require__) {
191
-
192
- "use strict";
193
- /* WEBPACK VAR INJECTION */(function(process) {
194
-
195
- if (process.env.NODE_ENV === 'production') {
196
- module.exports = __webpack_require__(198);
197
- } else {
198
- module.exports = __webpack_require__(199);
199
- }
200
-
201
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
202
 
203
  /***/ }),
 
204
  /* 2 */
205
  /***/ (function(module, exports, __webpack_require__) {
206
 
@@ -216,7 +50,8 @@ exports.default = function (instance, Constructor) {
216
  };
217
 
218
  /***/ }),
219
- /* 3 */
 
220
  /***/ (function(module, exports, __webpack_require__) {
221
 
222
  "use strict";
@@ -224,7 +59,7 @@ exports.default = function (instance, Constructor) {
224
 
225
  exports.__esModule = true;
226
 
227
- var _defineProperty = __webpack_require__(132);
228
 
229
  var _defineProperty2 = _interopRequireDefault(_defineProperty);
230
 
@@ -248,35 +83,6 @@ exports.default = function () {
248
  };
249
  }();
250
 
251
- /***/ }),
252
- /* 4 */
253
- /***/ (function(module, exports, __webpack_require__) {
254
-
255
- "use strict";
256
-
257
-
258
- exports.__esModule = true;
259
-
260
- var _assign = __webpack_require__(230);
261
-
262
- var _assign2 = _interopRequireDefault(_assign);
263
-
264
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
265
-
266
- exports.default = _assign2.default || function (target) {
267
- for (var i = 1; i < arguments.length; i++) {
268
- var source = arguments[i];
269
-
270
- for (var key in source) {
271
- if (Object.prototype.hasOwnProperty.call(source, key)) {
272
- target[key] = source[key];
273
- }
274
- }
275
- }
276
-
277
- return target;
278
- };
279
-
280
  /***/ }),
281
  /* 5 */
282
  /***/ (function(module, exports, __webpack_require__) {
@@ -286,7 +92,7 @@ exports.default = _assign2.default || function (target) {
286
 
287
  exports.__esModule = true;
288
 
289
- var _typeof2 = __webpack_require__(42);
290
 
291
  var _typeof3 = _interopRequireDefault(_typeof2);
292
 
@@ -309,15 +115,15 @@ exports.default = function (self, call) {
309
 
310
  exports.__esModule = true;
311
 
312
- var _setPrototypeOf = __webpack_require__(242);
313
 
314
  var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
315
 
316
- var _create = __webpack_require__(246);
317
 
318
  var _create2 = _interopRequireDefault(_create);
319
 
320
- var _typeof2 = __webpack_require__(42);
321
 
322
  var _typeof3 = _interopRequireDefault(_typeof2);
323
 
@@ -341,209 +147,49 @@ exports.default = function (subClass, superClass) {
341
 
342
  /***/ }),
343
  /* 7 */
344
- /***/ (function(module, exports) {
345
-
346
- // shim for using process in browser
347
- var process = module.exports = {};
348
-
349
- // cached from whatever global is present so that test runners that stub it
350
- // don't break things. But we need to wrap it in a try catch in case it is
351
- // wrapped in strict mode code which doesn't define any globals. It's inside a
352
- // function because try/catches deoptimize in certain engines.
353
-
354
- var cachedSetTimeout;
355
- var cachedClearTimeout;
356
-
357
- function defaultSetTimout() {
358
- throw new Error('setTimeout has not been defined');
359
- }
360
- function defaultClearTimeout () {
361
- throw new Error('clearTimeout has not been defined');
362
- }
363
- (function () {
364
- try {
365
- if (typeof setTimeout === 'function') {
366
- cachedSetTimeout = setTimeout;
367
- } else {
368
- cachedSetTimeout = defaultSetTimout;
369
- }
370
- } catch (e) {
371
- cachedSetTimeout = defaultSetTimout;
372
- }
373
- try {
374
- if (typeof clearTimeout === 'function') {
375
- cachedClearTimeout = clearTimeout;
376
- } else {
377
- cachedClearTimeout = defaultClearTimeout;
378
- }
379
- } catch (e) {
380
- cachedClearTimeout = defaultClearTimeout;
381
- }
382
- } ())
383
- function runTimeout(fun) {
384
- if (cachedSetTimeout === setTimeout) {
385
- //normal enviroments in sane situations
386
- return setTimeout(fun, 0);
387
- }
388
- // if setTimeout wasn't available but was latter defined
389
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
390
- cachedSetTimeout = setTimeout;
391
- return setTimeout(fun, 0);
392
- }
393
- try {
394
- // when when somebody has screwed with setTimeout but no I.E. maddness
395
- return cachedSetTimeout(fun, 0);
396
- } catch(e){
397
- try {
398
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
399
- return cachedSetTimeout.call(null, fun, 0);
400
- } catch(e){
401
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
402
- return cachedSetTimeout.call(this, fun, 0);
403
- }
404
- }
405
-
406
 
407
- }
408
- function runClearTimeout(marker) {
409
- if (cachedClearTimeout === clearTimeout) {
410
- //normal enviroments in sane situations
411
- return clearTimeout(marker);
412
- }
413
- // if clearTimeout wasn't available but was latter defined
414
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
415
- cachedClearTimeout = clearTimeout;
416
- return clearTimeout(marker);
417
- }
418
- try {
419
- // when when somebody has screwed with setTimeout but no I.E. maddness
420
- return cachedClearTimeout(marker);
421
- } catch (e){
422
- try {
423
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
424
- return cachedClearTimeout.call(null, marker);
425
- } catch (e){
426
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
427
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
428
- return cachedClearTimeout.call(this, marker);
429
- }
430
- }
431
 
432
 
 
433
 
434
- }
435
- var queue = [];
436
- var draining = false;
437
- var currentQueue;
438
- var queueIndex = -1;
439
 
440
- function cleanUpNextTick() {
441
- if (!draining || !currentQueue) {
442
- return;
443
- }
444
- draining = false;
445
- if (currentQueue.length) {
446
- queue = currentQueue.concat(queue);
447
- } else {
448
- queueIndex = -1;
449
- }
450
- if (queue.length) {
451
- drainQueue();
452
- }
453
- }
454
 
455
- function drainQueue() {
456
- if (draining) {
457
- return;
458
- }
459
- var timeout = runTimeout(cleanUpNextTick);
460
- draining = true;
461
 
462
- var len = queue.length;
463
- while(len) {
464
- currentQueue = queue;
465
- queue = [];
466
- while (++queueIndex < len) {
467
- if (currentQueue) {
468
- currentQueue[queueIndex].run();
469
- }
470
- }
471
- queueIndex = -1;
472
- len = queue.length;
473
- }
474
- currentQueue = null;
475
- draining = false;
476
- runClearTimeout(timeout);
477
- }
478
 
479
- process.nextTick = function (fun) {
480
- var args = new Array(arguments.length - 1);
481
- if (arguments.length > 1) {
482
- for (var i = 1; i < arguments.length; i++) {
483
- args[i - 1] = arguments[i];
484
- }
485
- }
486
- queue.push(new Item(fun, args));
487
- if (queue.length === 1 && !draining) {
488
- runTimeout(drainQueue);
489
  }
490
- };
491
-
492
- // v8 likes predictible objects
493
- function Item(fun, array) {
494
- this.fun = fun;
495
- this.array = array;
496
- }
497
- Item.prototype.run = function () {
498
- this.fun.apply(null, this.array);
499
- };
500
- process.title = 'browser';
501
- process.browser = true;
502
- process.env = {};
503
- process.argv = [];
504
- process.version = ''; // empty string to avoid regexp issues
505
- process.versions = {};
506
-
507
- function noop() {}
508
-
509
- process.on = noop;
510
- process.addListener = noop;
511
- process.once = noop;
512
- process.off = noop;
513
- process.removeListener = noop;
514
- process.removeAllListeners = noop;
515
- process.emit = noop;
516
- process.prependListener = noop;
517
- process.prependOnceListener = noop;
518
-
519
- process.listeners = function (name) { return [] }
520
-
521
- process.binding = function (name) {
522
- throw new Error('process.binding is not supported');
523
- };
524
 
525
- process.cwd = function () { return '/' };
526
- process.chdir = function (dir) {
527
- throw new Error('process.chdir is not supported');
528
  };
529
- process.umask = function() { return 0; };
530
-
531
 
532
  /***/ }),
533
- /* 8 */
 
534
  /***/ (function(module, exports, __webpack_require__) {
535
 
536
- module.exports = { "default": __webpack_require__(238), __esModule: true };
537
 
538
  /***/ }),
539
- /* 9 */
540
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
541
 
542
  "use strict";
543
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
544
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
545
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
546
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(92);
547
 
548
 
549
 
@@ -722,173 +368,11 @@ if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginF
722
  });
723
 
724
  /***/ }),
725
- /* 10 */
726
- /***/ (function(module, exports) {
727
-
728
- var core = module.exports = { version: '2.5.3' };
729
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
730
-
731
-
732
- /***/ }),
733
- /* 11 */
734
- /***/ (function(module, exports, __webpack_require__) {
735
-
736
- "use strict";
737
- /* WEBPACK VAR INJECTION */(function(process) {
738
-
739
- function checkDCE() {
740
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
741
- if (
742
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
743
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
744
- ) {
745
- return;
746
- }
747
- if (process.env.NODE_ENV !== 'production') {
748
- // This branch is unreachable because this function is only called
749
- // in production, but the condition is true only in development.
750
- // Therefore if the branch is still here, dead code elimination wasn't
751
- // properly applied.
752
- // Don't change the message. React DevTools relies on it. Also make sure
753
- // this message doesn't occur elsewhere in this function, or it will cause
754
- // a false positive.
755
- throw new Error('^_^');
756
- }
757
- try {
758
- // Verify that the code above has been dead code eliminated (DCE'd).
759
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
760
- } catch (err) {
761
- // DevTools shouldn't crash React, no matter what.
762
- // We should still report in case we break this code.
763
- console.error(err);
764
- }
765
- }
766
-
767
- if (process.env.NODE_ENV === 'production') {
768
- // DCE check should happen before ReactDOM bundle executes so that
769
- // DevTools can report bad minification during injection.
770
- checkDCE();
771
- module.exports = __webpack_require__(200);
772
- } else {
773
- module.exports = __webpack_require__(203);
774
- }
775
-
776
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
777
-
778
- /***/ }),
779
- /* 12 */
780
- /***/ (function(module, exports, __webpack_require__) {
781
-
782
- var store = __webpack_require__(83)('wks');
783
- var uid = __webpack_require__(58);
784
- var Symbol = __webpack_require__(14).Symbol;
785
- var USE_SYMBOL = typeof Symbol == 'function';
786
-
787
- var $exports = module.exports = function (name) {
788
- return store[name] || (store[name] =
789
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
790
- };
791
-
792
- $exports.store = store;
793
-
794
-
795
- /***/ }),
796
- /* 13 */
797
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
798
-
799
- "use strict";
800
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
801
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Grid__ = __webpack_require__(134);
802
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
803
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
804
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__ = __webpack_require__(259);
805
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "accessibilityOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__["a"]; });
806
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__ = __webpack_require__(136);
807
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultCellRangeRenderer", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__["a"]; });
808
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__ = __webpack_require__(135);
809
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__["c"]; });
810
-
811
-
812
-
813
-
814
-
815
-
816
-
817
-
818
-
819
- /***/ }),
820
- /* 14 */
821
- /***/ (function(module, exports) {
822
-
823
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
824
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
825
- ? window : typeof self != 'undefined' && self.Math == Math ? self
826
- // eslint-disable-next-line no-new-func
827
- : Function('return this')();
828
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
829
-
830
-
831
- /***/ }),
832
  /* 15 */
833
- /***/ (function(module, exports, __webpack_require__) {
834
-
835
- "use strict";
836
- /* WEBPACK VAR INJECTION */(function(process) {/**
837
- * Copyright 2013-2015, Facebook, Inc.
838
- * All rights reserved.
839
- *
840
- * This source code is licensed under the BSD-style license found in the
841
- * LICENSE file in the root directory of this source tree. An additional grant
842
- * of patent rights can be found in the PATENTS file in the same directory.
843
- */
844
-
845
-
846
-
847
- /**
848
- * Use invariant() to assert state which your program assumes to be true.
849
- *
850
- * Provide sprintf-style format (only %s is supported) and arguments
851
- * to provide information about what broke and what you were
852
- * expecting.
853
- *
854
- * The invariant message will be stripped in production, but the invariant
855
- * will remain to ensure logic does not differ in production.
856
- */
857
-
858
- var invariant = function(condition, format, a, b, c, d, e, f) {
859
- if (process.env.NODE_ENV !== 'production') {
860
- if (format === undefined) {
861
- throw new Error('invariant requires an error message argument');
862
- }
863
- }
864
-
865
- if (!condition) {
866
- var error;
867
- if (format === undefined) {
868
- error = new Error(
869
- 'Minified exception occurred; use the non-minified dev environment ' +
870
- 'for the full error message and additional helpful warnings.'
871
- );
872
- } else {
873
- var args = [a, b, c, d, e, f];
874
- var argIndex = 0;
875
- error = new Error(
876
- format.replace(/%s/g, function() { return args[argIndex++]; })
877
- );
878
- error.name = 'Invariant Violation';
879
- }
880
-
881
- error.framesToPop = 1; // we don't care about invariant's own frame
882
- throw error;
883
- }
884
- };
885
-
886
- module.exports = invariant;
887
-
888
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
889
-
890
- /***/ }),
891
- /* 16 */
892
  /***/ (function(module, exports) {
893
 
894
  /*
@@ -970,7 +454,7 @@ function toComment(sourceMap) {
970
 
971
 
972
  /***/ }),
973
- /* 17 */
974
  /***/ (function(module, exports, __webpack_require__) {
975
 
976
  /*
@@ -1026,7 +510,7 @@ var singleton = null;
1026
  var singletonCounter = 0;
1027
  var stylesInsertedAtTop = [];
1028
 
1029
- var fixUrls = __webpack_require__(426);
1030
 
1031
  module.exports = function(list, options) {
1032
  if (typeof DEBUG !== "undefined" && DEBUG) {
@@ -1342,85 +826,80 @@ function updateLink (link, options, obj) {
1342
 
1343
 
1344
  /***/ }),
1345
- /* 18 */
1346
  /***/ (function(module, exports, __webpack_require__) {
1347
 
1348
- var global = __webpack_require__(14);
1349
- var core = __webpack_require__(10);
1350
- var ctx = __webpack_require__(43);
1351
- var hide = __webpack_require__(28);
1352
- var PROTOTYPE = 'prototype';
1353
 
1354
- var $export = function (type, name, source) {
1355
- var IS_FORCED = type & $export.F;
1356
- var IS_GLOBAL = type & $export.G;
1357
- var IS_STATIC = type & $export.S;
1358
- var IS_PROTO = type & $export.P;
1359
- var IS_BIND = type & $export.B;
1360
- var IS_WRAP = type & $export.W;
1361
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
1362
- var expProto = exports[PROTOTYPE];
1363
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
1364
- var key, own, out;
1365
- if (IS_GLOBAL) source = name;
1366
- for (key in source) {
1367
- // contains in native
1368
- own = !IS_FORCED && target && target[key] !== undefined;
1369
- if (own && key in exports) continue;
1370
- // export native or passed
1371
- out = own ? target[key] : source[key];
1372
- // prevent global pollution for namespaces
1373
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
1374
- // bind timers to global for call from export context
1375
- : IS_BIND && own ? ctx(out, global)
1376
- // wrap global constructors for prevent change them in library
1377
- : IS_WRAP && target[key] == out ? (function (C) {
1378
- var F = function (a, b, c) {
1379
- if (this instanceof C) {
1380
- switch (arguments.length) {
1381
- case 0: return new C();
1382
- case 1: return new C(a);
1383
- case 2: return new C(a, b);
1384
- } return new C(a, b, c);
1385
- } return C.apply(this, arguments);
1386
- };
1387
- F[PROTOTYPE] = C[PROTOTYPE];
1388
- return F;
1389
- // make static versions for prototype methods
1390
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
1391
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
1392
- if (IS_PROTO) {
1393
- (exports.virtual || (exports.virtual = {}))[key] = out;
1394
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
1395
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
1396
- }
1397
  }
1398
- };
1399
- // type bitmap
1400
- $export.F = 1; // forced
1401
- $export.G = 2; // global
1402
- $export.S = 4; // static
1403
- $export.P = 8; // proto
1404
- $export.B = 16; // bind
1405
- $export.W = 32; // wrap
1406
- $export.U = 64; // safe
1407
- $export.R = 128; // real proto method for `library`
1408
- module.exports = $export;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1409
 
 
1410
 
1411
  /***/ }),
1412
- /* 19 */
1413
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1414
 
1415
- var isObject = __webpack_require__(25);
1416
- module.exports = function (it) {
1417
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
1418
- return it;
1419
- };
1420
 
1421
 
1422
  /***/ }),
1423
- /* 20 */
1424
  /***/ (function(module, exports) {
1425
 
1426
  var g;
@@ -1447,7 +926,154 @@ module.exports = g;
1447
 
1448
 
1449
  /***/ }),
1450
- /* 21 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1451
  /***/ (function(module, exports, __webpack_require__) {
1452
 
1453
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -1502,187 +1128,54 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1502
 
1503
 
1504
  /***/ }),
1505
- /* 22 */
1506
- /***/ (function(module, exports, __webpack_require__) {
1507
-
1508
- "use strict";
1509
- /*
1510
- object-assign
1511
- (c) Sindre Sorhus
1512
- @license MIT
1513
- */
1514
-
1515
-
1516
- /* eslint-disable no-unused-vars */
1517
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1518
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1519
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1520
-
1521
- function toObject(val) {
1522
- if (val === null || val === undefined) {
1523
- throw new TypeError('Object.assign cannot be called with null or undefined');
1524
- }
1525
-
1526
- return Object(val);
1527
- }
1528
-
1529
- function shouldUseNative() {
1530
- try {
1531
- if (!Object.assign) {
1532
- return false;
1533
- }
1534
-
1535
- // Detect buggy property enumeration order in older V8 versions.
1536
-
1537
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1538
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1539
- test1[5] = 'de';
1540
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
1541
- return false;
1542
- }
1543
-
1544
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1545
- var test2 = {};
1546
- for (var i = 0; i < 10; i++) {
1547
- test2['_' + String.fromCharCode(i)] = i;
1548
- }
1549
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1550
- return test2[n];
1551
- });
1552
- if (order2.join('') !== '0123456789') {
1553
- return false;
1554
- }
1555
-
1556
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1557
- var test3 = {};
1558
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1559
- test3[letter] = letter;
1560
- });
1561
- if (Object.keys(Object.assign({}, test3)).join('') !==
1562
- 'abcdefghijklmnopqrst') {
1563
- return false;
1564
- }
1565
-
1566
- return true;
1567
- } catch (err) {
1568
- // We don't expect any of the above to throw, but better to be safe.
1569
- return false;
1570
- }
1571
- }
1572
-
1573
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
1574
- var from;
1575
- var to = toObject(target);
1576
- var symbols;
1577
-
1578
- for (var s = 1; s < arguments.length; s++) {
1579
- from = Object(arguments[s]);
1580
 
1581
- for (var key in from) {
1582
- if (hasOwnProperty.call(from, key)) {
1583
- to[key] = from[key];
 
 
 
 
 
 
 
1584
  }
1585
- }
1586
-
1587
- if (getOwnPropertySymbols) {
1588
- symbols = getOwnPropertySymbols(from);
1589
- for (var i = 0; i < symbols.length; i++) {
1590
- if (propIsEnumerable.call(from, symbols[i])) {
1591
- to[symbols[i]] = from[symbols[i]];
1592
- }
1593
  }
1594
- }
 
1595
  }
1596
-
1597
- return to;
1598
- };
1599
-
1600
-
1601
- /***/ }),
1602
- /* 23 */
1603
- /***/ (function(module, exports, __webpack_require__) {
1604
-
1605
- "use strict";
1606
-
1607
-
1608
- /**
1609
- * Copyright (c) 2013-present, Facebook, Inc.
1610
- *
1611
- * This source code is licensed under the MIT license found in the
1612
- * LICENSE file in the root directory of this source tree.
1613
- *
1614
- *
1615
- */
1616
-
1617
- function makeEmptyFunction(arg) {
1618
- return function () {
1619
- return arg;
1620
- };
1621
- }
1622
-
1623
- /**
1624
- * This function accepts and discards inputs; it has no side effects. This is
1625
- * primarily useful idiomatically for overridable function endpoints which
1626
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1627
- */
1628
- var emptyFunction = function emptyFunction() {};
1629
-
1630
- emptyFunction.thatReturns = makeEmptyFunction;
1631
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1632
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1633
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1634
- emptyFunction.thatReturnsThis = function () {
1635
- return this;
1636
- };
1637
- emptyFunction.thatReturnsArgument = function (arg) {
1638
- return arg;
1639
  };
1640
 
1641
- module.exports = emptyFunction;
1642
 
1643
  /***/ }),
1644
- /* 24 */
 
 
 
 
 
 
1645
  /***/ (function(module, exports, __webpack_require__) {
1646
 
1647
- var anObject = __webpack_require__(19);
1648
- var IE8_DOM_DEFINE = __webpack_require__(122);
1649
- var toPrimitive = __webpack_require__(80);
1650
- var dP = Object.defineProperty;
1651
-
1652
- exports.f = __webpack_require__(26) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
1653
- anObject(O);
1654
- P = toPrimitive(P, true);
1655
- anObject(Attributes);
1656
- if (IE8_DOM_DEFINE) try {
1657
- return dP(O, P, Attributes);
1658
- } catch (e) { /* empty */ }
1659
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
1660
- if ('value' in Attributes) O[P] = Attributes.value;
1661
- return O;
1662
- };
1663
-
1664
-
1665
- /***/ }),
1666
- /* 25 */
1667
- /***/ (function(module, exports) {
1668
 
1669
- module.exports = function (it) {
1670
- return typeof it === 'object' ? it !== null : typeof it === 'function';
1671
  };
1672
 
1673
 
1674
  /***/ }),
1675
- /* 26 */
1676
- /***/ (function(module, exports, __webpack_require__) {
1677
-
1678
- // Thank's IE8 for his funny defineProperty
1679
- module.exports = !__webpack_require__(35)(function () {
1680
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
1681
- });
1682
-
1683
-
1684
- /***/ }),
1685
- /* 27 */
1686
  /***/ (function(module, exports, __webpack_require__) {
1687
 
1688
  "use strict";
@@ -1697,7 +1190,7 @@ module.exports = !__webpack_require__(35)(function () {
1697
 
1698
 
1699
  var React = __webpack_require__(1);
1700
- var factory = __webpack_require__(434);
1701
 
1702
  if (typeof React === 'undefined') {
1703
  throw Error(
@@ -1717,54 +1210,57 @@ module.exports = factory(
1717
 
1718
 
1719
  /***/ }),
1720
- /* 28 */
 
 
1721
  /***/ (function(module, exports, __webpack_require__) {
1722
 
1723
- var dP = __webpack_require__(24);
1724
- var createDesc = __webpack_require__(57);
1725
- module.exports = __webpack_require__(26) ? function (object, key, value) {
1726
- return dP.f(object, key, createDesc(1, value));
1727
- } : function (object, key, value) {
1728
- object[key] = value;
1729
- return object;
1730
  };
1731
 
1732
 
1733
  /***/ }),
1734
- /* 29 */
1735
- /***/ (function(module, exports) {
1736
-
1737
- var hasOwnProperty = {}.hasOwnProperty;
1738
- module.exports = function (it, key) {
1739
- return hasOwnProperty.call(it, key);
1740
- };
1741
 
 
 
 
 
 
1742
 
1743
- /***/ }),
1744
- /* 30 */
1745
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
1746
 
1747
- // to indexed object, toObject with fallback for non-array-like ES3 strings
1748
- var IObject = __webpack_require__(125);
1749
- var defined = __webpack_require__(78);
1750
  module.exports = function (it) {
1751
- return IObject(defined(it));
 
 
 
 
 
 
 
1752
  };
1753
 
1754
 
1755
  /***/ }),
1756
- /* 31 */
1757
- /***/ (function(module, exports, __webpack_require__) {
1758
-
1759
- module.exports = { "default": __webpack_require__(234), __esModule: true };
1760
-
1761
- /***/ }),
1762
- /* 32 */
1763
  /***/ (function(module, exports, __webpack_require__) {
1764
 
1765
- var baseGetTag = __webpack_require__(64),
1766
- getPrototype = __webpack_require__(311),
1767
- isObjectLike = __webpack_require__(52);
1768
 
1769
  /** `Object#toString` result references. */
1770
  var objectTag = '[object Object]';
@@ -1827,7 +1323,7 @@ module.exports = isPlainObject;
1827
 
1828
 
1829
  /***/ }),
1830
- /* 33 */
1831
  /***/ (function(module, exports) {
1832
 
1833
  /**
@@ -1859,7 +1355,7 @@ module.exports = isArray;
1859
 
1860
 
1861
  /***/ }),
1862
- /* 34 */
1863
  /***/ (function(module, exports, __webpack_require__) {
1864
 
1865
  "use strict";
@@ -1916,30 +1412,30 @@ function invariant(condition, format, a, b, c, d, e, f) {
1916
  }
1917
 
1918
  module.exports = invariant;
1919
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
1920
 
1921
  /***/ }),
1922
- /* 35 */
 
1923
  /***/ (function(module, exports) {
1924
 
1925
- module.exports = function (exec) {
1926
- try {
1927
- return !!exec();
1928
- } catch (e) {
1929
- return true;
1930
- }
1931
- };
1932
 
1933
 
1934
  /***/ }),
1935
- /* 36 */
1936
- /***/ (function(module, exports) {
 
 
1937
 
1938
- module.exports = {};
 
 
 
1939
 
 
1940
 
1941
  /***/ }),
1942
- /* 37 */
1943
  /***/ (function(module, exports, __webpack_require__) {
1944
 
1945
  var babelPluginFlowReactPropTypes_proptype_Index = {
@@ -1985,53096 +1481,61463 @@ if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype
1985
  });
1986
 
1987
  /***/ }),
1988
- /* 38 */
1989
  /***/ (function(module, exports, __webpack_require__) {
1990
 
1991
- var identity = __webpack_require__(159),
1992
- overRest = __webpack_require__(348),
1993
- setToString = __webpack_require__(349);
1994
-
1995
- /**
1996
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
1997
- *
1998
- * @private
1999
- * @param {Function} func The function to apply a rest parameter to.
2000
- * @param {number} [start=func.length-1] The start position of the rest parameter.
2001
- * @returns {Function} Returns the new function.
2002
  */
2003
- function baseRest(func, start) {
2004
- return setToString(overRest(func, start, identity), func + '');
2005
- }
2006
 
2007
- module.exports = baseRest;
 
2008
 
 
 
2009
 
2010
- /***/ }),
2011
- /* 39 */
2012
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2013
 
2014
- "use strict";
2015
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__propertyUtils__ = __webpack_require__(450);
2016
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2017
 
 
 
2018
 
 
 
2019
 
2020
- var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
 
2021
 
2022
- var getComputedStyleX = void 0;
 
 
 
2023
 
2024
- // https://stackoverflow.com/a/3485654/3040605
2025
- function forceRelayout(elem) {
2026
- var originalStyle = elem.style.display;
2027
- elem.style.display = 'none';
2028
- elem.offsetHeight; // eslint-disable-line
2029
- elem.style.display = originalStyle;
2030
- }
2031
 
2032
- function css(el, name, v) {
2033
- var value = v;
2034
- if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {
2035
- for (var i in name) {
2036
- if (name.hasOwnProperty(i)) {
2037
- css(el, i, name[i]);
2038
- }
2039
- }
2040
- return undefined;
2041
- }
2042
- if (typeof value !== 'undefined') {
2043
- if (typeof value === 'number') {
2044
- value = value + 'px';
2045
- }
2046
- el.style[name] = value;
2047
- return undefined;
2048
- }
2049
- return getComputedStyleX(el, name);
2050
- }
2051
 
2052
- function getClientPosition(elem) {
2053
- var box = void 0;
2054
- var x = void 0;
2055
- var y = void 0;
2056
- var doc = elem.ownerDocument;
2057
- var body = doc.body;
2058
- var docElem = doc && doc.documentElement;
2059
- // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式
2060
- box = elem.getBoundingClientRect();
2061
 
2062
- // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop
2063
- // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
2064
- // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
2065
 
2066
- x = box.left;
2067
- y = box.top;
 
 
2068
 
2069
- // In IE, most of the time, 2 extra pixels are added to the top and left
2070
- // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and
2071
- // IE6 standards mode, this border can be overridden by setting the
2072
- // document element's border to zero -- thus, we cannot rely on the
2073
- // offset always being 2 pixels.
2074
 
2075
- // In quirks mode, the offset can be determined by querying the body's
2076
- // clientLeft/clientTop, but in standards mode, it is found by querying
2077
- // the document element's clientLeft/clientTop. Since we already called
2078
- // getClientBoundingRect we have already forced a reflow, so it is not
2079
- // too expensive just to query them all.
2080
 
2081
- // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的
2082
- // 窗口边框标准是设 documentElement ,quirks 时设置 body
2083
- // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去
2084
- // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置
2085
- // 标准 ie 下 docElem.clientTop 就是 border-top
2086
- // ie7 html 即窗口边框改变不了。永远为 2
2087
- // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0
 
 
 
 
 
2088
 
2089
- x -= docElem.clientLeft || body.clientLeft || 0;
2090
- y -= docElem.clientTop || body.clientTop || 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2091
 
2092
- return {
2093
- left: x,
2094
- top: y
2095
- };
2096
- }
 
 
 
 
 
 
2097
 
2098
- function getScroll(w, top) {
2099
- var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
2100
- var method = 'scroll' + (top ? 'Top' : 'Left');
2101
- if (typeof ret !== 'number') {
2102
- var d = w.document;
2103
- // ie6,7,8 standard mode
2104
- ret = d.documentElement[method];
2105
- if (typeof ret !== 'number') {
2106
- // quirks mode
2107
- ret = d.body[method];
2108
- }
2109
- }
2110
- return ret;
2111
- }
2112
 
2113
- function getScrollLeft(w) {
2114
- return getScroll(w);
2115
- }
 
 
2116
 
2117
- function getScrollTop(w) {
2118
- return getScroll(w, true);
2119
- }
 
2120
 
2121
- function getOffset(el) {
2122
- var pos = getClientPosition(el);
2123
- var doc = el.ownerDocument;
2124
- var w = doc.defaultView || doc.parentWindow;
2125
- pos.left += getScrollLeft(w);
2126
- pos.top += getScrollTop(w);
2127
- return pos;
2128
- }
2129
 
2130
- /**
2131
- * A crude way of determining if an object is a window
2132
- * @member util
2133
- */
2134
- function isWindow(obj) {
2135
- // must use == for ie8
2136
- /* eslint eqeqeq:0 */
2137
- return obj !== null && obj !== undefined && obj == obj.window;
2138
- }
2139
 
2140
- function getDocument(node) {
2141
- if (isWindow(node)) {
2142
- return node.document;
2143
- }
2144
- if (node.nodeType === 9) {
2145
- return node;
2146
- }
2147
- return node.ownerDocument;
2148
- }
2149
 
2150
- function _getComputedStyle(elem, name, cs) {
2151
- var computedStyle = cs;
2152
- var val = '';
2153
- var d = getDocument(elem);
2154
- computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);
2155
 
2156
- // https://github.com/kissyteam/kissy/issues/61
2157
- if (computedStyle) {
2158
- val = computedStyle.getPropertyValue(name) || computedStyle[name];
2159
- }
2160
 
2161
- return val;
2162
- }
2163
 
2164
- var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');
2165
- var RE_POS = /^(top|right|bottom|left)$/;
2166
- var CURRENT_STYLE = 'currentStyle';
2167
- var RUNTIME_STYLE = 'runtimeStyle';
2168
- var LEFT = 'left';
2169
- var PX = 'px';
2170
 
2171
- function _getComputedStyleIE(elem, name) {
2172
- // currentStyle maybe null
2173
- // http://msdn.microsoft.com/en-us/library/ms535231.aspx
2174
- var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
2175
 
2176
- // width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height
2177
- // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19
2178
- // 在 ie 下不对,需要直接用 offset 方式
2179
- // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了
2180
 
2181
- // From the awesome hack by Dean Edwards
2182
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
2183
- // If we're not dealing with a regular pixel number
2184
- // but a number that has a weird ending, we need to convert it to pixels
2185
- // exclude left right for relativity
2186
- if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
2187
- // Remember the original values
2188
- var style = elem.style;
2189
- var left = style[LEFT];
2190
- var rsLeft = elem[RUNTIME_STYLE][LEFT];
2191
 
2192
- // prevent flashing of content
2193
- elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
2194
 
2195
- // Put in the new values to get a computed value out
2196
- style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;
2197
- ret = style.pixelLeft + PX;
2198
 
2199
- // Revert the changed values
2200
- style[LEFT] = left;
2201
 
2202
- elem[RUNTIME_STYLE][LEFT] = rsLeft;
2203
- }
2204
- return ret === '' ? 'auto' : ret;
2205
- }
2206
 
2207
- if (typeof window !== 'undefined') {
2208
- getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
2209
- }
2210
 
2211
- function getOffsetDirection(dir, option) {
2212
- if (dir === 'left') {
2213
- return option.useCssRight ? 'right' : dir;
2214
- }
2215
- return option.useCssBottom ? 'bottom' : dir;
2216
- }
2217
 
2218
- function oppositeOffsetDirection(dir) {
2219
- if (dir === 'left') {
2220
- return 'right';
2221
- } else if (dir === 'right') {
2222
- return 'left';
2223
- } else if (dir === 'top') {
2224
- return 'bottom';
2225
- } else if (dir === 'bottom') {
2226
- return 'top';
2227
- }
2228
- }
 
 
 
 
2229
 
2230
- // 设置 elem 相对 elem.ownerDocument 的坐标
2231
- function setLeftTop(elem, offset, option) {
2232
- // set position first, in-case top/left are set even on static elem
2233
- if (css(elem, 'position') === 'static') {
2234
- elem.style.position = 'relative';
2235
- }
2236
- var presetH = -999;
2237
- var presetV = -999;
2238
- var horizontalProperty = getOffsetDirection('left', option);
2239
- var verticalProperty = getOffsetDirection('top', option);
2240
- var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);
2241
- var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);
 
 
 
 
2242
 
2243
- if (horizontalProperty !== 'left') {
2244
- presetH = 999;
2245
- }
 
 
 
 
 
 
 
 
 
 
2246
 
2247
- if (verticalProperty !== 'top') {
2248
- presetV = 999;
2249
- }
2250
- var originalTransition = '';
2251
- var originalOffset = getOffset(elem);
2252
- if ('left' in offset || 'top' in offset) {
2253
- originalTransition = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["c" /* getTransitionProperty */])(elem) || '';
2254
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, 'none');
2255
- }
2256
- if ('left' in offset) {
2257
- elem.style[oppositeHorizontalProperty] = '';
2258
- elem.style[horizontalProperty] = presetH + 'px';
2259
- }
2260
- if ('top' in offset) {
2261
- elem.style[oppositeVerticalProperty] = '';
2262
- elem.style[verticalProperty] = presetV + 'px';
2263
- }
2264
- // force relayout
2265
- forceRelayout(elem);
2266
- var old = getOffset(elem);
2267
- var originalStyle = {};
2268
- for (var key in offset) {
2269
- if (offset.hasOwnProperty(key)) {
2270
- var dir = getOffsetDirection(key, option);
2271
- var preset = key === 'left' ? presetH : presetV;
2272
- var off = originalOffset[key] - old[key];
2273
- if (dir === key) {
2274
- originalStyle[dir] = preset + off;
2275
- } else {
2276
- originalStyle[dir] = preset - off;
2277
- }
2278
- }
2279
- }
2280
- css(elem, originalStyle);
2281
- // force relayout
2282
- forceRelayout(elem);
2283
- if ('left' in offset || 'top' in offset) {
2284
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, originalTransition);
2285
- }
2286
- var ret = {};
2287
- for (var _key in offset) {
2288
- if (offset.hasOwnProperty(_key)) {
2289
- var _dir = getOffsetDirection(_key, option);
2290
- var _off = offset[_key] - originalOffset[_key];
2291
- if (_key === _dir) {
2292
- ret[_dir] = originalStyle[_dir] + _off;
2293
- } else {
2294
- ret[_dir] = originalStyle[_dir] - _off;
2295
- }
2296
- }
2297
- }
2298
- css(elem, ret);
2299
- }
2300
 
2301
- function setTransform(elem, offset) {
2302
- var originalOffset = getOffset(elem);
2303
- var originalXY = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["b" /* getTransformXY */])(elem);
2304
- var resultXY = { x: originalXY.x, y: originalXY.y };
2305
- if ('left' in offset) {
2306
- resultXY.x = originalXY.x + offset.left - originalOffset.left;
2307
- }
2308
- if ('top' in offset) {
2309
- resultXY.y = originalXY.y + offset.top - originalOffset.top;
2310
- }
2311
- Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["d" /* setTransformXY */])(elem, resultXY);
2312
- }
2313
 
2314
- function setOffset(elem, offset, option) {
2315
- if (option.useCssRight || option.useCssBottom) {
2316
- setLeftTop(elem, offset, option);
2317
- } else if (option.useCssTransform && Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["a" /* getTransformName */])() in document.body.style) {
2318
- setTransform(elem, offset, option);
2319
- } else {
2320
- setLeftTop(elem, offset, option);
2321
- }
2322
- }
2323
 
2324
- function each(arr, fn) {
2325
- for (var i = 0; i < arr.length; i++) {
2326
- fn(arr[i]);
2327
- }
2328
- }
 
 
 
 
 
 
2329
 
2330
- function isBorderBoxFn(elem) {
2331
- return getComputedStyleX(elem, 'boxSizing') === 'border-box';
2332
- }
2333
 
2334
- var BOX_MODELS = ['margin', 'border', 'padding'];
2335
- var CONTENT_INDEX = -1;
2336
- var PADDING_INDEX = 2;
2337
- var BORDER_INDEX = 1;
2338
- var MARGIN_INDEX = 0;
2339
 
2340
- function swap(elem, options, callback) {
2341
- var old = {};
2342
- var style = elem.style;
2343
- var name = void 0;
 
 
 
 
2344
 
2345
- // Remember the old values, and insert the new ones
2346
- for (name in options) {
2347
- if (options.hasOwnProperty(name)) {
2348
- old[name] = style[name];
2349
- style[name] = options[name];
2350
- }
2351
- }
2352
 
2353
- callback.call(elem);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2354
 
2355
- // Revert the old values
2356
- for (name in options) {
2357
- if (options.hasOwnProperty(name)) {
2358
- style[name] = old[name];
2359
- }
2360
- }
2361
- }
 
 
 
 
 
 
 
 
2362
 
2363
- function getPBMWidth(elem, props, which) {
2364
- var value = 0;
2365
- var prop = void 0;
2366
- var j = void 0;
2367
- var i = void 0;
2368
- for (j = 0; j < props.length; j++) {
2369
- prop = props[j];
2370
- if (prop) {
2371
- for (i = 0; i < which.length; i++) {
2372
- var cssProp = void 0;
2373
- if (prop === 'border') {
2374
- cssProp = '' + prop + which[i] + 'Width';
2375
- } else {
2376
- cssProp = prop + which[i];
2377
- }
2378
- value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
2379
- }
2380
- }
2381
- }
2382
- return value;
2383
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2384
 
2385
- var domUtils = {};
 
 
 
 
 
 
 
2386
 
2387
- each(['Width', 'Height'], function (name) {
2388
- domUtils['doc' + name] = function (refWin) {
2389
- var d = refWin.document;
2390
- return Math.max(
2391
- // firefox chrome documentElement.scrollHeight< body.scrollHeight
2392
- // ie standard mode : documentElement.scrollHeight> body.scrollHeight
2393
- d.documentElement['scroll' + name],
2394
- // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
2395
- d.body['scroll' + name], domUtils['viewport' + name](d));
2396
  };
2397
 
2398
- domUtils['viewport' + name] = function (win) {
2399
- // pc browser includes scrollbar in window.innerWidth
2400
- var prop = 'client' + name;
2401
- var doc = win.document;
2402
- var body = doc.body;
2403
- var documentElement = doc.documentElement;
2404
- var documentElementProp = documentElement[prop];
2405
- // 标准模式取 documentElement
2406
- // backcompat 取 body
2407
- return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
2408
  };
2409
- });
2410
 
2411
- /*
2412
- 得到元素的大小信息
2413
- @param elem
2414
- @param name
2415
- @param {String} [extra] 'padding' : (css width) + padding
2416
- 'border' : (css width) + padding + border
2417
- 'margin' : (css width) + padding + border + margin
2418
- */
2419
- function getWH(elem, name, ex) {
2420
- var extra = ex;
2421
- if (isWindow(elem)) {
2422
- return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
2423
- } else if (elem.nodeType === 9) {
2424
- return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
2425
- }
2426
- var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
2427
- var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height;
2428
- var computedStyle = getComputedStyleX(elem);
2429
- var isBorderBox = isBorderBoxFn(elem, computedStyle);
2430
- var cssBoxValue = 0;
2431
- if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) {
2432
- borderBoxValue = undefined;
2433
- // Fall back to computed then un computed css if necessary
2434
- cssBoxValue = getComputedStyleX(elem, name);
2435
- if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) {
2436
- cssBoxValue = elem.style[name] || 0;
2437
- }
2438
- // Normalize '', auto, and prepare for extra
2439
- cssBoxValue = parseFloat(cssBoxValue) || 0;
2440
- }
2441
- if (extra === undefined) {
2442
- extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
2443
- }
2444
- var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
2445
- var val = borderBoxValue || cssBoxValue;
2446
- if (extra === CONTENT_INDEX) {
2447
- if (borderBoxValueOrIsBorderBox) {
2448
- return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);
2449
- }
2450
- return cssBoxValue;
2451
- } else if (borderBoxValueOrIsBorderBox) {
2452
- if (extra === BORDER_INDEX) {
2453
- return val;
2454
- }
2455
- return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle));
2456
- }
2457
- return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);
2458
- }
2459
 
2460
- var cssShow = {
2461
- position: 'absolute',
2462
- visibility: 'hidden',
2463
- display: 'block'
2464
- };
2465
 
2466
- // fix #119 : https://github.com/kissyteam/kissy/issues/119
2467
- function getWHIgnoreDisplay() {
2468
- for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) {
2469
- args[_key2] = arguments[_key2];
2470
- }
2471
 
2472
- var val = void 0;
2473
- var elem = args[0];
2474
- // in case elem is window
2475
- // elem.offsetWidth === undefined
2476
- if (elem.offsetWidth !== 0) {
2477
- val = getWH.apply(undefined, args);
2478
- } else {
2479
- swap(elem, cssShow, function () {
2480
- val = getWH.apply(undefined, args);
2481
- });
2482
- }
2483
- return val;
2484
- }
2485
 
2486
- each(['width', 'height'], function (name) {
2487
- var first = name.charAt(0).toUpperCase() + name.slice(1);
2488
- domUtils['outer' + first] = function (el, includeMargin) {
2489
- return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
2490
- };
2491
- var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
2492
 
2493
- domUtils[name] = function (elem, v) {
2494
- var val = v;
2495
- if (val !== undefined) {
2496
- if (elem) {
2497
- var computedStyle = getComputedStyleX(elem);
2498
- var isBorderBox = isBorderBoxFn(elem);
2499
- if (isBorderBox) {
2500
- val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);
2501
- }
2502
- return css(elem, name, val);
2503
- }
2504
- return undefined;
2505
- }
2506
- return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
2507
- };
2508
- });
2509
 
2510
- function mix(to, from) {
2511
- for (var i in from) {
2512
- if (from.hasOwnProperty(i)) {
2513
- to[i] = from[i];
2514
- }
2515
- }
2516
- return to;
2517
- }
2518
 
2519
- var utils = {
2520
- getWindow: function getWindow(node) {
2521
- if (node && node.document && node.setTimeout) {
2522
- return node;
2523
- }
2524
- var doc = node.ownerDocument || node;
2525
- return doc.defaultView || doc.parentWindow;
2526
- },
2527
 
2528
- getDocument: getDocument,
2529
- offset: function offset(el, value, option) {
2530
- if (typeof value !== 'undefined') {
2531
- setOffset(el, value, option || {});
2532
- } else {
2533
- return getOffset(el);
2534
- }
2535
- },
2536
 
2537
- isWindow: isWindow,
2538
- each: each,
2539
- css: css,
2540
- clone: function clone(obj) {
2541
- var i = void 0;
2542
- var ret = {};
2543
- for (i in obj) {
2544
- if (obj.hasOwnProperty(i)) {
2545
- ret[i] = obj[i];
2546
- }
2547
- }
2548
- var overflow = obj.overflow;
2549
- if (overflow) {
2550
- for (i in obj) {
2551
- if (obj.hasOwnProperty(i)) {
2552
- ret.overflow[i] = obj.overflow[i];
2553
- }
2554
  }
2555
- }
2556
- return ret;
2557
- },
2558
 
2559
- mix: mix,
2560
- getWindowScrollLeft: function getWindowScrollLeft(w) {
2561
- return getScrollLeft(w);
2562
- },
2563
- getWindowScrollTop: function getWindowScrollTop(w) {
2564
- return getScrollTop(w);
2565
- },
2566
- merge: function merge() {
2567
- var ret = {};
2568
 
2569
- for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {
2570
- args[_key3] = arguments[_key3];
2571
- }
 
 
 
 
2572
 
2573
- for (var i = 0; i < args.length; i++) {
2574
- utils.mix(ret, args[i]);
2575
- }
2576
- return ret;
2577
- },
2578
 
2579
- viewportWidth: 0,
2580
- viewportHeight: 0
2581
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2582
 
2583
- mix(utils, domUtils);
 
 
 
 
 
 
 
 
 
 
 
 
2584
 
2585
- /* harmony default export */ __webpack_exports__["a"] = (utils);
 
 
 
 
 
2586
 
2587
- /***/ }),
2588
- /* 40 */
2589
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
2590
 
2591
- "use strict";
2592
- /* WEBPACK VAR INJECTION */(function(process) {/**
2593
- * Copyright (c) 2013-present, Facebook, Inc.
2594
- *
2595
- * This source code is licensed under the MIT license found in the
2596
- * LICENSE file in the root directory of this source tree.
2597
- *
2598
- */
2599
 
 
 
 
 
 
 
 
 
 
 
 
2600
 
 
 
 
 
 
 
 
2601
 
2602
- var emptyObject = {};
 
 
 
 
 
 
 
 
 
 
 
 
2603
 
2604
- if (process.env.NODE_ENV !== 'production') {
2605
- Object.freeze(emptyObject);
2606
- }
 
 
 
 
2607
 
2608
- module.exports = emptyObject;
2609
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
 
 
 
 
 
 
 
 
 
 
 
 
2610
 
2611
- /***/ }),
2612
- /* 41 */
2613
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
2614
 
2615
- "use strict";
2616
- /* WEBPACK VAR INJECTION */(function(process) {/**
2617
- * Copyright (c) 2014-present, Facebook, Inc.
2618
- *
2619
- * This source code is licensed under the MIT license found in the
2620
- * LICENSE file in the root directory of this source tree.
2621
- *
2622
- */
 
 
 
 
 
2623
 
 
 
 
 
 
 
 
 
 
 
 
 
2624
 
 
 
 
 
 
 
 
2625
 
2626
- var emptyFunction = __webpack_require__(23);
 
 
 
 
 
 
 
 
 
 
 
 
2627
 
2628
- /**
2629
- * Similar to invariant but only logs a warning if the condition is not met.
2630
- * This can be used to log issues in development environments in critical
2631
- * paths. Removing the logging code for production environments will keep the
2632
- * same logic and follow the same code paths.
2633
- */
2634
 
2635
- var warning = emptyFunction;
 
 
 
 
 
 
 
 
 
 
 
2636
 
2637
- if (process.env.NODE_ENV !== 'production') {
2638
- var printWarning = function printWarning(format) {
2639
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2640
- args[_key - 1] = arguments[_key];
2641
  }
 
 
2642
 
2643
- var argIndex = 0;
2644
- var message = 'Warning: ' + format.replace(/%s/g, function () {
2645
- return args[argIndex++];
2646
- });
2647
- if (typeof console !== 'undefined') {
2648
- console.error(message);
2649
- }
2650
- try {
2651
- // --- Welcome to debugging React ---
2652
- // This error was thrown as a convenience so that you can use this stack
2653
- // to find the callsite that caused this warning to fire.
2654
- throw new Error(message);
2655
- } catch (x) {}
2656
- };
 
2657
 
2658
- warning = function warning(condition, format) {
2659
- if (format === undefined) {
2660
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
2661
  }
2662
-
2663
- if (format.indexOf('Failed Composite propType: ') === 0) {
2664
- return; // Ignore CompositeComponent proptype check.
2665
  }
 
 
2666
 
2667
- if (!condition) {
2668
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
2669
- args[_key2 - 2] = arguments[_key2];
2670
- }
2671
-
2672
- printWarning.apply(undefined, [format].concat(args));
 
 
 
 
 
 
 
 
 
 
2673
  }
2674
- };
2675
- }
 
 
 
2676
 
2677
- module.exports = warning;
2678
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
 
 
 
 
 
 
 
 
 
 
 
2679
 
2680
- /***/ }),
2681
- /* 42 */
2682
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
2683
 
2684
- "use strict";
 
 
 
 
 
 
 
2685
 
 
 
 
 
 
 
 
 
 
 
2686
 
2687
- exports.__esModule = true;
 
 
 
 
 
 
 
 
 
2688
 
2689
- var _iterator = __webpack_require__(209);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2690
 
2691
- var _iterator2 = _interopRequireDefault(_iterator);
 
 
 
 
 
 
 
 
 
 
 
 
 
2692
 
2693
- var _symbol = __webpack_require__(219);
 
 
 
 
 
 
2694
 
2695
- var _symbol2 = _interopRequireDefault(_symbol);
 
 
 
 
 
 
 
 
 
 
 
 
 
2696
 
2697
- var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
 
 
 
 
 
 
 
 
 
 
 
 
2698
 
2699
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 
 
 
 
 
2700
 
2701
- exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
2702
- return typeof obj === "undefined" ? "undefined" : _typeof(obj);
2703
- } : function (obj) {
2704
- return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
2705
- };
 
 
 
 
 
2706
 
2707
- /***/ }),
2708
- /* 43 */
2709
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
2710
 
2711
- // optional / simple context binding
2712
- var aFunction = __webpack_require__(56);
2713
- module.exports = function (fn, that, length) {
2714
- aFunction(fn);
2715
- if (that === undefined) return fn;
2716
- switch (length) {
2717
- case 1: return function (a) {
2718
- return fn.call(that, a);
2719
- };
2720
- case 2: return function (a, b) {
2721
- return fn.call(that, a, b);
2722
  };
2723
- case 3: return function (a, b, c) {
2724
- return fn.call(that, a, b, c);
 
 
 
 
 
 
 
 
 
 
2725
  };
2726
  }
2727
- return function (/* ...args */) {
2728
- return fn.apply(that, arguments);
2729
- };
2730
- };
2731
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2732
 
2733
- /***/ }),
2734
- /* 44 */
2735
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
2736
 
2737
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
2738
- var $keys = __webpack_require__(124);
2739
- var enumBugKeys = __webpack_require__(84);
 
 
 
2740
 
2741
- module.exports = Object.keys || function keys(O) {
2742
- return $keys(O, enumBugKeys);
2743
- };
 
 
 
 
 
 
 
 
 
 
2744
 
 
 
 
 
 
 
 
 
2745
 
2746
- /***/ }),
2747
- /* 45 */
2748
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
2749
 
2750
- var toString = {}.toString;
 
 
 
 
2751
 
2752
- module.exports = function (it) {
2753
- return toString.call(it).slice(8, -1);
2754
- };
 
 
 
 
 
 
 
 
 
 
 
2755
 
 
 
 
 
 
 
 
 
 
 
 
 
2756
 
2757
- /***/ }),
2758
- /* 46 */
2759
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
2760
 
2761
- module.exports = { "default": __webpack_require__(236), __esModule: true };
 
 
 
 
 
 
 
 
 
 
2762
 
2763
- /***/ }),
2764
- /* 47 */
2765
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
2766
 
2767
- "use strict";
 
 
2768
 
 
 
 
 
 
 
 
 
 
 
 
2769
 
2770
- exports.__esModule = true;
 
 
2771
 
2772
- exports.default = function (obj, keys) {
2773
- var target = {};
 
 
 
 
 
 
 
 
 
2774
 
2775
- for (var i in obj) {
2776
- if (keys.indexOf(i) >= 0) continue;
2777
- if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
2778
- target[i] = obj[i];
 
 
2779
  }
2780
 
2781
- return target;
2782
- };
2783
-
2784
- /***/ }),
2785
- /* 48 */
2786
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
2787
 
2788
- "use strict";
2789
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
2790
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cancelAnimationTimeout", function() { return cancelAnimationTimeout; });
2791
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "requestAnimationTimeout", function() { return requestAnimationTimeout; });
2792
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animationFrame__ = __webpack_require__(255);
 
 
 
2793
 
 
 
 
 
 
 
 
 
 
 
2794
 
2795
- var babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId = {
2796
- id: __webpack_require__(0).number.isRequired
2797
- };
2798
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId', {
2799
- value: babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId,
2800
- configurable: true
2801
- });
 
 
 
 
2802
 
 
 
 
 
 
 
 
 
 
 
2803
 
2804
- var cancelAnimationTimeout = function cancelAnimationTimeout(frame) {
2805
- return Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["a" /* caf */])(frame.id);
2806
- };
 
 
 
 
 
 
 
2807
 
2808
- /**
2809
- * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.
2810
- * When the delay time has been reached the function you're timing out will be called.
2811
- *
2812
- * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)
2813
- */
2814
- var requestAnimationTimeout = function requestAnimationTimeout(callback, delay) {
2815
- var start = Date.now();
 
 
2816
 
2817
- var timeout = function timeout() {
2818
- if (Date.now() - start >= delay) {
2819
- callback.call();
2820
- } else {
2821
- frame.id = Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["b" /* raf */])(timeout);
2822
  }
2823
- };
 
2824
 
2825
- var frame = {
2826
- id: Object(__WEBPACK_IMPORTED_MODULE_0__animationFrame__["b" /* raf */])(timeout)
2827
- };
 
 
 
 
 
 
 
2828
 
2829
- return frame;
2830
- };
 
 
 
2831
 
2832
- /***/ }),
2833
- /* 49 */
2834
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
2835
 
2836
- var babelPluginFlowReactPropTypes_proptype_CellDataGetterParams = {
2837
- columnData: __webpack_require__(0).any,
2838
- dataKey: __webpack_require__(0).string.isRequired,
2839
- rowData: function rowData(props, propName, componentName) {
2840
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
2841
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2842
  }
 
2843
  }
2844
- };
2845
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_CellDataGetterParams", {
2846
- value: babelPluginFlowReactPropTypes_proptype_CellDataGetterParams,
2847
- configurable: true
2848
- });
2849
- var babelPluginFlowReactPropTypes_proptype_CellRendererParams = {
2850
- cellData: __webpack_require__(0).any,
2851
- columnData: __webpack_require__(0).any,
2852
- dataKey: __webpack_require__(0).string.isRequired,
2853
- rowData: function rowData(props, propName, componentName) {
2854
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
2855
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
2856
- }
2857
- },
2858
- rowIndex: __webpack_require__(0).number.isRequired
2859
- };
2860
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_CellRendererParams", {
2861
- value: babelPluginFlowReactPropTypes_proptype_CellRendererParams,
2862
- configurable: true
2863
- });
2864
- var babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams = {
2865
- className: __webpack_require__(0).string.isRequired,
2866
- columns: __webpack_require__(0).arrayOf(__webpack_require__(0).any).isRequired,
2867
- style: function style(props, propName, componentName) {
2868
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
2869
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
2870
- }
2871
- }
2872
- };
2873
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams", {
2874
- value: babelPluginFlowReactPropTypes_proptype_HeaderRowRendererParams,
2875
- configurable: true
2876
- });
2877
- var babelPluginFlowReactPropTypes_proptype_HeaderRendererParams = {
2878
- columnData: __webpack_require__(0).any,
2879
- dataKey: __webpack_require__(0).string.isRequired,
2880
- disableSort: __webpack_require__(0).bool,
2881
- label: __webpack_require__(0).any,
2882
- sortBy: __webpack_require__(0).string,
2883
- sortDirection: __webpack_require__(0).string
2884
- };
2885
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_HeaderRendererParams", {
2886
- value: babelPluginFlowReactPropTypes_proptype_HeaderRendererParams,
2887
- configurable: true
2888
- });
2889
- var babelPluginFlowReactPropTypes_proptype_RowRendererParams = {
2890
- className: __webpack_require__(0).string.isRequired,
2891
- columns: __webpack_require__(0).arrayOf(__webpack_require__(0).any).isRequired,
2892
- index: __webpack_require__(0).number.isRequired,
2893
- isScrolling: __webpack_require__(0).bool.isRequired,
2894
- onRowClick: __webpack_require__(0).func,
2895
- onRowDoubleClick: __webpack_require__(0).func,
2896
- onRowMouseOver: __webpack_require__(0).func,
2897
- onRowMouseOut: __webpack_require__(0).func,
2898
- rowData: function rowData(props, propName, componentName) {
2899
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
2900
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
2901
- }
2902
- },
2903
- style: function style(props, propName, componentName) {
2904
- if (!Object.prototype.hasOwnProperty.call(props, propName)) {
2905
- throw new Error("Prop `" + propName + "` has type 'any' or 'mixed', but was not provided to `" + componentName + "`. Pass undefined or any other value.");
2906
- }
2907
- }
2908
- };
2909
- if (true) Object.defineProperty(exports, "babelPluginFlowReactPropTypes_proptype_RowRendererParams", {
2910
- value: babelPluginFlowReactPropTypes_proptype_RowRendererParams,
2911
- configurable: true
2912
- });
2913
-
2914
- /***/ }),
2915
- /* 50 */
2916
- /***/ (function(module, exports) {
2917
-
2918
- module.exports = function(module) {
2919
- if(!module.webpackPolyfill) {
2920
- module.deprecate = function() {};
2921
- module.paths = [];
2922
- // module.parent = undefined by default
2923
- if(!module.children) module.children = [];
2924
- Object.defineProperty(module, "loaded", {
2925
- enumerable: true,
2926
- get: function() {
2927
- return module.l;
2928
- }
2929
- });
2930
- Object.defineProperty(module, "id", {
2931
- enumerable: true,
2932
- get: function() {
2933
- return module.i;
2934
- }
2935
- });
2936
- module.webpackPolyfill = 1;
2937
- }
2938
- return module;
2939
- };
2940
-
2941
-
2942
- /***/ }),
2943
- /* 51 */
2944
- /***/ (function(module, exports, __webpack_require__) {
2945
-
2946
- var freeGlobal = __webpack_require__(152);
2947
-
2948
- /** Detect free variable `self`. */
2949
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2950
-
2951
- /** Used as a reference to the global object. */
2952
- var root = freeGlobal || freeSelf || Function('return this')();
2953
-
2954
- module.exports = root;
2955
-
2956
-
2957
- /***/ }),
2958
- /* 52 */
2959
- /***/ (function(module, exports) {
2960
-
2961
- /**
2962
- * Checks if `value` is object-like. A value is object-like if it's not `null`
2963
- * and has a `typeof` result of "object".
2964
- *
2965
- * @static
2966
- * @memberOf _
2967
- * @since 4.0.0
2968
- * @category Lang
2969
- * @param {*} value The value to check.
2970
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2971
- * @example
2972
- *
2973
- * _.isObjectLike({});
2974
- * // => true
2975
- *
2976
- * _.isObjectLike([1, 2, 3]);
2977
- * // => true
2978
- *
2979
- * _.isObjectLike(_.noop);
2980
- * // => false
2981
- *
2982
- * _.isObjectLike(null);
2983
- * // => false
2984
- */
2985
- function isObjectLike(value) {
2986
- return value != null && typeof value == 'object';
2987
- }
2988
-
2989
- module.exports = isObjectLike;
2990
-
2991
-
2992
- /***/ }),
2993
- /* 53 */
2994
- /***/ (function(module, exports) {
2995
-
2996
- /**
2997
- * Checks if `value` is the
2998
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2999
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3000
- *
3001
- * @static
3002
- * @memberOf _
3003
- * @since 0.1.0
3004
- * @category Lang
3005
- * @param {*} value The value to check.
3006
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3007
- * @example
3008
- *
3009
- * _.isObject({});
3010
- * // => true
3011
- *
3012
- * _.isObject([1, 2, 3]);
3013
- * // => true
3014
- *
3015
- * _.isObject(_.noop);
3016
- * // => true
3017
- *
3018
- * _.isObject(null);
3019
- * // => false
3020
- */
3021
- function isObject(value) {
3022
- var type = typeof value;
3023
- return value != null && (type == 'object' || type == 'function');
3024
- }
3025
 
3026
- module.exports = isObject;
 
 
 
 
 
 
 
 
 
 
 
 
3027
 
 
 
 
 
 
 
 
 
 
 
3028
 
3029
- /***/ }),
3030
- /* 54 */
3031
- /***/ (function(module, exports, __webpack_require__) {
 
 
3032
 
3033
- "use strict";
 
 
 
 
 
 
 
 
 
3034
 
3035
- var $at = __webpack_require__(211)(true);
3036
-
3037
- // 21.1.3.27 String.prototype[@@iterator]()
3038
- __webpack_require__(121)(String, 'String', function (iterated) {
3039
- this._t = String(iterated); // target
3040
- this._i = 0; // next index
3041
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
3042
- }, function () {
3043
- var O = this._t;
3044
- var index = this._i;
3045
- var point;
3046
- if (index >= O.length) return { value: undefined, done: true };
3047
- point = $at(O, index);
3048
- this._i += point.length;
3049
- return { value: point, done: false };
3050
- });
3051
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3052
 
3053
- /***/ }),
3054
- /* 55 */
3055
- /***/ (function(module, exports) {
 
 
 
 
3056
 
3057
- module.exports = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3058
 
 
 
 
 
 
 
 
 
 
 
 
 
3059
 
3060
- /***/ }),
3061
- /* 56 */
3062
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
3063
 
3064
- module.exports = function (it) {
3065
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
3066
- return it;
3067
- };
 
 
 
 
3068
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3069
 
3070
- /***/ }),
3071
- /* 57 */
3072
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
3073
 
3074
- module.exports = function (bitmap, value) {
3075
- return {
3076
- enumerable: !(bitmap & 1),
3077
- configurable: !(bitmap & 2),
3078
- writable: !(bitmap & 4),
3079
- value: value
3080
- };
3081
- };
 
 
3082
 
 
3083
 
3084
- /***/ }),
3085
- /* 58 */
3086
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3087
 
3088
- var id = 0;
3089
- var px = Math.random();
3090
- module.exports = function (key) {
3091
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
3092
- };
 
 
 
 
 
3093
 
 
 
 
 
3094
 
3095
- /***/ }),
3096
- /* 59 */
3097
- /***/ (function(module, exports, __webpack_require__) {
3098
 
3099
- var def = __webpack_require__(24).f;
3100
- var has = __webpack_require__(29);
3101
- var TAG = __webpack_require__(12)('toStringTag');
3102
 
3103
- module.exports = function (it, tag, stat) {
3104
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
3105
- };
3106
 
 
 
3107
 
3108
- /***/ }),
3109
- /* 60 */
3110
- /***/ (function(module, exports, __webpack_require__) {
 
 
3111
 
3112
- // 7.1.13 ToObject(argument)
3113
- var defined = __webpack_require__(78);
3114
- module.exports = function (it) {
3115
- return Object(defined(it));
3116
- };
 
3117
 
 
 
3118
 
3119
- /***/ }),
3120
- /* 61 */
3121
- /***/ (function(module, exports, __webpack_require__) {
3122
 
3123
- __webpack_require__(216);
3124
- var global = __webpack_require__(14);
3125
- var hide = __webpack_require__(28);
3126
- var Iterators = __webpack_require__(36);
3127
- var TO_STRING_TAG = __webpack_require__(12)('toStringTag');
3128
 
3129
- var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
3130
- 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
3131
- 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
3132
- 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
3133
- 'TextTrackList,TouchList').split(',');
 
 
 
 
 
 
 
3134
 
3135
- for (var i = 0; i < DOMIterables.length; i++) {
3136
- var NAME = DOMIterables[i];
3137
- var Collection = global[NAME];
3138
- var proto = Collection && Collection.prototype;
3139
- if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
3140
- Iterators[NAME] = Iterators.Array;
3141
- }
3142
 
 
 
 
 
3143
 
3144
- /***/ }),
3145
- /* 62 */
3146
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
3147
 
3148
- exports.f = {}.propertyIsEnumerable;
 
 
 
 
 
 
3149
 
 
 
3150
 
3151
- /***/ }),
3152
- /* 63 */
3153
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3154
 
3155
- "use strict";
3156
- var SortDirection = {
3157
- /**
3158
- * Sort items in ascending order.
3159
- * This means arranging from the lowest value to the highest (e.g. a-z, 0-9).
3160
- */
3161
- ASC: 'ASC',
3162
 
3163
- /**
3164
- * Sort items in descending order.
3165
- * This means arranging from the highest value to the lowest (e.g. z-a, 9-0).
3166
- */
3167
- DESC: 'DESC'
3168
- };
3169
 
3170
- /* harmony default export */ __webpack_exports__["a"] = (SortDirection);
3171
 
3172
- /***/ }),
3173
- /* 64 */
3174
- /***/ (function(module, exports, __webpack_require__) {
3175
-
3176
- var Symbol = __webpack_require__(97),
3177
- getRawTag = __webpack_require__(309),
3178
- objectToString = __webpack_require__(310);
3179
-
3180
- /** `Object#toString` result references. */
3181
- var nullTag = '[object Null]',
3182
- undefinedTag = '[object Undefined]';
3183
-
3184
- /** Built-in value references. */
3185
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3186
 
3187
- /**
3188
- * The base implementation of `getTag` without fallbacks for buggy environments.
3189
- *
3190
- * @private
3191
- * @param {*} value The value to query.
3192
- * @returns {string} Returns the `toStringTag`.
3193
- */
3194
- function baseGetTag(value) {
3195
- if (value == null) {
3196
- return value === undefined ? undefinedTag : nullTag;
3197
- }
3198
- return (symToStringTag && symToStringTag in Object(value))
3199
- ? getRawTag(value)
3200
- : objectToString(value);
3201
- }
 
 
 
 
 
 
 
 
3202
 
3203
- module.exports = baseGetTag;
 
 
 
 
 
 
 
3204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3205
 
3206
- /***/ }),
3207
- /* 65 */
3208
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
3209
 
3210
- "use strict";
 
 
 
 
 
 
3211
 
 
 
 
 
 
 
 
3212
 
3213
- Object.defineProperty(exports, "__esModule", {
3214
- value: true
3215
- });
3216
- exports.END_DRAG = exports.DROP = exports.HOVER = exports.PUBLISH_DRAG_SOURCE = exports.BEGIN_DRAG = undefined;
 
 
 
3217
 
3218
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
 
 
 
 
 
 
3219
 
3220
- exports.beginDrag = beginDrag;
3221
- exports.publishDragSource = publishDragSource;
3222
- exports.hover = hover;
3223
- exports.drop = drop;
3224
- exports.endDrag = endDrag;
 
 
3225
 
3226
- var _invariant = __webpack_require__(15);
 
 
 
 
 
 
 
 
3227
 
3228
- var _invariant2 = _interopRequireDefault(_invariant);
 
 
3229
 
3230
- var _isArray = __webpack_require__(33);
 
3231
 
3232
- var _isArray2 = _interopRequireDefault(_isArray);
3233
 
3234
- var _isObject = __webpack_require__(53);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3235
 
3236
- var _isObject2 = _interopRequireDefault(_isObject);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3237
 
3238
- var _matchesType = __webpack_require__(154);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3239
 
3240
- var _matchesType2 = _interopRequireDefault(_matchesType);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3241
 
3242
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 
 
3243
 
3244
- var BEGIN_DRAG = exports.BEGIN_DRAG = 'dnd-core/BEGIN_DRAG';
3245
- var PUBLISH_DRAG_SOURCE = exports.PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE';
3246
- var HOVER = exports.HOVER = 'dnd-core/HOVER';
3247
- var DROP = exports.DROP = 'dnd-core/DROP';
3248
- var END_DRAG = exports.END_DRAG = 'dnd-core/END_DRAG';
3249
 
3250
- function beginDrag(sourceIds) {
3251
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { publishSource: true, clientOffset: null };
3252
- var publishSource = options.publishSource,
3253
- clientOffset = options.clientOffset,
3254
- getSourceClientOffset = options.getSourceClientOffset;
3255
 
3256
- (0, _invariant2.default)((0, _isArray2.default)(sourceIds), 'Expected sourceIds to be an array.');
 
 
 
 
3257
 
3258
- var monitor = this.getMonitor();
3259
- var registry = this.getRegistry();
3260
- (0, _invariant2.default)(!monitor.isDragging(), 'Cannot call beginDrag while dragging.');
 
 
 
 
 
 
 
 
 
 
 
3261
 
3262
- for (var i = 0; i < sourceIds.length; i++) {
3263
- (0, _invariant2.default)(registry.getSource(sourceIds[i]), 'Expected sourceIds to be registered.');
3264
- }
3265
 
3266
- var sourceId = null;
3267
- for (var _i = sourceIds.length - 1; _i >= 0; _i--) {
3268
- if (monitor.canDragSource(sourceIds[_i])) {
3269
- sourceId = sourceIds[_i];
3270
- break;
3271
- }
3272
- }
3273
- if (sourceId === null) {
3274
- return;
3275
- }
3276
 
3277
- var sourceClientOffset = null;
3278
- if (clientOffset) {
3279
- (0, _invariant2.default)(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.');
3280
- sourceClientOffset = getSourceClientOffset(sourceId);
3281
- }
 
 
 
 
 
3282
 
3283
- var source = registry.getSource(sourceId);
3284
- var item = source.beginDrag(monitor, sourceId);
3285
- (0, _invariant2.default)((0, _isObject2.default)(item), 'Item must be an object.');
 
 
 
3286
 
3287
- registry.pinSource(sourceId);
 
 
 
 
 
 
 
 
 
 
3288
 
3289
- var itemType = registry.getSourceType(sourceId);
3290
- return {
3291
- type: BEGIN_DRAG,
3292
- itemType: itemType,
3293
- item: item,
3294
- sourceId: sourceId,
3295
- clientOffset: clientOffset,
3296
- sourceClientOffset: sourceClientOffset,
3297
- isSourcePublic: publishSource
3298
- };
3299
- }
 
 
 
 
3300
 
3301
- function publishDragSource() {
3302
- var monitor = this.getMonitor();
3303
- if (!monitor.isDragging()) {
3304
- return;
3305
- }
 
 
 
 
 
 
 
 
 
 
 
 
3306
 
3307
- return { type: PUBLISH_DRAG_SOURCE };
3308
- }
 
 
 
 
 
 
 
 
 
 
 
3309
 
3310
- function hover(targetIdsArg) {
3311
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
3312
- _ref$clientOffset = _ref.clientOffset,
3313
- clientOffset = _ref$clientOffset === undefined ? null : _ref$clientOffset;
3314
-
3315
- (0, _invariant2.default)((0, _isArray2.default)(targetIdsArg), 'Expected targetIds to be an array.');
3316
- var targetIds = targetIdsArg.slice(0);
 
 
 
 
 
 
 
 
 
3317
 
3318
- var monitor = this.getMonitor();
3319
- var registry = this.getRegistry();
3320
- (0, _invariant2.default)(monitor.isDragging(), 'Cannot call hover while not dragging.');
3321
- (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call hover after drop.');
 
 
3322
 
3323
- // First check invariants.
3324
- for (var i = 0; i < targetIds.length; i++) {
3325
- var targetId = targetIds[i];
3326
- (0, _invariant2.default)(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.');
3327
 
3328
- var target = registry.getTarget(targetId);
3329
- (0, _invariant2.default)(target, 'Expected targetIds to be registered.');
3330
- }
 
 
 
 
 
 
 
3331
 
3332
- var draggedItemType = monitor.getItemType();
 
 
 
 
 
3333
 
3334
- // Remove those targetIds that don't match the targetType. This
3335
- // fixes shallow isOver which would only be non-shallow because of
3336
- // non-matching targets.
3337
- for (var _i2 = targetIds.length - 1; _i2 >= 0; _i2--) {
3338
- var _targetId = targetIds[_i2];
3339
- var targetType = registry.getTargetType(_targetId);
3340
- if (!(0, _matchesType2.default)(targetType, draggedItemType)) {
3341
- targetIds.splice(_i2, 1);
3342
- }
3343
- }
 
3344
 
3345
- // Finally call hover on all matching targets.
3346
- for (var _i3 = 0; _i3 < targetIds.length; _i3++) {
3347
- var _targetId2 = targetIds[_i3];
3348
- var _target = registry.getTarget(_targetId2);
3349
- _target.hover(monitor, _targetId2);
3350
- }
 
 
 
 
 
 
3351
 
3352
- return {
3353
- type: HOVER,
3354
- targetIds: targetIds,
3355
- clientOffset: clientOffset
3356
- };
3357
- }
 
 
 
 
 
 
3358
 
3359
- function drop() {
3360
- var _this = this;
 
 
 
 
 
 
 
 
 
 
3361
 
3362
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
3363
 
3364
- var monitor = this.getMonitor();
3365
- var registry = this.getRegistry();
3366
- (0, _invariant2.default)(monitor.isDragging(), 'Cannot call drop while not dragging.');
3367
- (0, _invariant2.default)(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.');
 
 
 
 
 
 
 
 
3368
 
3369
- var targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor);
 
 
 
 
 
 
 
 
 
 
 
 
3370
 
3371
- targetIds.reverse();
3372
- targetIds.forEach(function (targetId, index) {
3373
- var target = registry.getTarget(targetId);
 
 
 
 
 
3374
 
3375
- var dropResult = target.drop(monitor, targetId);
3376
- (0, _invariant2.default)(typeof dropResult === 'undefined' || (0, _isObject2.default)(dropResult), 'Drop result must either be an object or undefined.');
3377
- if (typeof dropResult === 'undefined') {
3378
- dropResult = index === 0 ? {} : monitor.getDropResult();
3379
- }
 
3380
 
3381
- _this.store.dispatch({
3382
- type: DROP,
3383
- dropResult: _extends({}, options, dropResult)
3384
- });
3385
- });
3386
- }
3387
 
3388
- function endDrag() {
3389
- var monitor = this.getMonitor();
3390
- var registry = this.getRegistry();
3391
- (0, _invariant2.default)(monitor.isDragging(), 'Cannot call endDrag while not dragging.');
 
 
 
 
 
 
3392
 
3393
- var sourceId = monitor.getSourceId();
3394
- var source = registry.getSource(sourceId, true);
3395
- source.endDrag(monitor, sourceId);
 
 
 
3396
 
3397
- registry.unpinSource();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3398
 
3399
- return { type: END_DRAG };
3400
- }
 
 
 
 
 
 
 
 
 
 
 
 
3401
 
3402
- /***/ }),
3403
- /* 66 */
3404
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
3405
 
3406
- var getNative = __webpack_require__(67);
 
 
 
 
 
 
 
 
 
 
 
3407
 
3408
- /* Built-in method references that are verified to be native. */
3409
- var nativeCreate = getNative(Object, 'create');
 
 
 
 
 
 
 
 
 
 
 
3410
 
3411
- module.exports = nativeCreate;
 
 
 
3412
 
 
 
 
 
 
 
3413
 
3414
- /***/ }),
3415
- /* 67 */
3416
- /***/ (function(module, exports, __webpack_require__) {
3417
 
3418
- var baseIsNative = __webpack_require__(321),
3419
- getValue = __webpack_require__(325);
 
 
 
 
 
 
 
 
 
3420
 
3421
- /**
3422
- * Gets the native function at `key` of `object`.
3423
- *
3424
- * @private
3425
- * @param {Object} object The object to query.
3426
- * @param {string} key The key of the method to get.
3427
- * @returns {*} Returns the function if it's native, else `undefined`.
3428
- */
3429
- function getNative(object, key) {
3430
- var value = getValue(object, key);
3431
- return baseIsNative(value) ? value : undefined;
3432
- }
3433
 
3434
- module.exports = getNative;
 
 
 
 
 
 
 
 
 
 
 
 
 
3435
 
 
 
 
 
 
 
 
 
 
 
 
 
3436
 
3437
- /***/ }),
3438
- /* 68 */
3439
- /***/ (function(module, exports, __webpack_require__) {
3440
 
3441
- var eq = __webpack_require__(69);
3442
 
3443
- /**
3444
- * Gets the index at which the `key` is found in `array` of key-value pairs.
3445
- *
3446
- * @private
3447
- * @param {Array} array The array to inspect.
3448
- * @param {*} key The key to search for.
3449
- * @returns {number} Returns the index of the matched value, else `-1`.
3450
- */
3451
- function assocIndexOf(array, key) {
3452
- var length = array.length;
3453
- while (length--) {
3454
- if (eq(array[length][0], key)) {
3455
- return length;
3456
  }
3457
- }
3458
- return -1;
3459
- }
3460
 
3461
- module.exports = assocIndexOf;
 
 
 
 
 
 
 
 
 
 
3462
 
 
 
 
 
 
 
 
 
 
 
 
 
3463
 
3464
- /***/ }),
3465
- /* 69 */
3466
- /***/ (function(module, exports) {
3467
 
3468
- /**
3469
- * Performs a
3470
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3471
- * comparison between two values to determine if they are equivalent.
3472
- *
3473
- * @static
3474
- * @memberOf _
3475
- * @since 4.0.0
3476
- * @category Lang
3477
- * @param {*} value The value to compare.
3478
- * @param {*} other The other value to compare.
3479
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3480
- * @example
3481
- *
3482
- * var object = { 'a': 1 };
3483
- * var other = { 'a': 1 };
3484
- *
3485
- * _.eq(object, object);
3486
- * // => true
3487
- *
3488
- * _.eq(object, other);
3489
- * // => false
3490
- *
3491
- * _.eq('a', 'a');
3492
- * // => true
3493
- *
3494
- * _.eq('a', Object('a'));
3495
- * // => false
3496
- *
3497
- * _.eq(NaN, NaN);
3498
- * // => true
3499
- */
3500
- function eq(value, other) {
3501
- return value === other || (value !== value && other !== other);
3502
- }
3503
 
3504
- module.exports = eq;
 
 
 
 
 
 
 
 
 
 
 
3505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3506
 
3507
- /***/ }),
3508
- /* 70 */
3509
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
3510
 
3511
- var isKeyable = __webpack_require__(338);
3512
 
3513
- /**
3514
- * Gets the data for `map`.
3515
- *
3516
- * @private
3517
- * @param {Object} map The map to query.
3518
- * @param {string} key The reference key.
3519
- * @returns {*} Returns the map data.
3520
- */
3521
- function getMapData(map, key) {
3522
- var data = map.__data__;
3523
- return isKeyable(key)
3524
- ? data[typeof key == 'string' ? 'string' : 'hash']
3525
- : data.map;
3526
- }
3527
-
3528
- module.exports = getMapData;
3529
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3530
 
3531
- /***/ }),
3532
- /* 71 */
3533
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
3534
 
3535
- var isArrayLike = __webpack_require__(104),
3536
- isObjectLike = __webpack_require__(52);
 
 
 
 
 
 
 
 
 
3537
 
3538
- /**
3539
- * This method is like `_.isArrayLike` except that it also checks if `value`
3540
- * is an object.
3541
- *
3542
- * @static
3543
- * @memberOf _
3544
- * @since 4.0.0
3545
- * @category Lang
3546
- * @param {*} value The value to check.
3547
- * @returns {boolean} Returns `true` if `value` is an array-like object,
3548
- * else `false`.
3549
- * @example
3550
- *
3551
- * _.isArrayLikeObject([1, 2, 3]);
3552
- * // => true
3553
- *
3554
- * _.isArrayLikeObject(document.body.children);
3555
- * // => true
3556
- *
3557
- * _.isArrayLikeObject('abc');
3558
- * // => false
3559
- *
3560
- * _.isArrayLikeObject(_.noop);
3561
- * // => false
3562
- */
3563
- function isArrayLikeObject(value) {
3564
- return isObjectLike(value) && isArrayLike(value);
3565
- }
3566
 
3567
- module.exports = isArrayLikeObject;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3568
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3569
 
3570
- /***/ }),
3571
- /* 72 */
3572
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3573
 
3574
- "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3575
 
 
 
 
 
 
 
 
 
 
 
 
 
3576
 
3577
- Object.defineProperty(exports, "__esModule", {
3578
- value: true
3579
- });
3580
- exports.addSource = addSource;
3581
- exports.addTarget = addTarget;
3582
- exports.removeSource = removeSource;
3583
- exports.removeTarget = removeTarget;
3584
- var ADD_SOURCE = exports.ADD_SOURCE = 'dnd-core/ADD_SOURCE';
3585
- var ADD_TARGET = exports.ADD_TARGET = 'dnd-core/ADD_TARGET';
3586
- var REMOVE_SOURCE = exports.REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE';
3587
- var REMOVE_TARGET = exports.REMOVE_TARGET = 'dnd-core/REMOVE_TARGET';
 
3588
 
3589
- function addSource(sourceId) {
3590
- return {
3591
- type: ADD_SOURCE,
3592
- sourceId: sourceId
3593
- };
3594
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3595
 
3596
- function addTarget(targetId) {
3597
- return {
3598
- type: ADD_TARGET,
3599
- targetId: targetId
3600
- };
3601
- }
 
 
 
 
 
 
 
3602
 
3603
- function removeSource(sourceId) {
3604
- return {
3605
- type: REMOVE_SOURCE,
3606
- sourceId: sourceId
3607
- };
3608
- }
3609
 
3610
- function removeTarget(targetId) {
3611
- return {
3612
- type: REMOVE_TARGET,
3613
- targetId: targetId
3614
- };
3615
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3616
 
3617
- /***/ }),
3618
- /* 73 */
3619
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3620
 
3621
- "use strict";
3622
- /* WEBPACK VAR INJECTION */(function(process) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3623
 
3624
- Object.defineProperty(exports, "__esModule", {
3625
- value: true
3626
- });
3627
- exports.default = checkDecoratorArguments;
3628
- function checkDecoratorArguments(functionName, signature) {
3629
- if (process.env.NODE_ENV !== 'production') {
3630
- for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i += 1) {
3631
- var arg = arguments.length <= i + 2 ? undefined : arguments[i + 2];
3632
- if (arg && arg.prototype && arg.prototype.render) {
3633
- // eslint-disable-next-line no-console
3634
- console.error('You seem to be applying the arguments in the wrong order. ' + ('It should be ' + functionName + '(' + signature + ')(Component), not the other way around. ') + 'Read more: http://react-dnd.github.io/react-dnd/docs-troubleshooting.html#you-seem-to-be-applying-the-arguments-in-the-wrong-order');
3635
- return;
3636
- }
3637
- }
3638
- }
3639
- }
3640
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
 
 
 
 
 
 
 
3641
 
3642
- /***/ }),
3643
- /* 74 */
3644
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
3645
 
3646
- "use strict";
3647
- /* harmony export (immutable) */ __webpack_exports__["d"] = noop;
3648
- /* harmony export (immutable) */ __webpack_exports__["a"] = getKeyFromChildrenIndex;
3649
- /* harmony export (immutable) */ __webpack_exports__["b"] = loopMenuItem;
3650
- /* harmony export (immutable) */ __webpack_exports__["c"] = loopMenuItemRecusively;
3651
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
3652
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
3653
 
 
 
 
 
3654
 
3655
- function noop() {}
 
3656
 
3657
- function getKeyFromChildrenIndex(child, menuEventKey, index) {
3658
- var prefix = menuEventKey || '';
3659
- return child.key || prefix + 'item_' + index;
3660
- }
3661
 
3662
- function loopMenuItem(children, cb) {
3663
- var index = -1;
3664
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
3665
- index++;
3666
- if (c && c.type && c.type.isMenuItemGroup) {
3667
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(c.props.children, function (c2) {
3668
- index++;
3669
- cb(c2, index);
3670
  });
3671
- } else {
3672
- cb(c, index);
3673
  }
3674
- });
3675
- }
3676
 
3677
- function loopMenuItemRecusively(children, keys, ret) {
3678
- if (!children || ret.find) {
3679
- return;
3680
- }
3681
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
3682
- if (ret.find) {
3683
- return;
 
 
 
 
 
3684
  }
3685
- if (c) {
3686
- var construt = c.type;
3687
- if (!construt || !(construt.isSubMenu || construt.isMenuItem || construt.isMenuItemGroup)) {
3688
- return;
 
 
 
 
 
 
 
 
 
3689
  }
3690
- if (keys.indexOf(c.key) !== -1) {
3691
- ret.find = true;
3692
- } else if (c.props.children) {
3693
- loopMenuItemRecusively(c.props.children, keys, ret);
 
 
 
 
 
3694
  }
 
3695
  }
3696
- });
3697
- }
3698
-
3699
- /***/ }),
3700
- /* 75 */
3701
- /***/ (function(module, exports, __webpack_require__) {
3702
-
3703
- "use strict";
3704
- /* WEBPACK VAR INJECTION */(function(process) {/**
3705
- * Copyright (c) 2013-present, Facebook, Inc.
3706
- *
3707
- * This source code is licensed under the MIT license found in the
3708
- * LICENSE file in the root directory of this source tree.
3709
- */
3710
-
3711
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3712
 
3713
- if (process.env.NODE_ENV !== 'production') {
3714
- var invariant = __webpack_require__(34);
3715
- var warning = __webpack_require__(41);
3716
- var ReactPropTypesSecret = __webpack_require__(76);
3717
- var loggedTypeFailures = {};
3718
- }
3719
-
3720
- /**
3721
- * Assert that the values match with the type specs.
3722
- * Error messages are memorized and will only be shown once.
3723
- *
3724
- * @param {object} typeSpecs Map of name to a ReactPropType
3725
- * @param {object} values Runtime values that need to be type-checked
3726
- * @param {string} location e.g. "prop", "context", "child context"
3727
- * @param {string} componentName Name of the component for error messages.
3728
- * @param {?Function} getStack Returns the component stack.
3729
- * @private
3730
- */
3731
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
3732
- if (process.env.NODE_ENV !== 'production') {
3733
- for (var typeSpecName in typeSpecs) {
3734
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
3735
- var error;
3736
- // Prop type validation may throw. In case they do, we don't want to
3737
- // fail the render phase where it didn't fail before. So we log it.
3738
- // After these have been cleaned up, we'll let them throw.
3739
- try {
3740
- // This is intentionally an invariant that gets caught. It's the same
3741
- // behavior as without this statement except with a better message.
3742
- invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
3743
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3744
- } catch (ex) {
3745
- error = ex;
3746
- }
3747
- warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
3748
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3749
- // Only monitor this failure once because there tends to be a lot of the
3750
- // same error.
3751
- loggedTypeFailures[error.message] = true;
3752
 
3753
- var stack = getStack ? getStack() : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3754
 
3755
- warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
 
 
 
 
 
 
 
 
 
 
 
3756
  }
3757
  }
 
3758
  }
3759
- }
3760
- }
3761
-
3762
- module.exports = checkPropTypes;
3763
-
3764
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
3765
-
3766
- /***/ }),
3767
- /* 76 */
3768
- /***/ (function(module, exports, __webpack_require__) {
3769
-
3770
- "use strict";
3771
- /**
3772
- * Copyright (c) 2013-present, Facebook, Inc.
3773
- *
3774
- * This source code is licensed under the MIT license found in the
3775
- * LICENSE file in the root directory of this source tree.
3776
- */
3777
-
3778
 
 
 
 
 
 
 
 
 
 
3779
 
3780
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3781
-
3782
- module.exports = ReactPropTypesSecret;
 
 
 
 
 
 
3783
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3784
 
3785
- /***/ }),
3786
- /* 77 */
3787
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
3788
 
3789
- // 7.1.4 ToInteger
3790
- var ceil = Math.ceil;
3791
- var floor = Math.floor;
3792
- module.exports = function (it) {
3793
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
3794
- };
3795
 
 
 
 
 
 
 
 
 
 
 
3796
 
3797
- /***/ }),
3798
- /* 78 */
3799
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
3800
 
3801
- // 7.2.1 RequireObjectCoercible(argument)
3802
- module.exports = function (it) {
3803
- if (it == undefined) throw TypeError("Can't call method on " + it);
3804
- return it;
3805
- };
 
 
 
 
 
 
 
 
 
3806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3807
 
3808
- /***/ }),
3809
- /* 79 */
3810
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
3811
 
3812
- var isObject = __webpack_require__(25);
3813
- var document = __webpack_require__(14).document;
3814
- // typeof document.createElement is 'object' in old IE
3815
- var is = isObject(document) && isObject(document.createElement);
3816
- module.exports = function (it) {
3817
- return is ? document.createElement(it) : {};
3818
- };
3819
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3820
 
3821
- /***/ }),
3822
- /* 80 */
3823
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
3824
 
3825
- // 7.1.1 ToPrimitive(input [, PreferredType])
3826
- var isObject = __webpack_require__(25);
3827
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
3828
- // and the second argument - flag - preferred type is a string
3829
- module.exports = function (it, S) {
3830
- if (!isObject(it)) return it;
3831
- var fn, val;
3832
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
3833
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
3834
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
3835
- throw TypeError("Can't convert object to primitive value");
3836
- };
3837
 
 
 
 
 
 
 
 
 
 
 
 
3838
 
3839
- /***/ }),
3840
- /* 81 */
3841
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
3842
 
3843
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
3844
- var anObject = __webpack_require__(19);
3845
- var dPs = __webpack_require__(213);
3846
- var enumBugKeys = __webpack_require__(84);
3847
- var IE_PROTO = __webpack_require__(82)('IE_PROTO');
3848
- var Empty = function () { /* empty */ };
3849
- var PROTOTYPE = 'prototype';
 
 
 
 
 
 
 
3850
 
3851
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
3852
- var createDict = function () {
3853
- // Thrash, waste and sodomy: IE GC bug
3854
- var iframe = __webpack_require__(79)('iframe');
3855
- var i = enumBugKeys.length;
3856
- var lt = '<';
3857
- var gt = '>';
3858
- var iframeDocument;
3859
- iframe.style.display = 'none';
3860
- __webpack_require__(127).appendChild(iframe);
3861
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
3862
- // createDict = iframe.contentWindow.Object;
3863
- // html.removeChild(iframe);
3864
- iframeDocument = iframe.contentWindow.document;
3865
- iframeDocument.open();
3866
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
3867
- iframeDocument.close();
3868
- createDict = iframeDocument.F;
3869
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
3870
- return createDict();
3871
- };
3872
 
3873
- module.exports = Object.create || function create(O, Properties) {
3874
- var result;
3875
- if (O !== null) {
3876
- Empty[PROTOTYPE] = anObject(O);
3877
- result = new Empty();
3878
- Empty[PROTOTYPE] = null;
3879
- // add "__proto__" for Object.getPrototypeOf polyfill
3880
- result[IE_PROTO] = O;
3881
- } else result = createDict();
3882
- return Properties === undefined ? result : dPs(result, Properties);
3883
- };
3884
 
 
 
 
 
 
3885
 
3886
- /***/ }),
3887
- /* 82 */
3888
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
3889
 
3890
- var shared = __webpack_require__(83)('keys');
3891
- var uid = __webpack_require__(58);
3892
- module.exports = function (key) {
3893
- return shared[key] || (shared[key] = uid(key));
3894
- };
 
 
 
 
 
 
 
 
 
 
3895
 
 
 
 
 
 
 
 
 
 
 
 
 
3896
 
3897
- /***/ }),
3898
- /* 83 */
3899
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
3900
 
3901
- var global = __webpack_require__(14);
3902
- var SHARED = '__core-js_shared__';
3903
- var store = global[SHARED] || (global[SHARED] = {});
3904
- module.exports = function (key) {
3905
- return store[key] || (store[key] = {});
3906
- };
 
 
 
 
 
3907
 
 
 
 
 
 
 
 
 
 
 
 
 
3908
 
3909
- /***/ }),
3910
- /* 84 */
3911
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3912
 
3913
- // IE 8- don't enum bug keys
3914
- module.exports = (
3915
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
3916
- ).split(',');
 
 
 
 
 
 
 
3917
 
 
 
3918
 
3919
- /***/ }),
3920
- /* 85 */
3921
- /***/ (function(module, exports, __webpack_require__) {
 
3922
 
3923
- exports.f = __webpack_require__(12);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3924
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3925
 
3926
- /***/ }),
3927
- /* 86 */
3928
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
3929
 
3930
- var global = __webpack_require__(14);
3931
- var core = __webpack_require__(10);
3932
- var LIBRARY = __webpack_require__(55);
3933
- var wksExt = __webpack_require__(85);
3934
- var defineProperty = __webpack_require__(24).f;
3935
- module.exports = function (name) {
3936
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
3937
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
3938
- };
 
3939
 
 
 
 
 
 
 
 
 
 
 
3940
 
3941
- /***/ }),
3942
- /* 87 */
3943
- /***/ (function(module, exports) {
 
 
 
 
 
 
 
3944
 
3945
- exports.f = Object.getOwnPropertySymbols;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3946
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3947
 
3948
- /***/ }),
3949
- /* 88 */
3950
- /***/ (function(module, exports, __webpack_require__) {
3951
 
3952
- var pIE = __webpack_require__(62);
3953
- var createDesc = __webpack_require__(57);
3954
- var toIObject = __webpack_require__(30);
3955
- var toPrimitive = __webpack_require__(80);
3956
- var has = __webpack_require__(29);
3957
- var IE8_DOM_DEFINE = __webpack_require__(122);
3958
- var gOPD = Object.getOwnPropertyDescriptor;
3959
 
3960
- exports.f = __webpack_require__(26) ? gOPD : function getOwnPropertyDescriptor(O, P) {
3961
- O = toIObject(O);
3962
- P = toPrimitive(P, true);
3963
- if (IE8_DOM_DEFINE) try {
3964
- return gOPD(O, P);
3965
- } catch (e) { /* empty */ }
3966
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
3967
- };
 
 
 
 
 
 
 
 
3968
 
 
 
 
3969
 
3970
- /***/ }),
3971
- /* 89 */
3972
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
3973
 
3974
- // getting tag from 19.1.3.6 Object.prototype.toString()
3975
- var cof = __webpack_require__(45);
3976
- var TAG = __webpack_require__(12)('toStringTag');
3977
- // ES3 wrong here
3978
- var ARG = cof(function () { return arguments; }()) == 'Arguments';
 
 
 
 
 
3979
 
3980
- // fallback for IE11 Script Access Denied error
3981
- var tryGet = function (it, key) {
3982
- try {
3983
- return it[key];
3984
- } catch (e) { /* empty */ }
3985
- };
 
 
 
 
 
 
 
 
3986
 
3987
- module.exports = function (it) {
3988
- var O, T, B;
3989
- return it === undefined ? 'Undefined' : it === null ? 'Null'
3990
- // @@toStringTag case
3991
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
3992
- // builtinTag case
3993
- : ARG ? cof(O)
3994
- // ES3 arguments fallback
3995
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
3996
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3997
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3998
 
3999
- /***/ }),
4000
- /* 90 */
4001
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
4002
 
4003
- // most Object methods by ES6 should accept primitives
4004
- var $export = __webpack_require__(18);
4005
- var core = __webpack_require__(10);
4006
- var fails = __webpack_require__(35);
4007
- module.exports = function (KEY, exec) {
4008
- var fn = (core.Object || {})[KEY] || Object[KEY];
4009
- var exp = {};
4010
- exp[KEY] = exec(fn);
4011
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
4012
- };
4013
 
 
 
 
 
 
 
 
 
 
 
 
4014
 
4015
- /***/ }),
4016
- /* 91 */
4017
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4018
 
4019
- !function(root, factory) {
4020
- true ? module.exports = factory() : "function" == typeof define && define.amd ? define([], factory) : "object" == typeof exports ? exports.ReactSortableTree = factory() : root.ReactSortableTree = factory();
4021
- }("undefined" != typeof self ? self : this, function() {
4022
- /******/
4023
- return function(modules) {
4024
- /******/
4025
- /******/
4026
- // The require function
4027
- /******/
4028
- function __webpack_require__(moduleId) {
4029
- /******/
4030
- /******/
4031
- // Check if module is in cache
4032
- /******/
4033
- if (installedModules[moduleId]) /******/
4034
- return installedModules[moduleId].exports;
4035
- /******/
4036
- // Create a new module (and put it into the cache)
4037
- /******/
4038
- var module = installedModules[moduleId] = {
4039
- /******/
4040
- i: moduleId,
4041
- /******/
4042
- l: !1,
4043
- /******/
4044
- exports: {}
4045
- };
4046
- /******/
4047
- /******/
4048
- // Return the exports of the module
4049
- /******/
4050
- /******/
4051
- /******/
4052
- // Execute the module function
4053
- /******/
4054
- /******/
4055
- /******/
4056
- // Flag the module as loaded
4057
- /******/
4058
- return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
4059
- module.l = !0, module.exports;
4060
- }
4061
- // webpackBootstrap
4062
- /******/
4063
- // The module cache
4064
- /******/
4065
- var installedModules = {};
4066
- /******/
4067
- /******/
4068
- // Load entry module and return exports
4069
- /******/
4070
- /******/
4071
- /******/
4072
- /******/
4073
- // expose the modules object (__webpack_modules__)
4074
- /******/
4075
- /******/
4076
- /******/
4077
- // expose the module cache
4078
- /******/
4079
- /******/
4080
- /******/
4081
- // define getter function for harmony exports
4082
- /******/
4083
- /******/
4084
- /******/
4085
- // getDefaultExport function for compatibility with non-harmony modules
4086
- /******/
4087
- /******/
4088
- /******/
4089
- // Object.prototype.hasOwnProperty.call
4090
- /******/
4091
- /******/
4092
- /******/
4093
- // __webpack_public_path__
4094
- /******/
4095
- return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
4096
- __webpack_require__.d = function(exports, name, getter) {
4097
- /******/
4098
- __webpack_require__.o(exports, name) || /******/
4099
- Object.defineProperty(exports, name, {
4100
- /******/
4101
- configurable: !1,
4102
- /******/
4103
- enumerable: !0,
4104
- /******/
4105
- get: getter
4106
- });
4107
- }, __webpack_require__.n = function(module) {
4108
- /******/
4109
- var getter = module && module.__esModule ? /******/
4110
- function() {
4111
- return module.default;
4112
- } : /******/
4113
- function() {
4114
- return module;
4115
- };
4116
- /******/
4117
- /******/
4118
- return __webpack_require__.d(getter, "a", getter), getter;
4119
- }, __webpack_require__.o = function(object, property) {
4120
- return Object.prototype.hasOwnProperty.call(object, property);
4121
- }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 7);
4122
- }([ /* 0 */
4123
- /***/
4124
- function(module, exports, __webpack_require__) {
4125
- "use strict";
4126
- function _toConsumableArray(arr) {
4127
- if (Array.isArray(arr)) {
4128
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
4129
- return arr2;
4130
- }
4131
- return Array.from(arr);
4132
- }
4133
- /**
4134
- * Performs a depth-first traversal over all of the node descendants,
4135
- * incrementing currentIndex by 1 for each
4136
- */
4137
- function getNodeDataAtTreeIndexOrNextIndex(_ref) {
4138
- var targetIndex = _ref.targetIndex, node = _ref.node, currentIndex = _ref.currentIndex, getNodeKey = _ref.getNodeKey, _ref$path = _ref.path, path = void 0 === _ref$path ? [] : _ref$path, _ref$lowerSiblingCoun = _ref.lowerSiblingCounts, lowerSiblingCounts = void 0 === _ref$lowerSiblingCoun ? [] : _ref$lowerSiblingCoun, _ref$ignoreCollapsed = _ref.ignoreCollapsed, ignoreCollapsed = void 0 === _ref$ignoreCollapsed || _ref$ignoreCollapsed, _ref$isPseudoRoot = _ref.isPseudoRoot, isPseudoRoot = void 0 !== _ref$isPseudoRoot && _ref$isPseudoRoot, selfPath = isPseudoRoot ? [] : [].concat(_toConsumableArray(path), [ getNodeKey({
4139
- node: node,
4140
- treeIndex: currentIndex
4141
- }) ]);
4142
- // Return target node when found
4143
- if (currentIndex === targetIndex) return {
4144
- node: node,
4145
- lowerSiblingCounts: lowerSiblingCounts,
4146
- path: selfPath
4147
- };
4148
- // Add one and continue for nodes with no children or hidden children
4149
- if (!node.children || ignoreCollapsed && !0 !== node.expanded) return {
4150
- nextIndex: currentIndex + 1
4151
- };
4152
- for (var childIndex = currentIndex + 1, childCount = node.children.length, i = 0; i < childCount; i += 1) {
4153
- var result = getNodeDataAtTreeIndexOrNextIndex({
4154
- ignoreCollapsed: ignoreCollapsed,
4155
- getNodeKey: getNodeKey,
4156
- targetIndex: targetIndex,
4157
- node: node.children[i],
4158
- currentIndex: childIndex,
4159
- lowerSiblingCounts: [].concat(_toConsumableArray(lowerSiblingCounts), [ childCount - i - 1 ]),
4160
- path: selfPath
4161
- });
4162
- if (result.node) return result;
4163
- childIndex = result.nextIndex;
4164
- }
4165
- // If the target node is not found, return the farthest traversed index
4166
- return {
4167
- nextIndex: childIndex
4168
- };
4169
  }
4170
- function getDescendantCount(_ref2) {
4171
- var node = _ref2.node, _ref2$ignoreCollapsed = _ref2.ignoreCollapsed, ignoreCollapsed = void 0 === _ref2$ignoreCollapsed || _ref2$ignoreCollapsed;
4172
- return getNodeDataAtTreeIndexOrNextIndex({
4173
- getNodeKey: function() {},
4174
- ignoreCollapsed: ignoreCollapsed,
4175
- node: node,
4176
- currentIndex: 0,
4177
- targetIndex: -1
4178
- }).nextIndex - 1;
 
 
 
 
 
 
 
 
 
 
 
 
4179
  }
4180
- /**
4181
- * Walk all descendants of the given node, depth-first
4182
- *
4183
- * @param {Object} args - Function parameters
4184
- * @param {function} args.callback - Function to call on each node
4185
- * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index
4186
- * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4187
- * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves
4188
- * as the parent of all the nodes in the tree
4189
- * @param {Object} args.node - A tree node
4190
- * @param {Object=} args.parentNode - The parent node of `node`
4191
- * @param {number} args.currentIndex - The treeIndex of `node`
4192
- * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed
4193
- * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the
4194
- * previous nodes in this path
4195
- *
4196
- * @return {number|false} nextIndex - Index of the next sibling of `node`,
4197
- * or false if the walk should be terminated
4198
- */
4199
- function walkDescendants(_ref3) {
4200
- var callback = _ref3.callback, getNodeKey = _ref3.getNodeKey, ignoreCollapsed = _ref3.ignoreCollapsed, _ref3$isPseudoRoot = _ref3.isPseudoRoot, isPseudoRoot = void 0 !== _ref3$isPseudoRoot && _ref3$isPseudoRoot, node = _ref3.node, _ref3$parentNode = _ref3.parentNode, parentNode = void 0 === _ref3$parentNode ? null : _ref3$parentNode, currentIndex = _ref3.currentIndex, _ref3$path = _ref3.path, path = void 0 === _ref3$path ? [] : _ref3$path, _ref3$lowerSiblingCou = _ref3.lowerSiblingCounts, lowerSiblingCounts = void 0 === _ref3$lowerSiblingCou ? [] : _ref3$lowerSiblingCou, selfPath = isPseudoRoot ? [] : [].concat(_toConsumableArray(path), [ getNodeKey({
4201
- node: node,
4202
- treeIndex: currentIndex
4203
- }) ]), selfInfo = isPseudoRoot ? null : {
4204
- node: node,
4205
- parentNode: parentNode,
4206
- path: selfPath,
4207
- lowerSiblingCounts: lowerSiblingCounts,
4208
- treeIndex: currentIndex
4209
- };
4210
- if (!isPseudoRoot) {
4211
- // Cut walk short if the callback returned false
4212
- if (!1 === callback(selfInfo)) return !1;
4213
- }
4214
- // Return self on nodes with no children or hidden children
4215
- if (!node.children || !0 !== node.expanded && ignoreCollapsed && !isPseudoRoot) return currentIndex;
4216
- // Get all descendants
4217
- var childIndex = currentIndex, childCount = node.children.length;
4218
- if ("function" != typeof node.children) for (var i = 0; i < childCount; i += 1) // Cut walk short if the callback returned false
4219
- if (!1 === (childIndex = walkDescendants({
4220
- callback: callback,
4221
- getNodeKey: getNodeKey,
4222
- ignoreCollapsed: ignoreCollapsed,
4223
- node: node.children[i],
4224
- parentNode: isPseudoRoot ? null : node,
4225
- currentIndex: childIndex + 1,
4226
- lowerSiblingCounts: [].concat(_toConsumableArray(lowerSiblingCounts), [ childCount - i - 1 ]),
4227
- path: selfPath
4228
- }))) return !1;
4229
- return childIndex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4230
  }
4231
- /**
4232
- * Perform a change on the given node and all its descendants, traversing the tree depth-first
4233
- *
4234
- * @param {Object} args - Function parameters
4235
- * @param {function} args.callback - Function to call on each node
4236
- * @param {function} args.getNodeKey - Function to get the key from the nodeData and tree index
4237
- * @param {boolean} args.ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4238
- * @param {boolean=} args.isPseudoRoot - If true, this node has no real data, and only serves
4239
- * as the parent of all the nodes in the tree
4240
- * @param {Object} args.node - A tree node
4241
- * @param {Object=} args.parentNode - The parent node of `node`
4242
- * @param {number} args.currentIndex - The treeIndex of `node`
4243
- * @param {number[]|string[]} args.path - Array of keys leading up to node to be changed
4244
- * @param {number[]} args.lowerSiblingCounts - An array containing the count of siblings beneath the
4245
- * previous nodes in this path
4246
- *
4247
- * @return {number|false} nextIndex - Index of the next sibling of `node`,
4248
- * or false if the walk should be terminated
4249
- */
4250
- function mapDescendants(_ref4) {
4251
- var callback = _ref4.callback, getNodeKey = _ref4.getNodeKey, ignoreCollapsed = _ref4.ignoreCollapsed, _ref4$isPseudoRoot = _ref4.isPseudoRoot, isPseudoRoot = void 0 !== _ref4$isPseudoRoot && _ref4$isPseudoRoot, node = _ref4.node, _ref4$parentNode = _ref4.parentNode, parentNode = void 0 === _ref4$parentNode ? null : _ref4$parentNode, currentIndex = _ref4.currentIndex, _ref4$path = _ref4.path, path = void 0 === _ref4$path ? [] : _ref4$path, _ref4$lowerSiblingCou = _ref4.lowerSiblingCounts, lowerSiblingCounts = void 0 === _ref4$lowerSiblingCou ? [] : _ref4$lowerSiblingCou, nextNode = _extends({}, node), selfPath = isPseudoRoot ? [] : [].concat(_toConsumableArray(path), [ getNodeKey({
4252
- node: nextNode,
4253
- treeIndex: currentIndex
4254
- }) ]), selfInfo = {
4255
- node: nextNode,
4256
- parentNode: parentNode,
4257
- path: selfPath,
4258
- lowerSiblingCounts: lowerSiblingCounts,
4259
- treeIndex: currentIndex
4260
- };
4261
- // Return self on nodes with no children or hidden children
4262
- if (!nextNode.children || !0 !== nextNode.expanded && ignoreCollapsed && !isPseudoRoot) return {
4263
- treeIndex: currentIndex,
4264
- node: callback(selfInfo)
4265
- };
4266
- // Get all descendants
4267
- var childIndex = currentIndex, childCount = nextNode.children.length;
4268
- return "function" != typeof nextNode.children && (nextNode.children = nextNode.children.map(function(child, i) {
4269
- var mapResult = mapDescendants({
4270
- callback: callback,
4271
- getNodeKey: getNodeKey,
4272
- ignoreCollapsed: ignoreCollapsed,
4273
- node: child,
4274
- parentNode: isPseudoRoot ? null : nextNode,
4275
- currentIndex: childIndex + 1,
4276
- lowerSiblingCounts: [].concat(_toConsumableArray(lowerSiblingCounts), [ childCount - i - 1 ]),
4277
- path: selfPath
4278
- });
4279
- return childIndex = mapResult.treeIndex, mapResult.node;
4280
- })), {
4281
- node: callback(selfInfo),
4282
- treeIndex: childIndex
4283
- };
4284
  }
4285
- /**
4286
- * Count all the visible (expanded) descendants in the tree data.
4287
- *
4288
- * @param {!Object[]} treeData - Tree data
4289
- *
4290
- * @return {number} count
4291
- */
4292
- function getVisibleNodeCount(_ref5) {
4293
- var traverse = function traverse(node) {
4294
- return node.children && !0 === node.expanded && "function" != typeof node.children ? 1 + node.children.reduce(function(total, currentNode) {
4295
- return total + traverse(currentNode);
4296
- }, 0) : 1;
4297
- };
4298
- return _ref5.treeData.reduce(function(total, currentNode) {
4299
- return total + traverse(currentNode);
4300
- }, 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4301
  }
4302
- /**
4303
- * Get the <targetIndex>th visible node in the tree data.
4304
- *
4305
- * @param {!Object[]} treeData - Tree data
4306
- * @param {!number} targetIndex - The index of the node to search for
4307
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4308
- *
4309
- * @return {{
4310
- * node: Object,
4311
- * path: []string|[]number,
4312
- * lowerSiblingCounts: []number
4313
- * }|null} node - The node at targetIndex, or null if not found
4314
- */
4315
- function getVisibleNodeInfoAtIndex(_ref6) {
4316
- var treeData = _ref6.treeData, targetIndex = _ref6.index, getNodeKey = _ref6.getNodeKey;
4317
- if (!treeData || treeData.length < 1) return null;
4318
- // Call the tree traversal with a pseudo-root node
4319
- var result = getNodeDataAtTreeIndexOrNextIndex({
4320
- targetIndex: targetIndex,
4321
- getNodeKey: getNodeKey,
4322
- node: {
4323
- children: treeData,
4324
- expanded: !0
4325
- },
4326
- currentIndex: -1,
4327
- path: [],
4328
- lowerSiblingCounts: [],
4329
- isPseudoRoot: !0
4330
- });
4331
- return result.node ? result : null;
4332
  }
4333
- /**
4334
- * Walk descendants depth-first and call a callback on each
4335
- *
4336
- * @param {!Object[]} treeData - Tree data
4337
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4338
- * @param {function} callback - Function to call on each node
4339
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4340
- *
4341
- * @return void
4342
- */
4343
- function walk(_ref7) {
4344
- var treeData = _ref7.treeData, getNodeKey = _ref7.getNodeKey, callback = _ref7.callback, _ref7$ignoreCollapsed = _ref7.ignoreCollapsed, ignoreCollapsed = void 0 === _ref7$ignoreCollapsed || _ref7$ignoreCollapsed;
4345
- !treeData || treeData.length < 1 || walkDescendants({
4346
- callback: callback,
4347
- getNodeKey: getNodeKey,
4348
- ignoreCollapsed: ignoreCollapsed,
4349
- isPseudoRoot: !0,
4350
- node: {
4351
- children: treeData
4352
- },
4353
- currentIndex: -1,
4354
- path: [],
4355
- lowerSiblingCounts: []
4356
- });
4357
  }
4358
- /**
4359
- * Perform a depth-first transversal of the descendants and
4360
- * make a change to every node in the tree
4361
- *
4362
- * @param {!Object[]} treeData - Tree data
4363
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4364
- * @param {function} callback - Function to call on each node
4365
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4366
- *
4367
- * @return {Object[]} changedTreeData - The changed tree data
4368
- */
4369
- function map(_ref8) {
4370
- var treeData = _ref8.treeData, getNodeKey = _ref8.getNodeKey, callback = _ref8.callback, _ref8$ignoreCollapsed = _ref8.ignoreCollapsed, ignoreCollapsed = void 0 === _ref8$ignoreCollapsed || _ref8$ignoreCollapsed;
4371
- return !treeData || treeData.length < 1 ? [] : mapDescendants({
4372
- callback: callback,
4373
- getNodeKey: getNodeKey,
4374
- ignoreCollapsed: ignoreCollapsed,
4375
- isPseudoRoot: !0,
4376
- node: {
4377
- children: treeData
4378
- },
4379
- currentIndex: -1,
4380
- path: [],
4381
- lowerSiblingCounts: []
4382
- }).node.children;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4383
  }
4384
- /**
4385
- * Expand or close every node in the tree
4386
- *
4387
- * @param {!Object[]} treeData - Tree data
4388
- * @param {?boolean} expanded - Whether the node is expanded or not
4389
- *
4390
- * @return {Object[]} changedTreeData - The changed tree data
4391
- */
4392
- function toggleExpandedForAll(_ref9) {
4393
- var treeData = _ref9.treeData, _ref9$expanded = _ref9.expanded, expanded = void 0 === _ref9$expanded || _ref9$expanded;
4394
- return map({
4395
- treeData: treeData,
4396
- callback: function(_ref10) {
4397
- var node = _ref10.node;
4398
- return _extends({}, node, {
4399
- expanded: expanded
4400
- });
4401
- },
4402
- getNodeKey: function(_ref11) {
4403
- return _ref11.treeIndex;
4404
- },
4405
- ignoreCollapsed: !1
4406
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4407
  }
4408
- /**
4409
- * Replaces node at path with object, or callback-defined object
4410
- *
4411
- * @param {!Object[]} treeData
4412
- * @param {number[]|string[]} path - Array of keys leading up to node to be changed
4413
- * @param {function|any} newNode - Node to replace the node at the path with, or a function producing the new node
4414
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4415
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4416
- *
4417
- * @return {Object[]} changedTreeData - The changed tree data
4418
- */
4419
- function changeNodeAtPath(_ref12) {
4420
- var treeData = _ref12.treeData, path = _ref12.path, newNode = _ref12.newNode, getNodeKey = _ref12.getNodeKey, _ref12$ignoreCollapse = _ref12.ignoreCollapsed, ignoreCollapsed = void 0 === _ref12$ignoreCollapse || _ref12$ignoreCollapse, result = function traverse(_ref13) {
4421
- var _ref13$isPseudoRoot = _ref13.isPseudoRoot, isPseudoRoot = void 0 !== _ref13$isPseudoRoot && _ref13$isPseudoRoot, node = _ref13.node, currentTreeIndex = _ref13.currentTreeIndex, pathIndex = _ref13.pathIndex;
4422
- if (!isPseudoRoot && getNodeKey({
4423
- node: node,
4424
- treeIndex: currentTreeIndex
4425
- }) !== path[pathIndex]) return "RESULT_MISS";
4426
- if (pathIndex >= path.length - 1) // If this is the final location in the path, return its changed form
4427
- return "function" == typeof newNode ? newNode({
4428
- node: node,
4429
- treeIndex: currentTreeIndex
4430
- }) : newNode;
4431
- if (!node.children) // If this node is part of the path, but has no children, return the unchanged node
4432
- throw new Error("Path referenced children of node with no children.");
4433
- for (var nextTreeIndex = currentTreeIndex + 1, i = 0; i < node.children.length; i += 1) {
4434
- var _result = traverse({
4435
- node: node.children[i],
4436
- currentTreeIndex: nextTreeIndex,
4437
- pathIndex: pathIndex + 1
4438
- });
4439
- // If the result went down the correct path
4440
- if ("RESULT_MISS" !== _result) return _result ? _extends({}, node, {
4441
- children: [].concat(_toConsumableArray(node.children.slice(0, i)), [ _result ], _toConsumableArray(node.children.slice(i + 1)))
4442
- }) : _extends({}, node, {
4443
- children: [].concat(_toConsumableArray(node.children.slice(0, i)), _toConsumableArray(node.children.slice(i + 1)))
4444
- });
4445
- nextTreeIndex += 1 + getDescendantCount({
4446
- node: node.children[i],
4447
- ignoreCollapsed: ignoreCollapsed
4448
- });
4449
- }
4450
- return "RESULT_MISS";
4451
- }({
4452
- node: {
4453
- children: treeData
4454
- },
4455
- currentTreeIndex: -1,
4456
- pathIndex: -1,
4457
- isPseudoRoot: !0
4458
- });
4459
- if ("RESULT_MISS" === result) throw new Error("No node found at the given path.");
4460
- return result.children;
4461
  }
4462
- /**
4463
- * Removes the node at the specified path and returns the resulting treeData.
4464
- *
4465
- * @param {!Object[]} treeData
4466
- * @param {number[]|string[]} path - Array of keys leading up to node to be deleted
4467
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4468
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4469
- *
4470
- * @return {Object[]} changedTreeData - The tree data with the node removed
4471
- */
4472
- function removeNodeAtPath(_ref14) {
4473
- var treeData = _ref14.treeData, path = _ref14.path, getNodeKey = _ref14.getNodeKey, _ref14$ignoreCollapse = _ref14.ignoreCollapsed;
4474
- return changeNodeAtPath({
4475
- treeData: treeData,
4476
- path: path,
4477
- getNodeKey: getNodeKey,
4478
- ignoreCollapsed: void 0 === _ref14$ignoreCollapse || _ref14$ignoreCollapse,
4479
- newNode: null
4480
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4481
  }
4482
- /**
4483
- * Removes the node at the specified path and returns the resulting treeData.
4484
- *
4485
- * @param {!Object[]} treeData
4486
- * @param {number[]|string[]} path - Array of keys leading up to node to be deleted
4487
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4488
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4489
- *
4490
- * @return {Object} result
4491
- * @return {Object[]} result.treeData - The tree data with the node removed
4492
- * @return {Object} result.node - The node that was removed
4493
- * @return {number} result.treeIndex - The previous treeIndex of the removed node
4494
- */
4495
- function removeNode(_ref15) {
4496
- var treeData = _ref15.treeData, path = _ref15.path, getNodeKey = _ref15.getNodeKey, _ref15$ignoreCollapse = _ref15.ignoreCollapsed, ignoreCollapsed = void 0 === _ref15$ignoreCollapse || _ref15$ignoreCollapse, removedNode = null, removedTreeIndex = null;
4497
- return {
4498
- treeData: changeNodeAtPath({
4499
- treeData: treeData,
4500
- path: path,
4501
- getNodeKey: getNodeKey,
4502
- ignoreCollapsed: ignoreCollapsed,
4503
- newNode: function(_ref16) {
4504
- var node = _ref16.node, treeIndex = _ref16.treeIndex;
4505
- // Store the target node and delete it from the tree
4506
- return removedNode = node, removedTreeIndex = treeIndex, null;
4507
- }
4508
- }),
4509
- node: removedNode,
4510
- treeIndex: removedTreeIndex
4511
- };
4512
  }
4513
- /**
4514
- * Gets the node at the specified path
4515
- *
4516
- * @param {!Object[]} treeData
4517
- * @param {number[]|string[]} path - Array of keys leading up to node to be deleted
4518
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4519
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4520
- *
4521
- * @return {Object|null} nodeInfo - The node info at the given path, or null if not found
4522
- */
4523
- function getNodeAtPath(_ref17) {
4524
- var treeData = _ref17.treeData, path = _ref17.path, getNodeKey = _ref17.getNodeKey, _ref17$ignoreCollapse = _ref17.ignoreCollapsed, ignoreCollapsed = void 0 === _ref17$ignoreCollapse || _ref17$ignoreCollapse, foundNodeInfo = null;
4525
- try {
4526
- changeNodeAtPath({
4527
- treeData: treeData,
4528
- path: path,
4529
- getNodeKey: getNodeKey,
4530
- ignoreCollapsed: ignoreCollapsed,
4531
- newNode: function(_ref18) {
4532
- var node = _ref18.node, treeIndex = _ref18.treeIndex;
4533
- return foundNodeInfo = {
4534
- node: node,
4535
- treeIndex: treeIndex
4536
- }, node;
4537
- }
4538
- });
4539
- } catch (err) {}
4540
- return foundNodeInfo;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4541
  }
4542
- /**
4543
- * Adds the node to the specified parent and returns the resulting treeData.
4544
- *
4545
- * @param {!Object[]} treeData
4546
- * @param {!Object} newNode - The node to insert
4547
- * @param {number|string} parentKey - The key of the to-be parentNode of the node
4548
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4549
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4550
- * @param {boolean=} expandParent - If true, expands the parentNode specified by parentPath
4551
- *
4552
- * @return {Object} result
4553
- * @return {Object[]} result.treeData - The updated tree data
4554
- * @return {number} result.treeIndex - The tree index at which the node was inserted
4555
- */
4556
- function addNodeUnderParent(_ref19) {
4557
- var treeData = _ref19.treeData, newNode = _ref19.newNode, _ref19$parentKey = _ref19.parentKey, parentKey = void 0 === _ref19$parentKey ? null : _ref19$parentKey, getNodeKey = _ref19.getNodeKey, _ref19$ignoreCollapse = _ref19.ignoreCollapsed, ignoreCollapsed = void 0 === _ref19$ignoreCollapse || _ref19$ignoreCollapse, _ref19$expandParent = _ref19.expandParent, expandParent = void 0 !== _ref19$expandParent && _ref19$expandParent;
4558
- if (null === parentKey) return {
4559
- treeData: [].concat(_toConsumableArray(treeData || []), [ newNode ]),
4560
- treeIndex: (treeData || []).length
4561
- };
4562
- var insertedTreeIndex = null, hasBeenAdded = !1, changedTreeData = map({
4563
- treeData: treeData,
4564
- getNodeKey: getNodeKey,
4565
- ignoreCollapsed: ignoreCollapsed,
4566
- callback: function(_ref20) {
4567
- var node = _ref20.node, treeIndex = _ref20.treeIndex, path = _ref20.path, key = path ? path[path.length - 1] : null;
4568
- // Return nodes that are not the parent as-is
4569
- if (hasBeenAdded || key !== parentKey) return node;
4570
- hasBeenAdded = !0;
4571
- var parentNode = _extends({}, node);
4572
- // If no children exist yet, just add the single newNode
4573
- if (expandParent && (parentNode.expanded = !0), !parentNode.children) return insertedTreeIndex = treeIndex + 1,
4574
- _extends({}, parentNode, {
4575
- children: [ newNode ]
4576
- });
4577
- if ("function" == typeof parentNode.children) throw new Error("Cannot add to children defined by a function");
4578
- for (var nextTreeIndex = treeIndex + 1, i = 0; i < parentNode.children.length; i += 1) nextTreeIndex += 1 + getDescendantCount({
4579
- node: parentNode.children[i],
4580
- ignoreCollapsed: ignoreCollapsed
4581
- });
4582
- return insertedTreeIndex = nextTreeIndex, _extends({}, parentNode, {
4583
- children: [].concat(_toConsumableArray(parentNode.children), [ newNode ])
4584
- });
4585
- }
4586
- });
4587
- if (!hasBeenAdded) throw new Error("No node found with the given key.");
4588
- return {
4589
- treeData: changedTreeData,
4590
- treeIndex: insertedTreeIndex
4591
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4592
  }
4593
- function addNodeAtDepthAndIndex(_ref21) {
4594
- var targetDepth = _ref21.targetDepth, minimumTreeIndex = _ref21.minimumTreeIndex, newNode = _ref21.newNode, ignoreCollapsed = _ref21.ignoreCollapsed, expandParent = _ref21.expandParent, _ref21$isPseudoRoot = _ref21.isPseudoRoot, isPseudoRoot = void 0 !== _ref21$isPseudoRoot && _ref21$isPseudoRoot, isLastChild = _ref21.isLastChild, node = _ref21.node, currentIndex = _ref21.currentIndex, currentDepth = _ref21.currentDepth, getNodeKey = _ref21.getNodeKey, _ref21$path = _ref21.path, path = void 0 === _ref21$path ? [] : _ref21$path, selfPath = function(n) {
4595
- return isPseudoRoot ? [] : [].concat(_toConsumableArray(path), [ getNodeKey({
4596
- node: n,
4597
- treeIndex: currentIndex
4598
- }) ]);
4599
- };
4600
- // If the current position is the only possible place to add, add it
4601
- if (currentIndex >= minimumTreeIndex - 1 || isLastChild && (!node.children || !node.children.length)) {
4602
- if ("function" == typeof node.children) throw new Error("Cannot add to children defined by a function");
4603
- var extraNodeProps = expandParent ? {
4604
- expanded: !0
4605
- } : {}, _nextNode = _extends({}, node, extraNodeProps, {
4606
- children: node.children ? [ newNode ].concat(_toConsumableArray(node.children)) : [ newNode ]
4607
- });
4608
- return {
4609
- node: _nextNode,
4610
- nextIndex: currentIndex + 2,
4611
- insertedTreeIndex: currentIndex + 1,
4612
- parentPath: selfPath(_nextNode),
4613
- parentNode: isPseudoRoot ? null : _nextNode
4614
- };
4615
- }
4616
- // If this is the target depth for the insertion,
4617
- // i.e., where the newNode can be added to the current node's children
4618
- if (currentDepth >= targetDepth - 1) {
4619
- // Skip over nodes with no children or hidden children
4620
- if (!node.children || "function" == typeof node.children || !0 !== node.expanded && ignoreCollapsed && !isPseudoRoot) return {
4621
- node: node,
4622
- nextIndex: currentIndex + 1
4623
- };
4624
- for (var _childIndex = currentIndex + 1, _insertedTreeIndex = null, insertIndex = null, i = 0; i < node.children.length; i += 1) {
4625
- // If a valid location is found, mark it as the insertion location and
4626
- // break out of the loop
4627
- if (_childIndex >= minimumTreeIndex) {
4628
- _insertedTreeIndex = _childIndex, insertIndex = i;
4629
- break;
4630
- }
4631
- // Increment the index by the child itself plus the number of descendants it has
4632
- _childIndex += 1 + getDescendantCount({
4633
- node: node.children[i],
4634
- ignoreCollapsed: ignoreCollapsed
4635
- });
4636
- }
4637
- // If no valid indices to add the node were found
4638
- if (null === insertIndex) {
4639
- // If the last position in this node's children is less than the minimum index
4640
- // and there are more children on the level of this node, return without insertion
4641
- if (_childIndex < minimumTreeIndex && !isLastChild) return {
4642
- node: node,
4643
- nextIndex: _childIndex
4644
- };
4645
- // Use the last position in the children array to insert the newNode
4646
- _insertedTreeIndex = _childIndex, insertIndex = node.children.length;
4647
- }
4648
- // Insert the newNode at the insertIndex
4649
- var _nextNode2 = _extends({}, node, {
4650
- children: [].concat(_toConsumableArray(node.children.slice(0, insertIndex)), [ newNode ], _toConsumableArray(node.children.slice(insertIndex)))
4651
- });
4652
- // Return node with successful insert result
4653
- return {
4654
- node: _nextNode2,
4655
- nextIndex: _childIndex,
4656
- insertedTreeIndex: _insertedTreeIndex,
4657
- parentPath: selfPath(_nextNode2),
4658
- parentNode: isPseudoRoot ? null : _nextNode2
4659
- };
4660
- }
4661
- // Skip over nodes with no children or hidden children
4662
- if (!node.children || "function" == typeof node.children || !0 !== node.expanded && ignoreCollapsed && !isPseudoRoot) return {
4663
- node: node,
4664
- nextIndex: currentIndex + 1
4665
- };
4666
- // Get all descendants
4667
- var insertedTreeIndex = null, pathFragment = null, parentNode = null, childIndex = currentIndex + 1, newChildren = node.children;
4668
- "function" != typeof newChildren && (newChildren = newChildren.map(function(child, i) {
4669
- if (null !== insertedTreeIndex) return child;
4670
- var mapResult = addNodeAtDepthAndIndex({
4671
- targetDepth: targetDepth,
4672
- minimumTreeIndex: minimumTreeIndex,
4673
- newNode: newNode,
4674
- ignoreCollapsed: ignoreCollapsed,
4675
- expandParent: expandParent,
4676
- isLastChild: isLastChild && i === newChildren.length - 1,
4677
- node: child,
4678
- currentIndex: childIndex,
4679
- currentDepth: currentDepth + 1,
4680
- getNodeKey: getNodeKey,
4681
- path: []
4682
- });
4683
- return "insertedTreeIndex" in mapResult && (insertedTreeIndex = mapResult.insertedTreeIndex,
4684
- parentNode = mapResult.parentNode, pathFragment = mapResult.parentPath), childIndex = mapResult.nextIndex,
4685
- mapResult.node;
4686
- }));
4687
- var nextNode = _extends({}, node, {
4688
- children: newChildren
4689
- }), result = {
4690
- node: nextNode,
4691
- nextIndex: childIndex
4692
- };
4693
- return null !== insertedTreeIndex && (result.insertedTreeIndex = insertedTreeIndex,
4694
- result.parentPath = [].concat(_toConsumableArray(selfPath(nextNode)), _toConsumableArray(pathFragment)),
4695
- result.parentNode = parentNode), result;
4696
- }
4697
- /**
4698
- * Insert a node into the tree at the given depth, after the minimum index
4699
- *
4700
- * @param {!Object[]} treeData - Tree data
4701
- * @param {!number} depth - The depth to insert the node at (the first level of the array being depth 0)
4702
- * @param {!number} minimumTreeIndex - The lowest possible treeIndex to insert the node at
4703
- * @param {!Object} newNode - The node to insert into the tree
4704
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4705
- * @param {boolean=} expandParent - If true, expands the parent of the inserted node
4706
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4707
- *
4708
- * @return {Object} result
4709
- * @return {Object[]} result.treeData - The tree data with the node added
4710
- * @return {number} result.treeIndex - The tree index at which the node was inserted
4711
- * @return {number[]|string[]} result.path - Array of keys leading to the node location after insertion
4712
- * @return {Object} result.parentNode - The parent node of the inserted node
4713
- */
4714
- function insertNode(_ref22) {
4715
- var treeData = _ref22.treeData, targetDepth = _ref22.depth, minimumTreeIndex = _ref22.minimumTreeIndex, newNode = _ref22.newNode, _ref22$getNodeKey = _ref22.getNodeKey, getNodeKey = void 0 === _ref22$getNodeKey ? function() {} : _ref22$getNodeKey, _ref22$ignoreCollapse = _ref22.ignoreCollapsed, ignoreCollapsed = void 0 === _ref22$ignoreCollapse || _ref22$ignoreCollapse, _ref22$expandParent = _ref22.expandParent, expandParent = void 0 !== _ref22$expandParent && _ref22$expandParent;
4716
- if (!treeData && 0 === targetDepth) return {
4717
- treeData: [ newNode ],
4718
- treeIndex: 0,
4719
- path: [ getNodeKey({
4720
- node: newNode,
4721
- treeIndex: 0
4722
- }) ],
4723
- parentNode: null
4724
- };
4725
- var insertResult = addNodeAtDepthAndIndex({
4726
- targetDepth: targetDepth,
4727
- minimumTreeIndex: minimumTreeIndex,
4728
- newNode: newNode,
4729
- ignoreCollapsed: ignoreCollapsed,
4730
- expandParent: expandParent,
4731
- getNodeKey: getNodeKey,
4732
- isPseudoRoot: !0,
4733
- isLastChild: !0,
4734
- node: {
4735
- children: treeData
4736
- },
4737
- currentIndex: -1,
4738
- currentDepth: -1
4739
- });
4740
- if (!("insertedTreeIndex" in insertResult)) throw new Error("No suitable position found to insert.");
4741
- var treeIndex = insertResult.insertedTreeIndex;
4742
- return {
4743
- treeData: insertResult.node.children,
4744
- treeIndex: treeIndex,
4745
- path: [].concat(_toConsumableArray(insertResult.parentPath), [ getNodeKey({
4746
- node: newNode,
4747
- treeIndex: treeIndex
4748
- }) ]),
4749
- parentNode: insertResult.parentNode
4750
- };
4751
- }
4752
- /**
4753
- * Get tree data flattened.
4754
- *
4755
- * @param {!Object[]} treeData - Tree data
4756
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4757
- * @param {boolean=} ignoreCollapsed - Ignore children of nodes without `expanded` set to `true`
4758
- *
4759
- * @return {{
4760
- * node: Object,
4761
- * path: []string|[]number,
4762
- * lowerSiblingCounts: []number
4763
- * }}[] nodes - The node array
4764
- */
4765
- function getFlatDataFromTree(_ref23) {
4766
- var treeData = _ref23.treeData, getNodeKey = _ref23.getNodeKey, _ref23$ignoreCollapse = _ref23.ignoreCollapsed, ignoreCollapsed = void 0 === _ref23$ignoreCollapse || _ref23$ignoreCollapse;
4767
- if (!treeData || treeData.length < 1) return [];
4768
- var flattened = [];
4769
- return walk({
4770
- treeData: treeData,
4771
- getNodeKey: getNodeKey,
4772
- ignoreCollapsed: ignoreCollapsed,
4773
- callback: function(nodeInfo) {
4774
- flattened.push(nodeInfo);
4775
- }
4776
- }), flattened;
4777
- }
4778
- /**
4779
- * Generate a tree structure from flat data.
4780
- *
4781
- * @param {!Object[]} flatData
4782
- * @param {!function=} getKey - Function to get the key from the nodeData
4783
- * @param {!function=} getParentKey - Function to get the parent key from the nodeData
4784
- * @param {string|number=} rootKey - The value returned by `getParentKey` that corresponds to the root node.
4785
- * For example, if your nodes have id 1-99, you might use rootKey = 0
4786
- *
4787
- * @return {Object[]} treeData - The flat data represented as a tree
4788
- */
4789
- function getTreeFromFlatData(_ref24) {
4790
- var flatData = _ref24.flatData, _ref24$getKey = _ref24.getKey, getKey = void 0 === _ref24$getKey ? function(node) {
4791
- return node.id;
4792
- } : _ref24$getKey, _ref24$getParentKey = _ref24.getParentKey, getParentKey = void 0 === _ref24$getParentKey ? function(node) {
4793
- return node.parentId;
4794
- } : _ref24$getParentKey, _ref24$rootKey = _ref24.rootKey, rootKey = void 0 === _ref24$rootKey ? "0" : _ref24$rootKey;
4795
- if (!flatData) return [];
4796
- var childrenToParents = {};
4797
- if (flatData.forEach(function(child) {
4798
- var parentKey = getParentKey(child);
4799
- parentKey in childrenToParents ? childrenToParents[parentKey].push(child) : childrenToParents[parentKey] = [ child ];
4800
- }), !(rootKey in childrenToParents)) return [];
4801
- var trav = function trav(parent) {
4802
- var parentKey = getKey(parent);
4803
- return parentKey in childrenToParents ? _extends({}, parent, {
4804
- children: childrenToParents[parentKey].map(function(child) {
4805
- return trav(child);
4806
- })
4807
- }) : _extends({}, parent);
4808
- };
4809
- return childrenToParents[rootKey].map(function(child) {
4810
- return trav(child);
4811
- });
4812
  }
4813
- /**
4814
- * Check if a node is a descendant of another node.
4815
- *
4816
- * @param {!Object} older - Potential ancestor of younger node
4817
- * @param {!Object} younger - Potential descendant of older node
4818
- *
4819
- * @return {boolean}
4820
- */
4821
- function isDescendant(older, younger) {
4822
- return !!older.children && "function" != typeof older.children && older.children.some(function(child) {
4823
- return child === younger || isDescendant(child, younger);
4824
- });
4825
  }
4826
- /**
4827
- * Get the maximum depth of the children (the depth of the root node is 0).
4828
- *
4829
- * @param {!Object} node - Node in the tree
4830
- * @param {?number} depth - The current depth
4831
- *
4832
- * @return {number} maxDepth - The deepest depth in the tree
4833
- */
4834
- function getDepth(node) {
4835
- var depth = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;
4836
- return node.children ? "function" == typeof node.children ? depth + 1 : node.children.reduce(function(deepest, child) {
4837
- return Math.max(deepest, getDepth(child, depth + 1));
4838
- }, depth) : depth;
 
 
 
 
 
 
 
 
 
 
 
 
 
4839
  }
4840
- /**
4841
- * Find nodes matching a search query in the tree,
4842
- *
4843
- * @param {!function} getNodeKey - Function to get the key from the nodeData and tree index
4844
- * @param {!Object[]} treeData - Tree data
4845
- * @param {?string|number} searchQuery - Function returning a boolean to indicate whether the node is a match or not
4846
- * @param {!function} searchMethod - Function returning a boolean to indicate whether the node is a match or not
4847
- * @param {?number} searchFocusOffset - The offset of the match to focus on
4848
- * (e.g., 0 focuses on the first match, 1 on the second)
4849
- * @param {boolean=} expandAllMatchPaths - If true, expands the paths to any matched node
4850
- * @param {boolean=} expandFocusMatchPaths - If true, expands the path to the focused node
4851
- *
4852
- * @return {Object[]} matches - An array of objects containing the matching `node`s, their `path`s and `treeIndex`s
4853
- * @return {Object[]} treeData - The original tree data with all relevant nodes expanded.
4854
- * If expandAllMatchPaths and expandFocusMatchPaths are both false,
4855
- * it will be the same as the original tree data.
4856
- */
4857
- function find(_ref25) {
4858
- var getNodeKey = _ref25.getNodeKey, treeData = _ref25.treeData, searchQuery = _ref25.searchQuery, searchMethod = _ref25.searchMethod, searchFocusOffset = _ref25.searchFocusOffset, _ref25$expandAllMatch = _ref25.expandAllMatchPaths, expandAllMatchPaths = void 0 !== _ref25$expandAllMatch && _ref25$expandAllMatch, _ref25$expandFocusMat = _ref25.expandFocusMatchPaths, expandFocusMatchPaths = void 0 === _ref25$expandFocusMat || _ref25$expandFocusMat, matchCount = 0, result = function trav(_ref26) {
4859
- var _ref26$isPseudoRoot = _ref26.isPseudoRoot, isPseudoRoot = void 0 !== _ref26$isPseudoRoot && _ref26$isPseudoRoot, node = _ref26.node, currentIndex = _ref26.currentIndex, _ref26$path = _ref26.path, path = void 0 === _ref26$path ? [] : _ref26$path, matches = [], isSelfMatch = !1, hasFocusMatch = !1, selfPath = isPseudoRoot ? [] : [].concat(_toConsumableArray(path), [ getNodeKey({
4860
- node: node,
4861
- treeIndex: currentIndex
4862
- }) ]), extraInfo = isPseudoRoot ? null : {
4863
- path: selfPath,
4864
- treeIndex: currentIndex
4865
- }, hasChildren = node.children && "function" != typeof node.children && node.children.length > 0;
4866
- // Examine the current node to see if it is a match
4867
- !isPseudoRoot && searchMethod(_extends({}, extraInfo, {
4868
- node: node,
4869
- searchQuery: searchQuery
4870
- })) && (matchCount === searchFocusOffset && (hasFocusMatch = !0), // Keep track of the number of matching nodes, so we know when the searchFocusOffset
4871
- // is reached
4872
- matchCount += 1, // We cannot add this node to the matches right away, as it may be changed
4873
- // during the search of the descendants. The entire node is used in
4874
- // comparisons between nodes inside the `matches` and `treeData` results
4875
- // of this method (`find`)
4876
- isSelfMatch = !0);
4877
- var childIndex = currentIndex, newNode = _extends({}, node);
4878
- // Get all descendants
4879
- // Cannot assign a treeIndex to hidden nodes
4880
- // Add this node to the matches if it fits the search criteria.
4881
- // This is performed at the last minute so newNode can be sent in its final form.
4882
- return hasChildren && (newNode.children = newNode.children.map(function(child) {
4883
- var mapResult = trav({
4884
- node: child,
4885
- currentIndex: childIndex + 1,
4886
- path: selfPath
4887
- });
4888
- // Ignore hidden nodes by only advancing the index counter to the returned treeIndex
4889
- // if the child is expanded.
4890
- //
4891
- // The child could have been expanded from the start,
4892
- // or expanded due to a matching node being found in its descendants
4893
- // Expand the current node if it has descendants matching the search
4894
- // and the settings are set to do so.
4895
- return mapResult.node.expanded ? childIndex = mapResult.treeIndex : childIndex += 1,
4896
- (mapResult.matches.length > 0 || mapResult.hasFocusMatch) && (matches = [].concat(_toConsumableArray(matches), _toConsumableArray(mapResult.matches)),
4897
- mapResult.hasFocusMatch && (hasFocusMatch = !0), (expandAllMatchPaths && mapResult.matches.length > 0 || (expandAllMatchPaths || expandFocusMatchPaths) && mapResult.hasFocusMatch) && (newNode.expanded = !0)),
4898
- mapResult.node;
4899
- })), isPseudoRoot || newNode.expanded || (matches = matches.map(function(match) {
4900
- return _extends({}, match, {
4901
- treeIndex: null
4902
- });
4903
- })), isSelfMatch && (matches = [ _extends({}, extraInfo, {
4904
- node: newNode
4905
- }) ].concat(_toConsumableArray(matches))), {
4906
- node: matches.length > 0 ? newNode : node,
4907
- matches: matches,
4908
- hasFocusMatch: hasFocusMatch,
4909
- treeIndex: childIndex
4910
- };
4911
- }({
4912
- node: {
4913
- children: treeData
4914
- },
4915
- isPseudoRoot: !0,
4916
- currentIndex: -1
4917
- });
4918
- return {
4919
- matches: result.matches,
4920
- treeData: result.node.children
4921
- };
4922
  }
4923
- Object.defineProperty(exports, "__esModule", {
4924
- value: !0
4925
- });
4926
- var _extends = Object.assign || function(target) {
4927
- for (var i = 1; i < arguments.length; i++) {
4928
- var source = arguments[i];
4929
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
4930
- }
4931
- return target;
4932
- };
4933
- exports.getDescendantCount = getDescendantCount, exports.getVisibleNodeCount = getVisibleNodeCount,
4934
- exports.getVisibleNodeInfoAtIndex = getVisibleNodeInfoAtIndex, exports.walk = walk,
4935
- exports.map = map, exports.toggleExpandedForAll = toggleExpandedForAll, exports.changeNodeAtPath = changeNodeAtPath,
4936
- exports.removeNodeAtPath = removeNodeAtPath, exports.removeNode = removeNode, exports.getNodeAtPath = getNodeAtPath,
4937
- exports.addNodeUnderParent = addNodeUnderParent, exports.insertNode = insertNode,
4938
- exports.getFlatDataFromTree = getFlatDataFromTree, exports.getTreeFromFlatData = getTreeFromFlatData,
4939
- exports.isDescendant = isDescendant, exports.getDepth = getDepth, exports.find = find;
4940
- }, /* 1 */
4941
- /***/
4942
- function(module, exports) {
4943
- module.exports = __webpack_require__(1);
4944
- }, /* 2 */
4945
- /***/
4946
- function(module, exports) {
4947
- module.exports = __webpack_require__(0);
4948
- }, /* 3 */
4949
- /***/
4950
- function(module, exports) {
4951
- function cssWithMappingToString(item, useSourceMap) {
4952
- var content = item[1] || "", cssMapping = item[3];
4953
- if (!cssMapping) return content;
4954
- if (useSourceMap && "function" == typeof btoa) {
4955
- var sourceMapping = toComment(cssMapping);
4956
- return [ content ].concat(cssMapping.sources.map(function(source) {
4957
- return "/*# sourceURL=" + cssMapping.sourceRoot + source + " */";
4958
- })).concat([ sourceMapping ]).join("\n");
4959
  }
4960
- return [ content ].join("\n");
 
 
 
 
4961
  }
4962
- // Adapted from convert-source-map (MIT)
4963
- function toComment(sourceMap) {
4964
- return "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
 
 
4965
  }
4966
- /*
4967
- MIT License http://www.opensource.org/licenses/mit-license.php
4968
- Author Tobias Koppers @sokra
4969
- */
4970
- // css base code, injected by the css-loader
4971
- module.exports = function(useSourceMap) {
4972
- var list = [];
4973
- // return the list of modules as css string
4974
- // import a list of modules into the list
4975
- return list.toString = function() {
4976
- return this.map(function(item) {
4977
- var content = cssWithMappingToString(item, useSourceMap);
4978
- return item[2] ? "@media " + item[2] + "{" + content + "}" : content;
4979
- }).join("");
4980
- }, list.i = function(modules, mediaQuery) {
4981
- "string" == typeof modules && (modules = [ [ null, modules, "" ] ]);
4982
- for (var alreadyImportedModules = {}, i = 0; i < this.length; i++) {
4983
- var id = this[i][0];
4984
- "number" == typeof id && (alreadyImportedModules[id] = !0);
4985
- }
4986
- for (i = 0; i < modules.length; i++) {
4987
- var item = modules[i];
4988
- // skip already imported module
4989
- // this implementation is not 100% perfect for weird media query combinations
4990
- // when a module is imported multiple times with different media queries.
4991
- // I hope this will never occur (Hey this way we have smaller bundles)
4992
- "number" == typeof item[0] && alreadyImportedModules[item[0]] || (mediaQuery && !item[2] ? item[2] = mediaQuery : mediaQuery && (item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"),
4993
- list.push(item));
4994
- }
4995
- }, list;
4996
- };
4997
- }, /* 4 */
4998
- /***/
4999
- function(module, exports, __webpack_require__) {
5000
- function addStylesToDom(styles, options) {
5001
- for (var i = 0; i < styles.length; i++) {
5002
- var item = styles[i], domStyle = stylesInDom[item.id];
5003
- if (domStyle) {
5004
- domStyle.refs++;
5005
- for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](item.parts[j]);
5006
- for (;j < item.parts.length; j++) domStyle.parts.push(addStyle(item.parts[j], options));
5007
- } else {
5008
- for (var parts = [], j = 0; j < item.parts.length; j++) parts.push(addStyle(item.parts[j], options));
5009
- stylesInDom[item.id] = {
5010
- id: item.id,
5011
- refs: 1,
5012
- parts: parts
5013
- };
5014
- }
5015
- }
5016
- }
5017
- function listToStyles(list, options) {
5018
- for (var styles = [], newStyles = {}, i = 0; i < list.length; i++) {
5019
- var item = list[i], id = options.base ? item[0] + options.base : item[0], css = item[1], media = item[2], sourceMap = item[3], part = {
5020
- css: css,
5021
- media: media,
5022
- sourceMap: sourceMap
5023
- };
5024
- newStyles[id] ? newStyles[id].parts.push(part) : styles.push(newStyles[id] = {
5025
- id: id,
5026
- parts: [ part ]
5027
- });
5028
- }
5029
- return styles;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5030
  }
5031
- function insertStyleElement(options, style) {
5032
- var target = getElement(options.insertInto);
5033
- if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
5034
- var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
5035
- if ("top" === options.insertAt) lastStyleElementInsertedAtTop ? lastStyleElementInsertedAtTop.nextSibling ? target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling) : target.appendChild(style) : target.insertBefore(style, target.firstChild),
5036
- stylesInsertedAtTop.push(style); else if ("bottom" === options.insertAt) target.appendChild(style); else {
5037
- if ("object" != typeof options.insertAt || !options.insertAt.before) throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
5038
- var nextSibling = getElement(options.insertInto + " " + options.insertAt.before);
5039
- target.insertBefore(style, nextSibling);
5040
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5041
  }
5042
- function removeStyleElement(style) {
5043
- if (null === style.parentNode) return !1;
5044
- style.parentNode.removeChild(style);
5045
- var idx = stylesInsertedAtTop.indexOf(style);
5046
- idx >= 0 && stylesInsertedAtTop.splice(idx, 1);
 
5047
  }
5048
- function createStyleElement(options) {
5049
- var style = document.createElement("style");
5050
- return options.attrs.type = "text/css", addAttrs(style, options.attrs), insertStyleElement(options, style),
5051
- style;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5052
  }
5053
- function createLinkElement(options) {
5054
- var link = document.createElement("link");
5055
- return options.attrs.type = "text/css", options.attrs.rel = "stylesheet", addAttrs(link, options.attrs),
5056
- insertStyleElement(options, link), link;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5057
  }
5058
- function addAttrs(el, attrs) {
5059
- Object.keys(attrs).forEach(function(key) {
5060
- el.setAttribute(key, attrs[key]);
5061
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5062
  }
5063
- function addStyle(obj, options) {
5064
- var style, update, remove, result;
5065
- // If a transform function was defined, run it on the css
5066
- if (options.transform && obj.css) {
5067
- if (!(result = options.transform(obj.css))) // If the transform function returns a falsy value, don't add this css.
5068
- // This allows conditional loading of css
5069
- return function() {};
5070
- // If transform returns a value, use that instead of the original css.
5071
- // This allows running runtime transformations on the css.
5072
- obj.css = result;
5073
- }
5074
- if (options.singleton) {
5075
- var styleIndex = singletonCounter++;
5076
- style = singleton || (singleton = createStyleElement(options)), update = applyToSingletonTag.bind(null, style, styleIndex, !1),
5077
- remove = applyToSingletonTag.bind(null, style, styleIndex, !0);
5078
- } else obj.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (style = createLinkElement(options),
5079
- update = updateLink.bind(null, style, options), remove = function() {
5080
- removeStyleElement(style), style.href && URL.revokeObjectURL(style.href);
5081
- }) : (style = createStyleElement(options), update = applyToTag.bind(null, style),
5082
- remove = function() {
5083
- removeStyleElement(style);
5084
- });
5085
- return update(obj), function(newObj) {
5086
- if (newObj) {
5087
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) return;
5088
- update(obj = newObj);
5089
- } else remove();
5090
- };
5091
- }
5092
- function applyToSingletonTag(style, index, remove, obj) {
5093
- var css = remove ? "" : obj.css;
5094
- if (style.styleSheet) style.styleSheet.cssText = replaceText(index, css); else {
5095
- var cssNode = document.createTextNode(css), childNodes = style.childNodes;
5096
- childNodes[index] && style.removeChild(childNodes[index]), childNodes.length ? style.insertBefore(cssNode, childNodes[index]) : style.appendChild(cssNode);
5097
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5098
  }
5099
- function applyToTag(style, obj) {
5100
- var css = obj.css, media = obj.media;
5101
- if (media && style.setAttribute("media", media), style.styleSheet) style.styleSheet.cssText = css; else {
5102
- for (;style.firstChild; ) style.removeChild(style.firstChild);
5103
- style.appendChild(document.createTextNode(css));
5104
- }
5105
  }
5106
- function updateLink(link, options, obj) {
5107
- var css = obj.css, sourceMap = obj.sourceMap, autoFixUrls = void 0 === options.convertToAbsoluteUrls && sourceMap;
5108
- (options.convertToAbsoluteUrls || autoFixUrls) && (css = fixUrls(css)), sourceMap && (// http://stackoverflow.com/a/26603875
5109
- css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */");
5110
- var blob = new Blob([ css ], {
5111
- type: "text/css"
5112
- }), oldSrc = link.href;
5113
- link.href = URL.createObjectURL(blob), oldSrc && URL.revokeObjectURL(oldSrc);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5114
  }
5115
- /*
5116
- MIT License http://www.opensource.org/licenses/mit-license.php
5117
- Author Tobias Koppers @sokra
5118
- */
5119
- var stylesInDom = {}, isOldIE = function(fn) {
5120
- var memo;
5121
- return function() {
5122
- return void 0 === memo && (memo = fn.apply(this, arguments)), memo;
5123
- };
5124
- }(function() {
5125
- // Test for IE <= 9 as proposed by Browserhacks
5126
- // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
5127
- // Tests for existence of standard globals is to allow style-loader
5128
- // to operate correctly into non-standard environments
5129
- // @see https://github.com/webpack-contrib/style-loader/issues/177
5130
- return window && document && document.all && !window.atob;
5131
- }), getElement = function(fn) {
5132
- var memo = {};
5133
- return function(selector) {
5134
- if (void 0 === memo[selector]) {
5135
- var styleTarget = fn.call(this, selector);
5136
- // Special case to return head of iframe instead of iframe itself
5137
- if (styleTarget instanceof window.HTMLIFrameElement) try {
5138
- // This will throw an exception if access to iframe is blocked
5139
- // due to cross-origin restrictions
5140
- styleTarget = styleTarget.contentDocument.head;
5141
- } catch (e) {
5142
- styleTarget = null;
5143
- }
5144
- memo[selector] = styleTarget;
5145
- }
5146
- return memo[selector];
5147
- };
5148
- }(function(target) {
5149
- return document.querySelector(target);
5150
- }), singleton = null, singletonCounter = 0, stylesInsertedAtTop = [], fixUrls = __webpack_require__(14);
5151
- module.exports = function(list, options) {
5152
- if ("undefined" != typeof DEBUG && DEBUG && "object" != typeof document) throw new Error("The style-loader cannot be used in a non-browser environment");
5153
- options = options || {}, options.attrs = "object" == typeof options.attrs ? options.attrs : {},
5154
- // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
5155
- // tags it will allow on a page
5156
- options.singleton || "boolean" == typeof options.singleton || (options.singleton = isOldIE()),
5157
- // By default, add <style> tags to the <head> element
5158
- options.insertInto || (options.insertInto = "head"), // By default, add <style> tags to the bottom of the target
5159
- options.insertAt || (options.insertAt = "bottom");
5160
- var styles = listToStyles(list, options);
5161
- return addStylesToDom(styles, options), function(newList) {
5162
- for (var mayRemove = [], i = 0; i < styles.length; i++) {
5163
- var item = styles[i], domStyle = stylesInDom[item.id];
5164
- domStyle.refs--, mayRemove.push(domStyle);
5165
- }
5166
- if (newList) {
5167
- addStylesToDom(listToStyles(newList, options), options);
5168
- }
5169
- for (var i = 0; i < mayRemove.length; i++) {
5170
- var domStyle = mayRemove[i];
5171
- if (0 === domStyle.refs) {
5172
- for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
5173
- delete stylesInDom[domStyle.id];
5174
- }
5175
- }
5176
- };
5177
- };
5178
- var replaceText = function() {
5179
- var textStore = [];
5180
- return function(index, replacement) {
5181
- return textStore[index] = replacement, textStore.filter(Boolean).join("\n");
5182
- };
5183
- }();
5184
- }, /* 5 */
5185
- /***/
5186
- function(module, exports, __webpack_require__) {
5187
- "use strict";
5188
- function defaultGetNodeKey(_ref) {
5189
- return _ref.treeIndex;
5190
  }
5191
- // Cheap hack to get the text of a react object
5192
- function getReactElementText(parent) {
5193
- return "string" == typeof parent ? parent : "object" !== (void 0 === parent ? "undefined" : _typeof(parent)) || !parent.props || !parent.props.children || "string" != typeof parent.props.children && "object" !== _typeof(parent.props.children) ? "" : "string" == typeof parent.props.children ? parent.props.children : parent.props.children.map(function(child) {
5194
- return getReactElementText(child);
5195
- }).join("");
 
 
 
 
 
 
 
 
 
 
 
5196
  }
5197
- // Search for a query string inside a node property
5198
- function stringSearch(key, searchQuery, node, path, treeIndex) {
5199
- return "function" == typeof node[key] ? String(node[key]({
5200
- node: node,
5201
- path: path,
5202
- treeIndex: treeIndex
5203
- })).indexOf(searchQuery) > -1 : "object" === _typeof(node[key]) ? getReactElementText(node[key]).indexOf(searchQuery) > -1 : node[key] && String(node[key]).indexOf(searchQuery) > -1;
5204
  }
5205
- function defaultSearchMethod(_ref2) {
5206
- var node = _ref2.node, path = _ref2.path, treeIndex = _ref2.treeIndex, searchQuery = _ref2.searchQuery;
5207
- return stringSearch("title", searchQuery, node, path, treeIndex) || stringSearch("subtitle", searchQuery, node, path, treeIndex);
 
 
 
 
 
5208
  }
5209
- Object.defineProperty(exports, "__esModule", {
5210
- value: !0
5211
- });
5212
- var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
5213
- return typeof obj;
5214
- } : function(obj) {
5215
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
5216
- };
5217
- exports.defaultGetNodeKey = defaultGetNodeKey, exports.defaultSearchMethod = defaultSearchMethod;
5218
- }, /* 6 */
5219
- /***/
5220
- function(module, exports, __webpack_require__) {
5221
- "use strict";
5222
- Object.defineProperty(exports, "__esModule", {
5223
- value: !0
5224
- }), exports.memoizedGetDescendantCount = exports.memoizedGetFlatDataFromTree = exports.memoizedInsertNode = void 0;
5225
- var _treeDataUtils = __webpack_require__(0), memoize = function(f) {
5226
- var savedArgsArray = [], savedKeysArray = [], savedResult = null;
5227
- return function(args) {
5228
- var keysArray = Object.keys(args).sort(), argsArray = keysArray.map(function(key) {
5229
- return args[key];
5230
- });
5231
- // If the arguments for the last insert operation are different than this time,
5232
- // recalculate the result
5233
- return (argsArray.length !== savedArgsArray.length || argsArray.some(function(arg, index) {
5234
- return arg !== savedArgsArray[index];
5235
- }) || keysArray.some(function(key, index) {
5236
- return key !== savedKeysArray[index];
5237
- })) && (savedArgsArray = argsArray, savedKeysArray = keysArray, savedResult = f(args)),
5238
- savedResult;
5239
- };
5240
- };
5241
- exports.memoizedInsertNode = memoize(_treeDataUtils.insertNode), exports.memoizedGetFlatDataFromTree = memoize(_treeDataUtils.getFlatDataFromTree),
5242
- exports.memoizedGetDescendantCount = memoize(_treeDataUtils.getDescendantCount);
5243
- }, /* 7 */
5244
- /***/
5245
- function(module, exports, __webpack_require__) {
5246
- "use strict";
5247
- Object.defineProperty(exports, "__esModule", {
5248
- value: !0
5249
- }), exports.SortableTreeWithoutDndContext = void 0;
5250
- var _defaultHandlers = __webpack_require__(5);
5251
- Object.keys(_defaultHandlers).forEach(function(key) {
5252
- "default" !== key && "__esModule" !== key && Object.defineProperty(exports, key, {
5253
- enumerable: !0,
5254
- get: function() {
5255
- return _defaultHandlers[key];
5256
- }
5257
- });
5258
- });
5259
- var _treeDataUtils = __webpack_require__(0);
5260
- Object.keys(_treeDataUtils).forEach(function(key) {
5261
- "default" !== key && "__esModule" !== key && Object.defineProperty(exports, key, {
5262
- enumerable: !0,
5263
- get: function() {
5264
- return _treeDataUtils[key];
5265
- }
5266
- });
5267
- });
5268
- var _reactSortableTree = __webpack_require__(8), _reactSortableTree2 = function(obj) {
5269
- return obj && obj.__esModule ? obj : {
5270
- default: obj
5271
- };
5272
- }(_reactSortableTree);
5273
- exports.default = _reactSortableTree2.default, // Export the tree component without the react-dnd DragDropContext,
5274
- // for when component is used with other components using react-dnd.
5275
- // see: https://github.com/gaearon/react-dnd/issues/186
5276
- exports.SortableTreeWithoutDndContext = _reactSortableTree.SortableTreeWithoutDndContext;
5277
- }, /* 8 */
5278
- /***/
5279
- function(module, exports, __webpack_require__) {
5280
- "use strict";
5281
- function _interopRequireDefault(obj) {
5282
- return obj && obj.__esModule ? obj : {
5283
- default: obj
5284
- };
5285
  }
5286
- function _classCallCheck(instance, Constructor) {
5287
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5288
  }
5289
- function _possibleConstructorReturn(self, call) {
5290
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5291
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5292
  }
5293
- function _inherits(subClass, superClass) {
5294
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
5295
- subClass.prototype = Object.create(superClass && superClass.prototype, {
5296
- constructor: {
5297
- value: subClass,
5298
- enumerable: !1,
5299
- writable: !0,
5300
- configurable: !0
5301
- }
5302
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
5303
  }
5304
- Object.defineProperty(exports, "__esModule", {
5305
- value: !0
5306
- }), exports.SortableTreeWithoutDndContext = void 0;
5307
- var _createClass = function() {
5308
- function defineProperties(target, props) {
5309
- for (var i = 0; i < props.length; i++) {
5310
- var descriptor = props[i];
5311
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
5312
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
5313
- }
5314
- }
5315
- return function(Constructor, protoProps, staticProps) {
5316
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
5317
- Constructor;
5318
- };
5319
- }(), _extends = Object.assign || function(target) {
5320
- for (var i = 1; i < arguments.length; i++) {
5321
- var source = arguments[i];
5322
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
5323
- }
5324
- return target;
5325
- }, _react = __webpack_require__(1), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(2), _propTypes2 = _interopRequireDefault(_propTypes), _reactVirtualized = __webpack_require__(9), _lodash = __webpack_require__(10), _lodash2 = _interopRequireDefault(_lodash), _reactDndScrollzone = __webpack_require__(11), _reactDndScrollzone2 = _interopRequireDefault(_reactDndScrollzone);
5326
- __webpack_require__(12);
5327
- var _treeNode = __webpack_require__(15), _treeNode2 = _interopRequireDefault(_treeNode), _nodeRendererDefault = __webpack_require__(18), _nodeRendererDefault2 = _interopRequireDefault(_nodeRendererDefault), _treePlaceholder = __webpack_require__(22), _treePlaceholder2 = _interopRequireDefault(_treePlaceholder), _placeholderRendererDefault = __webpack_require__(23), _placeholderRendererDefault2 = _interopRequireDefault(_placeholderRendererDefault), _treeDataUtils = __webpack_require__(0), _memoizedTreeDataUtils = __webpack_require__(6), _genericUtils = __webpack_require__(26), _defaultHandlers = __webpack_require__(5), _dndManager = __webpack_require__(27), _dndManager2 = _interopRequireDefault(_dndManager), _reactSortableTree = __webpack_require__(31), _reactSortableTree2 = _interopRequireDefault(_reactSortableTree), treeIdCounter = 1, mergeTheme = function(props) {
5328
- var merged = _extends({}, props, {
5329
- style: _extends({}, props.theme.style, props.style),
5330
- innerStyle: _extends({}, props.theme.innerStyle, props.innerStyle),
5331
- reactVirtualizedListProps: _extends({}, props.theme.reactVirtualizedListProps, props.reactVirtualizedListProps)
5332
- }), overridableDefaults = {
5333
- nodeContentRenderer: _nodeRendererDefault2.default,
5334
- placeholderRenderer: _placeholderRendererDefault2.default,
5335
- rowHeight: 62,
5336
- scaffoldBlockPxWidth: 44,
5337
- slideRegionSize: 100,
5338
- treeNodeRenderer: _treeNode2.default
5339
- };
5340
- return Object.keys(overridableDefaults).forEach(function(propKey) {
5341
- // If prop has been specified, do not change it
5342
- // If prop is specified in theme, use the theme setting
5343
- // If all else fails, fall back to the default
5344
- null === props[propKey] && (merged[propKey] = void 0 !== props.theme[propKey] ? props.theme[propKey] : overridableDefaults[propKey]);
5345
- }), merged;
5346
- }, ReactSortableTree = function(_Component) {
5347
- function ReactSortableTree(props) {
5348
- _classCallCheck(this, ReactSortableTree);
5349
- var _this = _possibleConstructorReturn(this, (ReactSortableTree.__proto__ || Object.getPrototypeOf(ReactSortableTree)).call(this, props)), _mergeTheme = mergeTheme(props), dndType = _mergeTheme.dndType, nodeContentRenderer = _mergeTheme.nodeContentRenderer, treeNodeRenderer = _mergeTheme.treeNodeRenderer, isVirtualized = _mergeTheme.isVirtualized, slideRegionSize = _mergeTheme.slideRegionSize;
5350
- // Wrapping classes for use with react-dnd
5351
- // Prepare scroll-on-drag options for this list
5352
- return _this.dndManager = new _dndManager2.default(_this), _this.treeId = "rst__" + treeIdCounter,
5353
- treeIdCounter += 1, _this.dndType = dndType || _this.treeId, _this.nodeContentRenderer = _this.dndManager.wrapSource(nodeContentRenderer),
5354
- _this.treePlaceholderRenderer = _this.dndManager.wrapPlaceholder(_treePlaceholder2.default),
5355
- _this.treeNodeRenderer = _this.dndManager.wrapTarget(treeNodeRenderer), isVirtualized && (_this.scrollZoneVirtualList = (0,
5356
- _reactDndScrollzone2.default)(_reactVirtualized.List), _this.vStrength = (0, _reactDndScrollzone.createVerticalStrength)(slideRegionSize),
5357
- _this.hStrength = (0, _reactDndScrollzone.createHorizontalStrength)(slideRegionSize)),
5358
- _this.state = {
5359
- draggingTreeData: null,
5360
- draggedNode: null,
5361
- draggedMinimumTreeIndex: null,
5362
- draggedDepth: null,
5363
- searchMatches: [],
5364
- searchFocusTreeIndex: null,
5365
- dragging: !1
5366
- }, _this.toggleChildrenVisibility = _this.toggleChildrenVisibility.bind(_this),
5367
- _this.moveNode = _this.moveNode.bind(_this), _this.startDrag = _this.startDrag.bind(_this),
5368
- _this.dragHover = _this.dragHover.bind(_this), _this.endDrag = _this.endDrag.bind(_this),
5369
- _this.drop = _this.drop.bind(_this), _this.handleDndMonitorChange = _this.handleDndMonitorChange.bind(_this),
5370
- _this;
5371
- }
5372
- return _inherits(ReactSortableTree, _Component), _createClass(ReactSortableTree, [ {
5373
- key: "componentDidMount",
5374
- value: function() {
5375
- this.loadLazyChildren(), this.search(this.props), // Hook into react-dnd state changes to detect when the drag ends
5376
- // TODO: This is very brittle, so it needs to be replaced if react-dnd
5377
- // offers a more official way to detect when a drag ends
5378
- this.clearMonitorSubscription = this.context.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange);
5379
- }
5380
- }, {
5381
- key: "componentWillReceiveProps",
5382
- value: function(nextProps) {
5383
- this.props.treeData !== nextProps.treeData ? (// Ignore updates caused by search, in order to avoid infinite looping
5384
- this.ignoreOneTreeUpdate ? this.ignoreOneTreeUpdate = !1 : (// Reset the focused index if the tree has changed
5385
- this.setState({
5386
- searchFocusTreeIndex: null
5387
- }), // Load any children defined by a function
5388
- this.loadLazyChildren(nextProps), this.search(nextProps, !1, !1)), // Reset the drag state
5389
- this.setState({
5390
- draggingTreeData: null,
5391
- draggedNode: null,
5392
- draggedMinimumTreeIndex: null,
5393
- draggedDepth: null,
5394
- dragging: !1
5395
- })) : (0, _lodash2.default)(this.props.searchQuery, nextProps.searchQuery) ? this.props.searchFocusOffset !== nextProps.searchFocusOffset && this.search(nextProps, !0, !0, !0) : this.search(nextProps);
5396
- }
5397
- }, {
5398
- key: "componentDidUpdate",
5399
- value: function(prevProps, prevState) {
5400
- // if it is not the same then call the onDragStateChanged
5401
- this.state.dragging !== prevState.dragging && this.props.onDragStateChanged && this.props.onDragStateChanged({
5402
- isDragging: this.state.dragging,
5403
- draggedNode: this.state.draggedNode
5404
- });
5405
- }
5406
- }, {
5407
- key: "componentWillUnmount",
5408
- value: function() {
5409
- this.clearMonitorSubscription();
5410
- }
5411
- }, {
5412
- key: "getRows",
5413
- value: function(treeData) {
5414
- return (0, _memoizedTreeDataUtils.memoizedGetFlatDataFromTree)({
5415
- ignoreCollapsed: !0,
5416
- getNodeKey: this.props.getNodeKey,
5417
- treeData: treeData
5418
- });
5419
- }
5420
- }, {
5421
- key: "handleDndMonitorChange",
5422
- value: function() {
5423
- // If the drag ends and the tree is still in a mid-drag state,
5424
- // it means that the drag was canceled or the dragSource dropped
5425
- // elsewhere, and we should reset the state of this tree
5426
- !this.context.dragDropManager.getMonitor().isDragging() && this.state.draggingTreeData && this.endDrag();
5427
- }
5428
- }, {
5429
- key: "toggleChildrenVisibility",
5430
- value: function(_ref) {
5431
- var targetNode = _ref.node, path = _ref.path, treeData = (0, _treeDataUtils.changeNodeAtPath)({
5432
- treeData: this.props.treeData,
5433
- path: path,
5434
- newNode: function(_ref2) {
5435
- var node = _ref2.node;
5436
- return _extends({}, node, {
5437
- expanded: !node.expanded
5438
- });
5439
- },
5440
- getNodeKey: this.props.getNodeKey
5441
- });
5442
- this.props.onChange(treeData), this.props.onVisibilityToggle({
5443
- treeData: treeData,
5444
- node: targetNode,
5445
- expanded: !targetNode.expanded,
5446
- path: path
5447
- });
5448
- }
5449
- }, {
5450
- key: "moveNode",
5451
- value: function(_ref3) {
5452
- var node = _ref3.node, prevPath = _ref3.path, prevTreeIndex = _ref3.treeIndex, depth = _ref3.depth, minimumTreeIndex = _ref3.minimumTreeIndex, _insertNode = (0,
5453
- _treeDataUtils.insertNode)({
5454
- treeData: this.state.draggingTreeData,
5455
- newNode: node,
5456
- depth: depth,
5457
- minimumTreeIndex: minimumTreeIndex,
5458
- expandParent: !0,
5459
- getNodeKey: this.props.getNodeKey
5460
- }), treeData = _insertNode.treeData, treeIndex = _insertNode.treeIndex, path = _insertNode.path, nextParentNode = _insertNode.parentNode;
5461
- this.props.onChange(treeData), this.props.onMoveNode({
5462
- treeData: treeData,
5463
- node: node,
5464
- treeIndex: treeIndex,
5465
- path: path,
5466
- nextPath: path,
5467
- nextTreeIndex: treeIndex,
5468
- prevPath: prevPath,
5469
- prevTreeIndex: prevTreeIndex,
5470
- nextParentNode: nextParentNode
5471
- });
5472
- }
5473
- }, {
5474
- key: "search",
5475
- value: function() {
5476
- var props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props, seekIndex = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], expand = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2], singleSearch = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], treeData = props.treeData, onChange = props.onChange, searchFinishCallback = props.searchFinishCallback, searchQuery = props.searchQuery, searchMethod = props.searchMethod, searchFocusOffset = props.searchFocusOffset;
5477
- // Skip search if no conditions are specified
5478
- if ((null === searchQuery || void 0 === searchQuery || "" === String(searchQuery)) && !searchMethod) return this.setState({
5479
- searchMatches: []
5480
- }), void (searchFinishCallback && searchFinishCallback([]));
5481
- var _find = (0, _treeDataUtils.find)({
5482
- getNodeKey: this.props.getNodeKey,
5483
- treeData: treeData,
5484
- searchQuery: searchQuery,
5485
- searchMethod: searchMethod || _defaultHandlers.defaultSearchMethod,
5486
- searchFocusOffset: searchFocusOffset,
5487
- expandAllMatchPaths: expand && !singleSearch,
5488
- expandFocusMatchPaths: !!expand
5489
- }), expandedTreeData = _find.treeData, searchMatches = _find.matches;
5490
- // Update the tree with data leaving all paths leading to matching nodes open
5491
- expand && (this.ignoreOneTreeUpdate = !0, // Prevents infinite loop
5492
- onChange(expandedTreeData)), searchFinishCallback && searchFinishCallback(searchMatches);
5493
- var searchFocusTreeIndex = null;
5494
- seekIndex && null !== searchFocusOffset && searchFocusOffset < searchMatches.length && (searchFocusTreeIndex = searchMatches[searchFocusOffset].treeIndex),
5495
- this.setState({
5496
- searchMatches: searchMatches,
5497
- searchFocusTreeIndex: searchFocusTreeIndex
5498
- });
5499
- }
5500
- }, {
5501
- key: "startDrag",
5502
- value: function(_ref4) {
5503
- var _this2 = this, path = _ref4.path;
5504
- this.setState(function() {
5505
- var _removeNode = (0, _treeDataUtils.removeNode)({
5506
- treeData: _this2.props.treeData,
5507
- path: path,
5508
- getNodeKey: _this2.props.getNodeKey
5509
- }), draggingTreeData = _removeNode.treeData, draggedNode = _removeNode.node, draggedMinimumTreeIndex = _removeNode.treeIndex;
5510
- return {
5511
- draggingTreeData: draggingTreeData,
5512
- draggedNode: draggedNode,
5513
- draggedDepth: path.length - 1,
5514
- draggedMinimumTreeIndex: draggedMinimumTreeIndex,
5515
- dragging: !0
5516
- };
5517
- });
5518
- }
5519
- }, {
5520
- key: "dragHover",
5521
- value: function(_ref5) {
5522
- var draggedNode = _ref5.node, draggedDepth = _ref5.depth, draggedMinimumTreeIndex = _ref5.minimumTreeIndex;
5523
- // Ignore this hover if it is at the same position as the last hover
5524
- if (this.state.draggedDepth !== draggedDepth || this.state.draggedMinimumTreeIndex !== draggedMinimumTreeIndex) {
5525
- // Fall back to the tree data if something is being dragged in from
5526
- // an external element
5527
- var draggingTreeData = this.state.draggingTreeData || this.props.treeData, addedResult = (0,
5528
- _memoizedTreeDataUtils.memoizedInsertNode)({
5529
- treeData: draggingTreeData,
5530
- newNode: draggedNode,
5531
- depth: draggedDepth,
5532
- minimumTreeIndex: draggedMinimumTreeIndex,
5533
- expandParent: !0,
5534
- getNodeKey: this.props.getNodeKey
5535
- }), rows = this.getRows(addedResult.treeData), expandedParentPath = rows[addedResult.treeIndex].path;
5536
- this.setState({
5537
- draggedNode: draggedNode,
5538
- draggedDepth: draggedDepth,
5539
- draggedMinimumTreeIndex: draggedMinimumTreeIndex,
5540
- draggingTreeData: (0, _treeDataUtils.changeNodeAtPath)({
5541
- treeData: draggingTreeData,
5542
- path: expandedParentPath.slice(0, -1),
5543
- newNode: function(_ref6) {
5544
- var node = _ref6.node;
5545
- return _extends({}, node, {
5546
- expanded: !0
5547
- });
5548
- },
5549
- getNodeKey: this.props.getNodeKey
5550
- }),
5551
- // reset the scroll focus so it doesn't jump back
5552
- // to a search result while dragging
5553
- searchFocusTreeIndex: null,
5554
- dragging: !0
5555
- });
5556
- }
5557
- }
5558
- }, {
5559
- key: "endDrag",
5560
- value: function(dropResult) {
5561
- var _this3 = this;
5562
- // Drop was cancelled
5563
- if (dropResult) {
5564
- if (dropResult.treeId !== this.treeId) {
5565
- // The node was dropped in an external drop target or tree
5566
- var node = dropResult.node, path = dropResult.path, treeIndex = dropResult.treeIndex, shouldCopy = this.props.shouldCopyOnOutsideDrop;
5567
- "function" == typeof shouldCopy && (shouldCopy = shouldCopy({
5568
- node: node,
5569
- prevTreeIndex: treeIndex,
5570
- prevPath: path
5571
- }));
5572
- var treeData = this.state.draggingTreeData || this.props.treeData;
5573
- // If copying is enabled, a drop outside leaves behind a copy in the
5574
- // source tree
5575
- shouldCopy && (treeData = (0, _treeDataUtils.changeNodeAtPath)({
5576
- treeData: this.props.treeData,
5577
- // use treeData unaltered by the drag operation
5578
- path: path,
5579
- newNode: function(_ref7) {
5580
- var copyNode = _ref7.node;
5581
- return _extends({}, copyNode);
5582
- },
5583
- // create a shallow copy of the node
5584
- getNodeKey: this.props.getNodeKey
5585
- })), this.props.onChange(treeData), this.props.onMoveNode({
5586
- treeData: treeData,
5587
- node: node,
5588
- treeIndex: null,
5589
- path: null,
5590
- nextPath: null,
5591
- nextTreeIndex: null,
5592
- prevPath: path,
5593
- prevTreeIndex: treeIndex
5594
- });
5595
- }
5596
- } else !function() {
5597
- _this3.setState({
5598
- draggingTreeData: null,
5599
- draggedNode: null,
5600
- draggedMinimumTreeIndex: null,
5601
- draggedDepth: null,
5602
- dragging: !1
5603
- });
5604
- }();
5605
- }
5606
- }, {
5607
- key: "drop",
5608
- value: function(dropResult) {
5609
- this.moveNode(dropResult);
5610
- }
5611
- }, {
5612
- key: "loadLazyChildren",
5613
- value: function() {
5614
- var _this4 = this, props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.props;
5615
- (0, _treeDataUtils.walk)({
5616
- treeData: props.treeData,
5617
- getNodeKey: this.props.getNodeKey,
5618
- callback: function(_ref8) {
5619
- var node = _ref8.node, path = _ref8.path, lowerSiblingCounts = _ref8.lowerSiblingCounts, treeIndex = _ref8.treeIndex;
5620
- // If the node has children defined by a function, and is either expanded
5621
- // or set to load even before expansion, run the function.
5622
- node.children && "function" == typeof node.children && (node.expanded || props.loadCollapsedLazyChildren) && // Call the children fetching function
5623
- node.children({
5624
- node: node,
5625
- path: path,
5626
- lowerSiblingCounts: lowerSiblingCounts,
5627
- treeIndex: treeIndex,
5628
- // Provide a helper to append the new data when it is received
5629
- done: function(childrenArray) {
5630
- return _this4.props.onChange((0, _treeDataUtils.changeNodeAtPath)({
5631
- treeData: _this4.props.treeData,
5632
- path: path,
5633
- newNode: function(_ref9) {
5634
- var oldNode = _ref9.node;
5635
- // Only replace the old node if it's the one we set off to find children
5636
- // for in the first place
5637
- return oldNode === node ? _extends({}, oldNode, {
5638
- children: childrenArray
5639
- }) : oldNode;
5640
- },
5641
- getNodeKey: _this4.props.getNodeKey
5642
- }));
5643
- }
5644
- });
5645
- }
5646
- });
5647
- }
5648
- }, {
5649
- key: "renderRow",
5650
- value: function(_ref10, _ref11) {
5651
- var node = _ref10.node, parentNode = _ref10.parentNode, path = _ref10.path, lowerSiblingCounts = _ref10.lowerSiblingCounts, treeIndex = _ref10.treeIndex, listIndex = _ref11.listIndex, style = _ref11.style, getPrevRow = _ref11.getPrevRow, matchKeys = _ref11.matchKeys, swapFrom = _ref11.swapFrom, swapDepth = _ref11.swapDepth, swapLength = _ref11.swapLength, _mergeTheme2 = mergeTheme(this.props), canDrag = _mergeTheme2.canDrag, generateNodeProps = _mergeTheme2.generateNodeProps, scaffoldBlockPxWidth = _mergeTheme2.scaffoldBlockPxWidth, searchFocusOffset = _mergeTheme2.searchFocusOffset, TreeNodeRenderer = this.treeNodeRenderer, NodeContentRenderer = this.nodeContentRenderer, nodeKey = path[path.length - 1], isSearchMatch = nodeKey in matchKeys, isSearchFocus = isSearchMatch && matchKeys[nodeKey] === searchFocusOffset, callbackParams = {
5652
- node: node,
5653
- parentNode: parentNode,
5654
- path: path,
5655
- lowerSiblingCounts: lowerSiblingCounts,
5656
- treeIndex: treeIndex,
5657
- isSearchMatch: isSearchMatch,
5658
- isSearchFocus: isSearchFocus
5659
- }, nodeProps = generateNodeProps ? generateNodeProps(callbackParams) : {}, rowCanDrag = "function" != typeof canDrag ? canDrag : canDrag(callbackParams), sharedProps = {
5660
- treeIndex: treeIndex,
5661
- scaffoldBlockPxWidth: scaffoldBlockPxWidth,
5662
- node: node,
5663
- path: path,
5664
- treeId: this.treeId
5665
- };
5666
- return _react2.default.createElement(TreeNodeRenderer, _extends({
5667
- style: style,
5668
- key: nodeKey,
5669
- listIndex: listIndex,
5670
- getPrevRow: getPrevRow,
5671
- lowerSiblingCounts: lowerSiblingCounts,
5672
- swapFrom: swapFrom,
5673
- swapLength: swapLength,
5674
- swapDepth: swapDepth
5675
- }, sharedProps), _react2.default.createElement(NodeContentRenderer, _extends({
5676
- parentNode: parentNode,
5677
- isSearchMatch: isSearchMatch,
5678
- isSearchFocus: isSearchFocus,
5679
- canDrag: rowCanDrag,
5680
- toggleChildrenVisibility: this.toggleChildrenVisibility
5681
- }, sharedProps, nodeProps)));
5682
- }
5683
- }, {
5684
- key: "render",
5685
- value: function() {
5686
- var _this5 = this, _mergeTheme3 = mergeTheme(this.props), style = _mergeTheme3.style, className = _mergeTheme3.className, innerStyle = _mergeTheme3.innerStyle, rowHeight = _mergeTheme3.rowHeight, isVirtualized = _mergeTheme3.isVirtualized, placeholderRenderer = _mergeTheme3.placeholderRenderer, reactVirtualizedListProps = _mergeTheme3.reactVirtualizedListProps, getNodeKey = _mergeTheme3.getNodeKey, _state = this.state, searchMatches = _state.searchMatches, searchFocusTreeIndex = _state.searchFocusTreeIndex, draggedNode = _state.draggedNode, draggedDepth = _state.draggedDepth, draggedMinimumTreeIndex = _state.draggedMinimumTreeIndex, treeData = this.state.draggingTreeData || this.props.treeData, rows = void 0, swapFrom = null, swapLength = null;
5687
- if (draggedNode && null !== draggedMinimumTreeIndex) {
5688
- var addedResult = (0, _memoizedTreeDataUtils.memoizedInsertNode)({
5689
- treeData: treeData,
5690
- newNode: draggedNode,
5691
- depth: draggedDepth,
5692
- minimumTreeIndex: draggedMinimumTreeIndex,
5693
- expandParent: !0,
5694
- getNodeKey: getNodeKey
5695
- }), swapTo = draggedMinimumTreeIndex;
5696
- swapFrom = addedResult.treeIndex, swapLength = 1 + (0, _memoizedTreeDataUtils.memoizedGetDescendantCount)({
5697
- node: draggedNode
5698
- }), rows = (0, _genericUtils.slideRows)(this.getRows(addedResult.treeData), swapFrom, swapTo, swapLength);
5699
- } else rows = this.getRows(treeData);
5700
- // Get indices for rows that match the search conditions
5701
- var matchKeys = {};
5702
- searchMatches.forEach(function(_ref12, i) {
5703
- var path = _ref12.path;
5704
- matchKeys[path[path.length - 1]] = i;
5705
- });
5706
- // Seek to the focused search result if there is one specified
5707
- var scrollToInfo = null !== searchFocusTreeIndex ? {
5708
- scrollToIndex: searchFocusTreeIndex
5709
- } : {}, containerStyle = style, list = void 0;
5710
- if (rows.length < 1) {
5711
- var Placeholder = this.treePlaceholderRenderer, PlaceholderContent = placeholderRenderer;
5712
- list = _react2.default.createElement(Placeholder, {
5713
- treeId: this.treeId,
5714
- drop: this.drop
5715
- }, _react2.default.createElement(PlaceholderContent, null));
5716
- } else if (isVirtualized) {
5717
- containerStyle = _extends({
5718
- height: "100%"
5719
- }, containerStyle);
5720
- var ScrollZoneVirtualList = this.scrollZoneVirtualList;
5721
- // Render list with react-virtualized
5722
- list = _react2.default.createElement(_reactVirtualized.AutoSizer, null, function(_ref13) {
5723
- var height = _ref13.height, width = _ref13.width;
5724
- return _react2.default.createElement(ScrollZoneVirtualList, _extends({}, scrollToInfo, {
5725
- verticalStrength: _this5.vStrength,
5726
- horizontalStrength: _this5.hStrength,
5727
- speed: 30,
5728
- scrollToAlignment: "start",
5729
- className: _reactSortableTree2.default.virtualScrollOverride,
5730
- width: width,
5731
- onScroll: function(_ref14) {
5732
- var scrollTop = _ref14.scrollTop;
5733
- _this5.scrollTop = scrollTop;
5734
- },
5735
- height: height,
5736
- style: innerStyle,
5737
- rowCount: rows.length,
5738
- estimatedRowSize: "function" != typeof rowHeight ? rowHeight : void 0,
5739
- rowHeight: "function" != typeof rowHeight ? rowHeight : function(_ref15) {
5740
- var index = _ref15.index;
5741
- return rowHeight({
5742
- index: index,
5743
- treeIndex: index,
5744
- node: rows[index].node,
5745
- path: rows[index].path
5746
- });
5747
- },
5748
- rowRenderer: function(_ref16) {
5749
- var index = _ref16.index, rowStyle = _ref16.style;
5750
- return _this5.renderRow(rows[index], {
5751
- listIndex: index,
5752
- style: rowStyle,
5753
- getPrevRow: function() {
5754
- return rows[index - 1] || null;
5755
- },
5756
- matchKeys: matchKeys,
5757
- swapFrom: swapFrom,
5758
- swapDepth: draggedDepth,
5759
- swapLength: swapLength
5760
- });
5761
- }
5762
- }, reactVirtualizedListProps));
5763
- });
5764
- } else // Render list without react-virtualized
5765
- list = rows.map(function(row, index) {
5766
- return _this5.renderRow(row, {
5767
- listIndex: index,
5768
- style: {
5769
- height: "function" != typeof rowHeight ? rowHeight : rowHeight({
5770
- index: index,
5771
- treeIndex: index,
5772
- node: row.node,
5773
- path: row.path
5774
- })
5775
- },
5776
- getPrevRow: function() {
5777
- return rows[index - 1] || null;
5778
- },
5779
- matchKeys: matchKeys,
5780
- swapFrom: swapFrom,
5781
- swapDepth: draggedDepth,
5782
- swapLength: swapLength
5783
- });
5784
- });
5785
- return _react2.default.createElement("div", {
5786
- className: _reactSortableTree2.default.tree + (className ? " " + className : ""),
5787
- style: containerStyle
5788
- }, list);
5789
- }
5790
- } ]), ReactSortableTree;
5791
- }(_react.Component);
5792
- ReactSortableTree.propTypes = {
5793
- // Tree data in the following format:
5794
- // [{title: 'main', subtitle: 'sub'}, { title: 'value2', expanded: true, children: [{ title: 'value3') }] }]
5795
- // `title` is the primary label for the node
5796
- // `subtitle` is a secondary label for the node
5797
- // `expanded` shows children of the node if true, or hides them if false. Defaults to false.
5798
- // `children` is an array of child nodes belonging to the node.
5799
- treeData: _propTypes2.default.arrayOf(_propTypes2.default.object).isRequired,
5800
- // Style applied to the container wrapping the tree (style defaults to {height: '100%'})
5801
- style: _propTypes2.default.shape({}),
5802
- // Class name for the container wrapping the tree
5803
- className: _propTypes2.default.string,
5804
- // Style applied to the inner, scrollable container (for padding, etc.)
5805
- innerStyle: _propTypes2.default.shape({}),
5806
- // Used by react-virtualized
5807
- // Either a fixed row height (number) or a function that returns the
5808
- // height of a row given its index: `({ index: number }): number`
5809
- rowHeight: _propTypes2.default.oneOfType([ _propTypes2.default.number, _propTypes2.default.func ]),
5810
- // Size in px of the region near the edges that initiates scrolling on dragover
5811
- slideRegionSize: _propTypes2.default.number,
5812
- // Custom properties to hand to the react-virtualized list
5813
- // https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types
5814
- reactVirtualizedListProps: _propTypes2.default.shape({}),
5815
- // The width of the blocks containing the lines representing the structure of the tree.
5816
- scaffoldBlockPxWidth: _propTypes2.default.number,
5817
- // Maximum depth nodes can be inserted at. Defaults to infinite.
5818
- maxDepth: _propTypes2.default.number,
5819
- // The method used to search nodes.
5820
- // Defaults to a function that uses the `searchQuery` string to search for nodes with
5821
- // matching `title` or `subtitle` values.
5822
- // NOTE: Changing `searchMethod` will not update the search, but changing the `searchQuery` will.
5823
- searchMethod: _propTypes2.default.func,
5824
- // Used by the `searchMethod` to highlight and scroll to matched nodes.
5825
- // Should be a string for the default `searchMethod`, but can be anything when using a custom search.
5826
- searchQuery: _propTypes2.default.any,
5827
- // eslint-disable-line react/forbid-prop-types
5828
- // Outline the <`searchFocusOffset`>th node and scroll to it.
5829
- searchFocusOffset: _propTypes2.default.number,
5830
- // Get the nodes that match the search criteria. Used for counting total matches, etc.
5831
- searchFinishCallback: _propTypes2.default.func,
5832
- // Generate an object with additional props to be passed to the node renderer.
5833
- // Use this for adding buttons via the `buttons` key,
5834
- // or additional `style` / `className` settings.
5835
- generateNodeProps: _propTypes2.default.func,
5836
- // Set to false to disable virtualization.
5837
- // NOTE: Auto-scrolling while dragging, and scrolling to the `searchFocusOffset` will be disabled.
5838
- isVirtualized: _propTypes2.default.bool,
5839
- treeNodeRenderer: _propTypes2.default.func,
5840
- // Override the default component for rendering nodes (but keep the scaffolding generator)
5841
- // This is an advanced option for complete customization of the appearance.
5842
- // It is best to copy the component in `node-renderer-default.js` to use as a base, and customize as needed.
5843
- nodeContentRenderer: _propTypes2.default.func,
5844
- // Override the default component for rendering an empty tree
5845
- // This is an advanced option for complete customization of the appearance.
5846
- // It is best to copy the component in `placeholder-renderer-default.js` to use as a base,
5847
- // and customize as needed.
5848
- placeholderRenderer: _propTypes2.default.func,
5849
- theme: _propTypes2.default.shape({
5850
- style: _propTypes2.default.shape({}),
5851
- innerStyle: _propTypes2.default.shape({}),
5852
- reactVirtualizedListProps: _propTypes2.default.shape({}),
5853
- scaffoldBlockPxWidth: _propTypes2.default.number,
5854
- slideRegionSize: _propTypes2.default.number,
5855
- rowHeight: _propTypes2.default.oneOfType([ _propTypes2.default.number, _propTypes2.default.func ]),
5856
- treeNodeRenderer: _propTypes2.default.func,
5857
- nodeContentRenderer: _propTypes2.default.func,
5858
- placeholderRenderer: _propTypes2.default.func
5859
- }),
5860
- // Determine the unique key used to identify each node and
5861
- // generate the `path` array passed in callbacks.
5862
- // By default, returns the index in the tree (omitting hidden nodes).
5863
- getNodeKey: _propTypes2.default.func,
5864
- // Called whenever tree data changed.
5865
- // Just like with React input elements, you have to update your
5866
- // own component's data to see the changes reflected.
5867
- onChange: _propTypes2.default.func.isRequired,
5868
- // Called after node move operation.
5869
- onMoveNode: _propTypes2.default.func,
5870
- // Determine whether a node can be dragged. Set to false to disable dragging on all nodes.
5871
- canDrag: _propTypes2.default.oneOfType([ _propTypes2.default.func, _propTypes2.default.bool ]),
5872
- // Determine whether a node can be dropped based on its path and parents'.
5873
- canDrop: _propTypes2.default.func,
5874
- // When true, or a callback returning true, dropping nodes to react-dnd
5875
- // drop targets outside of this tree will not remove them from this tree
5876
- shouldCopyOnOutsideDrop: _propTypes2.default.oneOfType([ _propTypes2.default.func, _propTypes2.default.bool ]),
5877
- // Called after children nodes collapsed or expanded.
5878
- onVisibilityToggle: _propTypes2.default.func,
5879
- dndType: _propTypes2.default.string,
5880
- // Called to track between dropped and dragging
5881
- onDragStateChanged: _propTypes2.default.func
5882
- }, ReactSortableTree.defaultProps = {
5883
- canDrag: !0,
5884
- canDrop: null,
5885
- className: "",
5886
- dndType: null,
5887
- generateNodeProps: null,
5888
- getNodeKey: _defaultHandlers.defaultGetNodeKey,
5889
- innerStyle: {},
5890
- isVirtualized: !0,
5891
- maxDepth: null,
5892
- treeNodeRenderer: null,
5893
- nodeContentRenderer: null,
5894
- onMoveNode: function() {},
5895
- onVisibilityToggle: function() {},
5896
- placeholderRenderer: null,
5897
- reactVirtualizedListProps: {},
5898
- rowHeight: null,
5899
- scaffoldBlockPxWidth: null,
5900
- searchFinishCallback: null,
5901
- searchFocusOffset: null,
5902
- searchMethod: null,
5903
- searchQuery: null,
5904
- shouldCopyOnOutsideDrop: !1,
5905
- slideRegionSize: null,
5906
- style: {},
5907
- theme: {},
5908
- onDragStateChanged: function() {}
5909
- }, ReactSortableTree.contextTypes = {
5910
- dragDropManager: _propTypes2.default.shape({})
5911
- }, // Export the tree component without the react-dnd DragDropContext,
5912
- // for when component is used with other components using react-dnd.
5913
- // see: https://github.com/gaearon/react-dnd/issues/186
5914
- exports.SortableTreeWithoutDndContext = ReactSortableTree, exports.default = _dndManager2.default.wrapRoot(ReactSortableTree);
5915
- }, /* 9 */
5916
- /***/
5917
- function(module, exports) {
5918
- module.exports = __webpack_require__(251);
5919
- }, /* 10 */
5920
- /***/
5921
- function(module, exports) {
5922
- module.exports = __webpack_require__(298);
5923
- }, /* 11 */
5924
- /***/
5925
- function(module, exports) {
5926
- module.exports = __webpack_require__(299);
5927
- }, /* 12 */
5928
- /***/
5929
- function(module, exports, __webpack_require__) {
5930
- // style-loader: Adds some css to the DOM by adding a <style> tag
5931
- // load the styles
5932
- var content = __webpack_require__(13);
5933
- "string" == typeof content && (content = [ [ module.i, content, "" ] ]);
5934
- // Prepare cssTransformation
5935
- var options = {
5936
- insertAt: "top",
5937
- hmr: !0
5938
- };
5939
- options.transform = void 0;
5940
- // add the styles to the DOM
5941
- __webpack_require__(4)(content, options);
5942
- content.locals && (module.exports = content.locals);
5943
- }, /* 13 */
5944
- /***/
5945
- function(module, exports, __webpack_require__) {
5946
- exports = module.exports = __webpack_require__(3)(!1), // imports
5947
- // module
5948
- exports.push([ module.i, "/* Collection default theme */\n\n._2Ys25aFCIH7ZWp76lcHbjs {\n}\n\n._1wpSOFYFr7x9PMM0KcYTxm {\n}\n\n/* Grid default theme */\n\n._2SUC15-WVgF4XhvHuU81GS {\n}\n\n._3q1PBGJ8fGciELoHlm7I3C {\n}\n\n/* Table default theme */\n\n._1yPBpbwEbdtD7UxLvhZhM {\n}\n\n._1itUjAnMCYR-25x1rmTdtF {\n}\n\n._33g8s-zht4xwLlXSWWWwa3 {\n font-weight: 700;\n text-transform: uppercase;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n._3ZiV_g6aRjm62hwIWbJU38 {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n\n._3eKreK7WxwxtZyKjYLiygd {\n display: inline-block;\n max-width: 100%;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n._19Z4wAfIa_DTwtOUYjz8t,\n._2TseG-JCD0K5o_VT5VIN_w {\n margin-right: 10px;\n min-width: 0px;\n}\n._2TseG-JCD0K5o_VT5VIN_w {\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n._19Z4wAfIa_DTwtOUYjz8t:first-of-type,\n._2TseG-JCD0K5o_VT5VIN_w:first-of-type {\n margin-left: 10px;\n}\n._1RR8EsDxozD7xvl8boaBiB {\n cursor: pointer;\n}\n\n._1u1DZQe3YaUugu3cLrtqng {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n._15mdGqvC02VcdkTaoIuS06 {\n -webkit-box-flex: 0;\n -ms-flex: 0 0 24px;\n flex: 0 0 24px;\n height: 1em;\n width: 1em;\n fill: currentColor;\n}\n\n/* List default theme */\n\n._3HeSXQaspPzpYJlLHQlyit {\n}", "" ]),
5949
- // exports
5950
- exports.locals = {
5951
- ReactVirtualized__Collection: "_2Ys25aFCIH7ZWp76lcHbjs",
5952
- ReactVirtualized__Collection__innerScrollContainer: "_1wpSOFYFr7x9PMM0KcYTxm",
5953
- ReactVirtualized__Grid: "_2SUC15-WVgF4XhvHuU81GS",
5954
- ReactVirtualized__Grid__innerScrollContainer: "_3q1PBGJ8fGciELoHlm7I3C",
5955
- ReactVirtualized__Table: "_1yPBpbwEbdtD7UxLvhZhM",
5956
- ReactVirtualized__Table__Grid: "_1itUjAnMCYR-25x1rmTdtF",
5957
- ReactVirtualized__Table__headerRow: "_33g8s-zht4xwLlXSWWWwa3",
5958
- ReactVirtualized__Table__row: "_3ZiV_g6aRjm62hwIWbJU38",
5959
- ReactVirtualized__Table__headerTruncatedText: "_3eKreK7WxwxtZyKjYLiygd",
5960
- ReactVirtualized__Table__headerColumn: "_19Z4wAfIa_DTwtOUYjz8t",
5961
- ReactVirtualized__Table__rowColumn: "_2TseG-JCD0K5o_VT5VIN_w",
5962
- ReactVirtualized__Table__sortableHeaderColumn: "_1RR8EsDxozD7xvl8boaBiB",
5963
- ReactVirtualized__Table__sortableHeaderIconContainer: "_1u1DZQe3YaUugu3cLrtqng",
5964
- ReactVirtualized__Table__sortableHeaderIcon: "_15mdGqvC02VcdkTaoIuS06",
5965
- ReactVirtualized__List: "_3HeSXQaspPzpYJlLHQlyit"
5966
- };
5967
- }, /* 14 */
5968
- /***/
5969
- function(module, exports) {
5970
- /**
5971
- * When source maps are enabled, `style-loader` uses a link element with a data-uri to
5972
- * embed the css on the page. This breaks all relative urls because now they are relative to a
5973
- * bundle instead of the current page.
5974
- *
5975
- * One solution is to only use full urls, but that may be impossible.
5976
- *
5977
- * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
5978
- *
5979
- * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
5980
- *
5981
- */
5982
- module.exports = function(css) {
5983
- // get current location
5984
- var location = "undefined" != typeof window && window.location;
5985
- if (!location) throw new Error("fixUrls requires window.location");
5986
- // blank or null?
5987
- if (!css || "string" != typeof css) return css;
5988
- var baseUrl = location.protocol + "//" + location.host, currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
5989
- // send back the fixed css
5990
- return css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
5991
- // strip quotes (if they exist)
5992
- var unquotedOrigUrl = origUrl.trim().replace(/^"(.*)"$/, function(o, $1) {
5993
- return $1;
5994
- }).replace(/^'(.*)'$/, function(o, $1) {
5995
- return $1;
5996
- });
5997
- // already a full url? no change
5998
- if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) return fullMatch;
5999
- // convert the url to a full url
6000
- var newUrl;
6001
- // send back the fixed url(...)
6002
- //TODO: should we add protocol?
6003
- return newUrl = 0 === unquotedOrigUrl.indexOf("//") ? unquotedOrigUrl : 0 === unquotedOrigUrl.indexOf("/") ? baseUrl + unquotedOrigUrl : currentDir + unquotedOrigUrl.replace(/^\.\//, ""),
6004
- "url(" + JSON.stringify(newUrl) + ")";
6005
- });
6006
- };
6007
- }, /* 15 */
6008
- /***/
6009
- function(module, exports, __webpack_require__) {
6010
- "use strict";
6011
- function _interopRequireDefault(obj) {
6012
- return obj && obj.__esModule ? obj : {
6013
- default: obj
6014
- };
6015
- }
6016
- function _objectWithoutProperties(obj, keys) {
6017
- var target = {};
6018
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
6019
- return target;
6020
- }
6021
- function _classCallCheck(instance, Constructor) {
6022
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6023
- }
6024
- function _possibleConstructorReturn(self, call) {
6025
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6026
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
6027
- }
6028
- function _inherits(subClass, superClass) {
6029
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
6030
- subClass.prototype = Object.create(superClass && superClass.prototype, {
6031
- constructor: {
6032
- value: subClass,
6033
- enumerable: !1,
6034
- writable: !0,
6035
- configurable: !0
6036
- }
6037
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
6038
- }
6039
- Object.defineProperty(exports, "__esModule", {
6040
- value: !0
6041
- });
6042
- var _extends = Object.assign || function(target) {
6043
- for (var i = 1; i < arguments.length; i++) {
6044
- var source = arguments[i];
6045
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
6046
- }
6047
- return target;
6048
- }, _createClass = function() {
6049
- function defineProperties(target, props) {
6050
- for (var i = 0; i < props.length; i++) {
6051
- var descriptor = props[i];
6052
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
6053
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
6054
- }
6055
- }
6056
- return function(Constructor, protoProps, staticProps) {
6057
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
6058
- Constructor;
6059
- };
6060
- }(), _react = __webpack_require__(1), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(2), _propTypes2 = _interopRequireDefault(_propTypes), _treeNode = __webpack_require__(16), _treeNode2 = _interopRequireDefault(_treeNode), TreeNode = function(_Component) {
6061
- function TreeNode() {
6062
- return _classCallCheck(this, TreeNode), _possibleConstructorReturn(this, (TreeNode.__proto__ || Object.getPrototypeOf(TreeNode)).apply(this, arguments));
6063
- }
6064
- return _inherits(TreeNode, _Component), _createClass(TreeNode, [ {
6065
- key: "render",
6066
- value: function() {
6067
- var _props = this.props, children = _props.children, listIndex = _props.listIndex, swapFrom = _props.swapFrom, swapLength = _props.swapLength, swapDepth = _props.swapDepth, scaffoldBlockPxWidth = _props.scaffoldBlockPxWidth, lowerSiblingCounts = _props.lowerSiblingCounts, connectDropTarget = _props.connectDropTarget, isOver = _props.isOver, draggedNode = _props.draggedNode, canDrop = _props.canDrop, treeIndex = _props.treeIndex, otherProps = (_props.treeId,
6068
- _props.getPrevRow, _props.node, _props.path, _objectWithoutProperties(_props, [ "children", "listIndex", "swapFrom", "swapLength", "swapDepth", "scaffoldBlockPxWidth", "lowerSiblingCounts", "connectDropTarget", "isOver", "draggedNode", "canDrop", "treeIndex", "treeId", "getPrevRow", "node", "path" ])), scaffoldBlockCount = lowerSiblingCounts.length, scaffold = [];
6069
- return lowerSiblingCounts.forEach(function(lowerSiblingCount, i) {
6070
- var lineClass = "";
6071
- if (lowerSiblingCount > 0 ? // At this level in the tree, the nodes had sibling nodes further down
6072
- // Top-left corner of the tree
6073
- // +-----+
6074
- // | |
6075
- // | +--+
6076
- // | | |
6077
- // +--+--+
6078
- lineClass = 0 === listIndex ? _treeNode2.default.lineHalfHorizontalRight + " " + _treeNode2.default.lineHalfVerticalBottom : i === scaffoldBlockCount - 1 ? _treeNode2.default.lineHalfHorizontalRight + " " + _treeNode2.default.lineFullVertical : _treeNode2.default.lineFullVertical : 0 === listIndex ? // Top-left corner of the tree, but has no siblings
6079
- // +-----+
6080
- // | |
6081
- // | +--+
6082
- // | |
6083
- // +-----+
6084
- lineClass = _treeNode2.default.lineHalfHorizontalRight : i === scaffoldBlockCount - 1 && (// The last or only node in this level of the tree
6085
- // +--+--+
6086
- // | | |
6087
- // | +--+
6088
- // | |
6089
- // +-----+
6090
- lineClass = _treeNode2.default.lineHalfVerticalTop + " " + _treeNode2.default.lineHalfHorizontalRight),
6091
- scaffold.push(_react2.default.createElement("div", {
6092
- key: "pre_" + (1 + i),
6093
- style: {
6094
- width: scaffoldBlockPxWidth
6095
- },
6096
- className: _treeNode2.default.lineBlock + " " + lineClass
6097
- })), treeIndex !== listIndex && i === swapDepth) {
6098
- // This row has been shifted, and is at the depth of
6099
- // the line pointing to the new destination
6100
- var highlightLineClass = "";
6101
- // This block is on the bottom (target) line
6102
- // This block points at the target block (where the row will go when released)
6103
- highlightLineClass = listIndex === swapFrom + swapLength - 1 ? _treeNode2.default.highlightBottomLeftCorner : treeIndex === swapFrom ? _treeNode2.default.highlightTopLeftCorner : _treeNode2.default.highlightLineVertical,
6104
- scaffold.push(_react2.default.createElement("div", {
6105
- // eslint-disable-next-line react/no-array-index-key
6106
- key: i,
6107
- style: {
6108
- width: scaffoldBlockPxWidth,
6109
- left: scaffoldBlockPxWidth * i
6110
- },
6111
- className: _treeNode2.default.absoluteLineBlock + " " + highlightLineClass
6112
- }));
6113
- }
6114
- }), connectDropTarget(_react2.default.createElement("div", _extends({}, otherProps, {
6115
- className: _treeNode2.default.node
6116
- }), scaffold, _react2.default.createElement("div", {
6117
- className: _treeNode2.default.nodeContent,
6118
- style: {
6119
- left: scaffoldBlockPxWidth * scaffoldBlockCount
6120
- }
6121
- }, _react.Children.map(children, function(child) {
6122
- return (0, _react.cloneElement)(child, {
6123
- isOver: isOver,
6124
- canDrop: canDrop,
6125
- draggedNode: draggedNode
6126
- });
6127
- }))));
6128
- }
6129
- } ]), TreeNode;
6130
- }(_react.Component);
6131
- TreeNode.defaultProps = {
6132
- swapFrom: null,
6133
- swapDepth: null,
6134
- swapLength: null,
6135
- canDrop: !1,
6136
- draggedNode: null
6137
- }, TreeNode.propTypes = {
6138
- treeIndex: _propTypes2.default.number.isRequired,
6139
- treeId: _propTypes2.default.string.isRequired,
6140
- swapFrom: _propTypes2.default.number,
6141
- swapDepth: _propTypes2.default.number,
6142
- swapLength: _propTypes2.default.number,
6143
- scaffoldBlockPxWidth: _propTypes2.default.number.isRequired,
6144
- lowerSiblingCounts: _propTypes2.default.arrayOf(_propTypes2.default.number).isRequired,
6145
- listIndex: _propTypes2.default.number.isRequired,
6146
- children: _propTypes2.default.node.isRequired,
6147
- // Drop target
6148
- connectDropTarget: _propTypes2.default.func.isRequired,
6149
- isOver: _propTypes2.default.bool.isRequired,
6150
- canDrop: _propTypes2.default.bool,
6151
- draggedNode: _propTypes2.default.shape({}),
6152
- // used in dndManager
6153
- getPrevRow: _propTypes2.default.func.isRequired,
6154
- node: _propTypes2.default.shape({}).isRequired,
6155
- path: _propTypes2.default.arrayOf(_propTypes2.default.oneOfType([ _propTypes2.default.string, _propTypes2.default.number ])).isRequired
6156
- }, exports.default = TreeNode;
6157
- }, /* 16 */
6158
- /***/
6159
- function(module, exports, __webpack_require__) {
6160
- // style-loader: Adds some css to the DOM by adding a <style> tag
6161
- // load the styles
6162
- var content = __webpack_require__(17);
6163
- "string" == typeof content && (content = [ [ module.i, content, "" ] ]);
6164
- // Prepare cssTransformation
6165
- var options = {
6166
- insertAt: "top",
6167
- hmr: !0
6168
- };
6169
- options.transform = void 0;
6170
- // add the styles to the DOM
6171
- __webpack_require__(4)(content, options);
6172
- content.locals && (module.exports = content.locals);
6173
- }, /* 17 */
6174
- /***/
6175
- function(module, exports, __webpack_require__) {
6176
- exports = module.exports = __webpack_require__(3)(!1), // imports
6177
- // module
6178
- exports.push([ module.i, ".rst__node {\n min-width: 100%;\n white-space: nowrap;\n position: relative;\n text-align: left; }\n\n.rst__nodeContent {\n position: absolute;\n top: 0;\n bottom: 0; }\n\n/* ==========================================================================\n Scaffold\n\n Line-overlaid blocks used for showing the tree structure\n ========================================================================== */\n.rst__lineBlock, .rst__absoluteLineBlock {\n height: 100%;\n position: relative;\n display: inline-block; }\n\n.rst__absoluteLineBlock {\n position: absolute;\n top: 0; }\n\n.rst__lineHalfHorizontalRight::before, .rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after {\n position: absolute;\n content: '';\n background-color: black; }\n\n/**\n * +-----+\n * | |\n * | +--+\n * | |\n * +-----+\n */\n.rst__lineHalfHorizontalRight::before {\n height: 1px;\n top: 50%;\n right: 0;\n width: 50%; }\n\n/**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n.rst__lineFullVertical::after, .rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after {\n width: 1px;\n left: 50%;\n top: 0;\n height: 100%; }\n\n/**\n * +-----+\n * | | |\n * | + |\n * | |\n * +-----+\n */\n.rst__lineHalfVerticalTop::after, .rst__lineHalfVerticalBottom::after {\n top: 0;\n height: 50%; }\n\n/**\n * +-----+\n * | |\n * | + |\n * | | |\n * +-----+\n */\n.rst__lineHalfVerticalBottom::after {\n top: auto;\n bottom: 0; }\n\n/* Highlight line for pointing to dragged row destination\n ========================================================================== */\n/**\n * +--+--+\n * | | |\n * | | |\n * | | |\n * +--+--+\n */\n.rst__highlightLineVertical {\n z-index: 3; }\n .rst__highlightLineVertical::before {\n position: absolute;\n content: '';\n background-color: #36c2f6;\n width: 8px;\n margin-left: -4px;\n left: 50%;\n top: 0;\n height: 100%; }\n\n@-webkit-keyframes rst__arrow-pulse {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n opacity: 0; }\n 30% {\n -webkit-transform: translate(0, 300%);\n transform: translate(0, 300%);\n opacity: 1; }\n 70% {\n -webkit-transform: translate(0, 700%);\n transform: translate(0, 700%);\n opacity: 1; }\n 100% {\n -webkit-transform: translate(0, 1000%);\n transform: translate(0, 1000%);\n opacity: 0; } }\n\n@keyframes rst__arrow-pulse {\n 0% {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n opacity: 0; }\n 30% {\n -webkit-transform: translate(0, 300%);\n transform: translate(0, 300%);\n opacity: 1; }\n 70% {\n -webkit-transform: translate(0, 700%);\n transform: translate(0, 700%);\n opacity: 1; }\n 100% {\n -webkit-transform: translate(0, 1000%);\n transform: translate(0, 1000%);\n opacity: 0; } }\n .rst__highlightLineVertical::after {\n content: '';\n position: absolute;\n height: 0;\n margin-left: -4px;\n left: 50%;\n top: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid white;\n -webkit-animation: rst__arrow-pulse 1s infinite linear both;\n animation: rst__arrow-pulse 1s infinite linear both; }\n\n/**\n * +-----+\n * | |\n * | +--+\n * | | |\n * +--+--+\n */\n.rst__highlightTopLeftCorner::before {\n z-index: 3;\n content: '';\n position: absolute;\n border-top: solid 8px #36c2f6;\n border-left: solid 8px #36c2f6;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n height: calc(50% + 4px);\n top: 50%;\n margin-top: -4px;\n right: 0;\n width: calc(50% + 4px); }\n\n/**\n * +--+--+\n * | | |\n * | | |\n * | +->|\n * +-----+\n */\n.rst__highlightBottomLeftCorner {\n z-index: 3; }\n .rst__highlightBottomLeftCorner::before {\n content: '';\n position: absolute;\n border-bottom: solid 8px #36c2f6;\n border-left: solid 8px #36c2f6;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n height: calc(100% + 4px);\n top: 0;\n right: 12px;\n width: calc(50% - 8px); }\n .rst__highlightBottomLeftCorner::after {\n content: '';\n position: absolute;\n height: 0;\n right: 0;\n top: 100%;\n margin-top: -12px;\n border-top: 12px solid transparent;\n border-bottom: 12px solid transparent;\n border-left: 12px solid #36c2f6; }\n", "" ]),
6179
- // exports
6180
- exports.locals = {
6181
- node: "rst__node",
6182
- nodeContent: "rst__nodeContent",
6183
- lineBlock: "rst__lineBlock",
6184
- absoluteLineBlock: "rst__absoluteLineBlock",
6185
- lineHalfHorizontalRight: "rst__lineHalfHorizontalRight",
6186
- lineFullVertical: "rst__lineFullVertical",
6187
- lineHalfVerticalTop: "rst__lineHalfVerticalTop",
6188
- lineHalfVerticalBottom: "rst__lineHalfVerticalBottom",
6189
- highlightLineVertical: "rst__highlightLineVertical",
6190
- "arrow-pulse": "rst__arrow-pulse",
6191
- highlightTopLeftCorner: "rst__highlightTopLeftCorner",
6192
- highlightBottomLeftCorner: "rst__highlightBottomLeftCorner"
6193
- };
6194
- }, /* 18 */
6195
- /***/
6196
- function(module, exports, __webpack_require__) {
6197
- "use strict";
6198
- function _interopRequireDefault(obj) {
6199
- return obj && obj.__esModule ? obj : {
6200
- default: obj
6201
- };
6202
- }
6203
- function _objectWithoutProperties(obj, keys) {
6204
- var target = {};
6205
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
6206
- return target;
6207
- }
6208
- function _classCallCheck(instance, Constructor) {
6209
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6210
- }
6211
- function _possibleConstructorReturn(self, call) {
6212
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6213
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
6214
- }
6215
- function _inherits(subClass, superClass) {
6216
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
6217
- subClass.prototype = Object.create(superClass && superClass.prototype, {
6218
- constructor: {
6219
- value: subClass,
6220
- enumerable: !1,
6221
- writable: !0,
6222
- configurable: !0
6223
- }
6224
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
6225
- }
6226
- Object.defineProperty(exports, "__esModule", {
6227
- value: !0
6228
- });
6229
- var _createClass = function() {
6230
- function defineProperties(target, props) {
6231
- for (var i = 0; i < props.length; i++) {
6232
- var descriptor = props[i];
6233
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
6234
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
6235
- }
6236
- }
6237
- return function(Constructor, protoProps, staticProps) {
6238
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
6239
- Constructor;
6240
- };
6241
- }(), _extends = Object.assign || function(target) {
6242
- for (var i = 1; i < arguments.length; i++) {
6243
- var source = arguments[i];
6244
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
6245
- }
6246
- return target;
6247
- }, _react = __webpack_require__(1), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(2), _propTypes2 = _interopRequireDefault(_propTypes), _browserUtils = __webpack_require__(19), _nodeRendererDefault = __webpack_require__(20), _nodeRendererDefault2 = _interopRequireDefault(_nodeRendererDefault), _treeDataUtils = __webpack_require__(0), styles = _nodeRendererDefault2.default;
6248
- // Add extra classes in browsers that don't support flex
6249
- _browserUtils.getIEVersion < 10 && (styles = _extends({}, _nodeRendererDefault2.default, {
6250
- row: styles.row + " " + styles.row_NoFlex,
6251
- rowContents: styles.rowContents + " " + styles.rowContents_NoFlex,
6252
- rowLabel: styles.rowLabel + " " + styles.rowLabel_NoFlex,
6253
- rowToolbar: styles.rowToolbar + " " + styles.rowToolbar_NoFlex
6254
- }));
6255
- var NodeRendererDefault = function(_Component) {
6256
- function NodeRendererDefault() {
6257
- return _classCallCheck(this, NodeRendererDefault), _possibleConstructorReturn(this, (NodeRendererDefault.__proto__ || Object.getPrototypeOf(NodeRendererDefault)).apply(this, arguments));
6258
- }
6259
- return _inherits(NodeRendererDefault, _Component), _createClass(NodeRendererDefault, [ {
6260
- key: "render",
6261
- value: function() {
6262
- var _props = this.props, scaffoldBlockPxWidth = _props.scaffoldBlockPxWidth, toggleChildrenVisibility = _props.toggleChildrenVisibility, connectDragPreview = _props.connectDragPreview, connectDragSource = _props.connectDragSource, isDragging = _props.isDragging, canDrop = _props.canDrop, canDrag = _props.canDrag, node = _props.node, title = _props.title, subtitle = _props.subtitle, draggedNode = _props.draggedNode, path = _props.path, treeIndex = _props.treeIndex, isSearchMatch = _props.isSearchMatch, isSearchFocus = _props.isSearchFocus, buttons = _props.buttons, className = _props.className, style = _props.style, didDrop = _props.didDrop, otherProps = (_props.treeId,
6263
- _props.isOver, _props.parentNode, _objectWithoutProperties(_props, [ "scaffoldBlockPxWidth", "toggleChildrenVisibility", "connectDragPreview", "connectDragSource", "isDragging", "canDrop", "canDrag", "node", "title", "subtitle", "draggedNode", "path", "treeIndex", "isSearchMatch", "isSearchFocus", "buttons", "className", "style", "didDrop", "treeId", "isOver", "parentNode" ])), nodeTitle = title || node.title, nodeSubtitle = subtitle || node.subtitle, handle = void 0;
6264
- canDrag && (// Show a loading symbol on the handle when the children are expanded
6265
- // and yet still defined by a function (a callback to fetch the children)
6266
- handle = "function" == typeof node.children && node.expanded ? _react2.default.createElement("div", {
6267
- className: styles.loadingHandle
6268
- }, _react2.default.createElement("div", {
6269
- className: styles.loadingCircle
6270
- }, _react2.default.createElement("div", {
6271
- className: styles.loadingCirclePoint
6272
- }), _react2.default.createElement("div", {
6273
- className: styles.loadingCirclePoint
6274
- }), _react2.default.createElement("div", {
6275
- className: styles.loadingCirclePoint
6276
- }), _react2.default.createElement("div", {
6277
- className: styles.loadingCirclePoint
6278
- }), _react2.default.createElement("div", {
6279
- className: styles.loadingCirclePoint
6280
- }), _react2.default.createElement("div", {
6281
- className: styles.loadingCirclePoint
6282
- }), _react2.default.createElement("div", {
6283
- className: styles.loadingCirclePoint
6284
- }), _react2.default.createElement("div", {
6285
- className: styles.loadingCirclePoint
6286
- }), _react2.default.createElement("div", {
6287
- className: styles.loadingCirclePoint
6288
- }), _react2.default.createElement("div", {
6289
- className: styles.loadingCirclePoint
6290
- }), _react2.default.createElement("div", {
6291
- className: styles.loadingCirclePoint
6292
- }), _react2.default.createElement("div", {
6293
- className: styles.loadingCirclePoint
6294
- }))) : connectDragSource(_react2.default.createElement("div", {
6295
- className: styles.moveHandle
6296
- }), {
6297
- dropEffect: "copy"
6298
- }));
6299
- var isDraggedDescendant = draggedNode && (0, _treeDataUtils.isDescendant)(draggedNode, node), isLandingPadActive = !didDrop && isDragging;
6300
- return _react2.default.createElement("div", _extends({
6301
- style: {
6302
- height: "100%"
6303
- }
6304
- }, otherProps), toggleChildrenVisibility && node.children && (node.children.length > 0 || "function" == typeof node.children) && _react2.default.createElement("div", null, _react2.default.createElement("button", {
6305
- type: "button",
6306
- "aria-label": node.expanded ? "Collapse" : "Expand",
6307
- className: node.expanded ? styles.collapseButton : styles.expandButton,
6308
- style: {
6309
- left: -.5 * scaffoldBlockPxWidth
6310
- },
6311
- onClick: function() {
6312
- return toggleChildrenVisibility({
6313
- node: node,
6314
- path: path,
6315
- treeIndex: treeIndex
6316
- });
6317
- }
6318
- }), node.expanded && !isDragging && _react2.default.createElement("div", {
6319
- style: {
6320
- width: scaffoldBlockPxWidth
6321
- },
6322
- className: styles.lineChildren
6323
- })), _react2.default.createElement("div", {
6324
- className: styles.rowWrapper
6325
- }, connectDragPreview(_react2.default.createElement("div", {
6326
- className: styles.row + (isLandingPadActive ? " " + styles.rowLandingPad : "") + (isLandingPadActive && !canDrop ? " " + styles.rowCancelPad : "") + (isSearchMatch ? " " + styles.rowSearchMatch : "") + (isSearchFocus ? " " + styles.rowSearchFocus : "") + (className ? " " + className : ""),
6327
- style: _extends({
6328
- opacity: isDraggedDescendant ? .5 : 1
6329
- }, style)
6330
- }, handle, _react2.default.createElement("div", {
6331
- className: styles.rowContents + (canDrag ? "" : " " + styles.rowContentsDragDisabled)
6332
- }, _react2.default.createElement("div", {
6333
- className: styles.rowLabel
6334
- }, _react2.default.createElement("span", {
6335
- className: styles.rowTitle + (node.subtitle ? " " + styles.rowTitleWithSubtitle : "")
6336
- }, "function" == typeof nodeTitle ? nodeTitle({
6337
- node: node,
6338
- path: path,
6339
- treeIndex: treeIndex
6340
- }) : nodeTitle), nodeSubtitle && _react2.default.createElement("span", {
6341
- className: styles.rowSubtitle
6342
- }, "function" == typeof nodeSubtitle ? nodeSubtitle({
6343
- node: node,
6344
- path: path,
6345
- treeIndex: treeIndex
6346
- }) : nodeSubtitle)), _react2.default.createElement("div", {
6347
- className: styles.rowToolbar
6348
- }, buttons.map(function(btn, index) {
6349
- return _react2.default.createElement("div", {
6350
- key: index,
6351
- className: styles.toolbarButton
6352
- }, btn);
6353
- })))))));
6354
- }
6355
- } ]), NodeRendererDefault;
6356
- }(_react.Component);
6357
- NodeRendererDefault.defaultProps = {
6358
- isSearchMatch: !1,
6359
- isSearchFocus: !1,
6360
- canDrag: !1,
6361
- toggleChildrenVisibility: null,
6362
- buttons: [],
6363
- className: "",
6364
- style: {},
6365
- parentNode: null,
6366
- draggedNode: null,
6367
- canDrop: !1,
6368
- title: null,
6369
- subtitle: null
6370
- }, NodeRendererDefault.propTypes = {
6371
- node: _propTypes2.default.shape({}).isRequired,
6372
- title: _propTypes2.default.oneOfType([ _propTypes2.default.func, _propTypes2.default.node ]),
6373
- subtitle: _propTypes2.default.oneOfType([ _propTypes2.default.func, _propTypes2.default.node ]),
6374
- path: _propTypes2.default.arrayOf(_propTypes2.default.oneOfType([ _propTypes2.default.string, _propTypes2.default.number ])).isRequired,
6375
- treeIndex: _propTypes2.default.number.isRequired,
6376
- treeId: _propTypes2.default.string.isRequired,
6377
- isSearchMatch: _propTypes2.default.bool,
6378
- isSearchFocus: _propTypes2.default.bool,
6379
- canDrag: _propTypes2.default.bool,
6380
- scaffoldBlockPxWidth: _propTypes2.default.number.isRequired,
6381
- toggleChildrenVisibility: _propTypes2.default.func,
6382
- buttons: _propTypes2.default.arrayOf(_propTypes2.default.node),
6383
- className: _propTypes2.default.string,
6384
- style: _propTypes2.default.shape({}),
6385
- // Drag and drop API functions
6386
- // Drag source
6387
- connectDragPreview: _propTypes2.default.func.isRequired,
6388
- connectDragSource: _propTypes2.default.func.isRequired,
6389
- parentNode: _propTypes2.default.shape({}),
6390
- // Needed for dndManager
6391
- isDragging: _propTypes2.default.bool.isRequired,
6392
- didDrop: _propTypes2.default.bool.isRequired,
6393
- draggedNode: _propTypes2.default.shape({}),
6394
- // Drop target
6395
- isOver: _propTypes2.default.bool.isRequired,
6396
- canDrop: _propTypes2.default.bool
6397
- }, exports.default = NodeRendererDefault;
6398
- }, /* 19 */
6399
- /***/
6400
- function(module, exports, __webpack_require__) {
6401
- "use strict";
6402
- /* eslint-disable import/prefer-default-export */
6403
- /**
6404
- * Get the version of Internet Explorer in use, or undefined
6405
- *
6406
- * @return {?number} ieVersion - IE version as an integer, or undefined if not IE
6407
- */
6408
- function getIEVersion() {
6409
- var match = navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
6410
- return match ? parseInt(match[1], 10) : void 0;
6411
- }
6412
- Object.defineProperty(exports, "__esModule", {
6413
- value: !0
6414
- }), exports.getIEVersion = getIEVersion;
6415
- }, /* 20 */
6416
- /***/
6417
- function(module, exports, __webpack_require__) {
6418
- // style-loader: Adds some css to the DOM by adding a <style> tag
6419
- // load the styles
6420
- var content = __webpack_require__(21);
6421
- "string" == typeof content && (content = [ [ module.i, content, "" ] ]);
6422
- // Prepare cssTransformation
6423
- var options = {
6424
- insertAt: "top",
6425
- hmr: !0
6426
- };
6427
- options.transform = void 0;
6428
- // add the styles to the DOM
6429
- __webpack_require__(4)(content, options);
6430
- content.locals && (module.exports = content.locals);
6431
- }, /* 21 */
6432
- /***/
6433
- function(module, exports, __webpack_require__) {
6434
- exports = module.exports = __webpack_require__(3)(!1), // imports
6435
- // module
6436
- exports.push([ module.i, ".rst__rowWrapper {\n padding: 10px 10px 10px 0;\n height: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n\n.rst__row {\n height: 100%;\n white-space: nowrap;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n .rst__row > * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n\n/**\n * The outline of where the element will go if dropped, displayed while dragging\n */\n.rst__rowLandingPad, .rst__rowCancelPad {\n border: none !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n outline: none !important; }\n .rst__rowLandingPad > *, .rst__rowCancelPad > * {\n opacity: 0 !important; }\n .rst__rowLandingPad::before, .rst__rowCancelPad::before {\n background-color: lightblue;\n border: 3px dashed white;\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1; }\n\n/**\n * Alternate appearance of the landing pad when the dragged location is invalid\n */\n.rst__rowCancelPad::before {\n background-color: #e6a8ad; }\n\n/**\n * Nodes matching the search conditions are highlighted\n */\n.rst__rowSearchMatch {\n outline: solid 3px #0080ff; }\n\n/**\n * The node that matches the search conditions and is currently focused\n */\n.rst__rowSearchFocus {\n outline: solid 3px #fc6421; }\n\n.rst__rowContents, .rst__rowLabel, .rst__rowToolbar, .rst__moveHandle, .rst__loadingHandle, .rst__toolbarButton, .rst__rowLabel_NoFlex, .rst__rowToolbar_NoFlex {\n display: inline-block;\n vertical-align: middle; }\n\n.rst__rowContents {\n position: relative;\n height: 100%;\n border: solid #bbb 1px;\n border-left: none;\n -webkit-box-shadow: 0 2px 2px -2px;\n box-shadow: 0 2px 2px -2px;\n padding: 0 5px 0 10px;\n border-radius: 2px;\n min-width: 230px;\n -webkit-box-flex: 1;\n -ms-flex: 1 0 auto;\n flex: 1 0 auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n background-color: white; }\n\n.rst__rowContentsDragDisabled {\n border-left: solid #bbb 1px; }\n\n.rst__rowLabel {\n -webkit-box-flex: 0;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n padding-right: 20px; }\n\n.rst__rowToolbar {\n -webkit-box-flex: 0;\n -ms-flex: 0 1 auto;\n flex: 0 1 auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex; }\n\n.rst__moveHandle, .rst__loadingHandle {\n height: 100%;\n width: 44px;\n background: #d9d9d9 url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MiIgaGVpZ2h0PSI0MiI+PGcgc3Ryb2tlPSIjRkZGIiBzdHJva2Utd2lkdGg9IjIuOSIgPjxwYXRoIGQ9Ik0xNCAxNS43aDE0LjQiLz48cGF0aCBkPSJNMTQgMjEuNGgxNC40Ii8+PHBhdGggZD0iTTE0IDI3LjFoMTQuNCIvPjwvZz4KPC9zdmc+\") no-repeat center;\n border: solid #aaa 1px;\n -webkit-box-shadow: 0 2px 2px -2px;\n box-shadow: 0 2px 2px -2px;\n cursor: move;\n border-radius: 1px;\n z-index: 1; }\n\n.rst__loadingHandle {\n cursor: default;\n background: #d9d9d9; }\n\n@-webkit-keyframes rst__pointFade {\n 0%,\n 19.999%,\n 100% {\n opacity: 0; }\n 20% {\n opacity: 1; } }\n\n@keyframes rst__pointFade {\n 0%,\n 19.999%,\n 100% {\n opacity: 0; }\n 20% {\n opacity: 1; } }\n\n.rst__loadingCircle {\n width: 80%;\n height: 80%;\n margin: 10%;\n position: relative; }\n\n.rst__loadingCirclePoint {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0; }\n .rst__loadingCirclePoint:before {\n content: '';\n display: block;\n margin: 0 auto;\n width: 11%;\n height: 30%;\n background-color: #fff;\n border-radius: 30%;\n -webkit-animation: rst__pointFade 800ms infinite ease-in-out both;\n animation: rst__pointFade 800ms infinite ease-in-out both; }\n .rst__loadingCirclePoint:nth-of-type(1) {\n -webkit-transform: rotate(0deg);\n -ms-transform: rotate(0deg);\n transform: rotate(0deg); }\n .rst__loadingCirclePoint:nth-of-type(7) {\n -webkit-transform: rotate(180deg);\n -ms-transform: rotate(180deg);\n transform: rotate(180deg); }\n .rst__loadingCirclePoint:nth-of-type(1):before, .rst__loadingCirclePoint:nth-of-type(7):before {\n -webkit-animation-delay: -800ms;\n animation-delay: -800ms; }\n .rst__loadingCirclePoint:nth-of-type(2) {\n -webkit-transform: rotate(30deg);\n -ms-transform: rotate(30deg);\n transform: rotate(30deg); }\n .rst__loadingCirclePoint:nth-of-type(8) {\n -webkit-transform: rotate(210deg);\n -ms-transform: rotate(210deg);\n transform: rotate(210deg); }\n .rst__loadingCirclePoint:nth-of-type(2):before, .rst__loadingCirclePoint:nth-of-type(8):before {\n -webkit-animation-delay: -666.66667ms;\n animation-delay: -666.66667ms; }\n .rst__loadingCirclePoint:nth-of-type(3) {\n -webkit-transform: rotate(60deg);\n -ms-transform: rotate(60deg);\n transform: rotate(60deg); }\n .rst__loadingCirclePoint:nth-of-type(9) {\n -webkit-transform: rotate(240deg);\n -ms-transform: rotate(240deg);\n transform: rotate(240deg); }\n .rst__loadingCirclePoint:nth-of-type(3):before, .rst__loadingCirclePoint:nth-of-type(9):before {\n -webkit-animation-delay: -533.33333ms;\n animation-delay: -533.33333ms; }\n .rst__loadingCirclePoint:nth-of-type(4) {\n -webkit-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg); }\n .rst__loadingCirclePoint:nth-of-type(10) {\n -webkit-transform: rotate(270deg);\n -ms-transform: rotate(270deg);\n transform: rotate(270deg); }\n .rst__loadingCirclePoint:nth-of-type(4):before, .rst__loadingCirclePoint:nth-of-type(10):before {\n -webkit-animation-delay: -400ms;\n animation-delay: -400ms; }\n .rst__loadingCirclePoint:nth-of-type(5) {\n -webkit-transform: rotate(120deg);\n -ms-transform: rotate(120deg);\n transform: rotate(120deg); }\n .rst__loadingCirclePoint:nth-of-type(11) {\n -webkit-transform: rotate(300deg);\n -ms-transform: rotate(300deg);\n transform: rotate(300deg); }\n .rst__loadingCirclePoint:nth-of-type(5):before, .rst__loadingCirclePoint:nth-of-type(11):before {\n -webkit-animation-delay: -266.66667ms;\n animation-delay: -266.66667ms; }\n .rst__loadingCirclePoint:nth-of-type(6) {\n -webkit-transform: rotate(150deg);\n -ms-transform: rotate(150deg);\n transform: rotate(150deg); }\n .rst__loadingCirclePoint:nth-of-type(12) {\n -webkit-transform: rotate(330deg);\n -ms-transform: rotate(330deg);\n transform: rotate(330deg); }\n .rst__loadingCirclePoint:nth-of-type(6):before, .rst__loadingCirclePoint:nth-of-type(12):before {\n -webkit-animation-delay: -133.33333ms;\n animation-delay: -133.33333ms; }\n .rst__loadingCirclePoint:nth-of-type(7) {\n -webkit-transform: rotate(180deg);\n -ms-transform: rotate(180deg);\n transform: rotate(180deg); }\n .rst__loadingCirclePoint:nth-of-type(13) {\n -webkit-transform: rotate(360deg);\n -ms-transform: rotate(360deg);\n transform: rotate(360deg); }\n .rst__loadingCirclePoint:nth-of-type(7):before, .rst__loadingCirclePoint:nth-of-type(13):before {\n -webkit-animation-delay: 0ms;\n animation-delay: 0ms; }\n\n.rst__rowTitle {\n font-weight: bold; }\n\n.rst__rowTitleWithSubtitle {\n font-size: 85%;\n display: block;\n height: 0.8rem; }\n\n.rst__rowSubtitle {\n font-size: 70%;\n line-height: 1; }\n\n.rst__collapseButton,\n.rst__expandButton {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n position: absolute;\n border-radius: 100%;\n -webkit-box-shadow: 0 0 0 1px #000;\n box-shadow: 0 0 0 1px #000;\n width: 16px;\n height: 16px;\n padding: 0;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n cursor: pointer; }\n .rst__collapseButton:focus,\n .rst__expandButton:focus {\n outline: none;\n -webkit-box-shadow: 0 0 0 1px #000, 0 0 1px 3px #83bef9;\n box-shadow: 0 0 0 1px #000, 0 0 1px 3px #83bef9; }\n .rst__collapseButton:hover:not(:active),\n .rst__expandButton:hover:not(:active) {\n background-size: 24px;\n height: 20px;\n width: 20px; }\n\n.rst__collapseButton {\n background: #fff url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjgiIGZpbGw9IiNGRkYiLz48ZyBzdHJva2U9IiM5ODk4OTgiIHN0cm9rZS13aWR0aD0iMS45IiA+PHBhdGggZD0iTTQuNSA5aDkiLz48L2c+Cjwvc3ZnPg==\") no-repeat center; }\n\n.rst__expandButton {\n background: #fff url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjgiIGZpbGw9IiNGRkYiLz48ZyBzdHJva2U9IiM5ODk4OTgiIHN0cm9rZS13aWR0aD0iMS45IiA+PHBhdGggZD0iTTQuNSA5aDkiLz48cGF0aCBkPSJNOSA0LjV2OSIvPjwvZz4KPC9zdmc+\") no-repeat center; }\n\n/**\n * Classes for IE9 and below\n */\n.rst__row_NoFlex::before, .rst__rowContents_NoFlex::before {\n content: '';\n display: inline-block;\n vertical-align: middle;\n height: 100%; }\n\n.rst__rowContents_NoFlex {\n display: inline-block; }\n .rst__rowContents_NoFlex::after {\n content: '';\n display: inline-block;\n width: 100%; }\n\n.rst__rowLabel_NoFlex {\n width: 50%; }\n\n.rst__rowToolbar_NoFlex {\n text-align: right;\n width: 50%; }\n\n/**\n * Line for under a node with children\n */\n.rst__lineChildren {\n height: 100%;\n display: inline-block;\n position: absolute; }\n .rst__lineChildren::after {\n content: '';\n position: absolute;\n background-color: black;\n width: 1px;\n left: 50%;\n bottom: 0;\n height: 10px; }\n", "" ]),
6437
- // exports
6438
- exports.locals = {
6439
- rowWrapper: "rst__rowWrapper",
6440
- row: "rst__row",
6441
- rowLandingPad: "rst__rowLandingPad",
6442
- rowCancelPad: "rst__rowCancelPad",
6443
- rowSearchMatch: "rst__rowSearchMatch",
6444
- rowSearchFocus: "rst__rowSearchFocus",
6445
- rowContents: "rst__rowContents",
6446
- rowLabel: "rst__rowLabel",
6447
- rowToolbar: "rst__rowToolbar",
6448
- moveHandle: "rst__moveHandle",
6449
- loadingHandle: "rst__loadingHandle",
6450
- toolbarButton: "rst__toolbarButton",
6451
- rowLabel_NoFlex: "rst__rowLabel_NoFlex",
6452
- rowToolbar_NoFlex: "rst__rowToolbar_NoFlex",
6453
- rowContentsDragDisabled: "rst__rowContentsDragDisabled",
6454
- loadingCircle: "rst__loadingCircle",
6455
- loadingCirclePoint: "rst__loadingCirclePoint",
6456
- pointFade: "rst__pointFade",
6457
- rowTitle: "rst__rowTitle",
6458
- rowTitleWithSubtitle: "rst__rowTitleWithSubtitle",
6459
- rowSubtitle: "rst__rowSubtitle",
6460
- collapseButton: "rst__collapseButton",
6461
- expandButton: "rst__expandButton",
6462
- row_NoFlex: "rst__row_NoFlex",
6463
- rowContents_NoFlex: "rst__rowContents_NoFlex",
6464
- lineChildren: "rst__lineChildren"
6465
- };
6466
- }, /* 22 */
6467
- /***/
6468
- function(module, exports, __webpack_require__) {
6469
- "use strict";
6470
- function _interopRequireDefault(obj) {
6471
- return obj && obj.__esModule ? obj : {
6472
- default: obj
6473
- };
6474
- }
6475
- function _objectWithoutProperties(obj, keys) {
6476
- var target = {};
6477
- for (var i in obj) keys.indexOf(i) >= 0 || Object.prototype.hasOwnProperty.call(obj, i) && (target[i] = obj[i]);
6478
- return target;
6479
- }
6480
- function _classCallCheck(instance, Constructor) {
6481
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6482
- }
6483
- function _possibleConstructorReturn(self, call) {
6484
- if (!self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
6485
- return !call || "object" != typeof call && "function" != typeof call ? self : call;
6486
- }
6487
- function _inherits(subClass, superClass) {
6488
- if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
6489
- subClass.prototype = Object.create(superClass && superClass.prototype, {
6490
- constructor: {
6491
- value: subClass,
6492
- enumerable: !1,
6493
- writable: !0,
6494
- configurable: !0
6495
- }
6496
- }), superClass && (Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass);
6497
- }
6498
- Object.defineProperty(exports, "__esModule", {
6499
- value: !0
6500
- });
6501
- var _extends = Object.assign || function(target) {
6502
- for (var i = 1; i < arguments.length; i++) {
6503
- var source = arguments[i];
6504
- for (var key in source) Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
6505
- }
6506
- return target;
6507
- }, _createClass = function() {
6508
- function defineProperties(target, props) {
6509
- for (var i = 0; i < props.length; i++) {
6510
- var descriptor = props[i];
6511
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
6512
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
6513
- }
6514
- }
6515
- return function(Constructor, protoProps, staticProps) {
6516
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
6517
- Constructor;
6518
- };
6519
- }(), _react = __webpack_require__(1), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(2), _propTypes2 = _interopRequireDefault(_propTypes), TreePlaceholder = function(_Component) {
6520
- function TreePlaceholder() {
6521
- return _classCallCheck(this, TreePlaceholder), _possibleConstructorReturn(this, (TreePlaceholder.__proto__ || Object.getPrototypeOf(TreePlaceholder)).apply(this, arguments));
6522
- }
6523
- return _inherits(TreePlaceholder, _Component), _createClass(TreePlaceholder, [ {
6524
- key: "render",
6525
- value: function() {
6526
- var _props = this.props, children = _props.children, connectDropTarget = _props.connectDropTarget, otherProps = (_props.treeId,
6527
- _props.drop, _objectWithoutProperties(_props, [ "children", "connectDropTarget", "treeId", "drop" ]));
6528
- return connectDropTarget(_react2.default.createElement("div", null, _react.Children.map(children, function(child) {
6529
- return (0, _react.cloneElement)(child, _extends({}, otherProps));
6530
- })));
6531
- }
6532
- } ]), TreePlaceholder;
6533
- }(_react.Component);
6534
- TreePlaceholder.defaultProps = {
6535
- canDrop: !1,
6536
- draggedNode: null
6537
- }, TreePlaceholder.propTypes = {
6538
- children: _propTypes2.default.node.isRequired,
6539
- // Drop target
6540
- connectDropTarget: _propTypes2.default.func.isRequired,
6541
- isOver: _propTypes2.default.bool.isRequired,
6542
- canDrop: _propTypes2.default.bool,
6543
- draggedNode: _propTypes2.default.shape({}),
6544
- treeId: _propTypes2.default.string.isRequired,
6545
- drop: _propTypes2.default.func.isRequired
6546
- }, exports.default = TreePlaceholder;
6547
- }, /* 23 */
6548
- /***/
6549
- function(module, exports, __webpack_require__) {
6550
- "use strict";
6551
- function _interopRequireDefault(obj) {
6552
- return obj && obj.__esModule ? obj : {
6553
- default: obj
6554
- };
6555
- }
6556
- Object.defineProperty(exports, "__esModule", {
6557
- value: !0
6558
- });
6559
- var _react = __webpack_require__(1), _react2 = _interopRequireDefault(_react), _propTypes = __webpack_require__(2), _propTypes2 = _interopRequireDefault(_propTypes), _placeholderRendererDefault = __webpack_require__(24), _placeholderRendererDefault2 = _interopRequireDefault(_placeholderRendererDefault), PlaceholderRendererDefault = function(_ref) {
6560
- var isOver = _ref.isOver, canDrop = _ref.canDrop;
6561
- return _react2.default.createElement("div", {
6562
- className: _placeholderRendererDefault2.default.placeholder + (canDrop ? " " + _placeholderRendererDefault2.default.placeholderLandingPad : "") + (canDrop && !isOver ? " " + _placeholderRendererDefault2.default.placeholderCancelPad : "")
6563
- });
6564
- };
6565
- PlaceholderRendererDefault.defaultProps = {
6566
- isOver: !1,
6567
- canDrop: !1
6568
- }, PlaceholderRendererDefault.propTypes = {
6569
- isOver: _propTypes2.default.bool,
6570
- canDrop: _propTypes2.default.bool
6571
- }, exports.default = PlaceholderRendererDefault;
6572
- }, /* 24 */
6573
- /***/
6574
- function(module, exports, __webpack_require__) {
6575
- // style-loader: Adds some css to the DOM by adding a <style> tag
6576
- // load the styles
6577
- var content = __webpack_require__(25);
6578
- "string" == typeof content && (content = [ [ module.i, content, "" ] ]);
6579
- // Prepare cssTransformation
6580
- var options = {
6581
- insertAt: "top",
6582
- hmr: !0
6583
- };
6584
- options.transform = void 0;
6585
- // add the styles to the DOM
6586
- __webpack_require__(4)(content, options);
6587
- content.locals && (module.exports = content.locals);
6588
- }, /* 25 */
6589
- /***/
6590
- function(module, exports, __webpack_require__) {
6591
- exports = module.exports = __webpack_require__(3)(!1), // imports
6592
- // module
6593
- exports.push([ module.i, ".rst__placeholder {\n position: relative;\n height: 68px;\n max-width: 300px;\n padding: 10px; }\n .rst__placeholder,\n .rst__placeholder > * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n .rst__placeholder::before {\n border: 3px dashed #d9d9d9;\n content: '';\n position: absolute;\n top: 5px;\n right: 5px;\n bottom: 5px;\n left: 5px;\n z-index: -1; }\n\n/**\n * The outline of where the element will go if dropped, displayed while dragging\n */\n.rst__placeholderLandingPad, .rst__placeholderCancelPad {\n border: none !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n outline: none !important; }\n .rst__placeholderLandingPad *, .rst__placeholderCancelPad * {\n opacity: 0 !important; }\n .rst__placeholderLandingPad::before, .rst__placeholderCancelPad::before {\n background-color: lightblue;\n border-color: white; }\n\n/**\n * Alternate appearance of the landing pad when the dragged location is invalid\n */\n.rst__placeholderCancelPad::before {\n background-color: #e6a8ad; }\n", "" ]),
6594
- // exports
6595
- exports.locals = {
6596
- placeholder: "rst__placeholder",
6597
- placeholderLandingPad: "rst__placeholderLandingPad",
6598
- placeholderCancelPad: "rst__placeholderCancelPad"
6599
- };
6600
- }, /* 26 */
6601
- /***/
6602
- function(module, exports, __webpack_require__) {
6603
- "use strict";
6604
- function _toConsumableArray(arr) {
6605
- if (Array.isArray(arr)) {
6606
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
6607
- return arr2;
6608
- }
6609
- return Array.from(arr);
6610
- }
6611
- /* eslint-disable import/prefer-default-export */
6612
- function slideRows(rows, fromIndex, toIndex) {
6613
- var count = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 1, rowsWithoutMoved = [].concat(_toConsumableArray(rows.slice(0, fromIndex)), _toConsumableArray(rows.slice(fromIndex + count)));
6614
- return [].concat(_toConsumableArray(rowsWithoutMoved.slice(0, toIndex)), _toConsumableArray(rows.slice(fromIndex, fromIndex + count)), _toConsumableArray(rowsWithoutMoved.slice(toIndex)));
6615
- }
6616
- Object.defineProperty(exports, "__esModule", {
6617
- value: !0
6618
- }), exports.slideRows = slideRows;
6619
- }, /* 27 */
6620
- /***/
6621
- function(module, exports, __webpack_require__) {
6622
- "use strict";
6623
- function _classCallCheck(instance, Constructor) {
6624
- if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
6625
- }
6626
- Object.defineProperty(exports, "__esModule", {
6627
- value: !0
6628
- });
6629
- var _createClass = function() {
6630
- function defineProperties(target, props) {
6631
- for (var i = 0; i < props.length; i++) {
6632
- var descriptor = props[i];
6633
- descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0,
6634
- "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
6635
- }
6636
- }
6637
- return function(Constructor, protoProps, staticProps) {
6638
- return protoProps && defineProperties(Constructor.prototype, protoProps), staticProps && defineProperties(Constructor, staticProps),
6639
- Constructor;
6640
- };
6641
- }(), _reactDnd = __webpack_require__(28), _reactDndHtml5Backend = __webpack_require__(29), _reactDndHtml5Backend2 = function(obj) {
6642
- return obj && obj.__esModule ? obj : {
6643
- default: obj
6644
- };
6645
- }(_reactDndHtml5Backend), _reactDom = __webpack_require__(30), _treeDataUtils = __webpack_require__(0), _memoizedTreeDataUtils = __webpack_require__(6), DndManager = function() {
6646
- function DndManager(treeRef) {
6647
- _classCallCheck(this, DndManager), this.treeRef = treeRef;
6648
- }
6649
- return _createClass(DndManager, [ {
6650
- key: "getTargetDepth",
6651
- value: function(dropTargetProps, monitor, component) {
6652
- var dropTargetDepth = 0, rowAbove = dropTargetProps.getPrevRow();
6653
- rowAbove && (// Limit the length of the path to the deepest possible
6654
- dropTargetDepth = Math.min(rowAbove.path.length, dropTargetProps.path.length));
6655
- var blocksOffset = void 0, dragSourceInitialDepth = (monitor.getItem().path || []).length;
6656
- // When adding node from external source
6657
- if (monitor.getItem().treeId !== this.treeId) if (// Ignore the tree depth of the source, if it had any to begin with
6658
- dragSourceInitialDepth = 0, component) {
6659
- var relativePosition = (0, _reactDom.findDOMNode)(component).getBoundingClientRect(), leftShift = monitor.getSourceClientOffset().x - relativePosition.left;
6660
- blocksOffset = Math.round(leftShift / dropTargetProps.scaffoldBlockPxWidth);
6661
- } else blocksOffset = dropTargetProps.path.length; else blocksOffset = Math.round(monitor.getDifferenceFromInitialOffset().x / dropTargetProps.scaffoldBlockPxWidth);
6662
- var targetDepth = Math.min(dropTargetDepth, Math.max(0, dragSourceInitialDepth + blocksOffset - 1));
6663
- // If a maxDepth is defined, constrain the target depth
6664
- if (void 0 !== this.maxDepth && null !== this.maxDepth) {
6665
- var draggedNode = monitor.getItem().node, draggedChildDepth = (0, _treeDataUtils.getDepth)(draggedNode);
6666
- targetDepth = Math.max(0, Math.min(targetDepth, this.maxDepth - draggedChildDepth - 1));
6667
- }
6668
- return targetDepth;
6669
- }
6670
- }, {
6671
- key: "canDrop",
6672
- value: function(dropTargetProps, monitor) {
6673
- if (!monitor.isOver()) return !1;
6674
- var rowAbove = dropTargetProps.getPrevRow(), abovePath = rowAbove ? rowAbove.path : [], aboveNode = rowAbove ? rowAbove.node : {}, targetDepth = this.getTargetDepth(dropTargetProps, monitor, null);
6675
- // Cannot drop if we're adding to the children of the row above and
6676
- // the row above is a function
6677
- if (targetDepth >= abovePath.length && "function" == typeof aboveNode.children) return !1;
6678
- if ("function" == typeof this.customCanDrop) {
6679
- var _monitor$getItem = monitor.getItem(), node = _monitor$getItem.node, addedResult = (0,
6680
- _memoizedTreeDataUtils.memoizedInsertNode)({
6681
- treeData: this.treeData,
6682
- newNode: node,
6683
- depth: targetDepth,
6684
- getNodeKey: this.getNodeKey,
6685
- minimumTreeIndex: dropTargetProps.listIndex,
6686
- expandParent: !0
6687
- });
6688
- return this.customCanDrop({
6689
- node: node,
6690
- prevPath: monitor.getItem().path,
6691
- prevParent: monitor.getItem().parentNode,
6692
- prevTreeIndex: monitor.getItem().treeIndex,
6693
- // Equals -1 when dragged from external tree
6694
- nextPath: addedResult.path,
6695
- nextParent: addedResult.parentNode,
6696
- nextTreeIndex: addedResult.treeIndex
6697
- });
6698
- }
6699
- return !0;
6700
- }
6701
- }, {
6702
- key: "wrapSource",
6703
- value: function(el) {
6704
- function nodeDragSourcePropInjection(connect, monitor) {
6705
- return {
6706
- connectDragSource: connect.dragSource(),
6707
- connectDragPreview: connect.dragPreview(),
6708
- isDragging: monitor.isDragging(),
6709
- didDrop: monitor.didDrop()
6710
- };
6711
- }
6712
- var _this = this, nodeDragSource = {
6713
- beginDrag: function(props) {
6714
- return _this.startDrag(props), {
6715
- node: props.node,
6716
- parentNode: props.parentNode,
6717
- path: props.path,
6718
- treeIndex: props.treeIndex,
6719
- treeId: props.treeId
6720
- };
6721
- },
6722
- endDrag: function(props, monitor) {
6723
- _this.endDrag(monitor.getDropResult());
6724
- },
6725
- isDragging: function(props, monitor) {
6726
- var dropTargetNode = monitor.getItem().node;
6727
- return props.node === dropTargetNode;
6728
- }
6729
- };
6730
- return (0, _reactDnd.DragSource)(this.dndType, nodeDragSource, nodeDragSourcePropInjection)(el);
6731
- }
6732
- }, {
6733
- key: "wrapTarget",
6734
- value: function(el) {
6735
- function nodeDropTargetPropInjection(connect, monitor) {
6736
- var dragged = monitor.getItem();
6737
- return {
6738
- connectDropTarget: connect.dropTarget(),
6739
- isOver: monitor.isOver(),
6740
- canDrop: monitor.canDrop(),
6741
- draggedNode: dragged ? dragged.node : null
6742
- };
6743
- }
6744
- var _this2 = this, nodeDropTarget = {
6745
- drop: function(dropTargetProps, monitor, component) {
6746
- var result = {
6747
- node: monitor.getItem().node,
6748
- path: monitor.getItem().path,
6749
- treeIndex: monitor.getItem().treeIndex,
6750
- treeId: _this2.treeId,
6751
- minimumTreeIndex: dropTargetProps.treeIndex,
6752
- depth: _this2.getTargetDepth(dropTargetProps, monitor, component)
6753
- };
6754
- return _this2.drop(result), result;
6755
- },
6756
- hover: function(dropTargetProps, monitor, component) {
6757
- var targetDepth = _this2.getTargetDepth(dropTargetProps, monitor, component), draggedNode = monitor.getItem().node;
6758
- (// Redraw if hovered above different nodes
6759
- dropTargetProps.node !== draggedNode || // Or hovered above the same node but at a different depth
6760
- targetDepth !== dropTargetProps.path.length - 1) && _this2.dragHover({
6761
- node: draggedNode,
6762
- path: monitor.getItem().path,
6763
- minimumTreeIndex: dropTargetProps.listIndex,
6764
- depth: targetDepth
6765
- });
6766
- },
6767
- canDrop: this.canDrop.bind(this)
6768
- };
6769
- return (0, _reactDnd.DropTarget)(this.dndType, nodeDropTarget, nodeDropTargetPropInjection)(el);
6770
- }
6771
- }, {
6772
- key: "wrapPlaceholder",
6773
- value: function(el) {
6774
- function placeholderPropInjection(connect, monitor) {
6775
- var dragged = monitor.getItem();
6776
- return {
6777
- connectDropTarget: connect.dropTarget(),
6778
- isOver: monitor.isOver(),
6779
- canDrop: monitor.canDrop(),
6780
- draggedNode: dragged ? dragged.node : null
6781
- };
6782
- }
6783
- var _this3 = this, placeholderDropTarget = {
6784
- drop: function(dropTargetProps, monitor) {
6785
- var _monitor$getItem2 = monitor.getItem(), node = _monitor$getItem2.node, path = _monitor$getItem2.path, treeIndex = _monitor$getItem2.treeIndex, result = {
6786
- node: node,
6787
- path: path,
6788
- treeIndex: treeIndex,
6789
- treeId: _this3.treeId,
6790
- minimumTreeIndex: 0,
6791
- depth: 0
6792
- };
6793
- return _this3.drop(result), result;
6794
- }
6795
- };
6796
- return (0, _reactDnd.DropTarget)(this.dndType, placeholderDropTarget, placeholderPropInjection)(el);
6797
- }
6798
- }, {
6799
- key: "startDrag",
6800
- get: function() {
6801
- return this.treeRef.startDrag;
6802
- }
6803
- }, {
6804
- key: "dragHover",
6805
- get: function() {
6806
- return this.treeRef.dragHover;
6807
- }
6808
- }, {
6809
- key: "endDrag",
6810
- get: function() {
6811
- return this.treeRef.endDrag;
6812
- }
6813
- }, {
6814
- key: "drop",
6815
- get: function() {
6816
- return this.treeRef.drop;
6817
- }
6818
- }, {
6819
- key: "treeId",
6820
- get: function() {
6821
- return this.treeRef.treeId;
6822
- }
6823
- }, {
6824
- key: "dndType",
6825
- get: function() {
6826
- return this.treeRef.dndType;
6827
- }
6828
- }, {
6829
- key: "treeData",
6830
- get: function() {
6831
- return this.treeRef.state.draggingTreeData || this.treeRef.props.treeData;
6832
- }
6833
- }, {
6834
- key: "getNodeKey",
6835
- get: function() {
6836
- return this.treeRef.props.getNodeKey;
6837
- }
6838
- }, {
6839
- key: "customCanDrop",
6840
- get: function() {
6841
- return this.treeRef.props.canDrop;
6842
- }
6843
- }, {
6844
- key: "maxDepth",
6845
- get: function() {
6846
- return this.treeRef.props.maxDepth;
6847
- }
6848
- } ], [ {
6849
- key: "wrapRoot",
6850
- value: function(el) {
6851
- return (0, _reactDnd.DragDropContext)(_reactDndHtml5Backend2.default)(el);
6852
- }
6853
- } ]), DndManager;
6854
- }();
6855
- exports.default = DndManager;
6856
- }, /* 28 */
6857
- /***/
6858
- function(module, exports) {
6859
- module.exports = __webpack_require__(96);
6860
- }, /* 29 */
6861
- /***/
6862
- function(module, exports) {
6863
- module.exports = __webpack_require__(174);
6864
- }, /* 30 */
6865
- /***/
6866
- function(module, exports) {
6867
- module.exports = __webpack_require__(11);
6868
- }, /* 31 */
6869
- /***/
6870
- function(module, exports, __webpack_require__) {
6871
- // style-loader: Adds some css to the DOM by adding a <style> tag
6872
- // load the styles
6873
- var content = __webpack_require__(32);
6874
- "string" == typeof content && (content = [ [ module.i, content, "" ] ]);
6875
- // Prepare cssTransformation
6876
- var options = {
6877
- insertAt: "top",
6878
- hmr: !0
6879
- };
6880
- options.transform = void 0;
6881
- // add the styles to the DOM
6882
- __webpack_require__(4)(content, options);
6883
- content.locals && (module.exports = content.locals);
6884
- }, /* 32 */
6885
- /***/
6886
- function(module, exports, __webpack_require__) {
6887
- exports = module.exports = __webpack_require__(3)(!1), // imports
6888
- // module
6889
- exports.push([ module.i, "/**\n * The container holding the VirtualScroll\n */\n.rst__tree {\n /*! This comment keeps Sass from deleting the empty rule */ }\n\n/**\n * Extra class applied to VirtualScroll through className prop\n */\n.rst__virtualScrollOverride {\n overflow: auto !important; }\n .rst__virtualScrollOverride * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box; }\n\n.ReactVirtualized__Grid__innerScrollContainer {\n overflow: visible !important; }\n\n.ReactVirtualized__Grid {\n outline: none; }\n", "" ]),
6890
- // exports
6891
- exports.locals = {
6892
- tree: "rst__tree",
6893
- virtualScrollOverride: "rst__virtualScrollOverride"
6894
- };
6895
- } ]);
6896
- });
6897
-
6898
- /***/ }),
6899
- /* 92 */
6900
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6901
-
6902
- "use strict";
6903
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(47);
6904
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
6905
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
6906
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
6907
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
6908
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
6909
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CellSizeAndPositionManager__ = __webpack_require__(253);
6910
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__maxElementSize_js__ = __webpack_require__(254);
6911
-
6912
-
6913
-
6914
-
6915
- var babelPluginFlowReactPropTypes_proptype_VisibleCellRange = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_VisibleCellRange || __webpack_require__(0).any;
6916
-
6917
- var babelPluginFlowReactPropTypes_proptype_CellSizeGetter = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellSizeGetter || __webpack_require__(0).any;
6918
-
6919
- var babelPluginFlowReactPropTypes_proptype_Alignment = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_Alignment || __webpack_require__(0).any;
6920
-
6921
-
6922
-
6923
-
6924
- /**
6925
- * Browsers have scroll offset limitations (eg Chrome stops scrolling at ~33.5M pixels where as Edge tops out at ~1.5M pixels).
6926
- * After a certain position, the browser won't allow the user to scroll further (even via JavaScript scroll offset adjustments).
6927
- * This util picks a lower ceiling for max size and artificially adjusts positions within to make it transparent for users.
6928
- */
6929
-
6930
- /**
6931
- * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.
6932
- */
6933
- var ScalingCellSizeAndPositionManager = function () {
6934
- function ScalingCellSizeAndPositionManager(_ref) {
6935
- var _ref$maxScrollSize = _ref.maxScrollSize,
6936
- maxScrollSize = _ref$maxScrollSize === undefined ? Object(__WEBPACK_IMPORTED_MODULE_4__maxElementSize_js__["a" /* getMaxElementSize */])() : _ref$maxScrollSize,
6937
- params = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_ref, ['maxScrollSize']);
6938
-
6939
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, ScalingCellSizeAndPositionManager);
6940
-
6941
- // Favor composition over inheritance to simplify IE10 support
6942
- this._cellSizeAndPositionManager = new __WEBPACK_IMPORTED_MODULE_3__CellSizeAndPositionManager__["a" /* default */](params);
6943
- this._maxScrollSize = maxScrollSize;
6944
- }
6945
-
6946
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(ScalingCellSizeAndPositionManager, [{
6947
- key: 'areOffsetsAdjusted',
6948
- value: function areOffsetsAdjusted() {
6949
- return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;
6950
- }
6951
- }, {
6952
- key: 'configure',
6953
- value: function configure(params) {
6954
- this._cellSizeAndPositionManager.configure(params);
6955
- }
6956
- }, {
6957
- key: 'getCellCount',
6958
- value: function getCellCount() {
6959
- return this._cellSizeAndPositionManager.getCellCount();
6960
- }
6961
- }, {
6962
- key: 'getEstimatedCellSize',
6963
- value: function getEstimatedCellSize() {
6964
- return this._cellSizeAndPositionManager.getEstimatedCellSize();
6965
- }
6966
- }, {
6967
- key: 'getLastMeasuredIndex',
6968
- value: function getLastMeasuredIndex() {
6969
- return this._cellSizeAndPositionManager.getLastMeasuredIndex();
6970
- }
6971
-
6972
- /**
6973
- * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.
6974
- * The offset passed to this function is scaled (safe) as well.
6975
- */
6976
-
6977
- }, {
6978
- key: 'getOffsetAdjustment',
6979
- value: function getOffsetAdjustment(_ref2) {
6980
- var containerSize = _ref2.containerSize,
6981
- offset = _ref2.offset;
6982
-
6983
- var totalSize = this._cellSizeAndPositionManager.getTotalSize();
6984
- var safeTotalSize = this.getTotalSize();
6985
- var offsetPercentage = this._getOffsetPercentage({
6986
- containerSize: containerSize,
6987
- offset: offset,
6988
- totalSize: safeTotalSize
6989
- });
6990
-
6991
- return Math.round(offsetPercentage * (safeTotalSize - totalSize));
6992
- }
6993
- }, {
6994
- key: 'getSizeAndPositionOfCell',
6995
- value: function getSizeAndPositionOfCell(index) {
6996
- return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);
6997
- }
6998
- }, {
6999
- key: 'getSizeAndPositionOfLastMeasuredCell',
7000
- value: function getSizeAndPositionOfLastMeasuredCell() {
7001
- return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();
7002
- }
7003
-
7004
- /** See CellSizeAndPositionManager#getTotalSize */
7005
-
7006
- }, {
7007
- key: 'getTotalSize',
7008
- value: function getTotalSize() {
7009
- return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());
7010
- }
7011
-
7012
- /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */
7013
-
7014
- }, {
7015
- key: 'getUpdatedOffsetForIndex',
7016
- value: function getUpdatedOffsetForIndex(_ref3) {
7017
- var _ref3$align = _ref3.align,
7018
- align = _ref3$align === undefined ? 'auto' : _ref3$align,
7019
- containerSize = _ref3.containerSize,
7020
- currentOffset = _ref3.currentOffset,
7021
- targetIndex = _ref3.targetIndex;
7022
-
7023
- currentOffset = this._safeOffsetToOffset({
7024
- containerSize: containerSize,
7025
- offset: currentOffset
7026
- });
7027
-
7028
- var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({
7029
- align: align,
7030
- containerSize: containerSize,
7031
- currentOffset: currentOffset,
7032
- targetIndex: targetIndex
7033
- });
7034
-
7035
- return this._offsetToSafeOffset({
7036
- containerSize: containerSize,
7037
- offset: offset
7038
- });
7039
- }
7040
-
7041
- /** See CellSizeAndPositionManager#getVisibleCellRange */
7042
-
7043
- }, {
7044
- key: 'getVisibleCellRange',
7045
- value: function getVisibleCellRange(_ref4) {
7046
- var containerSize = _ref4.containerSize,
7047
- offset = _ref4.offset;
7048
-
7049
- offset = this._safeOffsetToOffset({
7050
- containerSize: containerSize,
7051
- offset: offset
7052
- });
7053
-
7054
- return this._cellSizeAndPositionManager.getVisibleCellRange({
7055
- containerSize: containerSize,
7056
- offset: offset
7057
- });
7058
- }
7059
- }, {
7060
- key: 'resetCell',
7061
- value: function resetCell(index) {
7062
- this._cellSizeAndPositionManager.resetCell(index);
7063
- }
7064
- }, {
7065
- key: '_getOffsetPercentage',
7066
- value: function _getOffsetPercentage(_ref5) {
7067
- var containerSize = _ref5.containerSize,
7068
- offset = _ref5.offset,
7069
- totalSize = _ref5.totalSize;
7070
-
7071
- return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);
7072
- }
7073
- }, {
7074
- key: '_offsetToSafeOffset',
7075
- value: function _offsetToSafeOffset(_ref6) {
7076
- var containerSize = _ref6.containerSize,
7077
- offset = _ref6.offset;
7078
-
7079
- var totalSize = this._cellSizeAndPositionManager.getTotalSize();
7080
- var safeTotalSize = this.getTotalSize();
7081
-
7082
- if (totalSize === safeTotalSize) {
7083
- return offset;
7084
- } else {
7085
- var offsetPercentage = this._getOffsetPercentage({
7086
- containerSize: containerSize,
7087
- offset: offset,
7088
- totalSize: totalSize
7089
- });
7090
-
7091
- return Math.round(offsetPercentage * (safeTotalSize - containerSize));
7092
- }
7093
- }
7094
- }, {
7095
- key: '_safeOffsetToOffset',
7096
- value: function _safeOffsetToOffset(_ref7) {
7097
- var containerSize = _ref7.containerSize,
7098
- offset = _ref7.offset;
7099
-
7100
- var totalSize = this._cellSizeAndPositionManager.getTotalSize();
7101
- var safeTotalSize = this.getTotalSize();
7102
-
7103
- if (totalSize === safeTotalSize) {
7104
- return offset;
7105
- } else {
7106
- var offsetPercentage = this._getOffsetPercentage({
7107
- containerSize: containerSize,
7108
- offset: offset,
7109
- totalSize: safeTotalSize
7110
- });
7111
-
7112
- return Math.round(offsetPercentage * (totalSize - containerSize));
7113
- }
7114
- }
7115
- }]);
7116
-
7117
- return ScalingCellSizeAndPositionManager;
7118
- }();
7119
-
7120
- /* harmony default export */ __webpack_exports__["a"] = (ScalingCellSizeAndPositionManager);
7121
-
7122
- /***/ }),
7123
- /* 93 */
7124
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7125
-
7126
- "use strict";
7127
- /* harmony export (immutable) */ __webpack_exports__["a"] = createCallbackMemoizer;
7128
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__ = __webpack_require__(46);
7129
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys__);
7130
-
7131
- /**
7132
- * Helper utility that updates the specified callback whenever any of the specified indices have changed.
7133
- */
7134
- function createCallbackMemoizer() {
7135
- var requireAllKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
7136
-
7137
- var cachedIndices = {};
7138
-
7139
- return function (_ref) {
7140
- var callback = _ref.callback,
7141
- indices = _ref.indices;
7142
-
7143
- var keys = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default()(indices);
7144
- var allInitialized = !requireAllKeys || keys.every(function (key) {
7145
- var value = indices[key];
7146
- return Array.isArray(value) ? value.length > 0 : value >= 0;
7147
- });
7148
- var indexChanged = keys.length !== __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_keys___default()(cachedIndices).length || keys.some(function (key) {
7149
- var cachedValue = cachedIndices[key];
7150
- var value = indices[key];
7151
-
7152
- return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value;
7153
- });
7154
-
7155
- cachedIndices = indices;
7156
-
7157
- if (allInitialized && indexChanged) {
7158
- callback(indices);
7159
- }
7160
- };
7161
- }
7162
-
7163
- /***/ }),
7164
- /* 94 */
7165
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7166
-
7167
- "use strict";
7168
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
7169
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
7170
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
7171
-
7172
-
7173
- var babelPluginFlowReactPropTypes_proptype_RowRendererParams = {
7174
- index: __webpack_require__(0).number.isRequired,
7175
- isScrolling: __webpack_require__(0).bool.isRequired,
7176
- isVisible: __webpack_require__(0).bool.isRequired,
7177
- key: __webpack_require__(0).string.isRequired,
7178
- parent: __webpack_require__(0).object.isRequired,
7179
- style: __webpack_require__(0).object.isRequired
7180
- };
7181
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_RowRendererParams', {
7182
- value: babelPluginFlowReactPropTypes_proptype_RowRendererParams,
7183
- configurable: true
7184
- });
7185
-
7186
- var babelPluginFlowReactPropTypes_proptype_RowRenderer = __webpack_require__(0).func;
7187
-
7188
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_RowRenderer', {
7189
- value: babelPluginFlowReactPropTypes_proptype_RowRenderer,
7190
- configurable: true
7191
- });
7192
- var babelPluginFlowReactPropTypes_proptype_RenderedRows = {
7193
- overscanStartIndex: __webpack_require__(0).number.isRequired,
7194
- overscanStopIndex: __webpack_require__(0).number.isRequired,
7195
- startIndex: __webpack_require__(0).number.isRequired,
7196
- stopIndex: __webpack_require__(0).number.isRequired
7197
- };
7198
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_RenderedRows', {
7199
- value: babelPluginFlowReactPropTypes_proptype_RenderedRows,
7200
- configurable: true
7201
- });
7202
- var babelPluginFlowReactPropTypes_proptype_Scroll = {
7203
- clientHeight: __webpack_require__(0).number.isRequired,
7204
- scrollHeight: __webpack_require__(0).number.isRequired,
7205
- scrollTop: __webpack_require__(0).number.isRequired
7206
- };
7207
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Scroll', {
7208
- value: babelPluginFlowReactPropTypes_proptype_Scroll,
7209
- configurable: true
7210
- });
7211
-
7212
- /***/ }),
7213
- /* 95 */
7214
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7215
-
7216
- "use strict";
7217
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
7218
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_SCROLLING_RESET_TIME_INTERVAL", function() { return DEFAULT_SCROLLING_RESET_TIME_INTERVAL; });
7219
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(4);
7220
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
7221
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(8);
7222
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__);
7223
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
7224
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
7225
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(3);
7226
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
7227
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
7228
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
7229
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(6);
7230
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
7231
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1);
7232
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
7233
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(21);
7234
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__);
7235
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__PositionCache__ = __webpack_require__(280);
7236
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_requestAnimationTimeout__ = __webpack_require__(48);
7237
-
7238
-
7239
-
7240
-
7241
-
7242
-
7243
-
7244
-
7245
-
7246
-
7247
-
7248
- var babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId = __webpack_require__(48).babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId || __webpack_require__(0).any;
7249
-
7250
- var emptyObject = {};
7251
-
7252
- /**
7253
- * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.
7254
- * This improves performance and makes scrolling smoother.
7255
- */
7256
- var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
7257
-
7258
- /**
7259
- * This component efficiently displays arbitrarily positioned cells using windowing techniques.
7260
- * Cell position is determined by an injected `cellPositioner` property.
7261
- * Windowing is vertical; this component does not support horizontal scrolling.
7262
- *
7263
- * Rendering occurs in two phases:
7264
- * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch.
7265
- * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled.
7266
- * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells
7267
- * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes).
7268
- * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes.
7269
- * 2) Second pass uses the external `cellPositioner` to layout cells.
7270
- * At this time the positioner has access to cached size measurements for all cells.
7271
- * The positions it returns are cached by Masonry for fast access later.
7272
- * Phase one is repeated if the user scrolls beyond the current layout's bounds.
7273
- * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`.
7274
- *
7275
- * Animation constraints:
7276
- * Simple animations are supported (eg translate/slide into place on initial reveal).
7277
- * More complex animations are not (eg flying from one position to another on resize).
7278
- *
7279
- * Layout constraints:
7280
- * This component supports multi-column layout.
7281
- * The height of each item may vary.
7282
- * The width of each item must not exceed the width of the column it is "in".
7283
- * The left position of all items within a column must align.
7284
- * (Items may not span multiple columns.)
7285
- */
7286
-
7287
- var Masonry = function (_PureComponent) {
7288
- __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Masonry, _PureComponent);
7289
-
7290
- function Masonry(props, context) {
7291
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Masonry);
7292
-
7293
- var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Masonry.__proto__ || __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default()(Masonry)).call(this, props, context));
7294
-
7295
- _this._invalidateOnUpdateStartIndex = null;
7296
- _this._invalidateOnUpdateStopIndex = null;
7297
- _this._positionCache = new __WEBPACK_IMPORTED_MODULE_8__PositionCache__["a" /* default */]();
7298
- _this._startIndex = null;
7299
- _this._startIndexMemoized = null;
7300
- _this._stopIndex = null;
7301
- _this._stopIndexMemoized = null;
7302
-
7303
-
7304
- _this.state = {
7305
- isScrolling: false,
7306
- scrollTop: 0
7307
- };
7308
-
7309
- _this._debounceResetIsScrollingCallback = _this._debounceResetIsScrollingCallback.bind(_this);
7310
- _this._setScrollingContainerRef = _this._setScrollingContainerRef.bind(_this);
7311
- _this._onScroll = _this._onScroll.bind(_this);
7312
- return _this;
7313
- }
7314
-
7315
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Masonry, [{
7316
- key: 'clearCellPositions',
7317
- value: function clearCellPositions() {
7318
- this._positionCache = new __WEBPACK_IMPORTED_MODULE_8__PositionCache__["a" /* default */]();
7319
- this.forceUpdate();
7320
- }
7321
-
7322
- // HACK This method signature was intended for Grid
7323
-
7324
- }, {
7325
- key: 'invalidateCellSizeAfterRender',
7326
- value: function invalidateCellSizeAfterRender(_ref) {
7327
- var index = _ref.rowIndex;
7328
-
7329
- if (this._invalidateOnUpdateStartIndex === null) {
7330
- this._invalidateOnUpdateStartIndex = index;
7331
- this._invalidateOnUpdateStopIndex = index;
7332
- } else {
7333
- this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index);
7334
- this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index);
7335
- }
7336
- }
7337
- }, {
7338
- key: 'recomputeCellPositions',
7339
- value: function recomputeCellPositions() {
7340
- var stopIndex = this._positionCache.count - 1;
7341
-
7342
- this._positionCache = new __WEBPACK_IMPORTED_MODULE_8__PositionCache__["a" /* default */]();
7343
- this._populatePositionCache(0, stopIndex);
7344
-
7345
- this.forceUpdate();
7346
- }
7347
- }, {
7348
- key: 'componentDidMount',
7349
- value: function componentDidMount() {
7350
- this._checkInvalidateOnUpdate();
7351
- this._invokeOnScrollCallback();
7352
- this._invokeOnCellsRenderedCallback();
7353
- }
7354
- }, {
7355
- key: 'componentDidUpdate',
7356
- value: function componentDidUpdate() {
7357
- this._checkInvalidateOnUpdate();
7358
- this._invokeOnScrollCallback();
7359
- this._invokeOnCellsRenderedCallback();
7360
- }
7361
- }, {
7362
- key: 'componentWillUnmount',
7363
- value: function componentWillUnmount() {
7364
- if (this._debounceResetIsScrollingId) {
7365
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_requestAnimationTimeout__["cancelAnimationTimeout"])(this._debounceResetIsScrollingId);
7366
- }
7367
- }
7368
- }, {
7369
- key: 'componentWillReceiveProps',
7370
- value: function componentWillReceiveProps(nextProps) {
7371
- var scrollTop = this.props.scrollTop;
7372
-
7373
-
7374
- if (scrollTop !== nextProps.scrollTop) {
7375
- this._debounceResetIsScrolling();
7376
-
7377
- this.setState({
7378
- isScrolling: true,
7379
- scrollTop: nextProps.scrollTop
7380
- });
7381
- }
7382
- }
7383
- }, {
7384
- key: 'render',
7385
- value: function render() {
7386
- var _this2 = this;
7387
-
7388
- var _props = this.props,
7389
- autoHeight = _props.autoHeight,
7390
- cellCount = _props.cellCount,
7391
- cellMeasurerCache = _props.cellMeasurerCache,
7392
- cellRenderer = _props.cellRenderer,
7393
- className = _props.className,
7394
- height = _props.height,
7395
- id = _props.id,
7396
- keyMapper = _props.keyMapper,
7397
- overscanByPixels = _props.overscanByPixels,
7398
- role = _props.role,
7399
- style = _props.style,
7400
- tabIndex = _props.tabIndex,
7401
- width = _props.width;
7402
- var _state = this.state,
7403
- isScrolling = _state.isScrolling,
7404
- scrollTop = _state.scrollTop;
7405
-
7406
-
7407
- var children = [];
7408
-
7409
- var estimateTotalHeight = this._getEstimatedTotalHeight();
7410
-
7411
- var shortestColumnSize = this._positionCache.shortestColumnSize;
7412
- var measuredCellCount = this._positionCache.count;
7413
-
7414
- var startIndex = 0;
7415
- var stopIndex = void 0;
7416
-
7417
- this._positionCache.range(Math.max(0, scrollTop - overscanByPixels), height + overscanByPixels * 2, function (index, left, top) {
7418
- if (typeof stopIndex === 'undefined') {
7419
- startIndex = index;
7420
- stopIndex = index;
7421
- } else {
7422
- startIndex = Math.min(startIndex, index);
7423
- stopIndex = Math.max(stopIndex, index);
7424
- }
7425
-
7426
- children.push(cellRenderer({
7427
- index: index,
7428
- isScrolling: isScrolling,
7429
- key: keyMapper(index),
7430
- parent: _this2,
7431
- style: {
7432
- height: cellMeasurerCache.getHeight(index),
7433
- left: left,
7434
- position: 'absolute',
7435
- top: top,
7436
- width: cellMeasurerCache.getWidth(index)
7437
- }
7438
- }));
7439
- });
7440
-
7441
- // We need to measure additional cells for this layout
7442
- if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) {
7443
- var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth));
7444
-
7445
- for (var _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) {
7446
- stopIndex = _index;
7447
-
7448
- children.push(cellRenderer({
7449
- index: _index,
7450
- isScrolling: isScrolling,
7451
- key: keyMapper(_index),
7452
- parent: this,
7453
- style: {
7454
- width: cellMeasurerCache.getWidth(_index)
7455
- }
7456
- }));
7457
- }
7458
- }
7459
-
7460
- this._startIndex = startIndex;
7461
- this._stopIndex = stopIndex;
7462
-
7463
- return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
7464
- 'div',
7465
- {
7466
- ref: this._setScrollingContainerRef,
7467
- 'aria-label': this.props['aria-label'],
7468
- className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()('ReactVirtualized__Masonry', className),
7469
- id: id,
7470
- onScroll: this._onScroll,
7471
- role: role,
7472
- style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
7473
- boxSizing: 'border-box',
7474
- direction: 'ltr',
7475
- height: autoHeight ? 'auto' : height,
7476
- overflowX: 'hidden',
7477
- overflowY: estimateTotalHeight < height ? 'hidden' : 'auto',
7478
- position: 'relative',
7479
- width: width,
7480
- WebkitOverflowScrolling: 'touch',
7481
- willChange: 'transform'
7482
- }, style),
7483
- tabIndex: tabIndex },
7484
- __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
7485
- 'div',
7486
- {
7487
- className: 'ReactVirtualized__Masonry__innerScrollContainer',
7488
- style: {
7489
- width: '100%',
7490
- height: estimateTotalHeight,
7491
- maxWidth: '100%',
7492
- maxHeight: estimateTotalHeight,
7493
- overflow: 'hidden',
7494
- pointerEvents: isScrolling ? 'none' : '',
7495
- position: 'relative'
7496
- } },
7497
- children
7498
- )
7499
- );
7500
- }
7501
- }, {
7502
- key: '_checkInvalidateOnUpdate',
7503
- value: function _checkInvalidateOnUpdate() {
7504
- if (typeof this._invalidateOnUpdateStartIndex === 'number') {
7505
- var _startIndex = this._invalidateOnUpdateStartIndex;
7506
- var _stopIndex = this._invalidateOnUpdateStopIndex;
7507
-
7508
- this._invalidateOnUpdateStartIndex = null;
7509
- this._invalidateOnUpdateStopIndex = null;
7510
-
7511
- // Query external layout logic for position of newly-measured cells
7512
- this._populatePositionCache(_startIndex, _stopIndex);
7513
-
7514
- this.forceUpdate();
7515
- }
7516
- }
7517
- }, {
7518
- key: '_debounceResetIsScrolling',
7519
- value: function _debounceResetIsScrolling() {
7520
- var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;
7521
-
7522
-
7523
- if (this._debounceResetIsScrollingId) {
7524
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_requestAnimationTimeout__["cancelAnimationTimeout"])(this._debounceResetIsScrollingId);
7525
- }
7526
-
7527
- this._debounceResetIsScrollingId = Object(__WEBPACK_IMPORTED_MODULE_9__utils_requestAnimationTimeout__["requestAnimationTimeout"])(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval);
7528
- }
7529
- }, {
7530
- key: '_debounceResetIsScrollingCallback',
7531
- value: function _debounceResetIsScrollingCallback() {
7532
- this.setState({
7533
- isScrolling: false
7534
- });
7535
- }
7536
- }, {
7537
- key: '_getEstimatedTotalHeight',
7538
- value: function _getEstimatedTotalHeight() {
7539
- var _props2 = this.props,
7540
- cellCount = _props2.cellCount,
7541
- cellMeasurerCache = _props2.cellMeasurerCache,
7542
- width = _props2.width;
7543
-
7544
-
7545
- var estimatedColumnCount = Math.max(1, Math.floor(width / cellMeasurerCache.defaultWidth));
7546
-
7547
- return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight);
7548
- }
7549
- }, {
7550
- key: '_invokeOnScrollCallback',
7551
- value: function _invokeOnScrollCallback() {
7552
- var _props3 = this.props,
7553
- height = _props3.height,
7554
- onScroll = _props3.onScroll;
7555
- var scrollTop = this.state.scrollTop;
7556
-
7557
-
7558
- if (this._onScrollMemoized !== scrollTop) {
7559
- onScroll({
7560
- clientHeight: height,
7561
- scrollHeight: this._getEstimatedTotalHeight(),
7562
- scrollTop: scrollTop
7563
- });
7564
-
7565
- this._onScrollMemoized = scrollTop;
7566
- }
7567
- }
7568
- }, {
7569
- key: '_invokeOnCellsRenderedCallback',
7570
- value: function _invokeOnCellsRenderedCallback() {
7571
- if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) {
7572
- var _onCellsRendered = this.props.onCellsRendered;
7573
-
7574
-
7575
- _onCellsRendered({
7576
- startIndex: this._startIndex,
7577
- stopIndex: this._stopIndex
7578
- });
7579
-
7580
- this._startIndexMemoized = this._startIndex;
7581
- this._stopIndexMemoized = this._stopIndex;
7582
- }
7583
- }
7584
- }, {
7585
- key: '_populatePositionCache',
7586
- value: function _populatePositionCache(startIndex, stopIndex) {
7587
- var _props4 = this.props,
7588
- cellMeasurerCache = _props4.cellMeasurerCache,
7589
- cellPositioner = _props4.cellPositioner;
7590
-
7591
-
7592
- for (var _index2 = startIndex; _index2 <= stopIndex; _index2++) {
7593
- var _cellPositioner = cellPositioner(_index2),
7594
- _left = _cellPositioner.left,
7595
- _top = _cellPositioner.top;
7596
-
7597
- this._positionCache.setPosition(_index2, _left, _top, cellMeasurerCache.getHeight(_index2));
7598
- }
7599
- }
7600
- }, {
7601
- key: '_setScrollingContainerRef',
7602
- value: function _setScrollingContainerRef(ref) {
7603
- this._scrollingContainer = ref;
7604
- }
7605
- }, {
7606
- key: '_onScroll',
7607
- value: function _onScroll(event) {
7608
- var height = this.props.height;
7609
-
7610
-
7611
- var eventScrollTop = event.target.scrollTop;
7612
-
7613
- // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
7614
- // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.
7615
- // This causes a series of rapid renders that is slow for long lists.
7616
- // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.
7617
- var scrollTop = Math.min(Math.max(0, this._getEstimatedTotalHeight() - height), eventScrollTop);
7618
-
7619
- // On iOS, we can arrive at negative offsets by swiping past the start or end.
7620
- // Avoid re-rendering in this case as it can cause problems; see #532 for more.
7621
- if (eventScrollTop !== scrollTop) {
7622
- return;
7623
- }
7624
-
7625
- // Prevent pointer events from interrupting a smooth scroll
7626
- this._debounceResetIsScrolling();
7627
-
7628
- // Certain devices (like Apple touchpad) rapid-fire duplicate events.
7629
- // Don't force a re-render if this is the case.
7630
- // The mouse may move faster then the animation frame does.
7631
- // Use requestAnimationFrame to avoid over-updating.
7632
- if (this.state.scrollTop !== scrollTop) {
7633
- this.setState({
7634
- isScrolling: true,
7635
- scrollTop: scrollTop
7636
- });
7637
- }
7638
- }
7639
- }]);
7640
-
7641
- return Masonry;
7642
- }(__WEBPACK_IMPORTED_MODULE_6_react__["PureComponent"]);
7643
-
7644
- Masonry.defaultProps = {
7645
- autoHeight: false,
7646
- keyMapper: identity,
7647
- onCellsRendered: noop,
7648
- onScroll: noop,
7649
- overscanByPixels: 20,
7650
- role: 'grid',
7651
- scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,
7652
- style: emptyObject,
7653
- tabIndex: 0
7654
- };
7655
- /* harmony default export */ __webpack_exports__["default"] = (Masonry);
7656
-
7657
-
7658
- function identity(value) {
7659
- return value;
7660
- }
7661
-
7662
- function noop() {}
7663
-
7664
- var babelPluginFlowReactPropTypes_proptype_CellMeasurerCache = {
7665
- defaultHeight: __webpack_require__(0).number.isRequired,
7666
- defaultWidth: __webpack_require__(0).number.isRequired,
7667
- getHeight: __webpack_require__(0).func.isRequired,
7668
- getWidth: __webpack_require__(0).func.isRequired
7669
- };
7670
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_CellMeasurerCache', {
7671
- value: babelPluginFlowReactPropTypes_proptype_CellMeasurerCache,
7672
- configurable: true
7673
- });
7674
-
7675
- var babelPluginFlowReactPropTypes_proptype_Positioner = __webpack_require__(0).func;
7676
-
7677
- if (typeof exports !== 'undefined') Object.defineProperty(exports, 'babelPluginFlowReactPropTypes_proptype_Positioner', {
7678
- value: babelPluginFlowReactPropTypes_proptype_Positioner,
7679
- configurable: true
7680
- });
7681
-
7682
- /***/ }),
7683
- /* 96 */
7684
- /***/ (function(module, exports, __webpack_require__) {
7685
-
7686
- "use strict";
7687
-
7688
-
7689
- Object.defineProperty(exports, "__esModule", {
7690
- value: true
7691
- });
7692
-
7693
- var _DragDropContext = __webpack_require__(151);
7694
-
7695
- Object.defineProperty(exports, 'DragDropContext', {
7696
- enumerable: true,
7697
- get: function get() {
7698
- return _interopRequireDefault(_DragDropContext).default;
7699
- }
7700
- });
7701
-
7702
- var _DragDropContextProvider = __webpack_require__(373);
7703
-
7704
- Object.defineProperty(exports, 'DragDropContextProvider', {
7705
- enumerable: true,
7706
- get: function get() {
7707
- return _interopRequireDefault(_DragDropContextProvider).default;
7708
- }
7709
- });
7710
-
7711
- var _DragLayer = __webpack_require__(374);
7712
-
7713
- Object.defineProperty(exports, 'DragLayer', {
7714
- enumerable: true,
7715
- get: function get() {
7716
- return _interopRequireDefault(_DragLayer).default;
7717
- }
7718
- });
7719
-
7720
- var _DragSource = __webpack_require__(375);
7721
-
7722
- Object.defineProperty(exports, 'DragSource', {
7723
- enumerable: true,
7724
- get: function get() {
7725
- return _interopRequireDefault(_DragSource).default;
7726
- }
7727
- });
7728
-
7729
- var _DropTarget = __webpack_require__(385);
7730
-
7731
- Object.defineProperty(exports, 'DropTarget', {
7732
- enumerable: true,
7733
- get: function get() {
7734
- return _interopRequireDefault(_DropTarget).default;
7735
- }
7736
- });
7737
-
7738
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7739
-
7740
- /***/ }),
7741
- /* 97 */
7742
- /***/ (function(module, exports, __webpack_require__) {
7743
-
7744
- var root = __webpack_require__(51);
7745
-
7746
- /** Built-in value references. */
7747
- var Symbol = root.Symbol;
7748
-
7749
- module.exports = Symbol;
7750
-
7751
-
7752
- /***/ }),
7753
- /* 98 */
7754
- /***/ (function(module, exports, __webpack_require__) {
7755
-
7756
- var MapCache = __webpack_require__(157),
7757
- setCacheAdd = __webpack_require__(342),
7758
- setCacheHas = __webpack_require__(343);
7759
-
7760
- /**
7761
- *
7762
- * Creates an array cache object to store unique values.
7763
- *
7764
- * @private
7765
- * @constructor
7766
- * @param {Array} [values] The values to cache.
7767
- */
7768
- function SetCache(values) {
7769
- var index = -1,
7770
- length = values == null ? 0 : values.length;
7771
-
7772
- this.__data__ = new MapCache;
7773
- while (++index < length) {
7774
- this.add(values[index]);
7775
- }
7776
- }
7777
-
7778
- // Add methods to `SetCache`.
7779
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
7780
- SetCache.prototype.has = setCacheHas;
7781
-
7782
- module.exports = SetCache;
7783
-
7784
-
7785
- /***/ }),
7786
- /* 99 */
7787
- /***/ (function(module, exports, __webpack_require__) {
7788
-
7789
- var baseIndexOf = __webpack_require__(344);
7790
-
7791
- /**
7792
- * A specialized version of `_.includes` for arrays without support for
7793
- * specifying an index to search from.
7794
- *
7795
- * @private
7796
- * @param {Array} [array] The array to inspect.
7797
- * @param {*} target The value to search for.
7798
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
7799
- */
7800
- function arrayIncludes(array, value) {
7801
- var length = array == null ? 0 : array.length;
7802
- return !!length && baseIndexOf(array, value, 0) > -1;
7803
- }
7804
-
7805
- module.exports = arrayIncludes;
7806
-
7807
-
7808
- /***/ }),
7809
- /* 100 */
7810
- /***/ (function(module, exports) {
7811
-
7812
- /**
7813
- * This function is like `arrayIncludes` except that it accepts a comparator.
7814
- *
7815
- * @private
7816
- * @param {Array} [array] The array to inspect.
7817
- * @param {*} target The value to search for.
7818
- * @param {Function} comparator The comparator invoked per element.
7819
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
7820
- */
7821
- function arrayIncludesWith(array, value, comparator) {
7822
- var index = -1,
7823
- length = array == null ? 0 : array.length;
7824
-
7825
- while (++index < length) {
7826
- if (comparator(value, array[index])) {
7827
- return true;
7828
- }
7829
- }
7830
- return false;
7831
- }
7832
-
7833
- module.exports = arrayIncludesWith;
7834
-
7835
-
7836
- /***/ }),
7837
- /* 101 */
7838
- /***/ (function(module, exports) {
7839
-
7840
- /**
7841
- * A specialized version of `_.map` for arrays without support for iteratee
7842
- * shorthands.
7843
- *
7844
- * @private
7845
- * @param {Array} [array] The array to iterate over.
7846
- * @param {Function} iteratee The function invoked per iteration.
7847
- * @returns {Array} Returns the new mapped array.
7848
- */
7849
- function arrayMap(array, iteratee) {
7850
- var index = -1,
7851
- length = array == null ? 0 : array.length,
7852
- result = Array(length);
7853
-
7854
- while (++index < length) {
7855
- result[index] = iteratee(array[index], index, array);
7856
- }
7857
- return result;
7858
- }
7859
-
7860
- module.exports = arrayMap;
7861
-
7862
-
7863
- /***/ }),
7864
- /* 102 */
7865
- /***/ (function(module, exports) {
7866
-
7867
- /**
7868
- * The base implementation of `_.unary` without support for storing metadata.
7869
- *
7870
- * @private
7871
- * @param {Function} func The function to cap arguments for.
7872
- * @returns {Function} Returns the new capped function.
7873
- */
7874
- function baseUnary(func) {
7875
- return function(value) {
7876
- return func(value);
7877
- };
7878
- }
7879
-
7880
- module.exports = baseUnary;
7881
-
7882
-
7883
- /***/ }),
7884
- /* 103 */
7885
- /***/ (function(module, exports) {
7886
-
7887
- /**
7888
- * Checks if a `cache` value for `key` exists.
7889
- *
7890
- * @private
7891
- * @param {Object} cache The cache to query.
7892
- * @param {string} key The key of the entry to check.
7893
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
7894
- */
7895
- function cacheHas(cache, key) {
7896
- return cache.has(key);
7897
- }
7898
-
7899
- module.exports = cacheHas;
7900
-
7901
-
7902
- /***/ }),
7903
- /* 104 */
7904
- /***/ (function(module, exports, __webpack_require__) {
7905
-
7906
- var isFunction = __webpack_require__(158),
7907
- isLength = __webpack_require__(162);
7908
-
7909
- /**
7910
- * Checks if `value` is array-like. A value is considered array-like if it's
7911
- * not a function and has a `value.length` that's an integer greater than or
7912
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
7913
- *
7914
- * @static
7915
- * @memberOf _
7916
- * @since 4.0.0
7917
- * @category Lang
7918
- * @param {*} value The value to check.
7919
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
7920
- * @example
7921
- *
7922
- * _.isArrayLike([1, 2, 3]);
7923
- * // => true
7924
- *
7925
- * _.isArrayLike(document.body.children);
7926
- * // => true
7927
- *
7928
- * _.isArrayLike('abc');
7929
- * // => true
7930
- *
7931
- * _.isArrayLike(_.noop);
7932
- * // => false
7933
- */
7934
- function isArrayLike(value) {
7935
- return value != null && isLength(value.length) && !isFunction(value);
7936
- }
7937
-
7938
- module.exports = isArrayLike;
7939
-
7940
-
7941
- /***/ }),
7942
- /* 105 */
7943
- /***/ (function(module, exports, __webpack_require__) {
7944
-
7945
- "use strict";
7946
- /**
7947
- * Copyright 2015, Yahoo! Inc.
7948
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
7949
- */
7950
-
7951
-
7952
- var REACT_STATICS = {
7953
- childContextTypes: true,
7954
- contextTypes: true,
7955
- defaultProps: true,
7956
- displayName: true,
7957
- getDefaultProps: true,
7958
- mixins: true,
7959
- propTypes: true,
7960
- type: true
7961
- };
7962
-
7963
- var KNOWN_STATICS = {
7964
- name: true,
7965
- length: true,
7966
- prototype: true,
7967
- caller: true,
7968
- callee: true,
7969
- arguments: true,
7970
- arity: true
7971
- };
7972
-
7973
- var defineProperty = Object.defineProperty;
7974
- var getOwnPropertyNames = Object.getOwnPropertyNames;
7975
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
7976
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
7977
- var getPrototypeOf = Object.getPrototypeOf;
7978
- var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
7979
-
7980
- module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
7981
- if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
7982
-
7983
- if (objectPrototype) {
7984
- var inheritedComponent = getPrototypeOf(sourceComponent);
7985
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
7986
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
7987
- }
7988
- }
7989
-
7990
- var keys = getOwnPropertyNames(sourceComponent);
7991
-
7992
- if (getOwnPropertySymbols) {
7993
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
7994
- }
7995
-
7996
- for (var i = 0; i < keys.length; ++i) {
7997
- var key = keys[i];
7998
- if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
7999
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
8000
- try { // Avoid failures from read-only properties
8001
- defineProperty(targetComponent, key, descriptor);
8002
- } catch (e) {}
8003
- }
8004
- }
8005
-
8006
- return targetComponent;
8007
- }
8008
-
8009
- return targetComponent;
8010
- };
8011
-
8012
-
8013
- /***/ }),
8014
- /* 106 */
8015
- /***/ (function(module, exports, __webpack_require__) {
8016
-
8017
- "use strict";
8018
-
8019
-
8020
- Object.defineProperty(exports, "__esModule", {
8021
- value: true
8022
- });
8023
- exports.default = shallowEqual;
8024
- function shallowEqual(objA, objB) {
8025
- if (objA === objB) {
8026
- return true;
8027
- }
8028
-
8029
- var keysA = Object.keys(objA);
8030
- var keysB = Object.keys(objB);
8031
-
8032
- if (keysA.length !== keysB.length) {
8033
- return false;
8034
- }
8035
-
8036
- // Test for A's keys different from B.
8037
- var hasOwn = Object.prototype.hasOwnProperty;
8038
- for (var i = 0; i < keysA.length; i += 1) {
8039
- if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
8040
- return false;
8041
- }
8042
-
8043
- var valA = objA[keysA[i]];
8044
- var valB = objB[keysA[i]];
8045
-
8046
- if (valA !== valB) {
8047
- return false;
8048
- }
8049
- }
8050
-
8051
- return true;
8052
- }
8053
-
8054
- /***/ }),
8055
- /* 107 */
8056
- /***/ (function(module, exports, __webpack_require__) {
8057
-
8058
- "use strict";
8059
-
8060
-
8061
- exports.__esModule = true;
8062
- exports['default'] = isDisposable;
8063
-
8064
- function isDisposable(obj) {
8065
- return Boolean(obj && typeof obj.dispose === 'function');
8066
- }
8067
-
8068
- module.exports = exports['default'];
8069
-
8070
- /***/ }),
8071
- /* 108 */
8072
- /***/ (function(module, exports, __webpack_require__) {
8073
-
8074
- "use strict";
8075
-
8076
-
8077
- Object.defineProperty(exports, "__esModule", {
8078
- value: true
8079
- });
8080
- var FILE = exports.FILE = '__NATIVE_FILE__';
8081
- var URL = exports.URL = '__NATIVE_URL__';
8082
- var TEXT = exports.TEXT = '__NATIVE_TEXT__';
8083
-
8084
- /***/ }),
8085
- /* 109 */
8086
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
8087
-
8088
- "use strict";
8089
- /**
8090
- * @ignore
8091
- * some key-codes definition and utils from closure-library
8092
- * @author yiminghe@gmail.com
8093
- */
8094
-
8095
- var KeyCode = {
8096
- /**
8097
- * MAC_ENTER
8098
- */
8099
- MAC_ENTER: 3,
8100
- /**
8101
- * BACKSPACE
8102
- */
8103
- BACKSPACE: 8,
8104
- /**
8105
- * TAB
8106
- */
8107
- TAB: 9,
8108
- /**
8109
- * NUMLOCK on FF/Safari Mac
8110
- */
8111
- NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
8112
- /**
8113
- * ENTER
8114
- */
8115
- ENTER: 13,
8116
- /**
8117
- * SHIFT
8118
- */
8119
- SHIFT: 16,
8120
- /**
8121
- * CTRL
8122
- */
8123
- CTRL: 17,
8124
- /**
8125
- * ALT
8126
- */
8127
- ALT: 18,
8128
- /**
8129
- * PAUSE
8130
- */
8131
- PAUSE: 19,
8132
- /**
8133
- * CAPS_LOCK
8134
- */
8135
- CAPS_LOCK: 20,
8136
- /**
8137
- * ESC
8138
- */
8139
- ESC: 27,
8140
- /**
8141
- * SPACE
8142
- */
8143
- SPACE: 32,
8144
- /**
8145
- * PAGE_UP
8146
- */
8147
- PAGE_UP: 33, // also NUM_NORTH_EAST
8148
- /**
8149
- * PAGE_DOWN
8150
- */
8151
- PAGE_DOWN: 34, // also NUM_SOUTH_EAST
8152
- /**
8153
- * END
8154
- */
8155
- END: 35, // also NUM_SOUTH_WEST
8156
- /**
8157
- * HOME
8158
- */
8159
- HOME: 36, // also NUM_NORTH_WEST
8160
- /**
8161
- * LEFT
8162
- */
8163
- LEFT: 37, // also NUM_WEST
8164
- /**
8165
- * UP
8166
- */
8167
- UP: 38, // also NUM_NORTH
8168
- /**
8169
- * RIGHT
8170
- */
8171
- RIGHT: 39, // also NUM_EAST
8172
- /**
8173
- * DOWN
8174
- */
8175
- DOWN: 40, // also NUM_SOUTH
8176
- /**
8177
- * PRINT_SCREEN
8178
- */
8179
- PRINT_SCREEN: 44,
8180
- /**
8181
- * INSERT
8182
- */
8183
- INSERT: 45, // also NUM_INSERT
8184
- /**
8185
- * DELETE
8186
- */
8187
- DELETE: 46, // also NUM_DELETE
8188
- /**
8189
- * ZERO
8190
- */
8191
- ZERO: 48,
8192
- /**
8193
- * ONE
8194
- */
8195
- ONE: 49,
8196
- /**
8197
- * TWO
8198
- */
8199
- TWO: 50,
8200
- /**
8201
- * THREE
8202
- */
8203
- THREE: 51,
8204
- /**
8205
- * FOUR
8206
- */
8207
- FOUR: 52,
8208
- /**
8209
- * FIVE
8210
- */
8211
- FIVE: 53,
8212
- /**
8213
- * SIX
8214
- */
8215
- SIX: 54,
8216
- /**
8217
- * SEVEN
8218
- */
8219
- SEVEN: 55,
8220
- /**
8221
- * EIGHT
8222
- */
8223
- EIGHT: 56,
8224
- /**
8225
- * NINE
8226
- */
8227
- NINE: 57,
8228
- /**
8229
- * QUESTION_MARK
8230
- */
8231
- QUESTION_MARK: 63, // needs localization
8232
- /**
8233
- * A
8234
- */
8235
- A: 65,
8236
- /**
8237
- * B
8238
- */
8239
- B: 66,
8240
- /**
8241
- * C
8242
- */
8243
- C: 67,
8244
- /**
8245
- * D
8246
- */
8247
- D: 68,
8248
- /**
8249
- * E
8250
- */
8251
- E: 69,
8252
- /**
8253
- * F
8254
- */
8255
- F: 70,
8256
- /**
8257
- * G
8258
- */
8259
- G: 71,
8260
- /**
8261
- * H
8262
- */
8263
- H: 72,
8264
- /**
8265
- * I
8266
- */
8267
- I: 73,
8268
- /**
8269
- * J
8270
- */
8271
- J: 74,
8272
- /**
8273
- * K
8274
- */
8275
- K: 75,
8276
- /**
8277
- * L
8278
- */
8279
- L: 76,
8280
- /**
8281
- * M
8282
- */
8283
- M: 77,
8284
- /**
8285
- * N
8286
- */
8287
- N: 78,
8288
- /**
8289
- * O
8290
- */
8291
- O: 79,
8292
- /**
8293
- * P
8294
- */
8295
- P: 80,
8296
- /**
8297
- * Q
8298
- */
8299
- Q: 81,
8300
- /**
8301
- * R
8302
- */
8303
- R: 82,
8304
- /**
8305
- * S
8306
- */
8307
- S: 83,
8308
- /**
8309
- * T
8310
- */
8311
- T: 84,
8312
- /**
8313
- * U
8314
- */
8315
- U: 85,
8316
- /**
8317
- * V
8318
- */
8319
- V: 86,
8320
- /**
8321
- * W
8322
- */
8323
- W: 87,
8324
- /**
8325
- * X
8326
- */
8327
- X: 88,
8328
- /**
8329
- * Y
8330
- */
8331
- Y: 89,
8332
- /**
8333
- * Z
8334
- */
8335
- Z: 90,
8336
- /**
8337
- * META
8338
- */
8339
- META: 91, // WIN_KEY_LEFT
8340
- /**
8341
- * WIN_KEY_RIGHT
8342
- */
8343
- WIN_KEY_RIGHT: 92,
8344
- /**
8345
- * CONTEXT_MENU
8346
- */
8347
- CONTEXT_MENU: 93,
8348
- /**
8349
- * NUM_ZERO
8350
- */
8351
- NUM_ZERO: 96,
8352
- /**
8353
- * NUM_ONE
8354
- */
8355
- NUM_ONE: 97,
8356
- /**
8357
- * NUM_TWO
8358
- */
8359
- NUM_TWO: 98,
8360
- /**
8361
- * NUM_THREE
8362
- */
8363
- NUM_THREE: 99,
8364
- /**
8365
- * NUM_FOUR
8366
- */
8367
- NUM_FOUR: 100,
8368
- /**
8369
- * NUM_FIVE
8370
- */
8371
- NUM_FIVE: 101,
8372
- /**
8373
- * NUM_SIX
8374
- */
8375
- NUM_SIX: 102,
8376
- /**
8377
- * NUM_SEVEN
8378
- */
8379
- NUM_SEVEN: 103,
8380
- /**
8381
- * NUM_EIGHT
8382
- */
8383
- NUM_EIGHT: 104,
8384
- /**
8385
- * NUM_NINE
8386
- */
8387
- NUM_NINE: 105,
8388
- /**
8389
- * NUM_MULTIPLY
8390
- */
8391
- NUM_MULTIPLY: 106,
8392
- /**
8393
- * NUM_PLUS
8394
- */
8395
- NUM_PLUS: 107,
8396
- /**
8397
- * NUM_MINUS
8398
- */
8399
- NUM_MINUS: 109,
8400
- /**
8401
- * NUM_PERIOD
8402
- */
8403
- NUM_PERIOD: 110,
8404
- /**
8405
- * NUM_DIVISION
8406
- */
8407
- NUM_DIVISION: 111,
8408
- /**
8409
- * F1
8410
- */
8411
- F1: 112,
8412
- /**
8413
- * F2
8414
- */
8415
- F2: 113,
8416
- /**
8417
- * F3
8418
- */
8419
- F3: 114,
8420
- /**
8421
- * F4
8422
- */
8423
- F4: 115,
8424
- /**
8425
- * F5
8426
- */
8427
- F5: 116,
8428
- /**
8429
- * F6
8430
- */
8431
- F6: 117,
8432
- /**
8433
- * F7
8434
- */
8435
- F7: 118,
8436
- /**
8437
- * F8
8438
- */
8439
- F8: 119,
8440
- /**
8441
- * F9
8442
- */
8443
- F9: 120,
8444
- /**
8445
- * F10
8446
- */
8447
- F10: 121,
8448
- /**
8449
- * F11
8450
- */
8451
- F11: 122,
8452
- /**
8453
- * F12
8454
- */
8455
- F12: 123,
8456
- /**
8457
- * NUMLOCK
8458
- */
8459
- NUMLOCK: 144,
8460
- /**
8461
- * SEMICOLON
8462
- */
8463
- SEMICOLON: 186, // needs localization
8464
- /**
8465
- * DASH
8466
- */
8467
- DASH: 189, // needs localization
8468
- /**
8469
- * EQUALS
8470
- */
8471
- EQUALS: 187, // needs localization
8472
- /**
8473
- * COMMA
8474
- */
8475
- COMMA: 188, // needs localization
8476
- /**
8477
- * PERIOD
8478
- */
8479
- PERIOD: 190, // needs localization
8480
- /**
8481
- * SLASH
8482
- */
8483
- SLASH: 191, // needs localization
8484
- /**
8485
- * APOSTROPHE
8486
- */
8487
- APOSTROPHE: 192, // needs localization
8488
- /**
8489
- * SINGLE_QUOTE
8490
- */
8491
- SINGLE_QUOTE: 222, // needs localization
8492
- /**
8493
- * OPEN_SQUARE_BRACKET
8494
- */
8495
- OPEN_SQUARE_BRACKET: 219, // needs localization
8496
- /**
8497
- * BACKSLASH
8498
- */
8499
- BACKSLASH: 220, // needs localization
8500
- /**
8501
- * CLOSE_SQUARE_BRACKET
8502
- */
8503
- CLOSE_SQUARE_BRACKET: 221, // needs localization
8504
- /**
8505
- * WIN_KEY
8506
- */
8507
- WIN_KEY: 224,
8508
- /**
8509
- * MAC_FF_META
8510
- */
8511
- MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
8512
- /**
8513
- * WIN_IME
8514
- */
8515
- WIN_IME: 229
8516
- };
8517
-
8518
- /*
8519
- whether text and modified key is entered at the same time.
8520
- */
8521
- KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
8522
- var keyCode = e.keyCode;
8523
- if (e.altKey && !e.ctrlKey || e.metaKey ||
8524
- // Function keys don't generate text
8525
- keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
8526
- return false;
8527
- }
8528
-
8529
- // The following keys are quite harmless, even in combination with
8530
- // CTRL, ALT or SHIFT.
8531
- switch (keyCode) {
8532
- case KeyCode.ALT:
8533
- case KeyCode.CAPS_LOCK:
8534
- case KeyCode.CONTEXT_MENU:
8535
- case KeyCode.CTRL:
8536
- case KeyCode.DOWN:
8537
- case KeyCode.END:
8538
- case KeyCode.ESC:
8539
- case KeyCode.HOME:
8540
- case KeyCode.INSERT:
8541
- case KeyCode.LEFT:
8542
- case KeyCode.MAC_FF_META:
8543
- case KeyCode.META:
8544
- case KeyCode.NUMLOCK:
8545
- case KeyCode.NUM_CENTER:
8546
- case KeyCode.PAGE_DOWN:
8547
- case KeyCode.PAGE_UP:
8548
- case KeyCode.PAUSE:
8549
- case KeyCode.PRINT_SCREEN:
8550
- case KeyCode.RIGHT:
8551
- case KeyCode.SHIFT:
8552
- case KeyCode.UP:
8553
- case KeyCode.WIN_KEY:
8554
- case KeyCode.WIN_KEY_RIGHT:
8555
- return false;
8556
- default:
8557
- return true;
8558
- }
8559
- };
8560
-
8561
- /*
8562
- whether character is entered.
8563
- */
8564
- KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
8565
- if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
8566
- return true;
8567
- }
8568
-
8569
- if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
8570
- return true;
8571
- }
8572
-
8573
- if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
8574
- return true;
8575
- }
8576
-
8577
- // Safari sends zero key code for non-latin characters.
8578
- if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
8579
- return true;
8580
- }
8581
-
8582
- switch (keyCode) {
8583
- case KeyCode.SPACE:
8584
- case KeyCode.QUESTION_MARK:
8585
- case KeyCode.NUM_PLUS:
8586
- case KeyCode.NUM_MINUS:
8587
- case KeyCode.NUM_PERIOD:
8588
- case KeyCode.NUM_DIVISION:
8589
- case KeyCode.SEMICOLON:
8590
- case KeyCode.DASH:
8591
- case KeyCode.EQUALS:
8592
- case KeyCode.COMMA:
8593
- case KeyCode.PERIOD:
8594
- case KeyCode.SLASH:
8595
- case KeyCode.APOSTROPHE:
8596
- case KeyCode.SINGLE_QUOTE:
8597
- case KeyCode.OPEN_SQUARE_BRACKET:
8598
- case KeyCode.BACKSLASH:
8599
- case KeyCode.CLOSE_SQUARE_BRACKET:
8600
- return true;
8601
- default:
8602
- return false;
8603
- }
8604
- };
8605
-
8606
- /* harmony default export */ __webpack_exports__["a"] = (KeyCode);
8607
-
8608
- /***/ }),
8609
- /* 110 */
8610
- /***/ (function(module, exports, __webpack_require__) {
8611
-
8612
- "use strict";
8613
-
8614
-
8615
- Object.defineProperty(exports, "__esModule", {
8616
- value: true
8617
- });
8618
- exports.cf7sDuplicateRules = exports.cf7sSurroundingRules = exports.cf7sDropRules = exports.cf7sRequest = exports.mergeDefault = exports.randomizeName = exports.cf7sItems = undefined;
8619
-
8620
- var _cf7sItems = __webpack_require__(187);
8621
-
8622
- var _api = __webpack_require__(486);
8623
-
8624
- var _functions = __webpack_require__(192);
8625
-
8626
- var _cf7sRules = __webpack_require__(501);
8627
-
8628
- // Simplify import of utils
8629
- exports.cf7sItems = _cf7sItems.cf7sItems;
8630
- exports.randomizeName = _functions.randomizeName;
8631
- exports.mergeDefault = _functions.mergeDefault;
8632
- exports.cf7sRequest = _api.cf7sRequest;
8633
- exports.cf7sDropRules = _cf7sRules.cf7sDropRules;
8634
- exports.cf7sSurroundingRules = _cf7sRules.cf7sSurroundingRules;
8635
- exports.cf7sDuplicateRules = _cf7sRules.cf7sDuplicateRules;
8636
-
8637
- /***/ }),
8638
- /* 111 */
8639
- /***/ (function(module, exports, __webpack_require__) {
8640
-
8641
- "use strict";
8642
-
8643
- // 25.4.1.5 NewPromiseCapability(C)
8644
- var aFunction = __webpack_require__(56);
8645
-
8646
- function PromiseCapability(C) {
8647
- var resolve, reject;
8648
- this.promise = new C(function ($$resolve, $$reject) {
8649
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
8650
- resolve = $$resolve;
8651
- reject = $$reject;
8652
- });
8653
- this.resolve = aFunction(resolve);
8654
- this.reject = aFunction(reject);
8655
- }
8656
-
8657
- module.exports.f = function (C) {
8658
- return new PromiseCapability(C);
8659
- };
8660
-
8661
-
8662
- /***/ }),
8663
- /* 112 */
8664
- /***/ (function(module, exports, __webpack_require__) {
8665
-
8666
- "use strict";
8667
-
8668
-
8669
- var asap = __webpack_require__(113);
8670
-
8671
- function noop() {}
8672
-
8673
- // States:
8674
- //
8675
- // 0 - pending
8676
- // 1 - fulfilled with _value
8677
- // 2 - rejected with _value
8678
- // 3 - adopted the state of another promise, _value
8679
- //
8680
- // once the state is no longer pending (0) it is immutable
8681
-
8682
- // All `_` prefixed properties will be reduced to `_{random number}`
8683
- // at build time to obfuscate them and discourage their use.
8684
- // We don't use symbols or Object.defineProperty to fully hide them
8685
- // because the performance isn't good enough.
8686
-
8687
-
8688
- // to avoid using try/catch inside critical functions, we
8689
- // extract them to here.
8690
- var LAST_ERROR = null;
8691
- var IS_ERROR = {};
8692
- function getThen(obj) {
8693
- try {
8694
- return obj.then;
8695
- } catch (ex) {
8696
- LAST_ERROR = ex;
8697
- return IS_ERROR;
8698
- }
8699
- }
8700
-
8701
- function tryCallOne(fn, a) {
8702
- try {
8703
- return fn(a);
8704
- } catch (ex) {
8705
- LAST_ERROR = ex;
8706
- return IS_ERROR;
8707
- }
8708
- }
8709
- function tryCallTwo(fn, a, b) {
8710
- try {
8711
- fn(a, b);
8712
- } catch (ex) {
8713
- LAST_ERROR = ex;
8714
- return IS_ERROR;
8715
- }
8716
- }
8717
-
8718
- module.exports = Promise;
8719
-
8720
- function Promise(fn) {
8721
- if (typeof this !== 'object') {
8722
- throw new TypeError('Promises must be constructed via new');
8723
- }
8724
- if (typeof fn !== 'function') {
8725
- throw new TypeError('Promise constructor\'s argument is not a function');
8726
- }
8727
- this._75 = 0;
8728
- this._83 = 0;
8729
- this._18 = null;
8730
- this._38 = null;
8731
- if (fn === noop) return;
8732
- doResolve(fn, this);
8733
- }
8734
- Promise._47 = null;
8735
- Promise._71 = null;
8736
- Promise._44 = noop;
8737
-
8738
- Promise.prototype.then = function(onFulfilled, onRejected) {
8739
- if (this.constructor !== Promise) {
8740
- return safeThen(this, onFulfilled, onRejected);
8741
- }
8742
- var res = new Promise(noop);
8743
- handle(this, new Handler(onFulfilled, onRejected, res));
8744
- return res;
8745
- };
8746
-
8747
- function safeThen(self, onFulfilled, onRejected) {
8748
- return new self.constructor(function (resolve, reject) {
8749
- var res = new Promise(noop);
8750
- res.then(resolve, reject);
8751
- handle(self, new Handler(onFulfilled, onRejected, res));
8752
- });
8753
- }
8754
- function handle(self, deferred) {
8755
- while (self._83 === 3) {
8756
- self = self._18;
8757
- }
8758
- if (Promise._47) {
8759
- Promise._47(self);
8760
- }
8761
- if (self._83 === 0) {
8762
- if (self._75 === 0) {
8763
- self._75 = 1;
8764
- self._38 = deferred;
8765
- return;
8766
- }
8767
- if (self._75 === 1) {
8768
- self._75 = 2;
8769
- self._38 = [self._38, deferred];
8770
- return;
8771
- }
8772
- self._38.push(deferred);
8773
- return;
8774
- }
8775
- handleResolved(self, deferred);
8776
- }
8777
-
8778
- function handleResolved(self, deferred) {
8779
- asap(function() {
8780
- var cb = self._83 === 1 ? deferred.onFulfilled : deferred.onRejected;
8781
- if (cb === null) {
8782
- if (self._83 === 1) {
8783
- resolve(deferred.promise, self._18);
8784
- } else {
8785
- reject(deferred.promise, self._18);
8786
- }
8787
- return;
8788
- }
8789
- var ret = tryCallOne(cb, self._18);
8790
- if (ret === IS_ERROR) {
8791
- reject(deferred.promise, LAST_ERROR);
8792
- } else {
8793
- resolve(deferred.promise, ret);
8794
- }
8795
- });
8796
- }
8797
- function resolve(self, newValue) {
8798
- // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
8799
- if (newValue === self) {
8800
- return reject(
8801
- self,
8802
- new TypeError('A promise cannot be resolved with itself.')
8803
- );
8804
- }
8805
- if (
8806
- newValue &&
8807
- (typeof newValue === 'object' || typeof newValue === 'function')
8808
- ) {
8809
- var then = getThen(newValue);
8810
- if (then === IS_ERROR) {
8811
- return reject(self, LAST_ERROR);
8812
- }
8813
- if (
8814
- then === self.then &&
8815
- newValue instanceof Promise
8816
- ) {
8817
- self._83 = 3;
8818
- self._18 = newValue;
8819
- finale(self);
8820
- return;
8821
- } else if (typeof then === 'function') {
8822
- doResolve(then.bind(newValue), self);
8823
- return;
8824
- }
8825
- }
8826
- self._83 = 1;
8827
- self._18 = newValue;
8828
- finale(self);
8829
- }
8830
-
8831
- function reject(self, newValue) {
8832
- self._83 = 2;
8833
- self._18 = newValue;
8834
- if (Promise._71) {
8835
- Promise._71(self, newValue);
8836
- }
8837
- finale(self);
8838
- }
8839
- function finale(self) {
8840
- if (self._75 === 1) {
8841
- handle(self, self._38);
8842
- self._38 = null;
8843
- }
8844
- if (self._75 === 2) {
8845
- for (var i = 0; i < self._38.length; i++) {
8846
- handle(self, self._38[i]);
8847
- }
8848
- self._38 = null;
8849
- }
8850
- }
8851
-
8852
- function Handler(onFulfilled, onRejected, promise){
8853
- this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
8854
- this.onRejected = typeof onRejected === 'function' ? onRejected : null;
8855
- this.promise = promise;
8856
- }
8857
-
8858
- /**
8859
- * Take a potentially misbehaving resolver function and make sure
8860
- * onFulfilled and onRejected are only called once.
8861
- *
8862
- * Makes no guarantees about asynchrony.
8863
- */
8864
- function doResolve(fn, promise) {
8865
- var done = false;
8866
- var res = tryCallTwo(fn, function (value) {
8867
- if (done) return;
8868
- done = true;
8869
- resolve(promise, value);
8870
- }, function (reason) {
8871
- if (done) return;
8872
- done = true;
8873
- reject(promise, reason);
8874
- });
8875
- if (!done && res === IS_ERROR) {
8876
- done = true;
8877
- reject(promise, LAST_ERROR);
8878
- }
8879
- }
8880
-
8881
-
8882
- /***/ }),
8883
- /* 113 */
8884
- /***/ (function(module, exports, __webpack_require__) {
8885
-
8886
- "use strict";
8887
- /* WEBPACK VAR INJECTION */(function(global) {
8888
-
8889
- // Use the fastest means possible to execute a task in its own turn, with
8890
- // priority over other events including IO, animation, reflow, and redraw
8891
- // events in browsers.
8892
- //
8893
- // An exception thrown by a task will permanently interrupt the processing of
8894
- // subsequent tasks. The higher level `asap` function ensures that if an
8895
- // exception is thrown by a task, that the task queue will continue flushing as
8896
- // soon as possible, but if you use `rawAsap` directly, you are responsible to
8897
- // either ensure that no exceptions are thrown from your task, or to manually
8898
- // call `rawAsap.requestFlush` if an exception is thrown.
8899
- module.exports = rawAsap;
8900
- function rawAsap(task) {
8901
- if (!queue.length) {
8902
- requestFlush();
8903
- flushing = true;
8904
- }
8905
- // Equivalent to push, but avoids a function call.
8906
- queue[queue.length] = task;
8907
- }
8908
-
8909
- var queue = [];
8910
- // Once a flush has been requested, no further calls to `requestFlush` are
8911
- // necessary until the next `flush` completes.
8912
- var flushing = false;
8913
- // `requestFlush` is an implementation-specific method that attempts to kick
8914
- // off a `flush` event as quickly as possible. `flush` will attempt to exhaust
8915
- // the event queue before yielding to the browser's own event loop.
8916
- var requestFlush;
8917
- // The position of the next task to execute in the task queue. This is
8918
- // preserved between calls to `flush` so that it can be resumed if
8919
- // a task throws an exception.
8920
- var index = 0;
8921
- // If a task schedules additional tasks recursively, the task queue can grow
8922
- // unbounded. To prevent memory exhaustion, the task queue will periodically
8923
- // truncate already-completed tasks.
8924
- var capacity = 1024;
8925
-
8926
- // The flush function processes all tasks that have been scheduled with
8927
- // `rawAsap` unless and until one of those tasks throws an exception.
8928
- // If a task throws an exception, `flush` ensures that its state will remain
8929
- // consistent and will resume where it left off when called again.
8930
- // However, `flush` does not make any arrangements to be called again if an
8931
- // exception is thrown.
8932
- function flush() {
8933
- while (index < queue.length) {
8934
- var currentIndex = index;
8935
- // Advance the index before calling the task. This ensures that we will
8936
- // begin flushing on the next task the task throws an error.
8937
- index = index + 1;
8938
- queue[currentIndex].call();
8939
- // Prevent leaking memory for long chains of recursive calls to `asap`.
8940
- // If we call `asap` within tasks scheduled by `asap`, the queue will
8941
- // grow, but to avoid an O(n) walk for every task we execute, we don't
8942
- // shift tasks off the queue after they have been executed.
8943
- // Instead, we periodically shift 1024 tasks off the queue.
8944
- if (index > capacity) {
8945
- // Manually shift all values starting at the index back to the
8946
- // beginning of the queue.
8947
- for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {
8948
- queue[scan] = queue[scan + index];
8949
- }
8950
- queue.length -= index;
8951
- index = 0;
8952
- }
8953
- }
8954
- queue.length = 0;
8955
- index = 0;
8956
- flushing = false;
8957
- }
8958
-
8959
- // `requestFlush` is implemented using a strategy based on data collected from
8960
- // every available SauceLabs Selenium web driver worker at time of writing.
8961
- // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
8962
-
8963
- // Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
8964
- // have WebKitMutationObserver but not un-prefixed MutationObserver.
8965
- // Must use `global` or `self` instead of `window` to work in both frames and web
8966
- // workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
8967
-
8968
- /* globals self */
8969
- var scope = typeof global !== "undefined" ? global : self;
8970
- var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
8971
-
8972
- // MutationObservers are desirable because they have high priority and work
8973
- // reliably everywhere they are implemented.
8974
- // They are implemented in all modern browsers.
8975
- //
8976
- // - Android 4-4.3
8977
- // - Chrome 26-34
8978
- // - Firefox 14-29
8979
- // - Internet Explorer 11
8980
- // - iPad Safari 6-7.1
8981
- // - iPhone Safari 7-7.1
8982
- // - Safari 6-7
8983
- if (typeof BrowserMutationObserver === "function") {
8984
- requestFlush = makeRequestCallFromMutationObserver(flush);
8985
-
8986
- // MessageChannels are desirable because they give direct access to the HTML
8987
- // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
8988
- // 11-12, and in web workers in many engines.
8989
- // Although message channels yield to any queued rendering and IO tasks, they
8990
- // would be better than imposing the 4ms delay of timers.
8991
- // However, they do not work reliably in Internet Explorer or Safari.
8992
-
8993
- // Internet Explorer 10 is the only browser that has setImmediate but does
8994
- // not have MutationObservers.
8995
- // Although setImmediate yields to the browser's renderer, it would be
8996
- // preferrable to falling back to setTimeout since it does not have
8997
- // the minimum 4ms penalty.
8998
- // Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
8999
- // Desktop to a lesser extent) that renders both setImmediate and
9000
- // MessageChannel useless for the purposes of ASAP.
9001
- // https://github.com/kriskowal/q/issues/396
9002
-
9003
- // Timers are implemented universally.
9004
- // We fall back to timers in workers in most engines, and in foreground
9005
- // contexts in the following browsers.
9006
- // However, note that even this simple case requires nuances to operate in a
9007
- // broad spectrum of browsers.
9008
- //
9009
- // - Firefox 3-13
9010
- // - Internet Explorer 6-9
9011
- // - iPad Safari 4.3
9012
- // - Lynx 2.8.7
9013
- } else {
9014
- requestFlush = makeRequestCallFromTimer(flush);
9015
- }
9016
-
9017
- // `requestFlush` requests that the high priority event queue be flushed as
9018
- // soon as possible.
9019
- // This is useful to prevent an error thrown in a task from stalling the event
9020
- // queue if the exception handled by Node.js’s
9021
- // `process.on("uncaughtException")` or by a domain.
9022
- rawAsap.requestFlush = requestFlush;
9023
-
9024
- // To request a high priority event, we induce a mutation observer by toggling
9025
- // the text of a text node between "1" and "-1".
9026
- function makeRequestCallFromMutationObserver(callback) {
9027
- var toggle = 1;
9028
- var observer = new BrowserMutationObserver(callback);
9029
- var node = document.createTextNode("");
9030
- observer.observe(node, {characterData: true});
9031
- return function requestCall() {
9032
- toggle = -toggle;
9033
- node.data = toggle;
9034
- };
9035
- }
9036
-
9037
- // The message channel technique was discovered by Malte Ubl and was the
9038
- // original foundation for this library.
9039
- // http://www.nonblocking.io/2011/06/windownexttick.html
9040
-
9041
- // Safari 6.0.5 (at least) intermittently fails to create message ports on a
9042
- // page's first load. Thankfully, this version of Safari supports
9043
- // MutationObservers, so we don't need to fall back in that case.
9044
-
9045
- // function makeRequestCallFromMessageChannel(callback) {
9046
- // var channel = new MessageChannel();
9047
- // channel.port1.onmessage = callback;
9048
- // return function requestCall() {
9049
- // channel.port2.postMessage(0);
9050
- // };
9051
- // }
9052
-
9053
- // For reasons explained above, we are also unable to use `setImmediate`
9054
- // under any circumstances.
9055
- // Even if we were, there is another bug in Internet Explorer 10.
9056
- // It is not sufficient to assign `setImmediate` to `requestFlush` because
9057
- // `setImmediate` must be called *by name* and therefore must be wrapped in a
9058
- // closure.
9059
- // Never forget.
9060
-
9061
- // function makeRequestCallFromSetImmediate(callback) {
9062
- // return function requestCall() {
9063
- // setImmediate(callback);
9064
- // };
9065
- // }
9066
-
9067
- // Safari 6.0 has a problem where timers will get lost while the user is
9068
- // scrolling. This problem does not impact ASAP because Safari 6.0 supports
9069
- // mutation observers, so that implementation is used instead.
9070
- // However, if we ever elect to use timers in Safari, the prevalent work-around
9071
- // is to add a scroll event listener that calls for a flush.
9072
-
9073
- // `setTimeout` does not call the passed callback if the delay is less than
9074
- // approximately 7 in web workers in Firefox 8 through 18, and sometimes not
9075
- // even then.
9076
-
9077
- function makeRequestCallFromTimer(callback) {
9078
- return function requestCall() {
9079
- // We dispatch a timeout with a specified delay of 0 for engines that
9080
- // can reliably accommodate that request. This will usually be snapped
9081
- // to a 4 milisecond delay, but once we're flushing, there's no delay
9082
- // between events.
9083
- var timeoutHandle = setTimeout(handleTimer, 0);
9084
- // However, since this timer gets frequently dropped in Firefox
9085
- // workers, we enlist an interval handle that will try to fire
9086
- // an event 20 times per second until it succeeds.
9087
- var intervalHandle = setInterval(handleTimer, 50);
9088
-
9089
- function handleTimer() {
9090
- // Whichever timer succeeds will cancel both timers and
9091
- // execute the callback.
9092
- clearTimeout(timeoutHandle);
9093
- clearInterval(intervalHandle);
9094
- callback();
9095
- }
9096
- };
9097
- }
9098
-
9099
- // This is for `asap.js` only.
9100
- // Its name will be periodically randomized to break any code that depends on
9101
- // its existence.
9102
- rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;
9103
-
9104
- // ASAP was originally a nextTick shim included in Q. This was factored out
9105
- // into this ASAP package. It was later adapted to RSVP which made further
9106
- // amendments. These decisions, particularly to marginalize MessageChannel and
9107
- // to capture the MutationObserver implementation in a closure, were integrated
9108
- // back into ASAP proper.
9109
- // https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
9110
-
9111
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(20)))
9112
-
9113
- /***/ }),
9114
- /* 114 */
9115
- /***/ (function(module, exports) {
9116
-
9117
- (function(self) {
9118
- 'use strict';
9119
-
9120
- if (self.fetch) {
9121
- return
9122
- }
9123
-
9124
- var support = {
9125
- searchParams: 'URLSearchParams' in self,
9126
- iterable: 'Symbol' in self && 'iterator' in Symbol,
9127
- blob: 'FileReader' in self && 'Blob' in self && (function() {
9128
- try {
9129
- new Blob()
9130
- return true
9131
- } catch(e) {
9132
- return false
9133
- }
9134
- })(),
9135
- formData: 'FormData' in self,
9136
- arrayBuffer: 'ArrayBuffer' in self
9137
- }
9138
-
9139
- if (support.arrayBuffer) {
9140
- var viewClasses = [
9141
- '[object Int8Array]',
9142
- '[object Uint8Array]',
9143
- '[object Uint8ClampedArray]',
9144
- '[object Int16Array]',
9145
- '[object Uint16Array]',
9146
- '[object Int32Array]',
9147
- '[object Uint32Array]',
9148
- '[object Float32Array]',
9149
- '[object Float64Array]'
9150
- ]
9151
-
9152
- var isDataView = function(obj) {
9153
- return obj && DataView.prototype.isPrototypeOf(obj)
9154
- }
9155
-
9156
- var isArrayBufferView = ArrayBuffer.isView || function(obj) {
9157
- return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
9158
- }
9159
- }
9160
-
9161
- function normalizeName(name) {
9162
- if (typeof name !== 'string') {
9163
- name = String(name)
9164
- }
9165
- if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
9166
- throw new TypeError('Invalid character in header field name')
9167
- }
9168
- return name.toLowerCase()
9169
- }
9170
-
9171
- function normalizeValue(value) {
9172
- if (typeof value !== 'string') {
9173
- value = String(value)
9174
- }
9175
- return value
9176
- }
9177
-
9178
- // Build a destructive iterator for the value list
9179
- function iteratorFor(items) {
9180
- var iterator = {
9181
- next: function() {
9182
- var value = items.shift()
9183
- return {done: value === undefined, value: value}
9184
- }
9185
- }
9186
-
9187
- if (support.iterable) {
9188
- iterator[Symbol.iterator] = function() {
9189
- return iterator
9190
- }
9191
- }
9192
-
9193
- return iterator
9194
- }
9195
-
9196
- function Headers(headers) {
9197
- this.map = {}
9198
-
9199
- if (headers instanceof Headers) {
9200
- headers.forEach(function(value, name) {
9201
- this.append(name, value)
9202
- }, this)
9203
- } else if (Array.isArray(headers)) {
9204
- headers.forEach(function(header) {
9205
- this.append(header[0], header[1])
9206
- }, this)
9207
- } else if (headers) {
9208
- Object.getOwnPropertyNames(headers).forEach(function(name) {
9209
- this.append(name, headers[name])
9210
- }, this)
9211
- }
9212
- }
9213
-
9214
- Headers.prototype.append = function(name, value) {
9215
- name = normalizeName(name)
9216
- value = normalizeValue(value)
9217
- var oldValue = this.map[name]
9218
- this.map[name] = oldValue ? oldValue+','+value : value
9219
- }
9220
-
9221
- Headers.prototype['delete'] = function(name) {
9222
- delete this.map[normalizeName(name)]
9223
- }
9224
-
9225
- Headers.prototype.get = function(name) {
9226
- name = normalizeName(name)
9227
- return this.has(name) ? this.map[name] : null
9228
- }
9229
-
9230
- Headers.prototype.has = function(name) {
9231
- return this.map.hasOwnProperty(normalizeName(name))
9232
- }
9233
-
9234
- Headers.prototype.set = function(name, value) {
9235
- this.map[normalizeName(name)] = normalizeValue(value)
9236
- }
9237
-
9238
- Headers.prototype.forEach = function(callback, thisArg) {
9239
- for (var name in this.map) {
9240
- if (this.map.hasOwnProperty(name)) {
9241
- callback.call(thisArg, this.map[name], name, this)
9242
- }
9243
- }
9244
- }
9245
-
9246
- Headers.prototype.keys = function() {
9247
- var items = []
9248
- this.forEach(function(value, name) { items.push(name) })
9249
- return iteratorFor(items)
9250
- }
9251
-
9252
- Headers.prototype.values = function() {
9253
- var items = []
9254
- this.forEach(function(value) { items.push(value) })
9255
- return iteratorFor(items)
9256
- }
9257
-
9258
- Headers.prototype.entries = function() {
9259
- var items = []
9260
- this.forEach(function(value, name) { items.push([name, value]) })
9261
- return iteratorFor(items)
9262
- }
9263
-
9264
- if (support.iterable) {
9265
- Headers.prototype[Symbol.iterator] = Headers.prototype.entries
9266
- }
9267
-
9268
- function consumed(body) {
9269
- if (body.bodyUsed) {
9270
- return Promise.reject(new TypeError('Already read'))
9271
- }
9272
- body.bodyUsed = true
9273
- }
9274
-
9275
- function fileReaderReady(reader) {
9276
- return new Promise(function(resolve, reject) {
9277
- reader.onload = function() {
9278
- resolve(reader.result)
9279
- }
9280
- reader.onerror = function() {
9281
- reject(reader.error)
9282
- }
9283
- })
9284
- }
9285
-
9286
- function readBlobAsArrayBuffer(blob) {
9287
- var reader = new FileReader()
9288
- var promise = fileReaderReady(reader)
9289
- reader.readAsArrayBuffer(blob)
9290
- return promise
9291
- }
9292
-
9293
- function readBlobAsText(blob) {
9294
- var reader = new FileReader()
9295
- var promise = fileReaderReady(reader)
9296
- reader.readAsText(blob)
9297
- return promise
9298
- }
9299
-
9300
- function readArrayBufferAsText(buf) {
9301
- var view = new Uint8Array(buf)
9302
- var chars = new Array(view.length)
9303
-
9304
- for (var i = 0; i < view.length; i++) {
9305
- chars[i] = String.fromCharCode(view[i])
9306
- }
9307
- return chars.join('')
9308
- }
9309
-
9310
- function bufferClone(buf) {
9311
- if (buf.slice) {
9312
- return buf.slice(0)
9313
- } else {
9314
- var view = new Uint8Array(buf.byteLength)
9315
- view.set(new Uint8Array(buf))
9316
- return view.buffer
9317
- }
9318
- }
9319
-
9320
- function Body() {
9321
- this.bodyUsed = false
9322
-
9323
- this._initBody = function(body) {
9324
- this._bodyInit = body
9325
- if (!body) {
9326
- this._bodyText = ''
9327
- } else if (typeof body === 'string') {
9328
- this._bodyText = body
9329
- } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
9330
- this._bodyBlob = body
9331
- } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
9332
- this._bodyFormData = body
9333
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
9334
- this._bodyText = body.toString()
9335
- } else if (support.arrayBuffer && support.blob && isDataView(body)) {
9336
- this._bodyArrayBuffer = bufferClone(body.buffer)
9337
- // IE 10-11 can't handle a DataView body.
9338
- this._bodyInit = new Blob([this._bodyArrayBuffer])
9339
- } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
9340
- this._bodyArrayBuffer = bufferClone(body)
9341
- } else {
9342
- throw new Error('unsupported BodyInit type')
9343
- }
9344
-
9345
- if (!this.headers.get('content-type')) {
9346
- if (typeof body === 'string') {
9347
- this.headers.set('content-type', 'text/plain;charset=UTF-8')
9348
- } else if (this._bodyBlob && this._bodyBlob.type) {
9349
- this.headers.set('content-type', this._bodyBlob.type)
9350
- } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
9351
- this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
9352
- }
9353
- }
9354
- }
9355
-
9356
- if (support.blob) {
9357
- this.blob = function() {
9358
- var rejected = consumed(this)
9359
- if (rejected) {
9360
- return rejected
9361
- }
9362
-
9363
- if (this._bodyBlob) {
9364
- return Promise.resolve(this._bodyBlob)
9365
- } else if (this._bodyArrayBuffer) {
9366
- return Promise.resolve(new Blob([this._bodyArrayBuffer]))
9367
- } else if (this._bodyFormData) {
9368
- throw new Error('could not read FormData body as blob')
9369
- } else {
9370
- return Promise.resolve(new Blob([this._bodyText]))
9371
- }
9372
- }
9373
-
9374
- this.arrayBuffer = function() {
9375
- if (this._bodyArrayBuffer) {
9376
- return consumed(this) || Promise.resolve(this._bodyArrayBuffer)
9377
- } else {
9378
- return this.blob().then(readBlobAsArrayBuffer)
9379
- }
9380
- }
9381
- }
9382
-
9383
- this.text = function() {
9384
- var rejected = consumed(this)
9385
- if (rejected) {
9386
- return rejected
9387
- }
9388
-
9389
- if (this._bodyBlob) {
9390
- return readBlobAsText(this._bodyBlob)
9391
- } else if (this._bodyArrayBuffer) {
9392
- return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
9393
- } else if (this._bodyFormData) {
9394
- throw new Error('could not read FormData body as text')
9395
- } else {
9396
- return Promise.resolve(this._bodyText)
9397
- }
9398
- }
9399
-
9400
- if (support.formData) {
9401
- this.formData = function() {
9402
- return this.text().then(decode)
9403
- }
9404
- }
9405
-
9406
- this.json = function() {
9407
- return this.text().then(JSON.parse)
9408
- }
9409
-
9410
- return this
9411
- }
9412
-
9413
- // HTTP methods whose capitalization should be normalized
9414
- var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
9415
-
9416
- function normalizeMethod(method) {
9417
- var upcased = method.toUpperCase()
9418
- return (methods.indexOf(upcased) > -1) ? upcased : method
9419
- }
9420
-
9421
- function Request(input, options) {
9422
- options = options || {}
9423
- var body = options.body
9424
-
9425
- if (input instanceof Request) {
9426
- if (input.bodyUsed) {
9427
- throw new TypeError('Already read')
9428
- }
9429
- this.url = input.url
9430
- this.credentials = input.credentials
9431
- if (!options.headers) {
9432
- this.headers = new Headers(input.headers)
9433
- }
9434
- this.method = input.method
9435
- this.mode = input.mode
9436
- if (!body && input._bodyInit != null) {
9437
- body = input._bodyInit
9438
- input.bodyUsed = true
9439
- }
9440
- } else {
9441
- this.url = String(input)
9442
- }
9443
-
9444
- this.credentials = options.credentials || this.credentials || 'omit'
9445
- if (options.headers || !this.headers) {
9446
- this.headers = new Headers(options.headers)
9447
- }
9448
- this.method = normalizeMethod(options.method || this.method || 'GET')
9449
- this.mode = options.mode || this.mode || null
9450
- this.referrer = null
9451
-
9452
- if ((this.method === 'GET' || this.method === 'HEAD') && body) {
9453
- throw new TypeError('Body not allowed for GET or HEAD requests')
9454
- }
9455
- this._initBody(body)
9456
- }
9457
-
9458
- Request.prototype.clone = function() {
9459
- return new Request(this, { body: this._bodyInit })
9460
- }
9461
-
9462
- function decode(body) {
9463
- var form = new FormData()
9464
- body.trim().split('&').forEach(function(bytes) {
9465
- if (bytes) {
9466
- var split = bytes.split('=')
9467
- var name = split.shift().replace(/\+/g, ' ')
9468
- var value = split.join('=').replace(/\+/g, ' ')
9469
- form.append(decodeURIComponent(name), decodeURIComponent(value))
9470
- }
9471
- })
9472
- return form
9473
- }
9474
-
9475
- function parseHeaders(rawHeaders) {
9476
- var headers = new Headers()
9477
- // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
9478
- // https://tools.ietf.org/html/rfc7230#section-3.2
9479
- var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ')
9480
- preProcessedHeaders.split(/\r?\n/).forEach(function(line) {
9481
- var parts = line.split(':')
9482
- var key = parts.shift().trim()
9483
- if (key) {
9484
- var value = parts.join(':').trim()
9485
- headers.append(key, value)
9486
- }
9487
- })
9488
- return headers
9489
- }
9490
-
9491
- Body.call(Request.prototype)
9492
-
9493
- function Response(bodyInit, options) {
9494
- if (!options) {
9495
- options = {}
9496
- }
9497
-
9498
- this.type = 'default'
9499
- this.status = options.status === undefined ? 200 : options.status
9500
- this.ok = this.status >= 200 && this.status < 300
9501
- this.statusText = 'statusText' in options ? options.statusText : 'OK'
9502
- this.headers = new Headers(options.headers)
9503
- this.url = options.url || ''
9504
- this._initBody(bodyInit)
9505
- }
9506
-
9507
- Body.call(Response.prototype)
9508
-
9509
- Response.prototype.clone = function() {
9510
- return new Response(this._bodyInit, {
9511
- status: this.status,
9512
- statusText: this.statusText,
9513
- headers: new Headers(this.headers),
9514
- url: this.url
9515
- })
9516
- }
9517
-
9518
- Response.error = function() {
9519
- var response = new Response(null, {status: 0, statusText: ''})
9520
- response.type = 'error'
9521
- return response
9522
- }
9523
-
9524
- var redirectStatuses = [301, 302, 303, 307, 308]
9525
-
9526
- Response.redirect = function(url, status) {
9527
- if (redirectStatuses.indexOf(status) === -1) {
9528
- throw new RangeError('Invalid status code')
9529
- }
9530
-
9531
- return new Response(null, {status: status, headers: {location: url}})
9532
- }
9533
-
9534
- self.Headers = Headers
9535
- self.Request = Request
9536
- self.Response = Response
9537
-
9538
- self.fetch = function(input, init) {
9539
- return new Promise(function(resolve, reject) {
9540
- var request = new Request(input, init)
9541
- var xhr = new XMLHttpRequest()
9542
-
9543
- xhr.onload = function() {
9544
- var options = {
9545
- status: xhr.status,
9546
- statusText: xhr.statusText,
9547
- headers: parseHeaders(xhr.getAllResponseHeaders() || '')
9548
- }
9549
- options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
9550
- var body = 'response' in xhr ? xhr.response : xhr.responseText
9551
- resolve(new Response(body, options))
9552
- }
9553
-
9554
- xhr.onerror = function() {
9555
- reject(new TypeError('Network request failed'))
9556
- }
9557
-
9558
- xhr.ontimeout = function() {
9559
- reject(new TypeError('Network request failed'))
9560
- }
9561
-
9562
- xhr.open(request.method, request.url, true)
9563
-
9564
- if (request.credentials === 'include') {
9565
- xhr.withCredentials = true
9566
- } else if (request.credentials === 'omit') {
9567
- xhr.withCredentials = false
9568
- }
9569
-
9570
- if ('responseType' in xhr && support.blob) {
9571
- xhr.responseType = 'blob'
9572
- }
9573
-
9574
- request.headers.forEach(function(value, name) {
9575
- xhr.setRequestHeader(name, value)
9576
- })
9577
-
9578
- xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
9579
- })
9580
- }
9581
- self.fetch.polyfill = true
9582
- })(typeof self !== 'undefined' ? self : this);
9583
-
9584
-
9585
- /***/ }),
9586
- /* 115 */
9587
- /***/ (function(module, exports, __webpack_require__) {
9588
-
9589
- "use strict";
9590
- /**
9591
- * Copyright (c) 2013-present, Facebook, Inc.
9592
- *
9593
- * This source code is licensed under the MIT license found in the
9594
- * LICENSE file in the root directory of this source tree.
9595
- *
9596
- */
9597
-
9598
-
9599
-
9600
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
9601
-
9602
- /**
9603
- * Simple, lightweight module assisting with the detection and context of
9604
- * Worker. Helps avoid circular dependencies and allows code to reason about
9605
- * whether or not they are in a Worker, even if they never include the main
9606
- * `ReactWorker` dependency.
9607
- */
9608
- var ExecutionEnvironment = {
9609
-
9610
- canUseDOM: canUseDOM,
9611
-
9612
- canUseWorkers: typeof Worker !== 'undefined',
9613
-
9614
- canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
9615
-
9616
- canUseViewport: canUseDOM && !!window.screen,
9617
-
9618
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
9619
-
9620
- };
9621
-
9622
- module.exports = ExecutionEnvironment;
9623
-
9624
- /***/ }),
9625
- /* 116 */
9626
- /***/ (function(module, exports, __webpack_require__) {
9627
-
9628
- "use strict";
9629
- /* WEBPACK VAR INJECTION */(function(process) {
9630
-
9631
- /**
9632
- * Copyright (c) 2013-present, Facebook, Inc.
9633
- *
9634
- * This source code is licensed under the MIT license found in the
9635
- * LICENSE file in the root directory of this source tree.
9636
- *
9637
- * @typechecks
9638
- */
9639
-
9640
- var emptyFunction = __webpack_require__(23);
9641
-
9642
- /**
9643
- * Upstream version of event listener. Does not take into account specific
9644
- * nature of platform.
9645
- */
9646
- var EventListener = {
9647
- /**
9648
- * Listen to DOM events during the bubble phase.
9649
- *
9650
- * @param {DOMEventTarget} target DOM element to register listener on.
9651
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
9652
- * @param {function} callback Callback function.
9653
- * @return {object} Object with a `remove` method.
9654
- */
9655
- listen: function listen(target, eventType, callback) {
9656
- if (target.addEventListener) {
9657
- target.addEventListener(eventType, callback, false);
9658
- return {
9659
- remove: function remove() {
9660
- target.removeEventListener(eventType, callback, false);
9661
- }
9662
- };
9663
- } else if (target.attachEvent) {
9664
- target.attachEvent('on' + eventType, callback);
9665
- return {
9666
- remove: function remove() {
9667
- target.detachEvent('on' + eventType, callback);
9668
- }
9669
- };
9670
- }
9671
- },
9672
-
9673
- /**
9674
- * Listen to DOM events during the capture phase.
9675
- *
9676
- * @param {DOMEventTarget} target DOM element to register listener on.
9677
- * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
9678
- * @param {function} callback Callback function.
9679
- * @return {object} Object with a `remove` method.
9680
- */
9681
- capture: function capture(target, eventType, callback) {
9682
- if (target.addEventListener) {
9683
- target.addEventListener(eventType, callback, true);
9684
- return {
9685
- remove: function remove() {
9686
- target.removeEventListener(eventType, callback, true);
9687
- }
9688
- };
9689
- } else {
9690
- if (process.env.NODE_ENV !== 'production') {
9691
- console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
9692
  }
9693
- return {
9694
- remove: emptyFunction
9695
- };
9696
- }
9697
- },
9698
-
9699
- registerDefault: function registerDefault() {}
9700
- };
9701
-
9702
- module.exports = EventListener;
9703
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7)))
9704
-
9705
- /***/ }),
9706
- /* 117 */
9707
- /***/ (function(module, exports, __webpack_require__) {
9708
-
9709
- "use strict";
9710
-
9711
-
9712
- /**
9713
- * Copyright (c) 2013-present, Facebook, Inc.
9714
- *
9715
- * This source code is licensed under the MIT license found in the
9716
- * LICENSE file in the root directory of this source tree.
9717
- *
9718
- * @typechecks
9719
- */
9720
-
9721
- /* eslint-disable fb-www/typeof-undefined */
9722
-
9723
- /**
9724
- * Same as document.activeElement but wraps in a try-catch block. In IE it is
9725
- * not safe to call document.activeElement if there is nothing focused.
9726
- *
9727
- * The activeElement will be null only if the document or document body is not
9728
- * yet defined.
9729
- *
9730
- * @param {?DOMDocument} doc Defaults to current document.
9731
- * @return {?DOMElement}
9732
- */
9733
- function getActiveElement(doc) /*?DOMElement*/{
9734
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
9735
- if (typeof doc === 'undefined') {
9736
- return null;
9737
- }
9738
- try {
9739
- return doc.activeElement || doc.body;
9740
- } catch (e) {
9741
- return doc.body;
9742
- }
9743
- }
9744
-
9745
- module.exports = getActiveElement;
9746
-
9747
- /***/ }),
9748
- /* 118 */
9749
- /***/ (function(module, exports, __webpack_require__) {
9750
-
9751
- "use strict";
9752
- /**
9753
- * Copyright (c) 2013-present, Facebook, Inc.
9754
- *
9755
- * This source code is licensed under the MIT license found in the
9756
- * LICENSE file in the root directory of this source tree.
9757
- *
9758
- * @typechecks
9759
- *
9760
- */
9761
-
9762
- /*eslint-disable no-self-compare */
9763
-
9764
-
9765
-
9766
- var hasOwnProperty = Object.prototype.hasOwnProperty;
9767
-
9768
- /**
9769
- * inlined Object.is polyfill to avoid requiring consumers ship their own
9770
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
9771
- */
9772
- function is(x, y) {
9773
- // SameValue algorithm
9774
- if (x === y) {
9775
- // Steps 1-5, 7-10
9776
- // Steps 6.b-6.e: +0 != -0
9777
- // Added the nonzero y check to make Flow happy, but it is redundant
9778
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
9779
- } else {
9780
- // Step 6.a: NaN == NaN
9781
- return x !== x && y !== y;
9782
- }
9783
- }
9784
-
9785
- /**
9786
- * Performs equality by iterating through keys on an object and returning false
9787
- * when any key has values which are not strictly equal between the arguments.
9788
- * Returns true when the values of all keys are strictly equal.
9789
- */
9790
- function shallowEqual(objA, objB) {
9791
- if (is(objA, objB)) {
9792
- return true;
9793
- }
9794
-
9795
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
9796
- return false;
9797
- }
9798
-
9799
- var keysA = Object.keys(objA);
9800
- var keysB = Object.keys(objB);
9801
-
9802
- if (keysA.length !== keysB.length) {
9803
- return false;
9804
- }
9805
-
9806
- // Test for A's keys different from B.
9807
- for (var i = 0; i < keysA.length; i++) {
9808
- if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
9809
- return false;
9810
- }
9811
- }
9812
-
9813
- return true;
9814
- }
9815
-
9816
- module.exports = shallowEqual;
9817
-
9818
- /***/ }),
9819
- /* 119 */
9820
- /***/ (function(module, exports, __webpack_require__) {
9821
-
9822
- "use strict";
9823
-
9824
-
9825
- /**
9826
- * Copyright (c) 2013-present, Facebook, Inc.
9827
- *
9828
- * This source code is licensed under the MIT license found in the
9829
- * LICENSE file in the root directory of this source tree.
9830
- *
9831
- *
9832
- */
9833
-
9834
- var isTextNode = __webpack_require__(201);
9835
-
9836
- /*eslint-disable no-bitwise */
9837
-
9838
- /**
9839
- * Checks if a given DOM node contains or is another DOM node.
9840
- */
9841
- function containsNode(outerNode, innerNode) {
9842
- if (!outerNode || !innerNode) {
9843
- return false;
9844
- } else if (outerNode === innerNode) {
9845
- return true;
9846
- } else if (isTextNode(outerNode)) {
9847
- return false;
9848
- } else if (isTextNode(innerNode)) {
9849
- return containsNode(outerNode, innerNode.parentNode);
9850
- } else if ('contains' in outerNode) {
9851
- return outerNode.contains(innerNode);
9852
- } else if (outerNode.compareDocumentPosition) {
9853
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
9854
- } else {
9855
- return false;
9856
- }
9857
- }
9858
-
9859
- module.exports = containsNode;
9860
-
9861
- /***/ }),
9862
- /* 120 */
9863
- /***/ (function(module, exports, __webpack_require__) {
9864
-
9865
- "use strict";
9866
- /**
9867
- * Copyright (c) 2013-present, Facebook, Inc.
9868
- *
9869
- * This source code is licensed under the MIT license found in the
9870
- * LICENSE file in the root directory of this source tree.
9871
- *
9872
- */
9873
-
9874
-
9875
-
9876
- /**
9877
- * @param {DOMElement} node input/textarea to focus
9878
- */
9879
-
9880
- function focusNode(node) {
9881
- // IE8 can throw "Can't move focus to the control because it is invisible,
9882
- // not enabled, or of a type that does not accept the focus." for all kinds of
9883
- // reasons that are too expensive and fragile to test.
9884
- try {
9885
- node.focus();
9886
- } catch (e) {}
9887
- }
9888
-
9889
- module.exports = focusNode;
9890
-
9891
- /***/ }),
9892
- /* 121 */
9893
- /***/ (function(module, exports, __webpack_require__) {
9894
-
9895
- "use strict";
9896
-
9897
- var LIBRARY = __webpack_require__(55);
9898
- var $export = __webpack_require__(18);
9899
- var redefine = __webpack_require__(123);
9900
- var hide = __webpack_require__(28);
9901
- var has = __webpack_require__(29);
9902
- var Iterators = __webpack_require__(36);
9903
- var $iterCreate = __webpack_require__(212);
9904
- var setToStringTag = __webpack_require__(59);
9905
- var getPrototypeOf = __webpack_require__(128);
9906
- var ITERATOR = __webpack_require__(12)('iterator');
9907
- var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
9908
- var FF_ITERATOR = '@@iterator';
9909
- var KEYS = 'keys';
9910
- var VALUES = 'values';
9911
-
9912
- var returnThis = function () { return this; };
9913
-
9914
- module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
9915
- $iterCreate(Constructor, NAME, next);
9916
- var getMethod = function (kind) {
9917
- if (!BUGGY && kind in proto) return proto[kind];
9918
- switch (kind) {
9919
- case KEYS: return function keys() { return new Constructor(this, kind); };
9920
- case VALUES: return function values() { return new Constructor(this, kind); };
9921
- } return function entries() { return new Constructor(this, kind); };
9922
- };
9923
- var TAG = NAME + ' Iterator';
9924
- var DEF_VALUES = DEFAULT == VALUES;
9925
- var VALUES_BUG = false;
9926
- var proto = Base.prototype;
9927
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
9928
- var $default = (!BUGGY && $native) || getMethod(DEFAULT);
9929
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
9930
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
9931
- var methods, key, IteratorPrototype;
9932
- // Fix native
9933
- if ($anyNative) {
9934
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
9935
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
9936
- // Set @@toStringTag to native iterators
9937
- setToStringTag(IteratorPrototype, TAG, true);
9938
- // fix for some old engines
9939
- if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
9940
- }
9941
- }
9942
- // fix Array#{values, @@iterator}.name in V8 / FF
9943
- if (DEF_VALUES && $native && $native.name !== VALUES) {
9944
- VALUES_BUG = true;
9945
- $default = function values() { return $native.call(this); };
9946
- }
9947
- // Define iterator
9948
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
9949
- hide(proto, ITERATOR, $default);
9950
- }
9951
- // Plug for library
9952
- Iterators[NAME] = $default;
9953
- Iterators[TAG] = returnThis;
9954
- if (DEFAULT) {
9955
- methods = {
9956
- values: DEF_VALUES ? $default : getMethod(VALUES),
9957
- keys: IS_SET ? $default : getMethod(KEYS),
9958
- entries: $entries
9959
- };
9960
- if (FORCED) for (key in methods) {
9961
- if (!(key in proto)) redefine(proto, key, methods[key]);
9962
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
9963
- }
9964
- return methods;
9965
- };
9966
-
9967
 
9968
- /***/ }),
9969
- /* 122 */
9970
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9971
 
9972
- module.exports = !__webpack_require__(26) && !__webpack_require__(35)(function () {
9973
- return Object.defineProperty(__webpack_require__(79)('div'), 'a', { get: function () { return 7; } }).a != 7;
9974
- });
 
 
 
 
 
 
 
 
 
9975
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9976
 
9977
- /***/ }),
9978
- /* 123 */
9979
- /***/ (function(module, exports, __webpack_require__) {
9980
 
9981
- module.exports = __webpack_require__(28);
 
 
 
 
 
 
 
 
 
 
 
 
 
9982
 
 
 
 
 
 
9983
 
9984
- /***/ }),
9985
- /* 124 */
9986
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
9987
 
9988
- var has = __webpack_require__(29);
9989
- var toIObject = __webpack_require__(30);
9990
- var arrayIndexOf = __webpack_require__(214)(false);
9991
- var IE_PROTO = __webpack_require__(82)('IE_PROTO');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9992
 
9993
- module.exports = function (object, names) {
9994
- var O = toIObject(object);
9995
- var i = 0;
9996
- var result = [];
9997
- var key;
9998
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
9999
- // Don't enum bug & hidden keys
10000
- while (names.length > i) if (has(O, key = names[i++])) {
10001
- ~arrayIndexOf(result, key) || result.push(key);
10002
- }
10003
- return result;
10004
- };
10005
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10006
 
10007
- /***/ }),
10008
- /* 125 */
10009
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
10010
 
10011
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
10012
- var cof = __webpack_require__(45);
10013
- // eslint-disable-next-line no-prototype-builtins
10014
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
10015
- return cof(it) == 'String' ? it.split('') : Object(it);
10016
- };
 
 
 
 
 
 
 
10017
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10018
 
10019
- /***/ }),
10020
- /* 126 */
10021
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10022
 
10023
- // 7.1.15 ToLength
10024
- var toInteger = __webpack_require__(77);
10025
- var min = Math.min;
10026
- module.exports = function (it) {
10027
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
10028
- };
 
 
 
 
 
10029
 
 
 
 
 
 
 
 
 
 
10030
 
10031
- /***/ }),
10032
- /* 127 */
10033
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
10034
 
10035
- var document = __webpack_require__(14).document;
10036
- module.exports = document && document.documentElement;
 
 
 
 
 
10037
 
 
 
 
 
 
 
 
 
 
 
10038
 
10039
- /***/ }),
10040
- /* 128 */
10041
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10042
 
10043
- // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
10044
- var has = __webpack_require__(29);
10045
- var toObject = __webpack_require__(60);
10046
- var IE_PROTO = __webpack_require__(82)('IE_PROTO');
10047
- var ObjectProto = Object.prototype;
10048
-
10049
- module.exports = Object.getPrototypeOf || function (O) {
10050
- O = toObject(O);
10051
- if (has(O, IE_PROTO)) return O[IE_PROTO];
10052
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
10053
- return O.constructor.prototype;
10054
- } return O instanceof Object ? ObjectProto : null;
10055
- };
 
 
 
10056
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10057
 
10058
- /***/ }),
10059
- /* 129 */
10060
- /***/ (function(module, exports, __webpack_require__) {
10061
 
10062
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
10063
- var $keys = __webpack_require__(124);
10064
- var hiddenKeys = __webpack_require__(84).concat('length', 'prototype');
 
 
 
 
10065
 
10066
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
10067
- return $keys(O, hiddenKeys);
10068
- };
 
 
 
 
10069
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10070
 
10071
- /***/ }),
10072
- /* 130 */
10073
- /***/ (function(module, exports) {
 
 
 
10074
 
 
 
 
 
 
 
 
 
 
 
10075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10076
 
10077
- /***/ }),
10078
- /* 131 */
10079
- /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10080
 
10081
- var classof = __webpack_require__(89);
10082
- var ITERATOR = __webpack_require__(12)('iterator');
10083
- var Iterators = __webpack_require__(36);
10084
- module.exports = __webpack_require__(10).getIteratorMethod = function (it) {
10085
- if (it != undefined) return it[ITERATOR]
10086
- || it['@@iterator']
10087
- || Iterators[classof(it)];
10088
- };
10089
 
 
 
 
10090
 
10091
- /***/ }),
10092
- /* 132 */
10093
- /***/ (function(module, exports, __webpack_require__) {
 
10094
 
10095
- module.exports = { "default": __webpack_require__(240), __esModule: true };
 
 
 
 
 
 
 
 
 
 
10096
 
10097
- /***/ }),
10098
- /* 133 */
10099
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
10100
 
10101
- "use strict";
10102
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(8);
10103
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of__);
10104
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
10105
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
10106
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(3);
10107
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
10108
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
10109
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
10110
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(6);
10111
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
10112
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(1);
10113
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
 
 
 
 
 
 
10114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10115
 
 
 
 
 
 
 
 
 
 
 
 
 
10116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10117
 
 
 
 
 
 
 
 
 
 
 
 
10118
 
 
 
10119
 
10120
- var babelPluginFlowReactPropTypes_proptype_RenderedSection = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_RenderedSection || __webpack_require__(0).any;
 
 
 
10121
 
10122
- var babelPluginFlowReactPropTypes_proptype_ScrollIndices = __webpack_require__(260).babelPluginFlowReactPropTypes_proptype_ScrollIndices || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10124
 
 
 
 
 
 
 
10125
 
10126
- /**
10127
- * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.
10128
- */
 
 
 
10129
 
10130
- var ArrowKeyStepper = function (_React$PureComponent) {
10131
- __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(ArrowKeyStepper, _React$PureComponent);
10132
 
10133
- function ArrowKeyStepper(props) {
10134
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, ArrowKeyStepper);
 
 
 
 
10135
 
10136
- var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (ArrowKeyStepper.__proto__ || __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_get_prototype_of___default()(ArrowKeyStepper)).call(this, props));
 
10137
 
10138
- _this._columnStartIndex = 0;
10139
- _this._columnStopIndex = 0;
10140
- _this._rowStartIndex = 0;
10141
- _this._rowStopIndex = 0;
10142
 
10143
- _this._onKeyDown = function (event) {
10144
- var _this$props = _this.props,
10145
- columnCount = _this$props.columnCount,
10146
- disabled = _this$props.disabled,
10147
- mode = _this$props.mode,
10148
- rowCount = _this$props.rowCount;
 
 
 
10149
 
 
 
 
 
 
10150
 
10151
- if (disabled) {
10152
- return;
 
 
10153
  }
 
 
10154
 
10155
- var _this$_getScrollState = _this._getScrollState(),
10156
- scrollToColumnPrevious = _this$_getScrollState.scrollToColumn,
10157
- scrollToRowPrevious = _this$_getScrollState.scrollToRow;
10158
-
10159
- var _this$_getScrollState2 = _this._getScrollState(),
10160
- scrollToColumn = _this$_getScrollState2.scrollToColumn,
10161
- scrollToRow = _this$_getScrollState2.scrollToRow;
 
 
 
 
 
 
 
 
 
 
 
 
10162
 
10163
- // The above cases all prevent default event event behavior.
10164
- // This is to keep the grid from scrolling after the snap-to update.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10165
 
 
 
 
 
 
10166
 
10167
- switch (event.key) {
10168
- case 'ArrowDown':
10169
- scrollToRow = mode === 'cells' ? Math.min(scrollToRow + 1, rowCount - 1) : Math.min(_this._rowStopIndex + 1, rowCount - 1);
10170
- break;
10171
- case 'ArrowLeft':
10172
- scrollToColumn = mode === 'cells' ? Math.max(scrollToColumn - 1, 0) : Math.max(_this._columnStartIndex - 1, 0);
10173
- break;
10174
- case 'ArrowRight':
10175
- scrollToColumn = mode === 'cells' ? Math.min(scrollToColumn + 1, columnCount - 1) : Math.min(_this._columnStopIndex + 1, columnCount - 1);
10176
- break;
10177
- case 'ArrowUp':
10178
- scrollToRow = mode === 'cells' ? Math.max(scrollToRow - 1, 0) : Math.max(_this._rowStartIndex - 1, 0);
10179
  break;
 
 
10180
  }
 
 
 
10181
 
10182
- if (scrollToColumn !== scrollToColumnPrevious || scrollToRow !== scrollToRowPrevious) {
10183
- event.preventDefault();
10184
-
10185
- _this._updateScrollState({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });
 
 
 
10186
  }
10187
- };
10188
-
10189
- _this._onSectionRendered = function (_ref) {
10190
- var columnStartIndex = _ref.columnStartIndex,
10191
- columnStopIndex = _ref.columnStopIndex,
10192
- rowStartIndex = _ref.rowStartIndex,
10193
- rowStopIndex = _ref.rowStopIndex;
10194
 
10195
- _this._columnStartIndex = columnStartIndex;
10196
- _this._columnStopIndex = columnStopIndex;
10197
- _this._rowStartIndex = rowStartIndex;
10198
- _this._rowStopIndex = rowStopIndex;
10199
- };
 
 
 
 
 
10200
 
10201
- _this.state = {
10202
- scrollToColumn: props.scrollToColumn,
10203
- scrollToRow: props.scrollToRow
10204
- };
10205
- return _this;
10206
- }
 
 
 
 
10207
 
10208
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(ArrowKeyStepper, [{
10209
- key: 'componentWillReceiveProps',
10210
- value: function componentWillReceiveProps(nextProps) {
10211
- if (this.props.isControlled) {
10212
- return;
10213
- }
 
 
 
 
 
10214
 
10215
- var scrollToColumn = nextProps.scrollToColumn,
10216
- scrollToRow = nextProps.scrollToRow;
10217
- var _props = this.props,
10218
- prevScrollToColumn = _props.scrollToColumn,
10219
- prevScrollToRow = _props.scrollToRow;
 
 
 
 
 
10220
 
 
 
 
 
 
 
 
 
 
 
 
10221
 
10222
- if (prevScrollToColumn !== scrollToColumn && prevScrollToRow !== scrollToRow) {
10223
- this.setState({
10224
- scrollToColumn: scrollToColumn,
10225
- scrollToRow: scrollToRow
10226
- });
10227
- } else if (prevScrollToColumn !== scrollToColumn) {
10228
- this.setState({ scrollToColumn: scrollToColumn });
10229
- } else if (prevScrollToRow !== scrollToRow) {
10230
- this.setState({ scrollToRow: scrollToRow });
10231
  }
 
10232
  }
10233
- }, {
10234
- key: 'setScrollIndexes',
10235
- value: function setScrollIndexes(_ref2) {
10236
- var scrollToColumn = _ref2.scrollToColumn,
10237
- scrollToRow = _ref2.scrollToRow;
10238
 
10239
- this.setState({
10240
- scrollToRow: scrollToRow,
10241
- scrollToColumn: scrollToColumn
10242
- });
 
 
 
 
 
 
10243
  }
10244
- }, {
10245
- key: 'render',
10246
- value: function render() {
10247
- var _props2 = this.props,
10248
- className = _props2.className,
10249
- children = _props2.children;
10250
-
10251
- var _getScrollState2 = this._getScrollState(),
10252
- scrollToColumn = _getScrollState2.scrollToColumn,
10253
- scrollToRow = _getScrollState2.scrollToRow;
10254
 
10255
- return __WEBPACK_IMPORTED_MODULE_5_react__["createElement"](
10256
- 'div',
10257
- { className: className, onKeyDown: this._onKeyDown },
10258
- children({
10259
- onSectionRendered: this._onSectionRendered,
10260
- scrollToColumn: scrollToColumn,
10261
- scrollToRow: scrollToRow
10262
- })
10263
- );
10264
- }
10265
- }, {
10266
- key: '_getScrollState',
10267
- value: function _getScrollState() {
10268
- return this.props.isControlled ? this.props : this.state;
 
10269
  }
10270
- }, {
10271
- key: '_updateScrollState',
10272
- value: function _updateScrollState(_ref3) {
10273
- var scrollToColumn = _ref3.scrollToColumn,
10274
- scrollToRow = _ref3.scrollToRow;
10275
- var _props3 = this.props,
10276
- isControlled = _props3.isControlled,
10277
- onScrollToChange = _props3.onScrollToChange;
10278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10279
 
10280
- if (typeof onScrollToChange === 'function') {
10281
- onScrollToChange({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });
10282
- }
 
 
 
 
 
 
 
10283
 
10284
- if (!isControlled) {
10285
- this.setState({ scrollToColumn: scrollToColumn, scrollToRow: scrollToRow });
 
 
 
10286
  }
 
10287
  }
10288
- }]);
10289
-
10290
- return ArrowKeyStepper;
10291
- }(__WEBPACK_IMPORTED_MODULE_5_react__["PureComponent"]);
10292
 
10293
- ArrowKeyStepper.defaultProps = {
10294
- disabled: false,
10295
- isControlled: false,
10296
- mode: 'edges',
10297
- scrollToColumn: 0,
10298
- scrollToRow: 0
10299
- };
10300
- ArrowKeyStepper.propTypes = {
10301
- children: __webpack_require__(0).func.isRequired,
10302
- className: __webpack_require__(0).string,
10303
- columnCount: __webpack_require__(0).number.isRequired,
10304
- disabled: __webpack_require__(0).bool.isRequired,
10305
- isControlled: __webpack_require__(0).bool.isRequired,
10306
- mode: __webpack_require__(0).oneOf(['cells', 'edges']).isRequired,
10307
- onScrollToChange: __webpack_require__(0).func,
10308
- rowCount: __webpack_require__(0).number.isRequired,
10309
- scrollToColumn: __webpack_require__(0).number.isRequired,
10310
- scrollToRow: __webpack_require__(0).number.isRequired
10311
- };
10312
- /* harmony default export */ __webpack_exports__["a"] = (ArrowKeyStepper);
10313
 
10314
- /***/ }),
10315
- /* 134 */
10316
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
10317
 
10318
- "use strict";
10319
- /* unused harmony export DEFAULT_SCROLLING_RESET_TIME_INTERVAL */
10320
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(4);
10321
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
10322
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(8);
10323
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__);
10324
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
10325
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
10326
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(3);
10327
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
10328
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
10329
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
10330
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(6);
10331
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
10332
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1);
10333
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
10334
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames__ = __webpack_require__(21);
10335
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_classnames__);
10336
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_calculateSizeAndPositionDataAndUpdateScrollOffset__ = __webpack_require__(256);
10337
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(92);
10338
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_createCallbackMemoizer__ = __webpack_require__(93);
10339
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__ = __webpack_require__(135);
10340
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_updateScrollIndexHelper__ = __webpack_require__(257);
10341
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultCellRangeRenderer__ = __webpack_require__(136);
10342
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_dom_helpers_util_scrollbarSize__ = __webpack_require__(137);
10343
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_dom_helpers_util_scrollbarSize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_dom_helpers_util_scrollbarSize__);
10344
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_requestAnimationTimeout__ = __webpack_require__(48);
10345
 
 
 
 
 
 
 
 
 
 
 
10346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10348
 
 
 
 
 
 
 
 
 
10349
 
 
 
 
 
 
 
 
 
 
 
10350
 
 
 
 
 
 
 
 
 
 
 
 
 
10351
 
10352
- var babelPluginFlowReactPropTypes_proptype_Alignment = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_Alignment || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
10353
 
10354
- var babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter || __webpack_require__(0).any;
 
 
10355
 
10356
- var babelPluginFlowReactPropTypes_proptype_RenderedSection = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_RenderedSection || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
10357
 
10358
- var babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_ScrollbarPresenceChange || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
10359
 
10360
- var babelPluginFlowReactPropTypes_proptype_Scroll = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_Scroll || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
10361
 
10362
- var babelPluginFlowReactPropTypes_proptype_NoContentRenderer = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_NoContentRenderer || __webpack_require__(0).any;
 
 
10363
 
10364
- var babelPluginFlowReactPropTypes_proptype_CellSizeGetter = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellSizeGetter || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
10365
 
10366
- var babelPluginFlowReactPropTypes_proptype_CellSize = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellSize || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
10367
 
10368
- var babelPluginFlowReactPropTypes_proptype_CellPosition = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellPosition || __webpack_require__(0).any;
 
 
 
 
 
 
10369
 
10370
- var babelPluginFlowReactPropTypes_proptype_CellRangeRenderer = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellRangeRenderer || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
10371
 
10372
- var babelPluginFlowReactPropTypes_proptype_CellRenderer = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellRenderer || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10373
 
10374
- var babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId = __webpack_require__(48).babelPluginFlowReactPropTypes_proptype_AnimationTimeoutId || __webpack_require__(0).any;
 
 
10375
 
 
 
10376
 
 
 
 
 
10377
 
 
 
10378
 
 
 
 
10379
 
 
 
10380
 
 
 
10381
 
 
 
 
 
10382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10383
 
 
 
 
 
 
 
 
 
 
 
 
10384
 
 
 
 
 
 
 
 
 
 
 
 
10385
 
 
 
 
 
 
10386
 
10387
- /**
10388
- * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.
10389
- * This improves performance and makes scrolling smoother.
10390
- */
10391
- var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10392
 
10393
- /**
10394
- * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.
10395
- * This prevents Grid from interrupting mouse-wheel animations (see issue #2).
10396
- */
10397
- var SCROLL_POSITION_CHANGE_REASONS = {
10398
- OBSERVED: 'observed',
10399
- REQUESTED: 'requested'
10400
- };
 
 
 
 
 
 
 
 
 
 
 
 
10401
 
10402
- var renderNull = function renderNull() {
10403
- return null;
10404
- };
 
 
 
 
 
 
 
 
 
 
10405
 
10406
- /**
10407
- * Renders tabular data with virtualization along the vertical and horizontal axes.
10408
- * Row heights and column widths must be known ahead of time and specified as properties.
10409
- */
10410
- var Grid = function (_React$PureComponent) {
10411
- __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Grid, _React$PureComponent);
 
 
 
 
 
10412
 
10413
- // Invokes onSectionRendered callback only when start/stop row or column indices change
10414
- function Grid(props) {
10415
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Grid);
 
 
 
 
 
 
10416
 
10417
- var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Grid.__proto__ || __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default()(Grid)).call(this, props));
 
 
 
 
 
 
 
 
 
10418
 
10419
- _this.state = {
10420
- isScrolling: false,
10421
- scrollDirectionHorizontal: __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */],
10422
- scrollDirectionVertical: __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */],
10423
- scrollLeft: 0,
10424
- scrollTop: 0,
10425
- scrollPositionChangeReason: null
10426
- };
10427
- _this._onGridRenderedMemoizer = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createCallbackMemoizer__["a" /* default */])();
10428
- _this._onScrollMemoizer = Object(__WEBPACK_IMPORTED_MODULE_10__utils_createCallbackMemoizer__["a" /* default */])(false);
10429
- _this._deferredInvalidateColumnIndex = null;
10430
- _this._deferredInvalidateRowIndex = null;
10431
- _this._recomputeScrollLeftFlag = false;
10432
- _this._recomputeScrollTopFlag = false;
10433
- _this._horizontalScrollBarSize = 0;
10434
- _this._verticalScrollBarSize = 0;
10435
- _this._scrollbarPresenceChanged = false;
10436
- _this._cellCache = {};
10437
- _this._styleCache = {};
10438
- _this._scrollbarSizeMeasured = false;
10439
- _this._renderedColumnStartIndex = 0;
10440
- _this._renderedColumnStopIndex = 0;
10441
- _this._renderedRowStartIndex = 0;
10442
- _this._renderedRowStopIndex = 0;
10443
 
10444
- _this._debounceScrollEndedCallback = function () {
10445
- _this._disablePointerEventsTimeoutId = null;
10446
- _this._resetStyleCache();
10447
- };
 
 
 
 
 
 
10448
 
10449
- _this._invokeOnGridRenderedHelper = function () {
10450
- var onSectionRendered = _this.props.onSectionRendered;
10451
 
 
 
 
 
 
 
 
 
 
 
 
10452
 
10453
- _this._onGridRenderedMemoizer({
10454
- callback: onSectionRendered,
10455
- indices: {
10456
- columnOverscanStartIndex: _this._columnStartIndex,
10457
- columnOverscanStopIndex: _this._columnStopIndex,
10458
- columnStartIndex: _this._renderedColumnStartIndex,
10459
- columnStopIndex: _this._renderedColumnStopIndex,
10460
- rowOverscanStartIndex: _this._rowStartIndex,
10461
- rowOverscanStopIndex: _this._rowStopIndex,
10462
- rowStartIndex: _this._renderedRowStartIndex,
10463
- rowStopIndex: _this._renderedRowStopIndex
 
 
10464
  }
10465
- });
10466
- };
10467
-
10468
- _this._setScrollingContainerRef = function (ref) {
10469
- _this._scrollingContainer = ref;
10470
- };
10471
 
10472
- _this._onScroll = function (event) {
10473
- // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.
10474
- // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.
10475
- // See issue #404 for more information.
10476
- if (event.target === _this._scrollingContainer) {
10477
- _this.handleScrollEvent(event.target);
10478
- }
10479
- };
 
 
 
 
 
 
 
10480
 
10481
- _this._columnWidthGetter = _this._wrapSizeGetter(props.columnWidth);
10482
- _this._rowHeightGetter = _this._wrapSizeGetter(props.rowHeight);
 
10483
 
10484
- _this._columnSizeAndPositionManager = new __WEBPACK_IMPORTED_MODULE_9__utils_ScalingCellSizeAndPositionManager__["a" /* default */]({
10485
- cellCount: props.columnCount,
10486
- cellSizeGetter: function cellSizeGetter(params) {
10487
- return _this._columnWidthGetter(params);
10488
- },
10489
- estimatedCellSize: _this._getEstimatedColumnSize(props)
10490
- });
10491
- _this._rowSizeAndPositionManager = new __WEBPACK_IMPORTED_MODULE_9__utils_ScalingCellSizeAndPositionManager__["a" /* default */]({
10492
- cellCount: props.rowCount,
10493
- cellSizeGetter: function cellSizeGetter(params) {
10494
- return _this._rowHeightGetter(params);
10495
- },
10496
- estimatedCellSize: _this._getEstimatedRowSize(props)
10497
- });
10498
- return _this;
10499
- }
 
 
 
 
 
10500
 
10501
- /**
10502
- * Gets offsets for a given cell and alignment.
10503
- */
 
10504
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10505
 
10506
- // See defaultCellRangeRenderer() for more information on the usage of these caches
 
10507
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10508
 
10509
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Grid, [{
10510
- key: 'getOffsetForCell',
10511
- value: function getOffsetForCell() {
10512
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10513
- _ref$alignment = _ref.alignment,
10514
- alignment = _ref$alignment === undefined ? this.props.scrollToAlignment : _ref$alignment,
10515
- _ref$columnIndex = _ref.columnIndex,
10516
- columnIndex = _ref$columnIndex === undefined ? this.props.scrollToColumn : _ref$columnIndex,
10517
- _ref$rowIndex = _ref.rowIndex,
10518
- rowIndex = _ref$rowIndex === undefined ? this.props.scrollToRow : _ref$rowIndex;
10519
 
10520
- var offsetProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, {
10521
- scrollToAlignment: alignment,
10522
- scrollToColumn: columnIndex,
10523
- scrollToRow: rowIndex
10524
- });
 
 
 
 
 
 
 
 
 
 
 
10525
 
10526
- return {
10527
- scrollLeft: this._getCalculatedScrollLeft(offsetProps),
10528
- scrollTop: this._getCalculatedScrollTop(offsetProps)
 
 
 
 
 
 
 
10529
  };
10530
  }
10531
 
10532
  /**
10533
- * This method handles a scroll event originating from an external scroll control.
10534
- * It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.
 
 
 
 
10535
  */
 
 
 
10536
 
10537
- }, {
10538
- key: 'handleScrollEvent',
10539
- value: function handleScrollEvent(_ref2) {
10540
- var _ref2$scrollLeft = _ref2.scrollLeft,
10541
- scrollLeftParam = _ref2$scrollLeft === undefined ? 0 : _ref2$scrollLeft,
10542
- _ref2$scrollTop = _ref2.scrollTop,
10543
- scrollTopParam = _ref2$scrollTop === undefined ? 0 : _ref2$scrollTop;
 
 
 
 
 
 
 
10544
 
10545
- // On iOS, we can arrive at negative offsets by swiping past the start.
10546
- // To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.
10547
- if (scrollTopParam < 0) {
10548
- return;
10549
  }
 
 
10550
 
10551
- // Prevent pointer events from interrupting a smooth scroll
10552
- this._debounceScrollEnded();
 
 
 
 
 
 
 
 
 
 
 
 
 
10553
 
10554
- var _props = this.props,
10555
- autoHeight = _props.autoHeight,
10556
- autoWidth = _props.autoWidth,
10557
- height = _props.height,
10558
- width = _props.width;
 
 
 
 
 
 
10559
 
10560
- // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,
10561
- // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.
10562
- // This causes a series of rapid renders that is slow for long lists.
10563
- // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.
 
 
 
 
 
10564
 
10565
- var scrollbarSize = this._scrollbarSize;
10566
- var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize();
10567
- var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
10568
- var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);
10569
- var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam);
 
 
 
 
 
 
 
 
 
10570
 
10571
- // Certain devices (like Apple touchpad) rapid-fire duplicate events.
10572
- // Don't force a re-render if this is the case.
10573
- // The mouse may move faster then the animation frame does.
10574
- // Use requestAnimationFrame to avoid over-updating.
10575
- if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {
10576
- // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.
10577
- // Don't change direction for an axis unless scroll offset has changed.
10578
- var _scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */] : __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["a" /* SCROLL_DIRECTION_BACKWARD */] : this.state.scrollDirectionHorizontal;
10579
- var _scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */] : __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["a" /* SCROLL_DIRECTION_BACKWARD */] : this.state.scrollDirectionVertical;
 
 
 
10580
 
10581
- var newState = {
10582
- isScrolling: true,
10583
- scrollDirectionHorizontal: _scrollDirectionHorizontal,
10584
- scrollDirectionVertical: _scrollDirectionVertical,
10585
- scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED
10586
- };
10587
 
10588
- if (!autoHeight) {
10589
- newState.scrollTop = scrollTop;
 
 
 
 
 
10590
  }
 
 
 
10591
 
10592
- if (!autoWidth) {
10593
- newState.scrollLeft = scrollLeft;
10594
- }
 
 
 
 
 
 
 
 
 
10595
 
10596
- this.setState(newState);
 
 
 
 
 
 
10597
  }
 
 
 
10598
 
10599
- this._invokeOnScrollMemoizer({
10600
- scrollLeft: scrollLeft,
10601
- scrollTop: scrollTop,
10602
- totalColumnsWidth: totalColumnsWidth,
10603
- totalRowsHeight: totalRowsHeight
 
 
 
 
 
 
 
 
 
10604
  });
10605
- }
 
10606
 
10607
  /**
10608
- * Invalidate Grid size and recompute visible cells.
10609
- * This is a deferred wrapper for recomputeGridSize().
10610
- * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders.
10611
- * This method is intended for advanced use-cases like CellMeasurer.
 
10612
  */
10613
- // @TODO (bvaughn) Add automated test coverage for this.
 
 
 
 
 
 
10614
 
10615
- }, {
10616
- key: 'invalidateCellSizeAfterRender',
10617
- value: function invalidateCellSizeAfterRender(_ref3) {
10618
- var columnIndex = _ref3.columnIndex,
10619
- rowIndex = _ref3.rowIndex;
 
 
 
 
 
 
 
 
 
 
 
 
 
10620
 
10621
- this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;
10622
- this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10623
  }
10624
 
10625
  /**
10626
- * Pre-measure all columns and rows in a Grid.
10627
- * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.
10628
- * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one).
 
 
10629
  */
 
 
 
 
 
 
 
 
 
 
10630
 
10631
- }, {
10632
- key: 'measureAllCells',
10633
- value: function measureAllCells() {
10634
- var _props2 = this.props,
10635
- columnCount = _props2.columnCount,
10636
- rowCount = _props2.rowCount;
10637
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10638
 
10639
- this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);
10640
- this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);
 
 
10641
  }
10642
 
10643
  /**
10644
- * Forced recompute of row heights and column widths.
10645
- * This function should be called if dynamic column or row sizes have changed but nothing else has.
10646
- * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.
 
 
 
 
 
 
 
 
 
 
10647
  */
 
 
 
 
 
10648
 
10649
- }, {
10650
- key: 'recomputeGridSize',
10651
- value: function recomputeGridSize() {
10652
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10653
- _ref4$columnIndex = _ref4.columnIndex,
10654
- columnIndex = _ref4$columnIndex === undefined ? 0 : _ref4$columnIndex,
10655
- _ref4$rowIndex = _ref4.rowIndex,
10656
- rowIndex = _ref4$rowIndex === undefined ? 0 : _ref4$rowIndex;
10657
-
10658
- var _props3 = this.props,
10659
- scrollToColumn = _props3.scrollToColumn,
10660
- scrollToRow = _props3.scrollToRow;
10661
-
10662
-
10663
- this._columnSizeAndPositionManager.resetCell(columnIndex);
10664
- this._rowSizeAndPositionManager.resetCell(rowIndex);
10665
-
10666
- // Cell sizes may be determined by a function property.
10667
- // In this case the cDU handler can't know if they changed.
10668
- // Store this flag to let the next cDU pass know it needs to recompute the scroll offset.
10669
- this._recomputeScrollLeftFlag = scrollToColumn >= 0 && columnIndex <= scrollToColumn;
10670
- this._recomputeScrollTopFlag = scrollToRow >= 0 && rowIndex <= scrollToRow;
10671
-
10672
- // Clear cell cache in case we are scrolling;
10673
- // Invalid row heights likely mean invalid cached content as well.
10674
- this._cellCache = {};
10675
- this._styleCache = {};
10676
-
10677
- this.forceUpdate();
10678
  }
10679
 
10680
  /**
10681
- * Ensure column and row are visible.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10682
  */
10683
-
10684
- }, {
10685
- key: 'scrollToCell',
10686
- value: function scrollToCell(_ref5) {
10687
- var columnIndex = _ref5.columnIndex,
10688
- rowIndex = _ref5.rowIndex;
10689
- var columnCount = this.props.columnCount;
10690
-
10691
-
10692
- var props = this.props;
10693
-
10694
- // Don't adjust scroll offset for single-column grids (eg List, Table).
10695
- // This can cause a funky scroll offset because of the vertical scrollbar width.
10696
- if (columnCount > 1 && columnIndex !== undefined) {
10697
- this._updateScrollLeftForScrollToColumn(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {
10698
- scrollToColumn: columnIndex
10699
- }));
10700
  }
 
 
 
10701
 
10702
- if (rowIndex !== undefined) {
10703
- this._updateScrollTopForScrollToRow(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, props, {
10704
- scrollToRow: rowIndex
10705
- }));
10706
  }
 
10707
  }
10708
- }, {
10709
- key: 'componentDidMount',
10710
- value: function componentDidMount() {
10711
- var _props4 = this.props,
10712
- getScrollbarSize = _props4.getScrollbarSize,
10713
- height = _props4.height,
10714
- scrollLeft = _props4.scrollLeft,
10715
- scrollToColumn = _props4.scrollToColumn,
10716
- scrollTop = _props4.scrollTop,
10717
- scrollToRow = _props4.scrollToRow,
10718
- width = _props4.width;
10719
-
10720
- // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
10721
- // We must do this at the start of the method as we may calculate and update scroll position below.
10722
 
10723
- this._handleInvalidatedGridSize();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10724
 
10725
- // If this component was first rendered server-side, scrollbar size will be undefined.
10726
- // In that event we need to remeasure.
10727
- if (!this._scrollbarSizeMeasured) {
10728
- this._scrollbarSize = getScrollbarSize();
10729
- this._scrollbarSizeMeasured = true;
10730
- this.setState({});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10731
  }
 
 
 
 
10732
 
10733
- if (typeof scrollLeft === 'number' && scrollLeft >= 0 || typeof scrollTop === 'number' && scrollTop >= 0) {
10734
- this.scrollToPosition({ scrollLeft: scrollLeft, scrollTop: scrollTop });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10735
  }
 
 
 
 
10736
 
10737
- // Don't update scroll offset if the size is 0; we don't render any cells in this case.
10738
- // Setting a state may cause us to later thing we've updated the offce when we haven't.
10739
- var sizeIsBiggerThanZero = height > 0 && width > 0;
10740
- if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {
10741
- this._updateScrollLeftForScrollToColumn();
10742
- }
10743
- if (scrollToRow >= 0 && sizeIsBiggerThanZero) {
10744
- this._updateScrollTopForScrollToRow();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10745
  }
10746
-
10747
- // Update onRowsRendered callback
10748
- this._invokeOnGridRenderedHelper();
10749
-
10750
- // Initialize onScroll callback
10751
- this._invokeOnScrollMemoizer({
10752
- scrollLeft: scrollLeft || 0,
10753
- scrollTop: scrollTop || 0,
10754
- totalColumnsWidth: this._columnSizeAndPositionManager.getTotalSize(),
10755
- totalRowsHeight: this._rowSizeAndPositionManager.getTotalSize()
10756
- });
10757
-
10758
- this._maybeCallOnScrollbarPresenceChange();
10759
  }
10760
 
10761
  /**
10762
- * @private
10763
- * This method updates scrollLeft/scrollTop in state for the following conditions:
10764
- * 1) New scroll-to-cell props have been set
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10765
  */
10766
-
10767
- }, {
10768
- key: 'componentDidUpdate',
10769
- value: function componentDidUpdate(prevProps, prevState) {
10770
- var _this2 = this;
10771
-
10772
- var _props5 = this.props,
10773
- autoHeight = _props5.autoHeight,
10774
- autoWidth = _props5.autoWidth,
10775
- columnCount = _props5.columnCount,
10776
- height = _props5.height,
10777
- rowCount = _props5.rowCount,
10778
- scrollToAlignment = _props5.scrollToAlignment,
10779
- scrollToColumn = _props5.scrollToColumn,
10780
- scrollToRow = _props5.scrollToRow,
10781
- width = _props5.width;
10782
- var _state = this.state,
10783
- scrollLeft = _state.scrollLeft,
10784
- scrollPositionChangeReason = _state.scrollPositionChangeReason,
10785
- scrollTop = _state.scrollTop;
10786
-
10787
- // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.
10788
- // We must do this at the start of the method as we may calculate and update scroll position below.
10789
-
10790
- this._handleInvalidatedGridSize();
10791
-
10792
- // Handle edge case where column or row count has only just increased over 0.
10793
- // In this case we may have to restore a previously-specified scroll offset.
10794
- // For more info see bvaughn/react-virtualized/issues/218
10795
- var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0;
10796
-
10797
- // Make sure requested changes to :scrollLeft or :scrollTop get applied.
10798
- // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,
10799
- // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).
10800
- // So we only set these when we require an adjustment of the scroll position.
10801
- // See issue #2 for more information.
10802
- if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {
10803
- // @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).
10804
- // In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.
10805
- if (!autoWidth && scrollLeft >= 0 && (scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero)) {
10806
- this._scrollingContainer.scrollLeft = scrollLeft;
10807
- }
10808
- if (!autoHeight && scrollTop >= 0 && (scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {
10809
- this._scrollingContainer.scrollTop = scrollTop;
10810
- }
10811
  }
 
 
 
 
10812
 
10813
- // Special case where the previous size was 0:
10814
- // In this case we don't show any windowed cells at all.
10815
- // So we should always recalculate offset afterwards.
10816
- var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10817
 
10818
- // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it
10819
- // @TODO Do we also need this check or can the one in componentWillUpdate() suffice?
10820
- if (this._recomputeScrollLeftFlag) {
10821
- this._recomputeScrollLeftFlag = false;
10822
- this._updateScrollLeftForScrollToColumn(this.props);
10823
- } else {
10824
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_updateScrollIndexHelper__["a" /* default */])({
10825
- cellSizeAndPositionManager: this._columnSizeAndPositionManager,
10826
- previousCellsCount: prevProps.columnCount,
10827
- previousCellSize: prevProps.columnWidth,
10828
- previousScrollToAlignment: prevProps.scrollToAlignment,
10829
- previousScrollToIndex: prevProps.scrollToColumn,
10830
- previousSize: prevProps.width,
10831
- scrollOffset: scrollLeft,
10832
- scrollToAlignment: scrollToAlignment,
10833
- scrollToIndex: scrollToColumn,
10834
- size: width,
10835
- sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,
10836
- updateScrollIndexCallback: function updateScrollIndexCallback() {
10837
- return _this2._updateScrollLeftForScrollToColumn(_this2.props);
10838
- }
10839
- });
10840
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10841
 
10842
- if (this._recomputeScrollTopFlag) {
10843
- this._recomputeScrollTopFlag = false;
10844
- this._updateScrollTopForScrollToRow(this.props);
10845
- } else {
10846
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_updateScrollIndexHelper__["a" /* default */])({
10847
- cellSizeAndPositionManager: this._rowSizeAndPositionManager,
10848
- previousCellsCount: prevProps.rowCount,
10849
- previousCellSize: prevProps.rowHeight,
10850
- previousScrollToAlignment: prevProps.scrollToAlignment,
10851
- previousScrollToIndex: prevProps.scrollToRow,
10852
- previousSize: prevProps.height,
10853
- scrollOffset: scrollTop,
10854
- scrollToAlignment: scrollToAlignment,
10855
- scrollToIndex: scrollToRow,
10856
- size: height,
10857
- sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,
10858
- updateScrollIndexCallback: function updateScrollIndexCallback() {
10859
- return _this2._updateScrollTopForScrollToRow(_this2.props);
10860
- }
10861
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
10862
  }
10863
-
10864
- // Update onRowsRendered callback if start/stop indices have changed
10865
- this._invokeOnGridRenderedHelper();
10866
-
10867
- // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners
10868
- if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {
10869
- var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize();
10870
- var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
10871
-
10872
- this._invokeOnScrollMemoizer({
10873
- scrollLeft: scrollLeft,
10874
- scrollTop: scrollTop,
10875
- totalColumnsWidth: totalColumnsWidth,
10876
- totalRowsHeight: totalRowsHeight
10877
- });
10878
  }
10879
-
10880
- this._maybeCallOnScrollbarPresenceChange();
10881
  }
10882
- }, {
10883
- key: 'componentWillMount',
10884
- value: function componentWillMount() {
10885
- var getScrollbarSize = this.props.getScrollbarSize;
10886
-
10887
- // If this component is being rendered server-side, getScrollbarSize() will return undefined.
10888
- // We handle this case in componentDidMount()
10889
 
10890
- this._scrollbarSize = getScrollbarSize();
10891
- if (this._scrollbarSize === undefined) {
10892
- this._scrollbarSizeMeasured = false;
10893
- this._scrollbarSize = 0;
10894
- } else {
10895
- this._scrollbarSizeMeasured = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10896
  }
10897
-
10898
- this._calculateChildrenToRender();
10899
- }
10900
- }, {
10901
- key: 'componentWillUnmount',
10902
- value: function componentWillUnmount() {
10903
- if (this._disablePointerEventsTimeoutId) {
10904
- Object(__WEBPACK_IMPORTED_MODULE_15__utils_requestAnimationTimeout__["cancelAnimationTimeout"])(this._disablePointerEventsTimeoutId);
10905
  }
 
10906
  }
10907
 
10908
  /**
10909
- * @private
10910
- * This method updates scrollLeft/scrollTop in state for the following conditions:
10911
- * 1) Empty content (0 rows or columns)
10912
- * 2) New scroll props overriding the current state
10913
- * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10914
  */
10915
-
10916
- }, {
10917
- key: 'componentWillReceiveProps',
10918
- value: function componentWillReceiveProps(nextProps) {
10919
- var _this3 = this;
10920
-
10921
- var _state2 = this.state,
10922
- scrollLeft = _state2.scrollLeft,
10923
- scrollTop = _state2.scrollTop;
10924
-
10925
-
10926
- if (nextProps.columnCount === 0 && scrollLeft !== 0 || nextProps.rowCount === 0 && scrollTop !== 0) {
10927
- this.scrollToPosition({
10928
- scrollLeft: 0,
10929
- scrollTop: 0
10930
- });
10931
- } else if (nextProps.scrollLeft !== this.props.scrollLeft || nextProps.scrollTop !== this.props.scrollTop) {
10932
- var newState = {};
10933
-
10934
- if (nextProps.scrollLeft != null) {
10935
- newState.scrollLeft = nextProps.scrollLeft;
10936
- }
10937
- if (nextProps.scrollTop != null) {
10938
- newState.scrollTop = nextProps.scrollTop;
10939
- }
10940
-
10941
- this.scrollToPosition(newState);
10942
- }
10943
-
10944
- if (nextProps.columnWidth !== this.props.columnWidth || nextProps.rowHeight !== this.props.rowHeight) {
10945
- this._styleCache = {};
10946
- }
10947
-
10948
- this._columnWidthGetter = this._wrapSizeGetter(nextProps.columnWidth);
10949
- this._rowHeightGetter = this._wrapSizeGetter(nextProps.rowHeight);
10950
-
10951
- this._columnSizeAndPositionManager.configure({
10952
- cellCount: nextProps.columnCount,
10953
- estimatedCellSize: this._getEstimatedColumnSize(nextProps)
10954
- });
10955
- this._rowSizeAndPositionManager.configure({
10956
- cellCount: nextProps.rowCount,
10957
- estimatedCellSize: this._getEstimatedRowSize(nextProps)
10958
- });
10959
-
10960
- var _props6 = this.props,
10961
- columnCount = _props6.columnCount,
10962
- rowCount = _props6.rowCount;
10963
-
10964
- // Special case when either cols or rows were 0
10965
- // This would prevent any cells from rendering
10966
- // So we need to reset row scroll if cols changed from 0 (and vice versa)
10967
-
10968
- if (columnCount === 0 || rowCount === 0) {
10969
- columnCount = 0;
10970
- rowCount = 0;
10971
  }
10972
-
10973
- // If scrolling is controlled outside this component, clear cache when scrolling stops
10974
- if (nextProps.autoHeight && nextProps.isScrolling === false && this.props.isScrolling === true) {
10975
- this._resetStyleCache();
 
 
10976
  }
10977
-
10978
- // Update scroll offsets if the size or number of cells have changed, invalidating the previous value
10979
- Object(__WEBPACK_IMPORTED_MODULE_8__utils_calculateSizeAndPositionDataAndUpdateScrollOffset__["a" /* default */])({
10980
- cellCount: columnCount,
10981
- cellSize: typeof this.props.columnWidth === 'number' ? this.props.columnWidth : null,
10982
- computeMetadataCallback: function computeMetadataCallback() {
10983
- return _this3._columnSizeAndPositionManager.resetCell(0);
10984
- },
10985
- computeMetadataCallbackProps: nextProps,
10986
- nextCellsCount: nextProps.columnCount,
10987
- nextCellSize: typeof nextProps.columnWidth === 'number' ? nextProps.columnWidth : null,
10988
- nextScrollToIndex: nextProps.scrollToColumn,
10989
- scrollToIndex: this.props.scrollToColumn,
10990
- updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {
10991
- return _this3._updateScrollLeftForScrollToColumn(nextProps, _this3.state);
10992
- }
10993
- });
10994
- Object(__WEBPACK_IMPORTED_MODULE_8__utils_calculateSizeAndPositionDataAndUpdateScrollOffset__["a" /* default */])({
10995
- cellCount: rowCount,
10996
- cellSize: typeof this.props.rowHeight === 'number' ? this.props.rowHeight : null,
10997
- computeMetadataCallback: function computeMetadataCallback() {
10998
- return _this3._rowSizeAndPositionManager.resetCell(0);
10999
- },
11000
- computeMetadataCallbackProps: nextProps,
11001
- nextCellsCount: nextProps.rowCount,
11002
- nextCellSize: typeof nextProps.rowHeight === 'number' ? nextProps.rowHeight : null,
11003
- nextScrollToIndex: nextProps.scrollToRow,
11004
- scrollToIndex: this.props.scrollToRow,
11005
- updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {
11006
- return _this3._updateScrollTopForScrollToRow(nextProps, _this3.state);
11007
- }
11008
- });
11009
- }
11010
- }, {
11011
- key: 'componentWillUpdate',
11012
- value: function componentWillUpdate(nextProps, nextState) {
11013
- this._calculateChildrenToRender(nextProps, nextState);
11014
  }
11015
- }, {
11016
- key: 'render',
11017
- value: function render() {
11018
- var _props7 = this.props,
11019
- autoContainerWidth = _props7.autoContainerWidth,
11020
- autoHeight = _props7.autoHeight,
11021
- autoWidth = _props7.autoWidth,
11022
- className = _props7.className,
11023
- containerProps = _props7.containerProps,
11024
- containerRole = _props7.containerRole,
11025
- containerStyle = _props7.containerStyle,
11026
- height = _props7.height,
11027
- id = _props7.id,
11028
- noContentRenderer = _props7.noContentRenderer,
11029
- role = _props7.role,
11030
- style = _props7.style,
11031
- tabIndex = _props7.tabIndex,
11032
- width = _props7.width;
11033
-
11034
-
11035
- var isScrolling = this._isScrolling();
11036
-
11037
- var gridStyle = {
11038
- boxSizing: 'border-box',
11039
- direction: 'ltr',
11040
- height: autoHeight ? 'auto' : height,
11041
- position: 'relative',
11042
- width: autoWidth ? 'auto' : width,
11043
- WebkitOverflowScrolling: 'touch',
11044
- willChange: 'transform'
11045
- };
11046
 
11047
- var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
11048
- var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11049
 
11050
- // Force browser to hide scrollbars when we know they aren't necessary.
11051
- // Otherwise once scrollbars appear they may not disappear again.
11052
- // For more info see issue #116
11053
- var verticalScrollBarSize = totalRowsHeight > height ? this._scrollbarSize : 0;
11054
- var horizontalScrollBarSize = totalColumnsWidth > width ? this._scrollbarSize : 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
11055
 
11056
- if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {
11057
- this._horizontalScrollBarSize = horizontalScrollBarSize;
11058
- this._verticalScrollBarSize = verticalScrollBarSize;
11059
- this._scrollbarPresenceChanged = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11060
  }
11061
-
11062
- // Also explicitly init styles to 'auto' if scrollbars are required.
11063
- // This works around an obscure edge case where external CSS styles have not yet been loaded,
11064
- // But an initial scroll index of offset is set as an external prop.
11065
- // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.
11066
- // This was originally reported via clauderic/react-infinite-calendar/issues/23
11067
- gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';
11068
- gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';
11069
-
11070
- var childrenToDisplay = this._childrenToDisplay;
11071
-
11072
- var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;
11073
-
11074
- return __WEBPACK_IMPORTED_MODULE_6_react__["createElement"](
11075
- 'div',
11076
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
11077
- ref: this._setScrollingContainerRef
11078
- }, containerProps, {
11079
- 'aria-label': this.props['aria-label'],
11080
- 'aria-readonly': this.props['aria-readonly'],
11081
- className: __WEBPACK_IMPORTED_MODULE_7_classnames___default()('ReactVirtualized__Grid', className),
11082
- id: id,
11083
- onScroll: this._onScroll,
11084
- role: role,
11085
- style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, gridStyle, style),
11086
- tabIndex: tabIndex }),
11087
- childrenToDisplay.length > 0 && __WEBPACK_IMPORTED_MODULE_6_react__["createElement"](
11088
- 'div',
11089
- {
11090
- className: 'ReactVirtualized__Grid__innerScrollContainer',
11091
- role: containerRole,
11092
- style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
11093
- width: autoContainerWidth ? 'auto' : totalColumnsWidth,
11094
- height: totalRowsHeight,
11095
- maxWidth: totalColumnsWidth,
11096
- maxHeight: totalRowsHeight,
11097
- overflow: 'hidden',
11098
- pointerEvents: isScrolling ? 'none' : '',
11099
- position: 'relative'
11100
- }, containerStyle) },
11101
- childrenToDisplay
11102
- ),
11103
- showNoContentRenderer && noContentRenderer()
11104
- );
11105
  }
11106
 
11107
- /* ---------------------------- Helper methods ---------------------------- */
11108
-
11109
- }, {
11110
- key: '_calculateChildrenToRender',
11111
- value: function _calculateChildrenToRender() {
11112
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11113
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11114
- var cellRenderer = props.cellRenderer,
11115
- cellRangeRenderer = props.cellRangeRenderer,
11116
- columnCount = props.columnCount,
11117
- deferredMeasurementCache = props.deferredMeasurementCache,
11118
- height = props.height,
11119
- overscanColumnCount = props.overscanColumnCount,
11120
- overscanIndicesGetter = props.overscanIndicesGetter,
11121
- overscanRowCount = props.overscanRowCount,
11122
- rowCount = props.rowCount,
11123
- width = props.width;
11124
- var scrollDirectionHorizontal = state.scrollDirectionHorizontal,
11125
- scrollDirectionVertical = state.scrollDirectionVertical,
11126
- scrollLeft = state.scrollLeft,
11127
- scrollTop = state.scrollTop;
11128
-
11129
-
11130
- var isScrolling = this._isScrolling(props, state);
11131
-
11132
- this._childrenToDisplay = [];
11133
-
11134
- // Render only enough columns and rows to cover the visible area of the grid.
11135
- if (height > 0 && width > 0) {
11136
- var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange({
11137
- containerSize: width,
11138
- offset: scrollLeft
11139
- });
11140
- var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange({
11141
- containerSize: height,
11142
- offset: scrollTop
11143
- });
11144
-
11145
- var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment({
11146
- containerSize: width,
11147
- offset: scrollLeft
11148
- });
11149
- var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment({
11150
- containerSize: height,
11151
- offset: scrollTop
11152
- });
11153
-
11154
- // Store for _invokeOnGridRenderedHelper()
11155
- this._renderedColumnStartIndex = visibleColumnIndices.start;
11156
- this._renderedColumnStopIndex = visibleColumnIndices.stop;
11157
- this._renderedRowStartIndex = visibleRowIndices.start;
11158
- this._renderedRowStopIndex = visibleRowIndices.stop;
11159
-
11160
- var overscanColumnIndices = overscanIndicesGetter({
11161
- direction: 'horizontal',
11162
- cellCount: columnCount,
11163
- overscanCellsCount: overscanColumnCount,
11164
- scrollDirection: scrollDirectionHorizontal,
11165
- startIndex: typeof visibleColumnIndices.start === 'number' ? visibleColumnIndices.start : 0,
11166
- stopIndex: typeof visibleColumnIndices.stop === 'number' ? visibleColumnIndices.stop : -1
11167
- });
11168
-
11169
- var overscanRowIndices = overscanIndicesGetter({
11170
- direction: 'vertical',
11171
- cellCount: rowCount,
11172
- overscanCellsCount: overscanRowCount,
11173
- scrollDirection: scrollDirectionVertical,
11174
- startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,
11175
- stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1
11176
- });
11177
-
11178
- // Store for _invokeOnGridRenderedHelper()
11179
- this._columnStartIndex = overscanColumnIndices.overscanStartIndex;
11180
- this._columnStopIndex = overscanColumnIndices.overscanStopIndex;
11181
- this._rowStartIndex = overscanRowIndices.overscanStartIndex;
11182
- this._rowStopIndex = overscanRowIndices.overscanStopIndex;
11183
-
11184
- // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.
11185
- if (deferredMeasurementCache) {
11186
- // If rows have a dynamic height, scan the rows we are about to render.
11187
- // If any have not yet been measured, then we need to render all columns initially,
11188
- // Because the height of the row is equal to the tallest cell within that row,
11189
- // (And so we can't know the height without measuring all column-cells first).
11190
- if (!deferredMeasurementCache.hasFixedHeight()) {
11191
- for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {
11192
- if (!deferredMeasurementCache.has(rowIndex, 0)) {
11193
- this._columnStartIndex = 0;
11194
- this._columnStopIndex = columnCount - 1;
11195
- break;
11196
- }
11197
- }
11198
- }
11199
 
11200
- // If columns have a dynamic width, scan the columns we are about to render.
11201
- // If any have not yet been measured, then we need to render all rows initially,
11202
- // Because the width of the column is equal to the widest cell within that column,
11203
- // (And so we can't know the width without measuring all row-cells first).
11204
- if (!deferredMeasurementCache.hasFixedWidth()) {
11205
- for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
11206
- if (!deferredMeasurementCache.has(0, columnIndex)) {
11207
- this._rowStartIndex = 0;
11208
- this._rowStopIndex = rowCount - 1;
11209
- break;
11210
- }
11211
- }
11212
- }
11213
- }
11214
 
11215
- this._childrenToDisplay = cellRangeRenderer({
11216
- cellCache: this._cellCache,
11217
- cellRenderer: cellRenderer,
11218
- columnSizeAndPositionManager: this._columnSizeAndPositionManager,
11219
- columnStartIndex: this._columnStartIndex,
11220
- columnStopIndex: this._columnStopIndex,
11221
- deferredMeasurementCache: deferredMeasurementCache,
11222
- horizontalOffsetAdjustment: horizontalOffsetAdjustment,
11223
- isScrolling: isScrolling,
11224
- parent: this,
11225
- rowSizeAndPositionManager: this._rowSizeAndPositionManager,
11226
- rowStartIndex: this._rowStartIndex,
11227
- rowStopIndex: this._rowStopIndex,
11228
- scrollLeft: scrollLeft,
11229
- scrollTop: scrollTop,
11230
- styleCache: this._styleCache,
11231
- verticalOffsetAdjustment: verticalOffsetAdjustment,
11232
- visibleColumnIndices: visibleColumnIndices,
11233
- visibleRowIndices: visibleRowIndices
11234
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11235
  }
 
 
 
 
 
11236
  }
11237
 
11238
  /**
11239
- * Sets an :isScrolling flag for a small window of time.
11240
- * This flag is used to disable pointer events on the scrollable portion of the Grid.
11241
- * This prevents jerky/stuttery mouse-wheel scrolling.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11242
  */
 
 
 
 
 
 
11243
 
11244
- }, {
11245
- key: '_debounceScrollEnded',
11246
- value: function _debounceScrollEnded() {
11247
- var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11248
 
 
 
 
 
 
 
 
 
 
11249
 
11250
- if (this._disablePointerEventsTimeoutId) {
11251
- Object(__WEBPACK_IMPORTED_MODULE_15__utils_requestAnimationTimeout__["cancelAnimationTimeout"])(this._disablePointerEventsTimeoutId);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11252
  }
 
 
 
 
11253
 
11254
- this._disablePointerEventsTimeoutId = Object(__WEBPACK_IMPORTED_MODULE_15__utils_requestAnimationTimeout__["requestAnimationTimeout"])(this._debounceScrollEndedCallback, scrollingResetTimeInterval);
11255
- }
11256
- }, {
11257
- key: '_getEstimatedColumnSize',
11258
- value: function _getEstimatedColumnSize(props) {
11259
- return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;
11260
- }
11261
- }, {
11262
- key: '_getEstimatedRowSize',
11263
- value: function _getEstimatedRowSize(props) {
11264
- return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;
 
 
 
 
 
 
11265
  }
11266
 
11267
  /**
11268
- * Check for batched CellMeasurer size invalidations.
11269
- * This will occur the first time one or more previously unmeasured cells are rendered.
 
 
 
 
 
 
 
 
 
 
11270
  */
 
 
 
 
11271
 
11272
- }, {
11273
- key: '_handleInvalidatedGridSize',
11274
- value: function _handleInvalidatedGridSize() {
11275
- if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {
11276
- var columnIndex = this._deferredInvalidateColumnIndex;
11277
- var rowIndex = this._deferredInvalidateRowIndex;
11278
-
11279
- this._deferredInvalidateColumnIndex = null;
11280
- this._deferredInvalidateRowIndex = null;
11281
-
11282
- this.recomputeGridSize({ columnIndex: columnIndex, rowIndex: rowIndex });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11283
  }
 
 
 
11284
  }
11285
- }, {
11286
- key: '_invokeOnScrollMemoizer',
11287
- value: function _invokeOnScrollMemoizer(_ref6) {
11288
- var _this4 = this;
11289
 
11290
- var scrollLeft = _ref6.scrollLeft,
11291
- scrollTop = _ref6.scrollTop,
11292
- totalColumnsWidth = _ref6.totalColumnsWidth,
11293
- totalRowsHeight = _ref6.totalRowsHeight;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11294
 
11295
- this._onScrollMemoizer({
11296
- callback: function callback(_ref7) {
11297
- var scrollLeft = _ref7.scrollLeft,
11298
- scrollTop = _ref7.scrollTop;
11299
- var _props8 = _this4.props,
11300
- height = _props8.height,
11301
- onScroll = _props8.onScroll,
11302
- width = _props8.width;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11304
 
11305
- onScroll({
11306
- clientHeight: height,
11307
- clientWidth: width,
11308
- scrollHeight: totalRowsHeight,
11309
- scrollLeft: scrollLeft,
11310
- scrollTop: scrollTop,
11311
- scrollWidth: totalColumnsWidth
11312
- });
11313
- },
11314
- indices: {
11315
- scrollLeft: scrollLeft,
11316
- scrollTop: scrollTop
11317
- }
11318
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
11319
  }
11320
- }, {
11321
- key: '_isScrolling',
11322
- value: function _isScrolling() {
11323
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11324
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11325
 
11326
- // If isScrolling is defined in props, use it to override the value in state
11327
- // This is a performance optimization for WindowScroller + Grid
11328
- return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11329
  }
11330
- }, {
11331
- key: '_maybeCallOnScrollbarPresenceChange',
11332
- value: function _maybeCallOnScrollbarPresenceChange() {
11333
- if (this._scrollbarPresenceChanged) {
11334
- var _onScrollbarPresenceChange = this.props.onScrollbarPresenceChange;
11335
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11336
 
11337
- this._scrollbarPresenceChanged = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11338
 
11339
- _onScrollbarPresenceChange({
11340
- horizontal: this._horizontalScrollBarSize > 0,
11341
- size: this._scrollbarSize,
11342
- vertical: this._verticalScrollBarSize > 0
11343
- });
 
 
11344
  }
 
 
11345
  }
11346
- }, {
11347
- key: 'scrollToPosition',
11348
-
11349
 
11350
  /**
11351
- * Scroll to the specified offset(s).
11352
- * Useful for animating position changes.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11353
  */
11354
- value: function scrollToPosition(_ref8) {
11355
- var scrollLeft = _ref8.scrollLeft,
11356
- scrollTop = _ref8.scrollTop;
11357
-
11358
- var newState = {
11359
- scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED
11360
- };
11361
-
11362
- if (typeof scrollLeft === 'number' && scrollLeft >= 0) {
11363
- newState.scrollDirectionHorizontal = scrollLeft > this.state.scrollLeft ? __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */] : __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["a" /* SCROLL_DIRECTION_BACKWARD */];
11364
- newState.scrollLeft = scrollLeft;
11365
- }
11366
 
11367
- if (typeof scrollTop === 'number' && scrollTop >= 0) {
11368
- newState.scrollDirectionVertical = scrollTop > this.state.scrollTop ? __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["b" /* SCROLL_DIRECTION_FORWARD */] : __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["a" /* SCROLL_DIRECTION_BACKWARD */];
11369
- newState.scrollTop = scrollTop;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11370
  }
11371
-
11372
- if (typeof scrollLeft === 'number' && scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || typeof scrollTop === 'number' && scrollTop >= 0 && scrollTop !== this.state.scrollTop) {
11373
- this.setState(newState);
11374
  }
11375
- }
11376
- }, {
11377
- key: '_wrapSizeGetter',
11378
- value: function _wrapSizeGetter(value) {
11379
- return typeof value === 'function' ? value : function () {
11380
- return value;
11381
- };
11382
- }
11383
- }, {
11384
- key: '_getCalculatedScrollLeft',
11385
- value: function _getCalculatedScrollLeft() {
11386
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11387
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11388
- var columnCount = props.columnCount,
11389
- height = props.height,
11390
- scrollToAlignment = props.scrollToAlignment,
11391
- scrollToColumn = props.scrollToColumn,
11392
- width = props.width;
11393
- var scrollLeft = state.scrollLeft;
11394
-
11395
-
11396
- if (columnCount > 0) {
11397
- var finalColumn = columnCount - 1;
11398
- var targetIndex = scrollToColumn < 0 ? finalColumn : Math.min(finalColumn, scrollToColumn);
11399
- var totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize();
11400
- var scrollBarSize = totalRowsHeight > height ? this._scrollbarSize : 0;
11401
-
11402
- return this._columnSizeAndPositionManager.getUpdatedOffsetForIndex({
11403
- align: scrollToAlignment,
11404
- containerSize: width - scrollBarSize,
11405
- currentOffset: scrollLeft,
11406
- targetIndex: targetIndex
11407
- });
11408
  }
 
11409
  }
11410
- }, {
11411
- key: '_updateScrollLeftForScrollToColumn',
11412
- value: function _updateScrollLeftForScrollToColumn() {
11413
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11414
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11415
- var scrollLeft = state.scrollLeft;
11416
-
11417
- var calculatedScrollLeft = this._getCalculatedScrollLeft(props, state);
11418
 
11419
- if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {
11420
- this.scrollToPosition({
11421
- scrollLeft: calculatedScrollLeft,
11422
- scrollTop: -1
11423
- });
11424
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
11425
  }
11426
- }, {
11427
- key: '_getCalculatedScrollTop',
11428
- value: function _getCalculatedScrollTop() {
11429
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11430
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11431
- var height = props.height,
11432
- rowCount = props.rowCount,
11433
- scrollToAlignment = props.scrollToAlignment,
11434
- scrollToRow = props.scrollToRow,
11435
- width = props.width;
11436
- var scrollTop = state.scrollTop;
11437
-
11438
-
11439
- if (rowCount > 0) {
11440
- var finalRow = rowCount - 1;
11441
- var targetIndex = scrollToRow < 0 ? finalRow : Math.min(finalRow, scrollToRow);
11442
- var totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
11443
- var scrollBarSize = totalColumnsWidth > width ? this._scrollbarSize : 0;
11444
 
11445
- return this._rowSizeAndPositionManager.getUpdatedOffsetForIndex({
11446
- align: scrollToAlignment,
11447
- containerSize: height - scrollBarSize,
11448
- currentOffset: scrollTop,
11449
- targetIndex: targetIndex
11450
- });
11451
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11452
  }
11453
- }, {
11454
- key: '_resetStyleCache',
11455
- value: function _resetStyleCache() {
11456
- var styleCache = this._styleCache;
11457
-
11458
- // Reset cell and style caches once scrolling stops.
11459
- // This makes Grid simpler to use (since cells commonly change).
11460
- // And it keeps the caches from growing too large.
11461
- // Performance is most sensitive when a user is scrolling.
11462
- this._cellCache = {};
11463
- this._styleCache = {};
11464
 
11465
- // Copy over the visible cell styles so avoid unnecessary re-render.
11466
- for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {
11467
- for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {
11468
- var key = rowIndex + '-' + columnIndex;
11469
- this._styleCache[key] = styleCache[key];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11470
  }
11471
  }
11472
-
11473
- this.setState({
11474
- isScrolling: false
11475
- });
11476
  }
11477
- }, {
11478
- key: '_updateScrollTopForScrollToRow',
11479
- value: function _updateScrollTopForScrollToRow() {
11480
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
11481
- var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;
11482
- var scrollTop = state.scrollTop;
11483
-
11484
- var calculatedScrollTop = this._getCalculatedScrollTop(props, state);
11485
 
11486
- if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {
11487
- this.scrollToPosition({
11488
- scrollLeft: -1,
11489
- scrollTop: calculatedScrollTop
11490
- });
11491
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11492
  }
11493
- }]);
11494
-
11495
- return Grid;
11496
- }(__WEBPACK_IMPORTED_MODULE_6_react__["PureComponent"]);
11497
-
11498
- Grid.defaultProps = {
11499
- 'aria-label': 'grid',
11500
- 'aria-readonly': true,
11501
- autoContainerWidth: false,
11502
- autoHeight: false,
11503
- autoWidth: false,
11504
- cellRangeRenderer: __WEBPACK_IMPORTED_MODULE_13__defaultCellRangeRenderer__["a" /* default */],
11505
- containerRole: 'rowgroup',
11506
- containerStyle: {},
11507
- estimatedColumnSize: 100,
11508
- estimatedRowSize: 30,
11509
- getScrollbarSize: __WEBPACK_IMPORTED_MODULE_14_dom_helpers_util_scrollbarSize___default.a,
11510
- noContentRenderer: renderNull,
11511
- onScroll: function onScroll() {},
11512
- onScrollbarPresenceChange: function onScrollbarPresenceChange() {},
11513
- onSectionRendered: function onSectionRendered() {},
11514
- overscanColumnCount: 0,
11515
- overscanIndicesGetter: __WEBPACK_IMPORTED_MODULE_11__defaultOverscanIndicesGetter__["c" /* default */],
11516
- overscanRowCount: 10,
11517
- role: 'grid',
11518
- scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,
11519
- scrollToAlignment: 'auto',
11520
- scrollToColumn: -1,
11521
- scrollToRow: -1,
11522
- style: {},
11523
- tabIndex: 0
11524
- };
11525
- Grid.propTypes = {
11526
- "aria-label": __webpack_require__(0).string.isRequired,
11527
- "aria-readonly": __webpack_require__(0).bool,
11528
-
11529
-
11530
- /**
11531
- * Set the width of the inner scrollable container to 'auto'.
11532
- * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar.
11533
- */
11534
- autoContainerWidth: __webpack_require__(0).bool.isRequired,
11535
-
11536
-
11537
- /**
11538
- * Removes fixed height from the scrollingContainer so that the total height of rows can stretch the window.
11539
- * Intended for use with WindowScroller
11540
- */
11541
- autoHeight: __webpack_require__(0).bool.isRequired,
11542
-
11543
-
11544
- /**
11545
- * Removes fixed width from the scrollingContainer so that the total width of rows can stretch the window.
11546
- * Intended for use with WindowScroller
11547
- */
11548
- autoWidth: __webpack_require__(0).bool.isRequired,
11549
-
11550
-
11551
- /** Responsible for rendering a cell given an row and column index. */
11552
- cellRenderer: typeof babelPluginFlowReactPropTypes_proptype_CellRenderer === 'function' ? babelPluginFlowReactPropTypes_proptype_CellRenderer.isRequired ? babelPluginFlowReactPropTypes_proptype_CellRenderer.isRequired : babelPluginFlowReactPropTypes_proptype_CellRenderer : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_CellRenderer).isRequired,
11553
-
11554
-
11555
- /** Responsible for rendering a group of cells given their index ranges. */
11556
- cellRangeRenderer: typeof babelPluginFlowReactPropTypes_proptype_CellRangeRenderer === 'function' ? babelPluginFlowReactPropTypes_proptype_CellRangeRenderer.isRequired ? babelPluginFlowReactPropTypes_proptype_CellRangeRenderer.isRequired : babelPluginFlowReactPropTypes_proptype_CellRangeRenderer : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_CellRangeRenderer).isRequired,
11557
-
11558
-
11559
- /** Optional custom CSS class name to attach to root Grid element. */
11560
- className: __webpack_require__(0).string,
11561
-
11562
-
11563
- /** Number of columns in grid. */
11564
- columnCount: __webpack_require__(0).number.isRequired,
11565
-
11566
-
11567
- /** Either a fixed column width (number) or a function that returns the width of a column given its index. */
11568
- columnWidth: typeof babelPluginFlowReactPropTypes_proptype_CellSize === 'function' ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired : babelPluginFlowReactPropTypes_proptype_CellSize : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_CellSize).isRequired,
11569
-
11570
-
11571
- /** Unfiltered props for the Grid container. */
11572
- containerProps: __webpack_require__(0).object,
11573
-
11574
-
11575
- /** ARIA role for the cell-container. */
11576
- containerRole: __webpack_require__(0).string.isRequired,
11577
-
11578
-
11579
- /** Optional inline style applied to inner cell-container */
11580
- containerStyle: __webpack_require__(0).object.isRequired,
11581
-
11582
 
11583
- /**
11584
- * If CellMeasurer is used to measure this Grid's children, this should be a pointer to its CellMeasurerCache.
11585
- * A shared CellMeasurerCache reference enables Grid and CellMeasurer to share measurement data.
11586
- */
11587
- deferredMeasurementCache: __webpack_require__(0).object,
11588
-
11589
-
11590
- /**
11591
- * Used to estimate the total width of a Grid before all of its columns have actually been measured.
11592
- * The estimated total width is adjusted as columns are rendered.
11593
- */
11594
- estimatedColumnSize: __webpack_require__(0).number.isRequired,
11595
-
11596
-
11597
- /**
11598
- * Used to estimate the total height of a Grid before all of its rows have actually been measured.
11599
- * The estimated total height is adjusted as rows are rendered.
11600
- */
11601
- estimatedRowSize: __webpack_require__(0).number.isRequired,
11602
-
11603
-
11604
- /** Exposed for testing purposes only. */
11605
- getScrollbarSize: __webpack_require__(0).func.isRequired,
11606
-
11607
-
11608
- /** Height of Grid; this property determines the number of visible (vs virtualized) rows. */
11609
- height: __webpack_require__(0).number.isRequired,
11610
-
11611
-
11612
- /** Optional custom id to attach to root Grid element. */
11613
- id: __webpack_require__(0).string,
11614
-
11615
-
11616
- /**
11617
- * Override internal is-scrolling state tracking.
11618
- * This property is primarily intended for use with the WindowScroller component.
11619
- */
11620
- isScrolling: __webpack_require__(0).bool,
11621
-
11622
-
11623
- /** Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. */
11624
- noContentRenderer: typeof babelPluginFlowReactPropTypes_proptype_NoContentRenderer === 'function' ? babelPluginFlowReactPropTypes_proptype_NoContentRenderer.isRequired ? babelPluginFlowReactPropTypes_proptype_NoContentRenderer.isRequired : babelPluginFlowReactPropTypes_proptype_NoContentRenderer : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_NoContentRenderer).isRequired,
11625
-
11626
-
11627
- /**
11628
- * Callback invoked whenever the scroll offset changes within the inner scrollable region.
11629
- * This callback can be used to sync scrolling between lists, tables, or grids.
11630
- */
11631
- onScroll: __webpack_require__(0).func.isRequired,
11632
-
11633
-
11634
- /**
11635
- * Called whenever a horizontal or vertical scrollbar is added or removed.
11636
- * This prop is not intended for end-user use;
11637
- * It is used by MultiGrid to support fixed-row/fixed-column scroll syncing.
11638
- */
11639
- onScrollbarPresenceChange: __webpack_require__(0).func.isRequired,
11640
-
11641
-
11642
- /** Callback invoked with information about the section of the Grid that was just rendered. */
11643
- onSectionRendered: __webpack_require__(0).func.isRequired,
11644
-
11645
-
11646
- /**
11647
- * Number of columns to render before/after the visible section of the grid.
11648
- * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.
11649
- */
11650
- overscanColumnCount: __webpack_require__(0).number.isRequired,
11651
-
11652
-
11653
- /**
11654
- * Calculates the number of cells to overscan before and after a specified range.
11655
- * This function ensures that overscanning doesn't exceed the available cells.
11656
- */
11657
- overscanIndicesGetter: typeof babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter === 'function' ? babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter.isRequired ? babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter.isRequired : babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter).isRequired,
11658
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11659
 
11660
- /**
11661
- * Number of rows to render above/below the visible section of the grid.
11662
- * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.
11663
- */
11664
- overscanRowCount: __webpack_require__(0).number.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11666
 
11667
- /** ARIA role for the grid element. */
11668
- role: __webpack_require__(0).string.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11669
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11670
 
11671
- /**
11672
- * Either a fixed row height (number) or a function that returns the height of a row given its index.
11673
- * Should implement the following interface: ({ index: number }): number
11674
- */
11675
- rowHeight: typeof babelPluginFlowReactPropTypes_proptype_CellSize === 'function' ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired : babelPluginFlowReactPropTypes_proptype_CellSize : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_CellSize).isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11676
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11677
 
11678
- /** Number of rows in grid. */
11679
- rowCount: __webpack_require__(0).number.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11680
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11681
 
11682
- /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */
11683
- scrollingResetTimeInterval: __webpack_require__(0).number.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11684
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11685
 
11686
- /** Horizontal offset. */
11687
- scrollLeft: __webpack_require__(0).number,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11688
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11689
 
11690
- /**
11691
- * Controls scroll-to-cell behavior of the Grid.
11692
- * The default ("auto") scrolls the least amount possible to ensure that the specified cell is fully visible.
11693
- * Use "start" to align cells to the top/left of the Grid and "end" to align bottom/right.
11694
- */
11695
- scrollToAlignment: typeof babelPluginFlowReactPropTypes_proptype_Alignment === 'function' ? babelPluginFlowReactPropTypes_proptype_Alignment.isRequired ? babelPluginFlowReactPropTypes_proptype_Alignment.isRequired : babelPluginFlowReactPropTypes_proptype_Alignment : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_Alignment).isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11696
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11697
 
11698
- /** Column index to ensure visible (by forcefully scrolling if necessary) */
11699
- scrollToColumn: __webpack_require__(0).number.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11700
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11701
 
11702
- /** Vertical offset. */
11703
- scrollTop: __webpack_require__(0).number,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11704
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11705
 
11706
- /** Row index to ensure visible (by forcefully scrolling if necessary) */
11707
- scrollToRow: __webpack_require__(0).number.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11708
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11709
 
11710
- /** Optional inline style */
11711
- style: __webpack_require__(0).object.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11712
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11713
 
11714
- /** Tab index for focus */
11715
- tabIndex: __webpack_require__(0).number,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11716
 
 
 
 
11717
 
11718
- /** Width of Grid; this property determines the number of visible (vs virtualized) columns. */
11719
- width: __webpack_require__(0).number.isRequired
11720
- };
11721
- /* harmony default export */ __webpack_exports__["a"] = (Grid);
11722
 
11723
- /***/ }),
11724
- /* 135 */
11725
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11726
 
11727
- "use strict";
11728
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SCROLL_DIRECTION_BACKWARD; });
11729
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SCROLL_DIRECTION_FORWARD; });
11730
- /* unused harmony export SCROLL_DIRECTION_HORIZONTAL */
11731
- /* unused harmony export SCROLL_DIRECTION_VERTICAL */
11732
- /* harmony export (immutable) */ __webpack_exports__["c"] = defaultOverscanIndicesGetter;
11733
- var babelPluginFlowReactPropTypes_proptype_OverscanIndices = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_OverscanIndices || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11734
 
11735
- var babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetterParams || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11736
 
11737
- var SCROLL_DIRECTION_BACKWARD = -1;
11738
- var SCROLL_DIRECTION_FORWARD = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11739
 
11740
- var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';
11741
- var SCROLL_DIRECTION_VERTICAL = 'vertical';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11742
 
11743
- /**
11744
- * Calculates the number of cells to overscan before and after a specified range.
11745
- * This function ensures that overscanning doesn't exceed the available cells.
11746
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11747
 
11748
- function defaultOverscanIndicesGetter(_ref) {
11749
- var cellCount = _ref.cellCount,
11750
- overscanCellsCount = _ref.overscanCellsCount,
11751
- scrollDirection = _ref.scrollDirection,
11752
- startIndex = _ref.startIndex,
11753
- stopIndex = _ref.stopIndex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11754
 
11755
- if (scrollDirection === SCROLL_DIRECTION_FORWARD) {
11756
- return {
11757
- overscanStartIndex: Math.max(0, startIndex),
11758
- overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)
11759
- };
11760
- } else {
11761
- return {
11762
- overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),
11763
- overscanStopIndex: Math.min(cellCount - 1, stopIndex)
11764
- };
11765
- }
11766
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11767
 
11768
- /***/ }),
11769
- /* 136 */
11770
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
11771
 
11772
- "use strict";
11773
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = defaultCellRangeRenderer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11775
 
11776
- /**
11777
- * Default implementation of cellRangeRenderer used by Grid.
11778
- * This renderer supports cell-caching while the user is scrolling.
11779
- */
 
 
 
 
 
 
 
 
 
 
 
11780
 
11781
- var babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams = __webpack_require__(9).babelPluginFlowReactPropTypes_proptype_CellRangeRendererParams || __webpack_require__(0).any;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11782
 
11783
- function defaultCellRangeRenderer(_ref) {
11784
- var cellCache = _ref.cellCache,
11785
- cellRenderer = _ref.cellRenderer,
11786
- columnSizeAndPositionManager = _ref.columnSizeAndPositionManager,
11787
- columnStartIndex = _ref.columnStartIndex,
11788
- columnStopIndex = _ref.columnStopIndex,
11789
- deferredMeasurementCache = _ref.deferredMeasurementCache,
11790
- horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment,
11791
- isScrolling = _ref.isScrolling,
11792
- parent = _ref.parent,
11793
- rowSizeAndPositionManager = _ref.rowSizeAndPositionManager,
11794
- rowStartIndex = _ref.rowStartIndex,
11795
- rowStopIndex = _ref.rowStopIndex,
11796
- styleCache = _ref.styleCache,
11797
- verticalOffsetAdjustment = _ref.verticalOffsetAdjustment,
11798
- visibleColumnIndices = _ref.visibleColumnIndices,
11799
- visibleRowIndices = _ref.visibleRowIndices;
11800
 
11801
- var renderedCells = [];
11802
 
11803
- // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).
11804
- // User cannot scroll beyond these size limitations.
11805
- // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.
11806
- // We should never cache styles for compressed offsets though as this can lead to bugs.
11807
- // See issue #576 for more.
11808
- var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11809
 
11810
- var canCacheStyle = !isScrolling && !areOffsetsAdjusted;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11811
 
11812
- for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
11813
- var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11814
 
11815
- for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
11816
- var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);
11817
- var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;
11818
- var key = rowIndex + '-' + columnIndex;
11819
- var style = void 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11820
 
11821
- // Cache style objects so shallow-compare doesn't re-render unnecessarily.
11822
- if (canCacheStyle && styleCache[key]) {
11823
- style = styleCache[key];
11824
- } else {
11825
- // In deferred mode, cells will be initially rendered before we know their size.
11826
- // Don't interfere with CellMeasurer's measurements by setting an invalid size.
11827
- if (deferredMeasurementCache && !deferredMeasurementCache.has(rowIndex, columnIndex)) {
11828
- // Position not-yet-measured cells at top/left 0,0,
11829
- // And give them width/height of 'auto' so they can grow larger than the parent Grid if necessary.
11830
- // Positioning them further to the right/bottom influences their measured size.
11831
- style = {
11832
- height: 'auto',
11833
- left: 0,
11834
- position: 'absolute',
11835
- top: 0,
11836
- width: 'auto'
11837
- };
11838
- } else {
11839
- style = {
11840
- height: rowDatum.size,
11841
- left: columnDatum.offset + horizontalOffsetAdjustment,
11842
- position: 'absolute',
11843
- top: rowDatum.offset + verticalOffsetAdjustment,
11844
- width: columnDatum.size
11845
- };
11846
 
11847
- styleCache[key] = style;
11848
- }
11849
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11850
 
11851
- var cellRendererParams = {
11852
- columnIndex: columnIndex,
11853
- isScrolling: isScrolling,
11854
- isVisible: isVisible,
11855
- key: key,
11856
- parent: parent,
11857
- rowIndex: rowIndex,
11858
- style: style
11859
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11860
 
11861
- var renderedCell = void 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11862
 
11863
- // Avoid re-creating cells while scrolling.
11864
- // This can lead to the same cell being created many times and can cause performance issues for "heavy" cells.
11865
- // If a scroll is in progress- cache and reuse cells.
11866
- // This cache will be thrown away once scrolling completes.
11867
- // However if we are scaling scroll positions and sizes, we should also avoid caching.
11868
- // This is because the offset changes slightly as scroll position changes and caching leads to stale values.
11869
- // For more info refer to issue #395
11870
- if (isScrolling && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {
11871
- if (!cellCache[key]) {
11872
- cellCache[key] = cellRenderer(cellRendererParams);
11873
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11874
 
11875
- renderedCell = cellCache[key];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11876
 
11877
- // If the user is no longer scrolling, don't cache cells.
11878
- // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11879
  } else {
11880
- renderedCell = cellRenderer(cellRendererParams);
11881
  }
 
11882
 
11883
- if (renderedCell == null || renderedCell === false) {
11884
- continue;
11885
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11886
 
11887
- if (process.env.NODE_ENV !== 'production') {
11888
- warnAboutMissingStyle(parent, renderedCell);
 
11889
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11890
 
11891
- renderedCells.push(renderedCell);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11892
  }
11893
- }
11894
 
11895
- return renderedCells;
11896
- }
11897
-
11898
- function warnAboutMissingStyle(parent, renderedCell) {
11899
- if (process.env.NODE_ENV !== 'production') {
11900
- if (renderedCell) {
11901
- // If the direct child is a CellMeasurer, then we should check its child
11902
- // See issue #611
11903
- if (renderedCell.type && renderedCell.type.__internalCellMeasurerFlag) {
11904
- renderedCell = renderedCell.props.children;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11905
  }
11906
-
11907
- if (renderedCell && renderedCell.props && renderedCell.props.style === undefined && parent.__warnedAboutMissingStyle !== true) {
11908
- parent.__warnedAboutMissingStyle = true;
11909
-
11910
- console.warn('Rendered cell should include style property for positioning.');
 
11911
  }
 
11912
  }
11913
- }
11914
- }
11915
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(7)))
11916
 
11917
- /***/ }),
11918
- /* 137 */
11919
- /***/ (function(module, exports, __webpack_require__) {
11920
-
11921
- "use strict";
11922
-
11923
-
11924
- Object.defineProperty(exports, "__esModule", {
11925
- value: true
11926
- });
11927
-
11928
- exports.default = function (recalc) {
11929
- if (!size && size !== 0 || recalc) {
11930
- if (_inDOM2.default) {
11931
- var scrollDiv = document.createElement('div');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11932
 
11933
- scrollDiv.style.position = 'absolute';
11934
- scrollDiv.style.top = '-9999px';
11935
- scrollDiv.style.width = '50px';
11936
- scrollDiv.style.height = '50px';
11937
- scrollDiv.style.overflow = 'scroll';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11938
 
11939
- document.body.appendChild(scrollDiv);
11940
- size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
11941
- document.body.removeChild(scrollDiv);
11942
  }
11943
- }
11944
-
11945
- return size;
11946
- };
11947
-
11948
- var _inDOM = __webpack_require__(258);
11949
-
11950
- var _inDOM2 = _interopRequireDefault(_inDOM);
11951
-
11952
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11953
 
11954
- var size = void 0;
11955
-
11956
- module.exports = exports['default'];
11957
-
11958
- /***/ }),
11959
- /* 138 */
11960
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
11961
-
11962
- "use strict";
11963
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(4);
11964
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
11965
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(8);
11966
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of__);
11967
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
11968
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
11969
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(3);
11970
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
11971
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
11972
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
11973
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(6);
11974
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
11975
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(1);
11976
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
11977
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__vendor_detectElementResize__ = __webpack_require__(139);
11978
-
11979
-
11980
-
11981
-
11982
-
11983
-
11984
-
11985
-
11986
-
11987
- var AutoSizer = function (_React$PureComponent) {
11988
- __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(AutoSizer, _React$PureComponent);
11989
 
11990
- function AutoSizer() {
11991
- var _ref;
11992
 
11993
- var _temp, _this, _ret;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11994
 
11995
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, AutoSizer);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11996
 
11997
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
11998
- args[_key] = arguments[_key];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11999
  }
12000
 
12001
- return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = AutoSizer.__proto__ || __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_prototype_of___default()(AutoSizer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
12002
- height: _this.props.defaultHeight || 0,
12003
- width: _this.props.defaultWidth || 0
12004
- }, _this._onResize = function () {
12005
- var _this$props = _this.props,
12006
- disableHeight = _this$props.disableHeight,
12007
- disableWidth = _this$props.disableWidth,
12008
- onResize = _this$props.onResize;
 
 
 
 
 
 
 
 
 
 
 
12009
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12010
 
12011
- if (_this._parentNode) {
12012
- // Guard against AutoSizer component being removed from the DOM immediately after being added.
12013
- // This can result in invalid style values which can result in NaN values if we don't handle them.
12014
- // See issue #150 for more context.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12015
 
12016
- var _height = _this._parentNode.offsetHeight || 0;
12017
- var _width = _this._parentNode.offsetWidth || 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12018
 
12019
- var _style = window.getComputedStyle(_this._parentNode) || {};
12020
- var paddingLeft = parseInt(_style.paddingLeft, 10) || 0;
12021
- var paddingRight = parseInt(_style.paddingRight, 10) || 0;
12022
- var paddingTop = parseInt(_style.paddingTop, 10) || 0;
12023
- var paddingBottom = parseInt(_style.paddingBottom, 10) || 0;
12024
 
12025
- var newHeight = _height - paddingTop - paddingBottom;
12026
- var newWidth = _width - paddingLeft - paddingRight;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12027
 
12028
- if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {
12029
- _this.setState({
12030
- height: _height - paddingTop - paddingBottom,
12031
- width: _width - paddingLeft - paddingRight
12032
- });
12033
 
12034
- onResize({ height: _height, width: _width });
12035
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12036
  }
12037
- }, _this._setRef = function (autoSizer) {
12038
- _this._autoSizer = autoSizer;
12039
- }, _temp), __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
12040
- }
12041
-
12042
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(AutoSizer, [{
12043
- key: 'componentDidMount',
12044
- value: function componentDidMount() {
12045
- var nonce = this.props.nonce;
12046
-
12047
- if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {
12048
- // Delay access of parentNode until mount.
12049
- // This handles edge-cases where the component has already been unmounted before its ref has been set,
12050
- // As well as libraries like react-lite which have a slightly different lifecycle.
12051
- this._parentNode = this._autoSizer.parentNode;
12052
 
12053
- // Defer requiring resize handler in order to support server-side rendering.
12054
- // See issue #41
12055
- this._detectElementResize = Object(__WEBPACK_IMPORTED_MODULE_7__vendor_detectElementResize__["a" /* default */])(nonce);
12056
- this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12057
 
12058
- this._onResize();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12059
  }
 
 
 
 
 
 
 
 
 
 
12060
  }
12061
- }, {
12062
- key: 'componentWillUnmount',
12063
- value: function componentWillUnmount() {
12064
- if (this._detectElementResize && this._parentNode) {
12065
- this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12066
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12067
  }
12068
- }, {
12069
- key: 'render',
12070
- value: function render() {
12071
- var _props = this.props,
12072
- children = _props.children,
12073
- className = _props.className,
12074
- disableHeight = _props.disableHeight,
12075
- disableWidth = _props.disableWidth,
12076
- style = _props.style;
12077
- var _state = this.state,
12078
- height = _state.height,
12079
- width = _state.width;
12080
 
12081
- // Outer div should not force width/height since that may prevent containers from shrinking.
12082
- // Inner component should overflow and use calculated width/height.
12083
- // See issue #68 for more information.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12084
 
12085
- var outerStyle = { overflow: 'visible' };
12086
- var childParams = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12087
 
12088
- if (!disableHeight) {
12089
- outerStyle.height = 0;
12090
- childParams.height = height;
 
 
 
 
 
 
12091
  }
12092
 
12093
- if (!disableWidth) {
12094
- outerStyle.width = 0;
12095
- childParams.width = width;
 
 
 
 
 
12096
  }
12097
 
12098
- /**
12099
- * TODO: Avoid rendering children before the initial measurements have been collected.
12100
- * At best this would just be wasting cycles.
12101
- * Add this check into version 10 though as it could break too many ref callbacks in version 9.
12102
- * Note that if default width/height props were provided this would still work with SSR.
12103
- if (
12104
- height !== 0 &&
12105
- width !== 0
12106
- ) {
12107
- child = children({ height, width })
12108
  }
12109
- */
12110
 
12111
- return __WEBPACK_IMPORTED_MODULE_6_react__["createElement"](
12112
- 'div',
12113
- {
12114
- className: className,
12115
- ref: this._setRef,
12116
- style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, outerStyle, style) },
12117
- children(childParams)
12118
- );
12119
- }
12120
- }]);
12121
 
12122
- return AutoSizer;
12123
- }(__WEBPACK_IMPORTED_MODULE_6_react__["PureComponent"]);
 
 
12124
 
12125
- AutoSizer.defaultProps = {
12126
- onResize: function onResize() {},
12127
- disableHeight: false,
12128
- disableWidth: false,
12129
- style: {}
12130
- };
12131
- AutoSizer.propTypes = {
12132
- /** Function responsible for rendering children.*/
12133
- children: __webpack_require__(0).func.isRequired,
12134
 
 
 
 
 
 
 
12135
 
12136
- /** Optional custom CSS class name to attach to root AutoSizer element. */
12137
- className: __webpack_require__(0).string,
 
 
 
 
 
 
12138
 
 
 
12139
 
12140
- /** Default height to use for initial render; useful for SSR */
12141
- defaultHeight: __webpack_require__(0).number,
 
 
 
 
 
 
12142
 
 
 
 
 
 
 
 
12143
 
12144
- /** Default width to use for initial render; useful for SSR */
12145
- defaultWidth: __webpack_require__(0).number,
 
12146
 
 
 
 
12147
 
12148
- /** Disable dynamic :height property */
12149
- disableHeight: __webpack_require__(0).bool.isRequired,
 
12150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12151
 
12152
- /** Disable dynamic :width property */
12153
- disableWidth: __webpack_require__(0).bool.isRequired,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12155
 
12156
- /** Nonce of the inlined stylesheet for Content Security Policy */
12157
- nonce: __webpack_require__(0).string,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12159
 
12160
- /** Callback to be invoked on-resize */
12161
- onResize: __webpack_require__(0).func.isRequired,
 
 
 
 
 
 
 
 
12162
 
 
 
12163
 
12164
- /** Optional inline style */
12165
- style: __webpack_require__(0).object
12166
- };
12167
- /* harmony default export */ __webpack_exports__["a"] = (AutoSizer);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12168
 
12169
- /***/ }),
12170
- /* 139 */
12171
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12172
 
12173
- "use strict";
12174
- /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (immutable) */ __webpack_exports__["a"] = createDetectElementResize;
12175
- /**
12176
- * Detect Element Resize.
12177
- * https://github.com/sdecima/javascript-detect-element-resize
12178
- * Sebastian Decima
12179
- *
12180
- * Forked from version 0.5.3; includes the following modifications:
12181
- * 1) Guard against unsafe 'window' and 'document' references (to support SSR).
12182
- * 2) Defer initialization code via a top-level function wrapper (to support SSR).
12183
- * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.
12184
- * 4) Add nonce for style element.
12185
- **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12186
 
12187
- function createDetectElementResize(nonce) {
12188
- // Check `document` and `window` in case of server-side rendering
12189
- var _window;
12190
- if (typeof window !== 'undefined') {
12191
- _window = window;
12192
- } else if (typeof self !== 'undefined') {
12193
- _window = self;
12194
- } else {
12195
- _window = global;
12196
- }
12197
 
12198
- var attachEvent = typeof document !== 'undefined' && document.attachEvent;
 
 
 
 
 
12199
 
12200
- if (!attachEvent) {
12201
- var requestFrame = function () {
12202
- var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {
12203
- return _window.setTimeout(fn, 20);
12204
- };
12205
- return function (fn) {
12206
- return raf(fn);
12207
- };
12208
- }();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12209
 
12210
- var cancelFrame = function () {
12211
- var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;
12212
- return function (id) {
12213
- return cancel(id);
12214
- };
12215
- }();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12216
 
12217
- var resetTriggers = function resetTriggers(element) {
12218
- var triggers = element.__resizeTriggers__,
12219
- expand = triggers.firstElementChild,
12220
- contract = triggers.lastElementChild,
12221
- expandChild = expand.firstElementChild;
12222
- contract.scrollLeft = contract.scrollWidth;
12223
- contract.scrollTop = contract.scrollHeight;
12224
- expandChild.style.width = expand.offsetWidth + 1 + 'px';
12225
- expandChild.style.height = expand.offsetHeight + 1 + 'px';
12226
- expand.scrollLeft = expand.scrollWidth;
12227
- expand.scrollTop = expand.scrollHeight;
12228
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
12229
 
12230
- var checkTriggers = function checkTriggers(element) {
12231
- return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;
12232
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12233
 
12234
- var scrollListener = function scrollListener(e) {
12235
- // Don't measure (which forces) reflow for scrolls that happen inside of children!
12236
- if (e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
12237
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12238
  }
 
 
 
 
12239
 
12240
- var element = this;
12241
- resetTriggers(this);
12242
- if (this.__resizeRAF__) {
12243
- cancelFrame(this.__resizeRAF__);
12244
- }
12245
- this.__resizeRAF__ = requestFrame(function () {
12246
- if (checkTriggers(element)) {
12247
- element.__resizeLast__.width = element.offsetWidth;
12248
- element.__resizeLast__.height = element.offsetHeight;
12249
- element.__resizeListeners__.forEach(function (fn) {
12250
- fn.call(element, e);
12251
- });
12252
  }
 
12253
  });
12254
- };
12255
-
12256
- /* Detect CSS Animations support to detect element display/re-attach */
12257
- var animation = false,
12258
- keyframeprefix = '',
12259
- animationstartevent = 'animationstart',
12260
- domPrefixes = 'Webkit Moz O ms'.split(' '),
12261
- startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),
12262
- pfx = '';
12263
- {
12264
- var elm = document.createElement('fakeelement');
12265
- if (elm.style.animationName !== undefined) {
12266
- animation = true;
12267
- }
12268
-
12269
- if (animation === false) {
12270
- for (var i = 0; i < domPrefixes.length; i++) {
12271
- if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
12272
- pfx = domPrefixes[i];
12273
- keyframeprefix = '-' + pfx.toLowerCase() + '-';
12274
- animationstartevent = startEvents[i];
12275
- animation = true;
12276
- break;
12277
- }
12278
- }
12279
- }
12280
  }
12281
 
12282
- var animationName = 'resizeanim';
12283
- var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
12284
- var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
12285
- }
12286
-
12287
- var createStyles = function createStyles(doc) {
12288
- if (!doc.getElementById('detectElementResize')) {
12289
- //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
12290
- var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
12291
- head = doc.head || doc.getElementsByTagName('head')[0],
12292
- style = doc.createElement('style');
12293
-
12294
- style.id = 'detectElementResize';
12295
- style.type = 'text/css';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12296
 
12297
- if (nonce != null) {
12298
- style.setAttribute('nonce', nonce);
12299
  }
12300
-
12301
- if (style.styleSheet) {
12302
- style.styleSheet.cssText = css;
12303
- } else {
12304
- style.appendChild(doc.createTextNode(css));
12305
  }
12306
-
12307
- head.appendChild(style);
 
 
 
12308
  }
12309
- };
12310
-
12311
- var addResizeListener = function addResizeListener(element, fn) {
12312
- if (attachEvent) {
12313
- element.attachEvent('onresize', fn);
12314
- } else {
12315
- if (!element.__resizeTriggers__) {
12316
- var doc = element.ownerDocument;
12317
- var elementStyle = _window.getComputedStyle(element);
12318
- if (elementStyle && elementStyle.position == 'static') {
12319
- element.style.position = 'relative';
12320
- }
12321
- createStyles(doc);
12322
- element.__resizeLast__ = {};
12323
- element.__resizeListeners__ = [];
12324
- (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';
12325
- element.__resizeTriggers__.innerHTML = '<div class="expand-trigger"><div></div></div>' + '<div class="contract-trigger"></div>';
12326
- element.appendChild(element.__resizeTriggers__);
12327
- resetTriggers(element);
12328
- element.addEventListener('scroll', scrollListener, true);
12329
 
12330
- /* Listen for a css animation to detect element display/re-attach */
12331
- if (animationstartevent) {
12332
- element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
12333
- if (e.animationName == animationName) {
12334
- resetTriggers(element);
12335
- }
12336
- };
12337
- element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);
12338
- }
12339
- }
12340
- element.__resizeListeners__.push(fn);
 
 
 
 
 
 
12341
  }
12342
- };
12343
 
12344
- var removeResizeListener = function removeResizeListener(element, fn) {
12345
- if (attachEvent) {
12346
- element.detachEvent('onresize', fn);
12347
- } else {
12348
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
12349
- if (!element.__resizeListeners__.length) {
12350
- element.removeEventListener('scroll', scrollListener, true);
12351
- if (element.__resizeTriggers__.__animationListener__) {
12352
- element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);
12353
- element.__resizeTriggers__.__animationListener__ = null;
12354
- }
12355
- try {
12356
- element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
12357
- } catch (e) {
12358
- // Preact compat; see developit/preact-compat/issues/228
12359
- }
12360
- }
 
 
 
 
 
 
 
12361
  }
12362
- };
12363
-
12364
- return {
12365
- addResizeListener: addResizeListener,
12366
- removeResizeListener: removeResizeListener
12367
- };
12368
- }
12369
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20)))
12370
-
12371
- /***/ }),
12372
- /* 140 */
12373
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
12374
-
12375
- "use strict";
12376
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__CellMeasurer__ = __webpack_require__(262);
12377
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CellMeasurerCache__ = __webpack_require__(141);
12378
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__CellMeasurer__["a"]; });
12379
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__CellMeasurerCache__["a"]; });
12380
-
12381
-
12382
-
12383
- /* unused harmony default export */ var _unused_webpack_default_export = (__WEBPACK_IMPORTED_MODULE_0__CellMeasurer__["a" /* default */]);
12384
-
12385
-
12386
- /***/ }),
12387
- /* 141 */
12388
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
12389
 
12390
- "use strict";
12391
- /* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export DEFAULT_HEIGHT */
12392
- /* unused harmony export DEFAULT_WIDTH */
12393
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
12394
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
12395
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(3);
12396
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
12397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12398
 
12399
- var DEFAULT_HEIGHT = 30;
12400
- var DEFAULT_WIDTH = 100;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12401
 
12402
- // Enables more intelligent mapping of a given column and row index to an item ID.
12403
- // This prevents a cell cache from being invalidated when its parent collection is modified.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12404
 
12405
- /**
12406
- * Caches measurements for a given cell.
12407
- */
12408
- var CellMeasurerCache = function () {
12409
- function CellMeasurerCache() {
12410
- var _this = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12411
 
12412
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12413
 
12414
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, CellMeasurerCache);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12415
 
12416
- this._cellHeightCache = {};
12417
- this._cellWidthCache = {};
12418
- this._columnWidthCache = {};
12419
- this._rowHeightCache = {};
12420
- this._columnCount = 0;
12421
- this._rowCount = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12422
 
12423
- this.columnWidth = function (_ref) {
12424
- var index = _ref.index;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12425
 
12426
- var key = _this._keyMapper(0, index);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12427
 
12428
- return _this._columnWidthCache.hasOwnProperty(key) ? _this._columnWidthCache[key] : _this._defaultWidth;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12429
  };
12430
 
12431
- this.rowHeight = function (_ref2) {
12432
- var index = _ref2.index;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12433
 
12434
- var key = _this._keyMapper(index, 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12435
 
12436
- return _this._rowHeightCache.hasOwnProperty(key) ? _this._rowHeightCache[key] : _this._defaultHeight;
12437
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12438
 
12439
- var defaultHeight = params.defaultHeight,
12440
- defaultWidth = params.defaultWidth,
12441
- fixedHeight = params.fixedHeight,
12442
- fixedWidth = params.fixedWidth,
12443
- keyMapper = params.keyMapper,
12444
- minHeight = params.minHeight,
12445
- minWidth = params.minWidth;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12446
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12447
 
12448
- this._hasFixedHeight = fixedHeight === true;
12449
- this._hasFixedWidth = fixedWidth === true;
12450
- this._minHeight = minHeight || 0;
12451
- this._minWidth = minWidth || 0;
12452
- this._keyMapper = keyMapper || defaultKeyMapper;
 
 
 
 
 
 
 
 
 
 
 
 
 
12453
 
12454
- this._defaultHeight = Math.max(this._minHeight, typeof defaultHeight === 'number' ? defaultHeight : DEFAULT_HEIGHT);
12455
- this._defaultWidth = Math.max(this._minWidth, typeof defaultWidth === 'number' ? defaultWidth : DEFAULT_WIDTH);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12456
 
12457
- if (process.env.NODE_ENV !== 'production') {
12458
- if (this._hasFixedHeight === false && this._hasFixedWidth === false) {
12459
- console.warn("CellMeasurerCache should only measure a cell's width or height. " + 'You have configured CellMeasurerCache to measure both. ' + 'This will result in poor performance.');
12460
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12461
 
12462
- if (this._hasFixedHeight === false && this._defaultHeight === 0) {
12463
- console.warn('Fixed height CellMeasurerCache should specify a :defaultHeight greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12464
  }
12465
-
12466
- if (this._hasFixedWidth === false && this._defaultWidth === 0) {
12467
- console.warn('Fixed width CellMeasurerCache should specify a :defaultWidth greater than 0. ' + 'Failing to do so will lead to unnecessary layout and poor performance.');
 
 
 
 
 
 
 
 
 
 
 
 
 
12468
  }
 
12469
  }
12470
- }
12471
-
12472
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(CellMeasurerCache, [{
12473
- key: 'clear',
12474
- value: function clear(rowIndex) {
12475
- var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
12476
 
12477
- var key = this._keyMapper(rowIndex, columnIndex);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12478
 
12479
- delete this._cellHeightCache[key];
12480
- delete this._cellWidthCache[key];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12481
 
12482
- this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12483
  }
12484
- }, {
12485
- key: 'clearAll',
12486
- value: function clearAll() {
12487
- this._cellHeightCache = {};
12488
- this._cellWidthCache = {};
12489
- this._columnWidthCache = {};
12490
- this._rowHeightCache = {};
12491
- this._rowCount = 0;
12492
- this._columnCount = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12493
  }
12494
- }, {
12495
- key: 'hasFixedHeight',
12496
- value: function hasFixedHeight() {
12497
- return this._hasFixedHeight;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12498
  }
12499
- }, {
12500
- key: 'hasFixedWidth',
12501
- value: function hasFixedWidth() {
12502
- return this._hasFixedWidth;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12503
  }
12504
- }, {
12505
- key: 'getHeight',
12506
- value: function getHeight(rowIndex) {
12507
- var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
12508
-
12509
- if (this._hasFixedHeight) {
12510
- return this._defaultHeight;
12511
- } else {
12512
- var _key = this._keyMapper(rowIndex, columnIndex);
12513
 
12514
- return this._cellHeightCache.hasOwnProperty(_key) ? Math.max(this._minHeight, this._cellHeightCache[_key]) : this._defaultHeight;
12515
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12516
  }
12517
- }, {
12518
- key: 'getWidth',
12519
- value: function getWidth(rowIndex) {
12520
- var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
12521
-
12522
- if (this._hasFixedWidth) {
12523
- return this._defaultWidth;
12524
- } else {
12525
- var _key2 = this._keyMapper(rowIndex, columnIndex);
12526
 
12527
- return this._cellWidthCache.hasOwnProperty(_key2) ? Math.max(this._minWidth, this._cellWidthCache[_key2]) : this._defaultWidth;
12528
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12529
  }
12530
- }, {
12531
- key: 'has',
12532
- value: function has(rowIndex) {
12533
- var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
12534
 
12535
- var key = this._keyMapper(rowIndex, columnIndex);
12536
-
12537
- return this._cellHeightCache.hasOwnProperty(key);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12538
  }
12539
- }, {
12540
- key: 'set',
12541
- value: function set(rowIndex, columnIndex, width, height) {
12542
- var key = this._keyMapper(rowIndex, columnIndex);
12543
-
12544
- if (columnIndex >= this._columnCount) {
12545
- this._columnCount = columnIndex + 1;
12546
- }
12547
- if (rowIndex >= this._rowCount) {
12548
- this._rowCount = rowIndex + 1;
12549
- }
12550
 
12551
- // Size is cached per cell so we don't have to re-measure if cells are re-ordered.
12552
- this._cellHeightCache[key] = height;
12553
- this._cellWidthCache[key] = width;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12554
 
12555
- this._updateCachedColumnAndRowSizes(rowIndex, columnIndex);
12556
- }
12557
- }, {
12558
- key: '_updateCachedColumnAndRowSizes',
12559
- value: function _updateCachedColumnAndRowSizes(rowIndex, columnIndex) {
12560
- // :columnWidth and :rowHeight are derived based on all cells in a column/row.
12561
- // Pre-cache these derived values for faster lookup later.
12562
- // Reads are expected to occur more frequently than writes in this case.
12563
- // Only update non-fixed dimensions though to avoid doing unnecessary work.
12564
- if (!this._hasFixedWidth) {
12565
- var columnWidth = 0;
12566
- for (var i = 0; i < this._rowCount; i++) {
12567
- columnWidth = Math.max(columnWidth, this.getWidth(i, columnIndex));
12568
- }
12569
- var columnKey = this._keyMapper(0, columnIndex);
12570
- this._columnWidthCache[columnKey] = columnWidth;
12571
- }
12572
- if (!this._hasFixedHeight) {
12573
- var rowHeight = 0;
12574
- for (var _i = 0; _i < this._columnCount; _i++) {
12575
- rowHeight = Math.max(rowHeight, this.getHeight(rowIndex, _i));
12576
- }
12577
- var rowKey = this._keyMapper(rowIndex, 0);
12578
- this._rowHeightCache[rowKey] = rowHeight;
12579
- }
12580
- }
12581
- }, {
12582
- key: 'defaultHeight',
12583
- get: function get() {
12584
- return this._defaultHeight;
12585
- }
12586
- }, {
12587
- key: 'defaultWidth',
12588
- get: function get() {
12589
- return this._defaultWidth;
12590
  }
12591
- }]);
12592
-
12593
- return CellMeasurerCache;
12594
- }();
12595
-
12596
- /* harmony default export */ __webpack_exports__["a"] = (CellMeasurerCache);
12597
-
12598
-
12599
- function defaultKeyMapper(rowIndex, columnIndex) {
12600
- return rowIndex + '-' + columnIndex;
12601
- }
12602
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(7)))
12603
-
12604
- /***/ }),
12605
- /* 142 */
12606
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
12607
-
12608
- "use strict";
12609
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(4);
12610
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
12611
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_own_property_descriptor__ = __webpack_require__(275);
12612
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_own_property_descriptor___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_own_property_descriptor__);
12613
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of__ = __webpack_require__(8);
12614
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of__);
12615
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__ = __webpack_require__(2);
12616
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck__);
12617
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__ = __webpack_require__(3);
12618
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass__);
12619
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(5);
12620
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn__);
12621
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__ = __webpack_require__(6);
12622
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits__);
12623
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Grid__ = __webpack_require__(13);
12624
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react__ = __webpack_require__(1);
12625
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_react__);
12626
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(21);
12627
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
12628
-
12629
-
12630
-
12631
-
12632
-
12633
-
12634
-
12635
-
12636
- var babelPluginFlowReactPropTypes_proptype_Scroll = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_Scroll || __webpack_require__(0).any;
12637
-
12638
- var babelPluginFlowReactPropTypes_proptype_CellRendererParams = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_CellRendererParams || __webpack_require__(0).any;
12639
-
12640
- var babelPluginFlowReactPropTypes_proptype_RenderedSection = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_RenderedSection || __webpack_require__(0).any;
12641
-
12642
- var babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter || __webpack_require__(0).any;
12643
-
12644
- var babelPluginFlowReactPropTypes_proptype_CellPosition = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_CellPosition || __webpack_require__(0).any;
12645
-
12646
- var babelPluginFlowReactPropTypes_proptype_CellSize = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_CellSize || __webpack_require__(0).any;
12647
-
12648
- var babelPluginFlowReactPropTypes_proptype_Alignment = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_Alignment || __webpack_require__(0).any;
12649
-
12650
- var babelPluginFlowReactPropTypes_proptype_NoContentRenderer = __webpack_require__(13).babelPluginFlowReactPropTypes_proptype_NoContentRenderer || __webpack_require__(0).any;
12651
-
12652
- var babelPluginFlowReactPropTypes_proptype_Scroll = __webpack_require__(94).babelPluginFlowReactPropTypes_proptype_Scroll || __webpack_require__(0).any;
12653
 
12654
- var babelPluginFlowReactPropTypes_proptype_RenderedRows = __webpack_require__(94).babelPluginFlowReactPropTypes_proptype_RenderedRows || __webpack_require__(0).any;
12655
-
12656
- var babelPluginFlowReactPropTypes_proptype_RowRenderer = __webpack_require__(94).babelPluginFlowReactPropTypes_proptype_RowRenderer || __webpack_require__(0).any;
12657
-
12658
-
12659
-
12660
-
12661
-
12662
- /**
12663
- * It is inefficient to create and manage a large list of DOM elements within a scrolling container
12664
- * if only a few of those elements are visible. The primary purpose of this component is to improve
12665
- * performance by only rendering the DOM nodes that a user is able to see based on their current
12666
- * scroll position.
12667
- *
12668
- * This component renders a virtualized list of elements with either fixed or dynamic heights.
12669
- */
12670
-
12671
- var List = function (_React$PureComponent) {
12672
- __WEBPACK_IMPORTED_MODULE_6_babel_runtime_helpers_inherits___default()(List, _React$PureComponent);
12673
-
12674
- function List() {
12675
- var _ref;
12676
-
12677
- var _temp, _this, _ret;
12678
-
12679
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_classCallCheck___default()(this, List);
12680
-
12681
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
12682
- args[_key] = arguments[_key];
 
 
 
 
 
 
12683
  }
12684
 
12685
- return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = List.__proto__ || __WEBPACK_IMPORTED_MODULE_2_babel_runtime_core_js_object_get_prototype_of___default()(List)).call.apply(_ref, [this].concat(args))), _this), _this._cellRenderer = function (_ref2) {
12686
- var parent = _ref2.parent,
12687
- rowIndex = _ref2.rowIndex,
12688
- style = _ref2.style,
12689
- isScrolling = _ref2.isScrolling,
12690
- isVisible = _ref2.isVisible,
12691
- key = _ref2.key;
12692
- var rowRenderer = _this.props.rowRenderer;
12693
-
12694
- // TRICKY The style object is sometimes cached by Grid.
12695
- // This prevents new style objects from bypassing shallowCompare().
12696
- // However as of React 16, style props are auto-frozen (at least in dev mode)
12697
- // Check to make sure we can still modify the style before proceeding.
12698
- // https://github.com/facebook/react/commit/977357765b44af8ff0cfea327866861073095c12#commitcomment-20648713
12699
-
12700
- var _Object$getOwnPropert = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_object_get_own_property_descriptor___default()(style, 'width'),
12701
- writable = _Object$getOwnPropert.writable;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12702
 
12703
- if (writable) {
12704
- // By default, List cells should be 100% width.
12705
- // This prevents them from flowing under a scrollbar (if present).
12706
- style.width = '100%';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12707
  }
 
 
12708
 
12709
- return rowRenderer({
12710
- index: rowIndex,
12711
- style: style,
12712
- isScrolling: isScrolling,
12713
- isVisible: isVisible,
12714
- key: key,
12715
- parent: parent
12716
- });
12717
- }, _this._setRef = function (ref) {
12718
- _this.Grid = ref;
12719
- }, _this._onScroll = function (_ref3) {
12720
- var clientHeight = _ref3.clientHeight,
12721
- scrollHeight = _ref3.scrollHeight,
12722
- scrollTop = _ref3.scrollTop;
12723
- var onScroll = _this.props.onScroll;
12724
-
12725
-
12726
- onScroll({ clientHeight: clientHeight, scrollHeight: scrollHeight, scrollTop: scrollTop });
12727
- }, _this._onSectionRendered = function (_ref4) {
12728
- var rowOverscanStartIndex = _ref4.rowOverscanStartIndex,
12729
- rowOverscanStopIndex = _ref4.rowOverscanStopIndex,
12730
- rowStartIndex = _ref4.rowStartIndex,
12731
- rowStopIndex = _ref4.rowStopIndex;
12732
- var onRowsRendered = _this.props.onRowsRendered;
12733
-
12734
 
12735
- onRowsRendered({
12736
- overscanStartIndex: rowOverscanStartIndex,
12737
- overscanStopIndex: rowOverscanStopIndex,
12738
- startIndex: rowStartIndex,
12739
- stopIndex: rowStopIndex
12740
- });
12741
- }, _temp), __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
12742
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12743
 
12744
- __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_createClass___default()(List, [{
12745
- key: 'forceUpdateGrid',
12746
- value: function forceUpdateGrid() {
12747
- if (this.Grid) {
12748
- this.Grid.forceUpdate();
12749
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12750
  }
12751
 
12752
- /** See Grid#getOffsetForCell */
12753
-
12754
- }, {
12755
- key: 'getOffsetForRow',
12756
- value: function getOffsetForRow(_ref5) {
12757
- var alignment = _ref5.alignment,
12758
- index = _ref5.index;
12759
-
12760
- if (this.Grid) {
12761
- var _Grid$getOffsetForCel = this.Grid.getOffsetForCell({
12762
- alignment: alignment,
12763
- rowIndex: index,
12764
- columnIndex: 0
12765
- }),
12766
- _scrollTop = _Grid$getOffsetForCel.scrollTop;
12767
-
12768
- return _scrollTop;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12769
  }
12770
- return 0;
12771
- }
12772
-
12773
- /** CellMeasurer compatibility */
12774
-
12775
- }, {
12776
- key: 'invalidateCellSizeAfterRender',
12777
- value: function invalidateCellSizeAfterRender(_ref6) {
12778
- var columnIndex = _ref6.columnIndex,
12779
- rowIndex = _ref6.rowIndex;
12780
-
12781
- if (this.Grid) {
12782
- this.Grid.invalidateCellSizeAfterRender({
12783
- rowIndex: rowIndex,
12784
- columnIndex: columnIndex
12785
- });
12786
  }
 
 
 
12787
  }
12788
 
12789
- /** See Grid#measureAllCells */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12790
 
12791
- }, {
12792
- key: 'measureAllRows',
12793
- value: function measureAllRows() {
12794
- if (this.Grid) {
12795
- this.Grid.measureAllCells();
12796
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12797
  }
12798
 
12799
- /** CellMeasurer compatibility */
12800
-
12801
- }, {
12802
- key: 'recomputeGridSize',
12803
- value: function recomputeGridSize() {
12804
- var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
12805
- _ref7$columnIndex = _ref7.columnIndex,
12806
- columnIndex = _ref7$columnIndex === undefined ? 0 : _ref7$columnIndex,
12807
- _ref7$rowIndex = _ref7.rowIndex,
12808
- rowIndex = _ref7$rowIndex === undefined ? 0 : _ref7$rowIndex;
 
 
 
 
 
 
 
 
12809
 
12810
- if (this.Grid) {
12811
- this.Grid.recomputeGridSize({
12812
- rowIndex: rowIndex,
12813
- columnIndex: columnIndex
12814
- });
12815
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12816
  }
12817
 
12818
- /** See Grid#recomputeGridSize */
12819
-
12820
- }, {
12821
- key: 'recomputeRowHeights',
12822
- value: function recomputeRowHeights() {
12823
- var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
12824
-
12825
- if (this.Grid) {
12826
- this.Grid.recomputeGridSize({
12827
- rowIndex: index,
12828
- columnIndex: 0
12829
- });
12830
- }
 
 
 
 
 
 
 
12831
  }
12832
 
12833
- /** See Grid#scrollToPosition */
12834
-
12835
- }, {
12836
- key: 'scrollToPosition',
12837
- value: function scrollToPosition() {
12838
- var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
 
 
 
 
 
 
 
 
 
 
 
 
12839
 
12840
- if (this.Grid) {
12841
- this.Grid.scrollToPosition({ scrollTop: scrollTop });
12842
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12843
  }
12844
 
12845
- /** See Grid#scrollToCell */
12846
-
12847
- }, {
12848
- key: 'scrollToRow',
12849
- value: function scrollToRow() {
12850
- var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
12851
-
12852
- if (this.Grid) {
12853
- this.Grid.scrollToCell({
12854
- columnIndex: 0,
12855
- rowIndex: index
12856
- });
12857
- }
 
 
 
 
 
 
12858
  }
12859
- }, {
12860
- key: 'render',
12861
- value: function render() {
12862
- var _props = this.props,
12863
- className = _props.className,
12864
- noRowsRenderer = _props.noRowsRenderer,
12865
- scrollToIndex = _props.scrollToIndex,
12866
- width = _props.width;
12867
 
12868
-
12869
- var classNames = __WEBPACK_IMPORTED_MODULE_9_classnames___default()('ReactVirtualized__List', className);
12870
-
12871
- return __WEBPACK_IMPORTED_MODULE_8_react__["createElement"](__WEBPACK_IMPORTED_MODULE_7__Grid__["default"], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, this.props, {
12872
- autoContainerWidth: true,
12873
- cellRenderer: this._cellRenderer,
12874
- className: classNames,
12875
- columnWidth: width,
12876
- columnCount: 1,
12877
- noContentRenderer: noRowsRenderer,
12878
- onScroll: this._onScroll,
12879
- onSectionRendered: this._onSectionRendered,
12880
- ref: this._setRef,
12881
- scrollToRow: scrollToIndex
12882
- }));
 
 
 
 
12883
  }
12884
- }]);
12885
-
12886
- return List;
12887
- }(__WEBPACK_IMPORTED_MODULE_8_react__["PureComponent"]);
12888
-
12889
- List.defaultProps = {
12890
- autoHeight: false,
12891
- estimatedRowSize: 30,
12892
- onScroll: function onScroll() {},
12893
- noRowsRenderer: function noRowsRenderer() {
12894
- return null;
12895
- },
12896
- onRowsRendered: function onRowsRendered() {},
12897
- overscanIndicesGetter: __WEBPACK_IMPORTED_MODULE_7__Grid__["accessibilityOverscanIndicesGetter"],
12898
- overscanRowCount: 10,
12899
- scrollToAlignment: 'auto',
12900
- scrollToIndex: -1,
12901
- style: {}
12902
- };
12903
- List.propTypes = {
12904
- "aria-label": __webpack_require__(0).string,
12905
-
12906
-
12907
- /**
12908
- * Removes fixed height from the scrollingContainer so that the total height
12909
- * of rows can stretch the window. Intended for use with WindowScroller
12910
- */
12911
- autoHeight: __webpack_require__(0).bool.isRequired,
12912
-
12913
-
12914
- /** Optional CSS class name */
12915
- className: __webpack_require__(0).string,
12916
-
12917
-
12918
- /**
12919
- * Used to estimate the total height of a List before all of its rows have actually been measured.
12920
- * The estimated total height is adjusted as rows are rendered.
12921
- */
12922
- estimatedRowSize: __webpack_require__(0).number.isRequired,
12923
-
12924
-
12925
- /** Height constraint for list (determines how many actual rows are rendered) */
12926
- height: __webpack_require__(0).number.isRequired,
12927
-
12928
-
12929
- /** Optional renderer to be used in place of rows when rowCount is 0 */
12930
- noRowsRenderer: typeof babelPluginFlowReactPropTypes_proptype_NoContentRenderer === 'function' ? babelPluginFlowReactPropTypes_proptype_NoContentRenderer.isRequired ? babelPluginFlowReactPropTypes_proptype_NoContentRenderer.isRequired : babelPluginFlowReactPropTypes_proptype_NoContentRenderer : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_NoContentRenderer).isRequired,
12931
-
12932
-
12933
- /** Callback invoked with information about the slice of rows that were just rendered. */
12934
 
12935
- onRowsRendered: __webpack_require__(0).func.isRequired,
12936
-
12937
-
12938
- /**
12939
- * Callback invoked whenever the scroll offset changes within the inner scrollable region.
12940
- * This callback can be used to sync scrolling between lists, tables, or grids.
12941
- */
12942
- onScroll: __webpack_require__(0).func.isRequired,
12943
-
12944
-
12945
- /** See Grid#overscanIndicesGetter */
12946
- overscanIndicesGetter: typeof babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter === 'function' ? babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter.isRequired ? babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter.isRequired : babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_OverscanIndicesGetter).isRequired,
12947
-
12948
-
12949
- /**
12950
- * Number of rows to render above/below the visible bounds of the list.
12951
- * These rows can help for smoother scrolling on touch devices.
12952
- */
12953
- overscanRowCount: __webpack_require__(0).number.isRequired,
12954
-
12955
-
12956
- /** Either a fixed row height (number) or a function that returns the height of a row given its index. */
12957
- rowHeight: typeof babelPluginFlowReactPropTypes_proptype_CellSize === 'function' ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired ? babelPluginFlowReactPropTypes_proptype_CellSize.isRequired : babelPluginFlowReactPropTypes_proptype_CellSize : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_CellSize).isRequired,
12958
-
12959
-
12960
- /** Responsible for rendering a row given an index; ({ index: number }): node */
12961
- rowRenderer: typeof babelPluginFlowReactPropTypes_proptype_RowRenderer === 'function' ? babelPluginFlowReactPropTypes_proptype_RowRenderer.isRequired ? babelPluginFlowReactPropTypes_proptype_RowRenderer.isRequired : babelPluginFlowReactPropTypes_proptype_RowRenderer : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_RowRenderer).isRequired,
12962
-
12963
-
12964
- /** Number of rows in list. */
12965
- rowCount: __webpack_require__(0).number.isRequired,
12966
-
12967
-
12968
- /** See Grid#scrollToAlignment */
12969
- scrollToAlignment: typeof babelPluginFlowReactPropTypes_proptype_Alignment === 'function' ? babelPluginFlowReactPropTypes_proptype_Alignment.isRequired ? babelPluginFlowReactPropTypes_proptype_Alignment.isRequired : babelPluginFlowReactPropTypes_proptype_Alignment : __webpack_require__(0).shape(babelPluginFlowReactPropTypes_proptype_Alignment).isRequired,
12970
-
12971
-
12972
- /** Row index to ensure visible (by forcefully scrolling if necessary) */
12973
- scrollToIndex: __webpack_require__(0).number.isRequired,
12974
-
12975
-
12976
- /** Vertical offset. */
12977
- scrollTop: __webpack_require__(0).number,
12978
-
12979
-
12980
- /** Optional inline style */
12981
- style: __webpack_require__(0).object.isRequired,
12982
-
12983
-
12984
- /** Tab index for focus */
12985
- tabIndex: __webpack_require__(0).number,
12986
-
12987
-
12988
- /** Width of list */
12989
- width: __webpack_require__(0).number.isRequired
12990
- };
12991
- /* harmony default export */ __webpack_exports__["a"] = (List);
12992
-
12993
- /***/ }),
12994
- /* 143 */
12995
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
12996
-
12997
- "use strict";
12998
- /* harmony export (immutable) */ __webpack_exports__["a"] = defaultCellDataGetter;
12999
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ webpackJsonp([0],[
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /* 0 */
3
  /***/ (function(module, exports, __webpack_require__) {
4
 
24
  // By explicitly using `prop-types` you are opting into new development behavior.
25
  // http://fb.me/prop-types-in-prod
26
  var throwOnDirectAccess = true;
27
+ module.exports = __webpack_require__(258)(isValidElement, throwOnDirectAccess);
28
  } else {
29
  // By explicitly using `prop-types` you are opting into new production behavior.
30
  // http://fb.me/prop-types-in-prod
31
+ module.exports = __webpack_require__(259)();
32
  }
33
 
34
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  /***/ }),
37
+ /* 1 */,
38
  /* 2 */
39
  /***/ (function(module, exports, __webpack_require__) {
40
 
50
  };
51
 
52
  /***/ }),
53
+ /* 3 */,
54
+ /* 4 */
55
  /***/ (function(module, exports, __webpack_require__) {
56
 
57
  "use strict";
59
 
60
  exports.__esModule = true;
61
 
62
+ var _defineProperty = __webpack_require__(61);
63
 
64
  var _defineProperty2 = _interopRequireDefault(_defineProperty);
65
 
83
  };
84
  }();
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  /***/ }),
87
  /* 5 */
88
  /***/ (function(module, exports, __webpack_require__) {
92
 
93
  exports.__esModule = true;
94
 
95
+ var _typeof2 = __webpack_require__(29);
96
 
97
  var _typeof3 = _interopRequireDefault(_typeof2);
98
 
115
 
116
  exports.__esModule = true;
117
 
118
+ var _setPrototypeOf = __webpack_require__(90);
119
 
120
  var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
121
 
122
+ var _create = __webpack_require__(94);
123
 
124
  var _create2 = _interopRequireDefault(_create);
125
 
126
+ var _typeof2 = __webpack_require__(29);
127
 
128
  var _typeof3 = _interopRequireDefault(_typeof2);
129
 
147
 
148
  /***/ }),
149
  /* 7 */
150
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
+ "use strict";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
 
155
+ exports.__esModule = true;
156
 
157
+ var _assign = __webpack_require__(68);
 
 
 
 
158
 
159
+ var _assign2 = _interopRequireDefault(_assign);
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
 
 
 
 
162
 
163
+ exports.default = _assign2.default || function (target) {
164
+ for (var i = 1; i < arguments.length; i++) {
165
+ var source = arguments[i];
 
 
 
 
 
 
 
 
 
 
 
 
 
166
 
167
+ for (var key in source) {
168
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
169
+ target[key] = source[key];
170
+ }
 
 
 
 
 
 
171
  }
172
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
+ return target;
 
 
175
  };
 
 
176
 
177
  /***/ }),
178
+ /* 8 */,
179
+ /* 9 */
180
  /***/ (function(module, exports, __webpack_require__) {
181
 
182
+ module.exports = { "default": __webpack_require__(86), __esModule: true };
183
 
184
  /***/ }),
185
+ /* 10 */
186
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
187
 
188
  "use strict";
189
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
190
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(1);
191
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
192
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_ScalingCellSizeAndPositionManager__ = __webpack_require__(137);
193
 
194
 
195
 
368
  });
369
 
370
  /***/ }),
371
+ /* 11 */,
372
+ /* 12 */,
373
+ /* 13 */,
374
+ /* 14 */,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  /* 15 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  /***/ (function(module, exports) {
377
 
378
  /*
454
 
455
 
456
  /***/ }),
457
+ /* 16 */
458
  /***/ (function(module, exports, __webpack_require__) {
459
 
460
  /*
510
  var singletonCounter = 0;
511
  var stylesInsertedAtTop = [];
512
 
513
+ var fixUrls = __webpack_require__(104);
514
 
515
  module.exports = function(list, options) {
516
  if (typeof DEBUG !== "undefined" && DEBUG) {
826
 
827
 
828
  /***/ }),
829
+ /* 17 */
830
  /***/ (function(module, exports, __webpack_require__) {
831
 
832
+ "use strict";
833
+ /* WEBPACK VAR INJECTION */(function(process) {
 
 
 
834
 
835
+ function checkDCE() {
836
+ /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
837
+ if (
838
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
839
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
840
+ ) {
841
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
842
  }
843
+ if (process.env.NODE_ENV !== 'production') {
844
+ // This branch is unreachable because this function is only called
845
+ // in production, but the condition is true only in development.
846
+ // Therefore if the branch is still here, dead code elimination wasn't
847
+ // properly applied.
848
+ // Don't change the message. React DevTools relies on it. Also make sure
849
+ // this message doesn't occur elsewhere in this function, or it will cause
850
+ // a false positive.
851
+ throw new Error('^_^');
852
+ }
853
+ try {
854
+ // Verify that the code above has been dead code eliminated (DCE'd).
855
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
856
+ } catch (err) {
857
+ // DevTools shouldn't crash React, no matter what.
858
+ // We should still report in case we break this code.
859
+ console.error(err);
860
+ }
861
+ }
862
+
863
+ if (process.env.NODE_ENV === 'production') {
864
+ // DCE check should happen before ReactDOM bundle executes so that
865
+ // DevTools can report bad minification during injection.
866
+ checkDCE();
867
+ module.exports = __webpack_require__(237);
868
+ } else {
869
+ module.exports = __webpack_require__(240);
870
+ }
871
 
872
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
873
 
874
  /***/ }),
875
+ /* 18 */,
876
+ /* 19 */,
877
+ /* 20 */,
878
+ /* 21 */
879
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
880
+
881
+ "use strict";
882
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
883
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Grid__ = __webpack_require__(172);
884
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
885
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Grid", function() { return __WEBPACK_IMPORTED_MODULE_0__Grid__["a"]; });
886
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__ = __webpack_require__(268);
887
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "accessibilityOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_1__accessibilityOverscanIndicesGetter__["a"]; });
888
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__ = __webpack_require__(174);
889
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultCellRangeRenderer", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultCellRangeRenderer__["a"]; });
890
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__ = __webpack_require__(173);
891
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultOverscanIndicesGetter", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultOverscanIndicesGetter__["c"]; });
892
+
893
+
894
+
895
+
896
+
897
+
898
 
 
 
 
 
 
899
 
900
 
901
  /***/ }),
902
+ /* 22 */
903
  /***/ (function(module, exports) {
904
 
905
  var g;
926
 
927
 
928
  /***/ }),
929
+ /* 23 */,
930
+ /* 24 */,
931
+ /* 25 */
932
+ /***/ (function(module, exports, __webpack_require__) {
933
+
934
+ "use strict";
935
+ /* WEBPACK VAR INJECTION */(function(process) {/**
936
+ * Copyright 2013-2015, Facebook, Inc.
937
+ * All rights reserved.
938
+ *
939
+ * This source code is licensed under the BSD-style license found in the
940
+ * LICENSE file in the root directory of this source tree. An additional grant
941
+ * of patent rights can be found in the PATENTS file in the same directory.
942
+ */
943
+
944
+
945
+
946
+ /**
947
+ * Use invariant() to assert state which your program assumes to be true.
948
+ *
949
+ * Provide sprintf-style format (only %s is supported) and arguments
950
+ * to provide information about what broke and what you were
951
+ * expecting.
952
+ *
953
+ * The invariant message will be stripped in production, but the invariant
954
+ * will remain to ensure logic does not differ in production.
955
+ */
956
+
957
+ var invariant = function(condition, format, a, b, c, d, e, f) {
958
+ if (process.env.NODE_ENV !== 'production') {
959
+ if (format === undefined) {
960
+ throw new Error('invariant requires an error message argument');
961
+ }
962
+ }
963
+
964
+ if (!condition) {
965
+ var error;
966
+ if (format === undefined) {
967
+ error = new Error(
968
+ 'Minified exception occurred; use the non-minified dev environment ' +
969
+ 'for the full error message and additional helpful warnings.'
970
+ );
971
+ } else {
972
+ var args = [a, b, c, d, e, f];
973
+ var argIndex = 0;
974
+ error = new Error(
975
+ format.replace(/%s/g, function() { return args[argIndex++]; })
976
+ );
977
+ error.name = 'Invariant Violation';
978
+ }
979
+
980
+ error.framesToPop = 1; // we don't care about invariant's own frame
981
+ throw error;
982
+ }
983
+ };
984
+
985
+ module.exports = invariant;
986
+
987
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
988
+
989
+ /***/ }),
990
+ /* 26 */,
991
+ /* 27 */,
992
+ /* 28 */,
993
+ /* 29 */
994
+ /***/ (function(module, exports, __webpack_require__) {
995
+
996
+ "use strict";
997
+
998
+
999
+ exports.__esModule = true;
1000
+
1001
+ var _iterator = __webpack_require__(72);
1002
+
1003
+ var _iterator2 = _interopRequireDefault(_iterator);
1004
+
1005
+ var _symbol = __webpack_require__(74);
1006
+
1007
+ var _symbol2 = _interopRequireDefault(_symbol);
1008
+
1009
+ var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
1010
+
1011
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1012
+
1013
+ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
1014
+ return typeof obj === "undefined" ? "undefined" : _typeof(obj);
1015
+ } : function (obj) {
1016
+ return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
1017
+ };
1018
+
1019
+ /***/ }),
1020
+ /* 30 */
1021
+ /***/ (function(module, exports, __webpack_require__) {
1022
+
1023
+ exports.f = __webpack_require__(11);
1024
+
1025
+
1026
+ /***/ }),
1027
+ /* 31 */
1028
+ /***/ (function(module, exports, __webpack_require__) {
1029
+
1030
+ var global = __webpack_require__(13);
1031
+ var core = __webpack_require__(3);
1032
+ var LIBRARY = __webpack_require__(43);
1033
+ var wksExt = __webpack_require__(30);
1034
+ var defineProperty = __webpack_require__(14).f;
1035
+ module.exports = function (name) {
1036
+ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
1037
+ if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
1038
+ };
1039
+
1040
+
1041
+ /***/ }),
1042
+ /* 32 */,
1043
+ /* 33 */
1044
+ /***/ (function(module, exports, __webpack_require__) {
1045
+
1046
+ module.exports = { "default": __webpack_require__(84), __esModule: true };
1047
+
1048
+ /***/ }),
1049
+ /* 34 */,
1050
+ /* 35 */,
1051
+ /* 36 */,
1052
+ /* 37 */,
1053
+ /* 38 */,
1054
+ /* 39 */
1055
+ /***/ (function(module, exports, __webpack_require__) {
1056
+
1057
+ var pIE = __webpack_require__(28);
1058
+ var createDesc = __webpack_require__(36);
1059
+ var toIObject = __webpack_require__(24);
1060
+ var toPrimitive = __webpack_require__(50);
1061
+ var has = __webpack_require__(23);
1062
+ var IE8_DOM_DEFINE = __webpack_require__(109);
1063
+ var gOPD = Object.getOwnPropertyDescriptor;
1064
+
1065
+ exports.f = __webpack_require__(20) ? gOPD : function getOwnPropertyDescriptor(O, P) {
1066
+ O = toIObject(O);
1067
+ P = toPrimitive(P, true);
1068
+ if (IE8_DOM_DEFINE) try {
1069
+ return gOPD(O, P);
1070
+ } catch (e) { /* empty */ }
1071
+ if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
1072
+ };
1073
+
1074
+
1075
+ /***/ }),
1076
+ /* 40 */
1077
  /***/ (function(module, exports, __webpack_require__) {
1078
 
1079
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
1128
 
1129
 
1130
  /***/ }),
1131
+ /* 41 */
1132
+ /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1133
 
1134
+ module.exports = function(module) {
1135
+ if(!module.webpackPolyfill) {
1136
+ module.deprecate = function() {};
1137
+ module.paths = [];
1138
+ // module.parent = undefined by default
1139
+ if(!module.children) module.children = [];
1140
+ Object.defineProperty(module, "loaded", {
1141
+ enumerable: true,
1142
+ get: function() {
1143
+ return module.l;
1144
  }
1145
+ });
1146
+ Object.defineProperty(module, "id", {
1147
+ enumerable: true,
1148
+ get: function() {
1149
+ return module.i;
 
 
 
1150
  }
1151
+ });
1152
+ module.webpackPolyfill = 1;
1153
  }
1154
+ return module;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
  };
1156
 
 
1157
 
1158
  /***/ }),
1159
+ /* 42 */,
1160
+ /* 43 */,
1161
+ /* 44 */,
1162
+ /* 45 */,
1163
+ /* 46 */,
1164
+ /* 47 */,
1165
+ /* 48 */
1166
  /***/ (function(module, exports, __webpack_require__) {
1167
 
1168
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
1169
+ var $keys = __webpack_require__(111);
1170
+ var hiddenKeys = __webpack_require__(67).concat('length', 'prototype');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1171
 
1172
+ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1173
+ return $keys(O, hiddenKeys);
1174
  };
1175
 
1176
 
1177
  /***/ }),
1178
+ /* 49 */
 
 
 
 
 
 
 
 
 
 
1179
  /***/ (function(module, exports, __webpack_require__) {
1180
 
1181
  "use strict";
1190
 
1191
 
1192
  var React = __webpack_require__(1);
1193
+ var factory = __webpack_require__(452);
1194
 
1195
  if (typeof React === 'undefined') {
1196
  throw Error(
1210
 
1211
 
1212
  /***/ }),
1213
+ /* 50 */,
1214
+ /* 51 */,
1215
+ /* 52 */
1216
  /***/ (function(module, exports, __webpack_require__) {
1217
 
1218
+ var classof = __webpack_require__(53);
1219
+ var ITERATOR = __webpack_require__(11)('iterator');
1220
+ var Iterators = __webpack_require__(45);
1221
+ module.exports = __webpack_require__(3).getIteratorMethod = function (it) {
1222
+ if (it != undefined) return it[ITERATOR]
1223
+ || it['@@iterator']
1224
+ || Iterators[classof(it)];
1225
  };
1226
 
1227
 
1228
  /***/ }),
1229
+ /* 53 */
1230
+ /***/ (function(module, exports, __webpack_require__) {
 
 
 
 
 
1231
 
1232
+ // getting tag from 19.1.3.6 Object.prototype.toString()
1233
+ var cof = __webpack_require__(37);
1234
+ var TAG = __webpack_require__(11)('toStringTag');
1235
+ // ES3 wrong here
1236
+ var ARG = cof(function () { return arguments; }()) == 'Arguments';
1237
 
1238
+ // fallback for IE11 Script Access Denied error
1239
+ var tryGet = function (it, key) {
1240
+ try {
1241
+ return it[key];
1242
+ } catch (e) { /* empty */ }
1243
+ };
1244
 
 
 
 
1245
  module.exports = function (it) {
1246
+ var O, T, B;
1247
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1248
+ // @@toStringTag case
1249
+ : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
1250
+ // builtinTag case
1251
+ : ARG ? cof(O)
1252
+ // ES3 arguments fallback
1253
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
1254
  };
1255
 
1256
 
1257
  /***/ }),
1258
+ /* 54 */
 
 
 
 
 
 
1259
  /***/ (function(module, exports, __webpack_require__) {
1260
 
1261
+ var baseGetTag = __webpack_require__(115),
1262
+ getPrototype = __webpack_require__(320),
1263
+ isObjectLike = __webpack_require__(101);
1264
 
1265
  /** `Object#toString` result references. */
1266
  var objectTag = '[object Object]';
1323
 
1324
 
1325
  /***/ }),
1326
+ /* 55 */
1327
  /***/ (function(module, exports) {
1328
 
1329
  /**
1355
 
1356
 
1357
  /***/ }),
1358
+ /* 56 */
1359
  /***/ (function(module, exports, __webpack_require__) {
1360
 
1361
  "use strict";
1412
  }
1413
 
1414
  module.exports = invariant;
1415
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8)))
1416
 
1417
  /***/ }),
1418
+ /* 57 */,
1419
+ /* 58 */
1420
  /***/ (function(module, exports) {
1421
 
 
 
 
 
 
 
 
1422
 
1423
 
1424
  /***/ }),
1425
+ /* 59 */
1426
+ /***/ (function(module, exports, __webpack_require__) {
1427
+
1428
+ module.exports = { "default": __webpack_require__(134), __esModule: true };
1429
 
1430
+ /***/ }),
1431
+ /* 60 */,
1432
+ /* 61 */
1433
+ /***/ (function(module, exports, __webpack_require__) {
1434
 
1435
+ module.exports = { "default": __webpack_require__(88), __esModule: true };
1436
 
1437
  /***/ }),
1438
+ /* 62 */
1439
  /***/ (function(module, exports, __webpack_require__) {
1440
 
1441
  var babelPluginFlowReactPropTypes_proptype_Index = {
1481
  });
1482
 
1483
  /***/ }),
1484
+ /* 63 */
1485
  /***/ (function(module, exports, __webpack_require__) {
1486
 
1487
+ /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
1488
+ * @license
1489
+ * Lodash <https://lodash.com/>
1490
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
1491
+ * Released under MIT license <https://lodash.com/license>
1492
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1493
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 
 
 
 
1494
  */
1495
+ ;(function() {
 
 
1496
 
1497
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
1498
+ var undefined;
1499
 
1500
+ /** Used as the semantic version number. */
1501
+ var VERSION = '4.17.10';
1502
 
1503
+ /** Used as the size to enable large array optimizations. */
1504
+ var LARGE_ARRAY_SIZE = 200;
 
1505
 
1506
+ /** Error message constants. */
1507
+ var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
1508
+ FUNC_ERROR_TEXT = 'Expected a function';
1509
 
1510
+ /** Used to stand-in for `undefined` hash values. */
1511
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1512
 
1513
+ /** Used as the maximum memoize cache size. */
1514
+ var MAX_MEMOIZE_SIZE = 500;
1515
 
1516
+ /** Used as the internal argument placeholder. */
1517
+ var PLACEHOLDER = '__lodash_placeholder__';
1518
 
1519
+ /** Used to compose bitmasks for cloning. */
1520
+ var CLONE_DEEP_FLAG = 1,
1521
+ CLONE_FLAT_FLAG = 2,
1522
+ CLONE_SYMBOLS_FLAG = 4;
1523
 
1524
+ /** Used to compose bitmasks for value comparisons. */
1525
+ var COMPARE_PARTIAL_FLAG = 1,
1526
+ COMPARE_UNORDERED_FLAG = 2;
 
 
 
 
1527
 
1528
+ /** Used to compose bitmasks for function metadata. */
1529
+ var WRAP_BIND_FLAG = 1,
1530
+ WRAP_BIND_KEY_FLAG = 2,
1531
+ WRAP_CURRY_BOUND_FLAG = 4,
1532
+ WRAP_CURRY_FLAG = 8,
1533
+ WRAP_CURRY_RIGHT_FLAG = 16,
1534
+ WRAP_PARTIAL_FLAG = 32,
1535
+ WRAP_PARTIAL_RIGHT_FLAG = 64,
1536
+ WRAP_ARY_FLAG = 128,
1537
+ WRAP_REARG_FLAG = 256,
1538
+ WRAP_FLIP_FLAG = 512;
 
 
 
 
 
 
 
 
1539
 
1540
+ /** Used as default options for `_.truncate`. */
1541
+ var DEFAULT_TRUNC_LENGTH = 30,
1542
+ DEFAULT_TRUNC_OMISSION = '...';
 
 
 
 
 
 
1543
 
1544
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
1545
+ var HOT_COUNT = 800,
1546
+ HOT_SPAN = 16;
1547
 
1548
+ /** Used to indicate the type of lazy iteratees. */
1549
+ var LAZY_FILTER_FLAG = 1,
1550
+ LAZY_MAP_FLAG = 2,
1551
+ LAZY_WHILE_FLAG = 3;
1552
 
1553
+ /** Used as references for various `Number` constants. */
1554
+ var INFINITY = 1 / 0,
1555
+ MAX_SAFE_INTEGER = 9007199254740991,
1556
+ MAX_INTEGER = 1.7976931348623157e+308,
1557
+ NAN = 0 / 0;
1558
 
1559
+ /** Used as references for the maximum length and index of an array. */
1560
+ var MAX_ARRAY_LENGTH = 4294967295,
1561
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
1562
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
 
1563
 
1564
+ /** Used to associate wrap methods with their bit flags. */
1565
+ var wrapFlags = [
1566
+ ['ary', WRAP_ARY_FLAG],
1567
+ ['bind', WRAP_BIND_FLAG],
1568
+ ['bindKey', WRAP_BIND_KEY_FLAG],
1569
+ ['curry', WRAP_CURRY_FLAG],
1570
+ ['curryRight', WRAP_CURRY_RIGHT_FLAG],
1571
+ ['flip', WRAP_FLIP_FLAG],
1572
+ ['partial', WRAP_PARTIAL_FLAG],
1573
+ ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
1574
+ ['rearg', WRAP_REARG_FLAG]
1575
+ ];
1576
 
1577
+ /** `Object#toString` result references. */
1578
+ var argsTag = '[object Arguments]',
1579
+ arrayTag = '[object Array]',
1580
+ asyncTag = '[object AsyncFunction]',
1581
+ boolTag = '[object Boolean]',
1582
+ dateTag = '[object Date]',
1583
+ domExcTag = '[object DOMException]',
1584
+ errorTag = '[object Error]',
1585
+ funcTag = '[object Function]',
1586
+ genTag = '[object GeneratorFunction]',
1587
+ mapTag = '[object Map]',
1588
+ numberTag = '[object Number]',
1589
+ nullTag = '[object Null]',
1590
+ objectTag = '[object Object]',
1591
+ promiseTag = '[object Promise]',
1592
+ proxyTag = '[object Proxy]',
1593
+ regexpTag = '[object RegExp]',
1594
+ setTag = '[object Set]',
1595
+ stringTag = '[object String]',
1596
+ symbolTag = '[object Symbol]',
1597
+ undefinedTag = '[object Undefined]',
1598
+ weakMapTag = '[object WeakMap]',
1599
+ weakSetTag = '[object WeakSet]';
1600
 
1601
+ var arrayBufferTag = '[object ArrayBuffer]',
1602
+ dataViewTag = '[object DataView]',
1603
+ float32Tag = '[object Float32Array]',
1604
+ float64Tag = '[object Float64Array]',
1605
+ int8Tag = '[object Int8Array]',
1606
+ int16Tag = '[object Int16Array]',
1607
+ int32Tag = '[object Int32Array]',
1608
+ uint8Tag = '[object Uint8Array]',
1609
+ uint8ClampedTag = '[object Uint8ClampedArray]',
1610
+ uint16Tag = '[object Uint16Array]',
1611
+ uint32Tag = '[object Uint32Array]';
1612
 
1613
+ /** Used to match empty string literals in compiled template source. */
1614
+ var reEmptyStringLeading = /\b__p \+= '';/g,
1615
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
1616
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
 
 
 
 
 
 
 
 
 
 
1617
 
1618
+ /** Used to match HTML entities and HTML characters. */
1619
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
1620
+ reUnescapedHtml = /[&<>"']/g,
1621
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
1622
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
1623
 
1624
+ /** Used to match template delimiters. */
1625
+ var reEscape = /<%-([\s\S]+?)%>/g,
1626
+ reEvaluate = /<%([\s\S]+?)%>/g,
1627
+ reInterpolate = /<%=([\s\S]+?)%>/g;
1628
 
1629
+ /** Used to match property names within property paths. */
1630
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1631
+ reIsPlainProp = /^\w*$/,
1632
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
 
 
 
 
1633
 
1634
+ /**
1635
+ * Used to match `RegExp`
1636
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
1637
+ */
1638
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
1639
+ reHasRegExpChar = RegExp(reRegExpChar.source);
 
 
 
1640
 
1641
+ /** Used to match leading and trailing whitespace. */
1642
+ var reTrim = /^\s+|\s+$/g,
1643
+ reTrimStart = /^\s+/,
1644
+ reTrimEnd = /\s+$/;
 
 
 
 
 
1645
 
1646
+ /** Used to match wrap detail comments. */
1647
+ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
1648
+ reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
1649
+ reSplitDetails = /,? & /;
 
1650
 
1651
+ /** Used to match words composed of alphanumeric characters. */
1652
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
 
 
1653
 
1654
+ /** Used to match backslashes in property paths. */
1655
+ var reEscapeChar = /\\(\\)?/g;
1656
 
1657
+ /**
1658
+ * Used to match
1659
+ * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
1660
+ */
1661
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
 
1662
 
1663
+ /** Used to match `RegExp` flags from their coerced string values. */
1664
+ var reFlags = /\w*$/;
 
 
1665
 
1666
+ /** Used to detect bad signed hexadecimal string values. */
1667
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
 
 
1668
 
1669
+ /** Used to detect binary string values. */
1670
+ var reIsBinary = /^0b[01]+$/i;
 
 
 
 
 
 
 
 
1671
 
1672
+ /** Used to detect host constructors (Safari). */
1673
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1674
 
1675
+ /** Used to detect octal string values. */
1676
+ var reIsOctal = /^0o[0-7]+$/i;
 
1677
 
1678
+ /** Used to detect unsigned integer values. */
1679
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1680
 
1681
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
1682
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
 
 
1683
 
1684
+ /** Used to ensure capturing order of template delimiters. */
1685
+ var reNoMatch = /($^)/;
 
1686
 
1687
+ /** Used to match unescaped characters in compiled string literals. */
1688
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
 
 
 
 
1689
 
1690
+ /** Used to compose unicode character classes. */
1691
+ var rsAstralRange = '\\ud800-\\udfff',
1692
+ rsComboMarksRange = '\\u0300-\\u036f',
1693
+ reComboHalfMarksRange = '\\ufe20-\\ufe2f',
1694
+ rsComboSymbolsRange = '\\u20d0-\\u20ff',
1695
+ rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
1696
+ rsDingbatRange = '\\u2700-\\u27bf',
1697
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
1698
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
1699
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
1700
+ rsPunctuationRange = '\\u2000-\\u206f',
1701
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
1702
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
1703
+ rsVarRange = '\\ufe0e\\ufe0f',
1704
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
1705
 
1706
+ /** Used to compose unicode capture groups. */
1707
+ var rsApos = "['\u2019]",
1708
+ rsAstral = '[' + rsAstralRange + ']',
1709
+ rsBreak = '[' + rsBreakRange + ']',
1710
+ rsCombo = '[' + rsComboRange + ']',
1711
+ rsDigits = '\\d+',
1712
+ rsDingbat = '[' + rsDingbatRange + ']',
1713
+ rsLower = '[' + rsLowerRange + ']',
1714
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
1715
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
1716
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
1717
+ rsNonAstral = '[^' + rsAstralRange + ']',
1718
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
1719
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
1720
+ rsUpper = '[' + rsUpperRange + ']',
1721
+ rsZWJ = '\\u200d';
1722
 
1723
+ /** Used to compose unicode regexes. */
1724
+ var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
1725
+ rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
1726
+ rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
1727
+ rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
1728
+ reOptMod = rsModifier + '?',
1729
+ rsOptVar = '[' + rsVarRange + ']?',
1730
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
1731
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
1732
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
1733
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
1734
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
1735
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
1736
 
1737
+ /** Used to match apostrophes. */
1738
+ var reApos = RegExp(rsApos, 'g');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1739
 
1740
+ /**
1741
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
1742
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
1743
+ */
1744
+ var reComboMark = RegExp(rsCombo, 'g');
 
 
 
 
 
 
 
1745
 
1746
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
1747
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
 
 
 
 
 
 
 
1748
 
1749
+ /** Used to match complex or compound words. */
1750
+ var reUnicodeWord = RegExp([
1751
+ rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
1752
+ rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
1753
+ rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
1754
+ rsUpper + '+' + rsOptContrUpper,
1755
+ rsOrdUpper,
1756
+ rsOrdLower,
1757
+ rsDigits,
1758
+ rsEmoji
1759
+ ].join('|'), 'g');
1760
 
1761
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
1762
+ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
 
1763
 
1764
+ /** Used to detect strings that need a more robust regexp to match words. */
1765
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
 
 
 
1766
 
1767
+ /** Used to assign default `context` object properties. */
1768
+ var contextProps = [
1769
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
1770
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
1771
+ 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
1772
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
1773
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
1774
+ ];
1775
 
1776
+ /** Used to make template sourceURLs easier to identify. */
1777
+ var templateCounter = -1;
 
 
 
 
 
1778
 
1779
+ /** Used to identify `toStringTag` values of typed arrays. */
1780
+ var typedArrayTags = {};
1781
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1782
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1783
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1784
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1785
+ typedArrayTags[uint32Tag] = true;
1786
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1787
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1788
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1789
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1790
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1791
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1792
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
1793
+ typedArrayTags[weakMapTag] = false;
1794
 
1795
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
1796
+ var cloneableTags = {};
1797
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
1798
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
1799
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
1800
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
1801
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
1802
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
1803
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
1804
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
1805
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
1806
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
1807
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
1808
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
1809
+ cloneableTags[weakMapTag] = false;
1810
 
1811
+ /** Used to map Latin Unicode letters to basic Latin letters. */
1812
+ var deburredLetters = {
1813
+ // Latin-1 Supplement block.
1814
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
1815
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
1816
+ '\xc7': 'C', '\xe7': 'c',
1817
+ '\xd0': 'D', '\xf0': 'd',
1818
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
1819
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
1820
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
1821
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
1822
+ '\xd1': 'N', '\xf1': 'n',
1823
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
1824
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
1825
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
1826
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
1827
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
1828
+ '\xc6': 'Ae', '\xe6': 'ae',
1829
+ '\xde': 'Th', '\xfe': 'th',
1830
+ '\xdf': 'ss',
1831
+ // Latin Extended-A block.
1832
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
1833
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
1834
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
1835
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
1836
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
1837
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
1838
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
1839
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
1840
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
1841
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
1842
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
1843
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
1844
+ '\u0134': 'J', '\u0135': 'j',
1845
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
1846
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
1847
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
1848
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
1849
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
1850
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
1851
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
1852
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
1853
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
1854
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
1855
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
1856
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
1857
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
1858
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
1859
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
1860
+ '\u0174': 'W', '\u0175': 'w',
1861
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
1862
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
1863
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
1864
+ '\u0132': 'IJ', '\u0133': 'ij',
1865
+ '\u0152': 'Oe', '\u0153': 'oe',
1866
+ '\u0149': "'n", '\u017f': 's'
1867
+ };
1868
 
1869
+ /** Used to map characters to HTML entities. */
1870
+ var htmlEscapes = {
1871
+ '&': '&amp;',
1872
+ '<': '&lt;',
1873
+ '>': '&gt;',
1874
+ '"': '&quot;',
1875
+ "'": '&#39;'
1876
+ };
1877
 
1878
+ /** Used to map HTML entities to characters. */
1879
+ var htmlUnescapes = {
1880
+ '&amp;': '&',
1881
+ '&lt;': '<',
1882
+ '&gt;': '>',
1883
+ '&quot;': '"',
1884
+ '&#39;': "'"
 
 
1885
  };
1886
 
1887
+ /** Used to escape characters for inclusion in compiled string literals. */
1888
+ var stringEscapes = {
1889
+ '\\': '\\',
1890
+ "'": "'",
1891
+ '\n': 'n',
1892
+ '\r': 'r',
1893
+ '\u2028': 'u2028',
1894
+ '\u2029': 'u2029'
 
 
1895
  };
 
1896
 
1897
+ /** Built-in method references without a dependency on `root`. */
1898
+ var freeParseFloat = parseFloat,
1899
+ freeParseInt = parseInt;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1900
 
1901
+ /** Detect free variable `global` from Node.js. */
1902
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
 
 
 
1903
 
1904
+ /** Detect free variable `self`. */
1905
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
 
 
 
1906
 
1907
+ /** Used as a reference to the global object. */
1908
+ var root = freeGlobal || freeSelf || Function('return this')();
 
 
 
 
 
 
 
 
 
 
 
1909
 
1910
+ /** Detect free variable `exports`. */
1911
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
 
 
 
 
1912
 
1913
+ /** Detect free variable `module`. */
1914
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1915
 
1916
+ /** Detect the popular CommonJS extension `module.exports`. */
1917
+ var moduleExports = freeModule && freeModule.exports === freeExports;
 
 
 
 
 
 
1918
 
1919
+ /** Detect free variable `process` from Node.js. */
1920
+ var freeProcess = moduleExports && freeGlobal.process;
 
 
 
 
 
 
1921
 
1922
+ /** Used to access faster Node.js helpers. */
1923
+ var nodeUtil = (function() {
1924
+ try {
1925
+ // Use `util.types` for Node.js 10+.
1926
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
 
 
 
1927
 
1928
+ if (types) {
1929
+ return types;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1930
  }
 
 
 
1931
 
1932
+ // Legacy `process.binding('util')` for Node.js < 10.
1933
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1934
+ } catch (e) {}
1935
+ }());
 
 
 
 
 
1936
 
1937
+ /* Node.js helper references. */
1938
+ var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
1939
+ nodeIsDate = nodeUtil && nodeUtil.isDate,
1940
+ nodeIsMap = nodeUtil && nodeUtil.isMap,
1941
+ nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
1942
+ nodeIsSet = nodeUtil && nodeUtil.isSet,
1943
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1944
 
1945
+ /*--------------------------------------------------------------------------*/
 
 
 
 
1946
 
1947
+ /**
1948
+ * A faster alternative to `Function#apply`, this function invokes `func`
1949
+ * with the `this` binding of `thisArg` and the arguments of `args`.
1950
+ *
1951
+ * @private
1952
+ * @param {Function} func The function to invoke.
1953
+ * @param {*} thisArg The `this` binding of `func`.
1954
+ * @param {Array} args The arguments to invoke `func` with.
1955
+ * @returns {*} Returns the result of `func`.
1956
+ */
1957
+ function apply(func, thisArg, args) {
1958
+ switch (args.length) {
1959
+ case 0: return func.call(thisArg);
1960
+ case 1: return func.call(thisArg, args[0]);
1961
+ case 2: return func.call(thisArg, args[0], args[1]);
1962
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
1963
+ }
1964
+ return func.apply(thisArg, args);
1965
+ }
1966
 
1967
+ /**
1968
+ * A specialized version of `baseAggregator` for arrays.
1969
+ *
1970
+ * @private
1971
+ * @param {Array} [array] The array to iterate over.
1972
+ * @param {Function} setter The function to set `accumulator` values.
1973
+ * @param {Function} iteratee The iteratee to transform keys.
1974
+ * @param {Object} accumulator The initial aggregated object.
1975
+ * @returns {Function} Returns `accumulator`.
1976
+ */
1977
+ function arrayAggregator(array, setter, iteratee, accumulator) {
1978
+ var index = -1,
1979
+ length = array == null ? 0 : array.length;
1980
 
1981
+ while (++index < length) {
1982
+ var value = array[index];
1983
+ setter(accumulator, value, iteratee(value), array);
1984
+ }
1985
+ return accumulator;
1986
+ }
1987
 
1988
+ /**
1989
+ * A specialized version of `_.forEach` for arrays without support for
1990
+ * iteratee shorthands.
1991
+ *
1992
+ * @private
1993
+ * @param {Array} [array] The array to iterate over.
1994
+ * @param {Function} iteratee The function invoked per iteration.
1995
+ * @returns {Array} Returns `array`.
1996
+ */
1997
+ function arrayEach(array, iteratee) {
1998
+ var index = -1,
1999
+ length = array == null ? 0 : array.length;
2000
 
2001
+ while (++index < length) {
2002
+ if (iteratee(array[index], index, array) === false) {
2003
+ break;
2004
+ }
2005
+ }
2006
+ return array;
2007
+ }
 
2008
 
2009
+ /**
2010
+ * A specialized version of `_.forEachRight` for arrays without support for
2011
+ * iteratee shorthands.
2012
+ *
2013
+ * @private
2014
+ * @param {Array} [array] The array to iterate over.
2015
+ * @param {Function} iteratee The function invoked per iteration.
2016
+ * @returns {Array} Returns `array`.
2017
+ */
2018
+ function arrayEachRight(array, iteratee) {
2019
+ var length = array == null ? 0 : array.length;
2020
 
2021
+ while (length--) {
2022
+ if (iteratee(array[length], length, array) === false) {
2023
+ break;
2024
+ }
2025
+ }
2026
+ return array;
2027
+ }
2028
 
2029
+ /**
2030
+ * A specialized version of `_.every` for arrays without support for
2031
+ * iteratee shorthands.
2032
+ *
2033
+ * @private
2034
+ * @param {Array} [array] The array to iterate over.
2035
+ * @param {Function} predicate The function invoked per iteration.
2036
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
2037
+ * else `false`.
2038
+ */
2039
+ function arrayEvery(array, predicate) {
2040
+ var index = -1,
2041
+ length = array == null ? 0 : array.length;
2042
 
2043
+ while (++index < length) {
2044
+ if (!predicate(array[index], index, array)) {
2045
+ return false;
2046
+ }
2047
+ }
2048
+ return true;
2049
+ }
2050
 
2051
+ /**
2052
+ * A specialized version of `_.filter` for arrays without support for
2053
+ * iteratee shorthands.
2054
+ *
2055
+ * @private
2056
+ * @param {Array} [array] The array to iterate over.
2057
+ * @param {Function} predicate The function invoked per iteration.
2058
+ * @returns {Array} Returns the new filtered array.
2059
+ */
2060
+ function arrayFilter(array, predicate) {
2061
+ var index = -1,
2062
+ length = array == null ? 0 : array.length,
2063
+ resIndex = 0,
2064
+ result = [];
2065
 
2066
+ while (++index < length) {
2067
+ var value = array[index];
2068
+ if (predicate(value, index, array)) {
2069
+ result[resIndex++] = value;
2070
+ }
2071
+ }
2072
+ return result;
2073
+ }
2074
 
2075
+ /**
2076
+ * A specialized version of `_.includes` for arrays without support for
2077
+ * specifying an index to search from.
2078
+ *
2079
+ * @private
2080
+ * @param {Array} [array] The array to inspect.
2081
+ * @param {*} target The value to search for.
2082
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
2083
+ */
2084
+ function arrayIncludes(array, value) {
2085
+ var length = array == null ? 0 : array.length;
2086
+ return !!length && baseIndexOf(array, value, 0) > -1;
2087
+ }
2088
 
2089
+ /**
2090
+ * This function is like `arrayIncludes` except that it accepts a comparator.
2091
+ *
2092
+ * @private
2093
+ * @param {Array} [array] The array to inspect.
2094
+ * @param {*} target The value to search for.
2095
+ * @param {Function} comparator The comparator invoked per element.
2096
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
2097
+ */
2098
+ function arrayIncludesWith(array, value, comparator) {
2099
+ var index = -1,
2100
+ length = array == null ? 0 : array.length;
2101
 
2102
+ while (++index < length) {
2103
+ if (comparator(value, array[index])) {
2104
+ return true;
2105
+ }
2106
+ }
2107
+ return false;
2108
+ }
2109
 
2110
+ /**
2111
+ * A specialized version of `_.map` for arrays without support for iteratee
2112
+ * shorthands.
2113
+ *
2114
+ * @private
2115
+ * @param {Array} [array] The array to iterate over.
2116
+ * @param {Function} iteratee The function invoked per iteration.
2117
+ * @returns {Array} Returns the new mapped array.
2118
+ */
2119
+ function arrayMap(array, iteratee) {
2120
+ var index = -1,
2121
+ length = array == null ? 0 : array.length,
2122
+ result = Array(length);
2123
 
2124
+ while (++index < length) {
2125
+ result[index] = iteratee(array[index], index, array);
2126
+ }
2127
+ return result;
2128
+ }
 
2129
 
2130
+ /**
2131
+ * Appends the elements of `values` to `array`.
2132
+ *
2133
+ * @private
2134
+ * @param {Array} array The array to modify.
2135
+ * @param {Array} values The values to append.
2136
+ * @returns {Array} Returns `array`.
2137
+ */
2138
+ function arrayPush(array, values) {
2139
+ var index = -1,
2140
+ length = values.length,
2141
+ offset = array.length;
2142
 
2143
+ while (++index < length) {
2144
+ array[offset + index] = values[index];
 
 
2145
  }
2146
+ return array;
2147
+ }
2148
 
2149
+ /**
2150
+ * A specialized version of `_.reduce` for arrays without support for
2151
+ * iteratee shorthands.
2152
+ *
2153
+ * @private
2154
+ * @param {Array} [array] The array to iterate over.
2155
+ * @param {Function} iteratee The function invoked per iteration.
2156
+ * @param {*} [accumulator] The initial value.
2157
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2158
+ * the initial value.
2159
+ * @returns {*} Returns the accumulated value.
2160
+ */
2161
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2162
+ var index = -1,
2163
+ length = array == null ? 0 : array.length;
2164
 
2165
+ if (initAccum && length) {
2166
+ accumulator = array[++index];
 
2167
  }
2168
+ while (++index < length) {
2169
+ accumulator = iteratee(accumulator, array[index], index, array);
 
2170
  }
2171
+ return accumulator;
2172
+ }
2173
 
2174
+ /**
2175
+ * A specialized version of `_.reduceRight` for arrays without support for
2176
+ * iteratee shorthands.
2177
+ *
2178
+ * @private
2179
+ * @param {Array} [array] The array to iterate over.
2180
+ * @param {Function} iteratee The function invoked per iteration.
2181
+ * @param {*} [accumulator] The initial value.
2182
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
2183
+ * the initial value.
2184
+ * @returns {*} Returns the accumulated value.
2185
+ */
2186
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
2187
+ var length = array == null ? 0 : array.length;
2188
+ if (initAccum && length) {
2189
+ accumulator = array[--length];
2190
  }
2191
+ while (length--) {
2192
+ accumulator = iteratee(accumulator, array[length], length, array);
2193
+ }
2194
+ return accumulator;
2195
+ }
2196
 
2197
+ /**
2198
+ * A specialized version of `_.some` for arrays without support for iteratee
2199
+ * shorthands.
2200
+ *
2201
+ * @private
2202
+ * @param {Array} [array] The array to iterate over.
2203
+ * @param {Function} predicate The function invoked per iteration.
2204
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
2205
+ * else `false`.
2206
+ */
2207
+ function arraySome(array, predicate) {
2208
+ var index = -1,
2209
+ length = array == null ? 0 : array.length;
2210
 
2211
+ while (++index < length) {
2212
+ if (predicate(array[index], index, array)) {
2213
+ return true;
2214
+ }
2215
+ }
2216
+ return false;
2217
+ }
2218
 
2219
+ /**
2220
+ * Gets the size of an ASCII `string`.
2221
+ *
2222
+ * @private
2223
+ * @param {string} string The string inspect.
2224
+ * @returns {number} Returns the string size.
2225
+ */
2226
+ var asciiSize = baseProperty('length');
2227
 
2228
+ /**
2229
+ * Converts an ASCII `string` to an array.
2230
+ *
2231
+ * @private
2232
+ * @param {string} string The string to convert.
2233
+ * @returns {Array} Returns the converted array.
2234
+ */
2235
+ function asciiToArray(string) {
2236
+ return string.split('');
2237
+ }
2238
 
2239
+ /**
2240
+ * Splits an ASCII `string` into an array of its words.
2241
+ *
2242
+ * @private
2243
+ * @param {string} The string to inspect.
2244
+ * @returns {Array} Returns the words of `string`.
2245
+ */
2246
+ function asciiWords(string) {
2247
+ return string.match(reAsciiWord) || [];
2248
+ }
2249
 
2250
+ /**
2251
+ * The base implementation of methods like `_.findKey` and `_.findLastKey`,
2252
+ * without support for iteratee shorthands, which iterates over `collection`
2253
+ * using `eachFunc`.
2254
+ *
2255
+ * @private
2256
+ * @param {Array|Object} collection The collection to inspect.
2257
+ * @param {Function} predicate The function invoked per iteration.
2258
+ * @param {Function} eachFunc The function to iterate over `collection`.
2259
+ * @returns {*} Returns the found element or its key, else `undefined`.
2260
+ */
2261
+ function baseFindKey(collection, predicate, eachFunc) {
2262
+ var result;
2263
+ eachFunc(collection, function(value, key, collection) {
2264
+ if (predicate(value, key, collection)) {
2265
+ result = key;
2266
+ return false;
2267
+ }
2268
+ });
2269
+ return result;
2270
+ }
2271
 
2272
+ /**
2273
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
2274
+ * support for iteratee shorthands.
2275
+ *
2276
+ * @private
2277
+ * @param {Array} array The array to inspect.
2278
+ * @param {Function} predicate The function invoked per iteration.
2279
+ * @param {number} fromIndex The index to search from.
2280
+ * @param {boolean} [fromRight] Specify iterating from right to left.
2281
+ * @returns {number} Returns the index of the matched value, else `-1`.
2282
+ */
2283
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
2284
+ var length = array.length,
2285
+ index = fromIndex + (fromRight ? 1 : -1);
2286
 
2287
+ while ((fromRight ? index-- : ++index < length)) {
2288
+ if (predicate(array[index], index, array)) {
2289
+ return index;
2290
+ }
2291
+ }
2292
+ return -1;
2293
+ }
2294
 
2295
+ /**
2296
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
2297
+ *
2298
+ * @private
2299
+ * @param {Array} array The array to inspect.
2300
+ * @param {*} value The value to search for.
2301
+ * @param {number} fromIndex The index to search from.
2302
+ * @returns {number} Returns the index of the matched value, else `-1`.
2303
+ */
2304
+ function baseIndexOf(array, value, fromIndex) {
2305
+ return value === value
2306
+ ? strictIndexOf(array, value, fromIndex)
2307
+ : baseFindIndex(array, baseIsNaN, fromIndex);
2308
+ }
2309
 
2310
+ /**
2311
+ * This function is like `baseIndexOf` except that it accepts a comparator.
2312
+ *
2313
+ * @private
2314
+ * @param {Array} array The array to inspect.
2315
+ * @param {*} value The value to search for.
2316
+ * @param {number} fromIndex The index to search from.
2317
+ * @param {Function} comparator The comparator invoked per element.
2318
+ * @returns {number} Returns the index of the matched value, else `-1`.
2319
+ */
2320
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
2321
+ var index = fromIndex - 1,
2322
+ length = array.length;
2323
 
2324
+ while (++index < length) {
2325
+ if (comparator(array[index], value)) {
2326
+ return index;
2327
+ }
2328
+ }
2329
+ return -1;
2330
+ }
2331
 
2332
+ /**
2333
+ * The base implementation of `_.isNaN` without support for number objects.
2334
+ *
2335
+ * @private
2336
+ * @param {*} value The value to check.
2337
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
2338
+ */
2339
+ function baseIsNaN(value) {
2340
+ return value !== value;
2341
+ }
2342
 
2343
+ /**
2344
+ * The base implementation of `_.mean` and `_.meanBy` without support for
2345
+ * iteratee shorthands.
2346
+ *
2347
+ * @private
2348
+ * @param {Array} array The array to iterate over.
2349
+ * @param {Function} iteratee The function invoked per iteration.
2350
+ * @returns {number} Returns the mean.
2351
+ */
2352
+ function baseMean(array, iteratee) {
2353
+ var length = array == null ? 0 : array.length;
2354
+ return length ? (baseSum(array, iteratee) / length) : NAN;
2355
+ }
2356
 
2357
+ /**
2358
+ * The base implementation of `_.property` without support for deep paths.
2359
+ *
2360
+ * @private
2361
+ * @param {string} key The key of the property to get.
2362
+ * @returns {Function} Returns the new accessor function.
2363
+ */
2364
+ function baseProperty(key) {
2365
+ return function(object) {
2366
+ return object == null ? undefined : object[key];
 
2367
  };
2368
+ }
2369
+
2370
+ /**
2371
+ * The base implementation of `_.propertyOf` without support for deep paths.
2372
+ *
2373
+ * @private
2374
+ * @param {Object} object The object to query.
2375
+ * @returns {Function} Returns the new accessor function.
2376
+ */
2377
+ function basePropertyOf(object) {
2378
+ return function(key) {
2379
+ return object == null ? undefined : object[key];
2380
  };
2381
  }
 
 
 
 
2382
 
2383
+ /**
2384
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
2385
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
2386
+ *
2387
+ * @private
2388
+ * @param {Array|Object} collection The collection to iterate over.
2389
+ * @param {Function} iteratee The function invoked per iteration.
2390
+ * @param {*} accumulator The initial value.
2391
+ * @param {boolean} initAccum Specify using the first or last element of
2392
+ * `collection` as the initial value.
2393
+ * @param {Function} eachFunc The function to iterate over `collection`.
2394
+ * @returns {*} Returns the accumulated value.
2395
+ */
2396
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
2397
+ eachFunc(collection, function(value, index, collection) {
2398
+ accumulator = initAccum
2399
+ ? (initAccum = false, value)
2400
+ : iteratee(accumulator, value, index, collection);
2401
+ });
2402
+ return accumulator;
2403
+ }
2404
 
2405
+ /**
2406
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
2407
+ * sort order of `array` and replaces criteria objects with their corresponding
2408
+ * values.
2409
+ *
2410
+ * @private
2411
+ * @param {Array} array The array to sort.
2412
+ * @param {Function} comparer The function to define sort order.
2413
+ * @returns {Array} Returns `array`.
2414
+ */
2415
+ function baseSortBy(array, comparer) {
2416
+ var length = array.length;
2417
 
2418
+ array.sort(comparer);
2419
+ while (length--) {
2420
+ array[length] = array[length].value;
2421
+ }
2422
+ return array;
2423
+ }
2424
 
2425
+ /**
2426
+ * The base implementation of `_.sum` and `_.sumBy` without support for
2427
+ * iteratee shorthands.
2428
+ *
2429
+ * @private
2430
+ * @param {Array} array The array to iterate over.
2431
+ * @param {Function} iteratee The function invoked per iteration.
2432
+ * @returns {number} Returns the sum.
2433
+ */
2434
+ function baseSum(array, iteratee) {
2435
+ var result,
2436
+ index = -1,
2437
+ length = array.length;
2438
 
2439
+ while (++index < length) {
2440
+ var current = iteratee(array[index]);
2441
+ if (current !== undefined) {
2442
+ result = result === undefined ? current : (result + current);
2443
+ }
2444
+ }
2445
+ return result;
2446
+ }
2447
 
2448
+ /**
2449
+ * The base implementation of `_.times` without support for iteratee shorthands
2450
+ * or max array length checks.
2451
+ *
2452
+ * @private
2453
+ * @param {number} n The number of times to invoke `iteratee`.
2454
+ * @param {Function} iteratee The function invoked per iteration.
2455
+ * @returns {Array} Returns the array of results.
2456
+ */
2457
+ function baseTimes(n, iteratee) {
2458
+ var index = -1,
2459
+ result = Array(n);
2460
 
2461
+ while (++index < n) {
2462
+ result[index] = iteratee(index);
2463
+ }
2464
+ return result;
2465
+ }
2466
 
2467
+ /**
2468
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
2469
+ * of key-value pairs for `object` corresponding to the property names of `props`.
2470
+ *
2471
+ * @private
2472
+ * @param {Object} object The object to query.
2473
+ * @param {Array} props The property names to get values for.
2474
+ * @returns {Object} Returns the key-value pairs.
2475
+ */
2476
+ function baseToPairs(object, props) {
2477
+ return arrayMap(props, function(key) {
2478
+ return [key, object[key]];
2479
+ });
2480
+ }
2481
 
2482
+ /**
2483
+ * The base implementation of `_.unary` without support for storing metadata.
2484
+ *
2485
+ * @private
2486
+ * @param {Function} func The function to cap arguments for.
2487
+ * @returns {Function} Returns the new capped function.
2488
+ */
2489
+ function baseUnary(func) {
2490
+ return function(value) {
2491
+ return func(value);
2492
+ };
2493
+ }
2494
 
2495
+ /**
2496
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
2497
+ * array of `object` property values corresponding to the property names
2498
+ * of `props`.
2499
+ *
2500
+ * @private
2501
+ * @param {Object} object The object to query.
2502
+ * @param {Array} props The property names to get values for.
2503
+ * @returns {Object} Returns the array of property values.
2504
+ */
2505
+ function baseValues(object, props) {
2506
+ return arrayMap(props, function(key) {
2507
+ return object[key];
2508
+ });
2509
+ }
2510
 
2511
+ /**
2512
+ * Checks if a `cache` value for `key` exists.
2513
+ *
2514
+ * @private
2515
+ * @param {Object} cache The cache to query.
2516
+ * @param {string} key The key of the entry to check.
2517
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2518
+ */
2519
+ function cacheHas(cache, key) {
2520
+ return cache.has(key);
2521
+ }
2522
 
2523
+ /**
2524
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
2525
+ * that is not found in the character symbols.
2526
+ *
2527
+ * @private
2528
+ * @param {Array} strSymbols The string symbols to inspect.
2529
+ * @param {Array} chrSymbols The character symbols to find.
2530
+ * @returns {number} Returns the index of the first unmatched string symbol.
2531
+ */
2532
+ function charsStartIndex(strSymbols, chrSymbols) {
2533
+ var index = -1,
2534
+ length = strSymbols.length;
2535
 
2536
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2537
+ return index;
2538
+ }
2539
 
2540
+ /**
2541
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
2542
+ * that is not found in the character symbols.
2543
+ *
2544
+ * @private
2545
+ * @param {Array} strSymbols The string symbols to inspect.
2546
+ * @param {Array} chrSymbols The character symbols to find.
2547
+ * @returns {number} Returns the index of the last unmatched string symbol.
2548
+ */
2549
+ function charsEndIndex(strSymbols, chrSymbols) {
2550
+ var index = strSymbols.length;
2551
 
2552
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
2553
+ return index;
2554
+ }
2555
 
2556
+ /**
2557
+ * Gets the number of `placeholder` occurrences in `array`.
2558
+ *
2559
+ * @private
2560
+ * @param {Array} array The array to inspect.
2561
+ * @param {*} placeholder The placeholder to search for.
2562
+ * @returns {number} Returns the placeholder count.
2563
+ */
2564
+ function countHolders(array, placeholder) {
2565
+ var length = array.length,
2566
+ result = 0;
2567
 
2568
+ while (length--) {
2569
+ if (array[length] === placeholder) {
2570
+ ++result;
2571
+ }
2572
+ }
2573
+ return result;
2574
  }
2575
 
2576
+ /**
2577
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
2578
+ * letters to basic Latin letters.
2579
+ *
2580
+ * @private
2581
+ * @param {string} letter The matched letter to deburr.
2582
+ * @returns {string} Returns the deburred letter.
2583
+ */
2584
+ var deburrLetter = basePropertyOf(deburredLetters);
2585
 
2586
+ /**
2587
+ * Used by `_.escape` to convert characters to HTML entities.
2588
+ *
2589
+ * @private
2590
+ * @param {string} chr The matched character to escape.
2591
+ * @returns {string} Returns the escaped character.
2592
+ */
2593
+ var escapeHtmlChar = basePropertyOf(htmlEscapes);
2594
 
2595
+ /**
2596
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
2597
+ *
2598
+ * @private
2599
+ * @param {string} chr The matched character to escape.
2600
+ * @returns {string} Returns the escaped character.
2601
+ */
2602
+ function escapeStringChar(chr) {
2603
+ return '\\' + stringEscapes[chr];
2604
+ }
2605
 
2606
+ /**
2607
+ * Gets the value at `key` of `object`.
2608
+ *
2609
+ * @private
2610
+ * @param {Object} [object] The object to query.
2611
+ * @param {string} key The key of the property to get.
2612
+ * @returns {*} Returns the property value.
2613
+ */
2614
+ function getValue(object, key) {
2615
+ return object == null ? undefined : object[key];
2616
+ }
2617
 
2618
+ /**
2619
+ * Checks if `string` contains Unicode symbols.
2620
+ *
2621
+ * @private
2622
+ * @param {string} string The string to inspect.
2623
+ * @returns {boolean} Returns `true` if a symbol is found, else `false`.
2624
+ */
2625
+ function hasUnicode(string) {
2626
+ return reHasUnicode.test(string);
2627
+ }
2628
 
2629
+ /**
2630
+ * Checks if `string` contains a word composed of Unicode symbols.
2631
+ *
2632
+ * @private
2633
+ * @param {string} string The string to inspect.
2634
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
2635
+ */
2636
+ function hasUnicodeWord(string) {
2637
+ return reHasUnicodeWord.test(string);
2638
+ }
2639
 
2640
+ /**
2641
+ * Converts `iterator` to an array.
2642
+ *
2643
+ * @private
2644
+ * @param {Object} iterator The iterator to convert.
2645
+ * @returns {Array} Returns the converted array.
2646
+ */
2647
+ function iteratorToArray(iterator) {
2648
+ var data,
2649
+ result = [];
2650
 
2651
+ while (!(data = iterator.next()).done) {
2652
+ result.push(data.value);
 
 
 
2653
  }
2654
+ return result;
2655
+ }
2656
 
2657
+ /**
2658
+ * Converts `map` to its key-value pairs.
2659
+ *
2660
+ * @private
2661
+ * @param {Object} map The map to convert.
2662
+ * @returns {Array} Returns the key-value pairs.
2663
+ */
2664
+ function mapToArray(map) {
2665
+ var index = -1,
2666
+ result = Array(map.size);
2667
 
2668
+ map.forEach(function(value, key) {
2669
+ result[++index] = [key, value];
2670
+ });
2671
+ return result;
2672
+ }
2673
 
2674
+ /**
2675
+ * Creates a unary function that invokes `func` with its argument transformed.
2676
+ *
2677
+ * @private
2678
+ * @param {Function} func The function to wrap.
2679
+ * @param {Function} transform The argument transform.
2680
+ * @returns {Function} Returns the new function.
2681
+ */
2682
+ function overArg(func, transform) {
2683
+ return function(arg) {
2684
+ return func(transform(arg));
2685
+ };
2686
+ }
2687
 
2688
+ /**
2689
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
2690
+ * and returns an array of their indexes.
2691
+ *
2692
+ * @private
2693
+ * @param {Array} array The array to modify.
2694
+ * @param {*} placeholder The placeholder to replace.
2695
+ * @returns {Array} Returns the new array of placeholder indexes.
2696
+ */
2697
+ function replaceHolders(array, placeholder) {
2698
+ var index = -1,
2699
+ length = array.length,
2700
+ resIndex = 0,
2701
+ result = [];
2702
+
2703
+ while (++index < length) {
2704
+ var value = array[index];
2705
+ if (value === placeholder || value === PLACEHOLDER) {
2706
+ array[index] = PLACEHOLDER;
2707
+ result[resIndex++] = index;
2708
+ }
2709
  }
2710
+ return result;
2711
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2712
 
2713
+ /**
2714
+ * Gets the value at `key`, unless `key` is "__proto__".
2715
+ *
2716
+ * @private
2717
+ * @param {Object} object The object to query.
2718
+ * @param {string} key The key of the property to get.
2719
+ * @returns {*} Returns the property value.
2720
+ */
2721
+ function safeGet(object, key) {
2722
+ return key == '__proto__'
2723
+ ? undefined
2724
+ : object[key];
2725
+ }
2726
 
2727
+ /**
2728
+ * Converts `set` to an array of its values.
2729
+ *
2730
+ * @private
2731
+ * @param {Object} set The set to convert.
2732
+ * @returns {Array} Returns the values.
2733
+ */
2734
+ function setToArray(set) {
2735
+ var index = -1,
2736
+ result = Array(set.size);
2737
 
2738
+ set.forEach(function(value) {
2739
+ result[++index] = value;
2740
+ });
2741
+ return result;
2742
+ }
2743
 
2744
+ /**
2745
+ * Converts `set` to its value-value pairs.
2746
+ *
2747
+ * @private
2748
+ * @param {Object} set The set to convert.
2749
+ * @returns {Array} Returns the value-value pairs.
2750
+ */
2751
+ function setToPairs(set) {
2752
+ var index = -1,
2753
+ result = Array(set.size);
2754
 
2755
+ set.forEach(function(value) {
2756
+ result[++index] = [value, value];
2757
+ });
2758
+ return result;
2759
+ }
 
 
 
 
 
 
 
 
 
 
 
2760
 
2761
+ /**
2762
+ * A specialized version of `_.indexOf` which performs strict equality
2763
+ * comparisons of values, i.e. `===`.
2764
+ *
2765
+ * @private
2766
+ * @param {Array} array The array to inspect.
2767
+ * @param {*} value The value to search for.
2768
+ * @param {number} fromIndex The index to search from.
2769
+ * @returns {number} Returns the index of the matched value, else `-1`.
2770
+ */
2771
+ function strictIndexOf(array, value, fromIndex) {
2772
+ var index = fromIndex - 1,
2773
+ length = array.length;
2774
 
2775
+ while (++index < length) {
2776
+ if (array[index] === value) {
2777
+ return index;
2778
+ }
2779
+ }
2780
+ return -1;
2781
+ }
2782
 
2783
+ /**
2784
+ * A specialized version of `_.lastIndexOf` which performs strict equality
2785
+ * comparisons of values, i.e. `===`.
2786
+ *
2787
+ * @private
2788
+ * @param {Array} array The array to inspect.
2789
+ * @param {*} value The value to search for.
2790
+ * @param {number} fromIndex The index to search from.
2791
+ * @returns {number} Returns the index of the matched value, else `-1`.
2792
+ */
2793
+ function strictLastIndexOf(array, value, fromIndex) {
2794
+ var index = fromIndex + 1;
2795
+ while (index--) {
2796
+ if (array[index] === value) {
2797
+ return index;
2798
+ }
2799
+ }
2800
+ return index;
2801
+ }
2802
 
2803
+ /**
2804
+ * Gets the number of symbols in `string`.
2805
+ *
2806
+ * @private
2807
+ * @param {string} string The string to inspect.
2808
+ * @returns {number} Returns the string size.
2809
+ */
2810
+ function stringSize(string) {
2811
+ return hasUnicode(string)
2812
+ ? unicodeSize(string)
2813
+ : asciiSize(string);
2814
+ }
2815
 
2816
+ /**
2817
+ * Converts `string` to an array.
2818
+ *
2819
+ * @private
2820
+ * @param {string} string The string to convert.
2821
+ * @returns {Array} Returns the converted array.
2822
+ */
2823
+ function stringToArray(string) {
2824
+ return hasUnicode(string)
2825
+ ? unicodeToArray(string)
2826
+ : asciiToArray(string);
2827
+ }
2828
 
2829
+ /**
2830
+ * Used by `_.unescape` to convert HTML entities to characters.
2831
+ *
2832
+ * @private
2833
+ * @param {string} chr The matched character to unescape.
2834
+ * @returns {string} Returns the unescaped character.
2835
+ */
2836
+ var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
2837
 
2838
+ /**
2839
+ * Gets the size of a Unicode `string`.
2840
+ *
2841
+ * @private
2842
+ * @param {string} string The string inspect.
2843
+ * @returns {number} Returns the string size.
2844
+ */
2845
+ function unicodeSize(string) {
2846
+ var result = reUnicode.lastIndex = 0;
2847
+ while (reUnicode.test(string)) {
2848
+ ++result;
2849
+ }
2850
+ return result;
2851
+ }
2852
 
2853
+ /**
2854
+ * Converts a Unicode `string` to an array.
2855
+ *
2856
+ * @private
2857
+ * @param {string} string The string to convert.
2858
+ * @returns {Array} Returns the converted array.
2859
+ */
2860
+ function unicodeToArray(string) {
2861
+ return string.match(reUnicode) || [];
2862
+ }
2863
 
2864
+ /**
2865
+ * Splits a Unicode `string` into an array of its words.
2866
+ *
2867
+ * @private
2868
+ * @param {string} The string to inspect.
2869
+ * @returns {Array} Returns the words of `string`.
2870
+ */
2871
+ function unicodeWords(string) {
2872
+ return string.match(reUnicodeWord) || [];
2873
+ }
2874
 
2875
+ /*--------------------------------------------------------------------------*/
2876
 
2877
+ /**
2878
+ * Create a new pristine `lodash` function using the `context` object.
2879
+ *
2880
+ * @static
2881
+ * @memberOf _
2882
+ * @since 1.1.0
2883
+ * @category Util
2884
+ * @param {Object} [context=root] The context object.
2885
+ * @returns {Function} Returns a new `lodash` function.
2886
+ * @example
2887
+ *
2888
+ * _.mixin({ 'foo': _.constant('foo') });
2889
+ *
2890
+ * var lodash = _.runInContext();
2891
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
2892
+ *
2893
+ * _.isFunction(_.foo);
2894
+ * // => true
2895
+ * _.isFunction(_.bar);
2896
+ * // => false
2897
+ *
2898
+ * lodash.isFunction(lodash.foo);
2899
+ * // => false
2900
+ * lodash.isFunction(lodash.bar);
2901
+ * // => true
2902
+ *
2903
+ * // Create a suped-up `defer` in Node.js.
2904
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
2905
+ */
2906
+ var runInContext = (function runInContext(context) {
2907
+ context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2908
 
2909
+ /** Built-in constructor references. */
2910
+ var Array = context.Array,
2911
+ Date = context.Date,
2912
+ Error = context.Error,
2913
+ Function = context.Function,
2914
+ Math = context.Math,
2915
+ Object = context.Object,
2916
+ RegExp = context.RegExp,
2917
+ String = context.String,
2918
+ TypeError = context.TypeError;
2919
 
2920
+ /** Used for built-in method references. */
2921
+ var arrayProto = Array.prototype,
2922
+ funcProto = Function.prototype,
2923
+ objectProto = Object.prototype;
2924
 
2925
+ /** Used to detect overreaching core-js shims. */
2926
+ var coreJsData = context['__core-js_shared__'];
 
2927
 
2928
+ /** Used to resolve the decompiled source of functions. */
2929
+ var funcToString = funcProto.toString;
 
2930
 
2931
+ /** Used to check objects for own properties. */
2932
+ var hasOwnProperty = objectProto.hasOwnProperty;
 
2933
 
2934
+ /** Used to generate unique IDs. */
2935
+ var idCounter = 0;
2936
 
2937
+ /** Used to detect methods masquerading as native. */
2938
+ var maskSrcKey = (function() {
2939
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2940
+ return uid ? ('Symbol(src)_1.' + uid) : '';
2941
+ }());
2942
 
2943
+ /**
2944
+ * Used to resolve the
2945
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2946
+ * of values.
2947
+ */
2948
+ var nativeObjectToString = objectProto.toString;
2949
 
2950
+ /** Used to infer the `Object` constructor. */
2951
+ var objectCtorString = funcToString.call(Object);
2952
 
2953
+ /** Used to restore the original `_` reference in `_.noConflict`. */
2954
+ var oldDash = root._;
 
2955
 
2956
+ /** Used to detect if a method is native. */
2957
+ var reIsNative = RegExp('^' +
2958
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
2959
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
2960
+ );
2961
 
2962
+ /** Built-in value references. */
2963
+ var Buffer = moduleExports ? context.Buffer : undefined,
2964
+ Symbol = context.Symbol,
2965
+ Uint8Array = context.Uint8Array,
2966
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
2967
+ getPrototype = overArg(Object.getPrototypeOf, Object),
2968
+ objectCreate = Object.create,
2969
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
2970
+ splice = arrayProto.splice,
2971
+ spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
2972
+ symIterator = Symbol ? Symbol.iterator : undefined,
2973
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
2974
 
2975
+ var defineProperty = (function() {
2976
+ try {
2977
+ var func = getNative(Object, 'defineProperty');
2978
+ func({}, '', {});
2979
+ return func;
2980
+ } catch (e) {}
2981
+ }());
2982
 
2983
+ /** Mocked built-ins. */
2984
+ var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
2985
+ ctxNow = Date && Date.now !== root.Date.now && Date.now,
2986
+ ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2987
 
2988
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2989
+ var nativeCeil = Math.ceil,
2990
+ nativeFloor = Math.floor,
2991
+ nativeGetSymbols = Object.getOwnPropertySymbols,
2992
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
2993
+ nativeIsFinite = context.isFinite,
2994
+ nativeJoin = arrayProto.join,
2995
+ nativeKeys = overArg(Object.keys, Object),
2996
+ nativeMax = Math.max,
2997
+ nativeMin = Math.min,
2998
+ nativeNow = Date.now,
2999
+ nativeParseInt = context.parseInt,
3000
+ nativeRandom = Math.random,
3001
+ nativeReverse = arrayProto.reverse;
3002
 
3003
+ /* Built-in method references that are verified to be native. */
3004
+ var DataView = getNative(context, 'DataView'),
3005
+ Map = getNative(context, 'Map'),
3006
+ Promise = getNative(context, 'Promise'),
3007
+ Set = getNative(context, 'Set'),
3008
+ WeakMap = getNative(context, 'WeakMap'),
3009
+ nativeCreate = getNative(Object, 'create');
3010
 
3011
+ /** Used to store function metadata. */
3012
+ var metaMap = WeakMap && new WeakMap;
3013
 
3014
+ /** Used to lookup unminified function names. */
3015
+ var realNames = {};
 
3016
 
3017
+ /** Used to detect maps, sets, and weakmaps. */
3018
+ var dataViewCtorString = toSource(DataView),
3019
+ mapCtorString = toSource(Map),
3020
+ promiseCtorString = toSource(Promise),
3021
+ setCtorString = toSource(Set),
3022
+ weakMapCtorString = toSource(WeakMap);
 
3023
 
3024
+ /** Used to convert symbols to primitives and strings. */
3025
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
3026
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
3027
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
 
 
3028
 
3029
+ /*------------------------------------------------------------------------*/
3030
 
3031
+ /**
3032
+ * Creates a `lodash` object which wraps `value` to enable implicit method
3033
+ * chain sequences. Methods that operate on and return arrays, collections,
3034
+ * and functions can be chained together. Methods that retrieve a single value
3035
+ * or may return a primitive value will automatically end the chain sequence
3036
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
3037
+ * with `_#value`.
3038
+ *
3039
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
3040
+ * enabled using `_.chain`.
3041
+ *
3042
+ * The execution of chained methods is lazy, that is, it's deferred until
3043
+ * `_#value` is implicitly or explicitly called.
3044
+ *
3045
+ * Lazy evaluation allows several methods to support shortcut fusion.
3046
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
3047
+ * the creation of intermediate arrays and can greatly reduce the number of
3048
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
3049
+ * fusion if the section is applied to an array and iteratees accept only
3050
+ * one argument. The heuristic for whether a section qualifies for shortcut
3051
+ * fusion is subject to change.
3052
+ *
3053
+ * Chaining is supported in custom builds as long as the `_#value` method is
3054
+ * directly or indirectly included in the build.
3055
+ *
3056
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
3057
+ *
3058
+ * The wrapper `Array` methods are:
3059
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
3060
+ *
3061
+ * The wrapper `String` methods are:
3062
+ * `replace` and `split`
3063
+ *
3064
+ * The wrapper methods that support shortcut fusion are:
3065
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
3066
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
3067
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
3068
+ *
3069
+ * The chainable wrapper methods are:
3070
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
3071
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
3072
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
3073
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
3074
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
3075
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
3076
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
3077
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
3078
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
3079
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
3080
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
3081
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
3082
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
3083
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
3084
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
3085
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
3086
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
3087
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
3088
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
3089
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
3090
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
3091
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
3092
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
3093
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
3094
+ *
3095
+ * The wrapper methods that are **not** chainable by default are:
3096
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
3097
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
3098
+ * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
3099
+ * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
3100
+ * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
3101
+ * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
3102
+ * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
3103
+ * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
3104
+ * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
3105
+ * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
3106
+ * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
3107
+ * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
3108
+ * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
3109
+ * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
3110
+ * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
3111
+ * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
3112
+ * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
3113
+ * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
3114
+ * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
3115
+ * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
3116
+ * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
3117
+ * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
3118
+ * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
3119
+ * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
3120
+ * `upperFirst`, `value`, and `words`
3121
+ *
3122
+ * @name _
3123
+ * @constructor
3124
+ * @category Seq
3125
+ * @param {*} value The value to wrap in a `lodash` instance.
3126
+ * @returns {Object} Returns the new `lodash` wrapper instance.
3127
+ * @example
3128
+ *
3129
+ * function square(n) {
3130
+ * return n * n;
3131
+ * }
3132
+ *
3133
+ * var wrapped = _([1, 2, 3]);
3134
+ *
3135
+ * // Returns an unwrapped value.
3136
+ * wrapped.reduce(_.add);
3137
+ * // => 6
3138
+ *
3139
+ * // Returns a wrapped value.
3140
+ * var squares = wrapped.map(square);
3141
+ *
3142
+ * _.isArray(squares);
3143
+ * // => false
3144
+ *
3145
+ * _.isArray(squares.value());
3146
+ * // => true
3147
+ */
3148
+ function lodash(value) {
3149
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
3150
+ if (value instanceof LodashWrapper) {
3151
+ return value;
3152
+ }
3153
+ if (hasOwnProperty.call(value, '__wrapped__')) {
3154
+ return wrapperClone(value);
3155
+ }
3156
+ }
3157
+ return new LodashWrapper(value);
3158
+ }
3159
 
3160
+ /**
3161
+ * The base implementation of `_.create` without support for assigning
3162
+ * properties to the created object.
3163
+ *
3164
+ * @private
3165
+ * @param {Object} proto The object to inherit from.
3166
+ * @returns {Object} Returns the new object.
3167
+ */
3168
+ var baseCreate = (function() {
3169
+ function object() {}
3170
+ return function(proto) {
3171
+ if (!isObject(proto)) {
3172
+ return {};
3173
+ }
3174
+ if (objectCreate) {
3175
+ return objectCreate(proto);
3176
+ }
3177
+ object.prototype = proto;
3178
+ var result = new object;
3179
+ object.prototype = undefined;
3180
+ return result;
3181
+ };
3182
+ }());
3183
 
3184
+ /**
3185
+ * The function whose prototype chain sequence wrappers inherit from.
3186
+ *
3187
+ * @private
3188
+ */
3189
+ function baseLodash() {
3190
+ // No operation performed.
3191
+ }
3192
 
3193
+ /**
3194
+ * The base constructor for creating `lodash` wrapper objects.
3195
+ *
3196
+ * @private
3197
+ * @param {*} value The value to wrap.
3198
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
3199
+ */
3200
+ function LodashWrapper(value, chainAll) {
3201
+ this.__wrapped__ = value;
3202
+ this.__actions__ = [];
3203
+ this.__chain__ = !!chainAll;
3204
+ this.__index__ = 0;
3205
+ this.__values__ = undefined;
3206
+ }
3207
 
3208
+ /**
3209
+ * By default, the template delimiters used by lodash are like those in
3210
+ * embedded Ruby (ERB) as well as ES2015 template strings. Change the
3211
+ * following template settings to use alternative delimiters.
3212
+ *
3213
+ * @static
3214
+ * @memberOf _
3215
+ * @type {Object}
3216
+ */
3217
+ lodash.templateSettings = {
3218
 
3219
+ /**
3220
+ * Used to detect `data` property values to be HTML-escaped.
3221
+ *
3222
+ * @memberOf _.templateSettings
3223
+ * @type {RegExp}
3224
+ */
3225
+ 'escape': reEscape,
3226
 
3227
+ /**
3228
+ * Used to detect code to be evaluated.
3229
+ *
3230
+ * @memberOf _.templateSettings
3231
+ * @type {RegExp}
3232
+ */
3233
+ 'evaluate': reEvaluate,
3234
 
3235
+ /**
3236
+ * Used to detect `data` property values to inject.
3237
+ *
3238
+ * @memberOf _.templateSettings
3239
+ * @type {RegExp}
3240
+ */
3241
+ 'interpolate': reInterpolate,
3242
 
3243
+ /**
3244
+ * Used to reference the data object in the template text.
3245
+ *
3246
+ * @memberOf _.templateSettings
3247
+ * @type {string}
3248
+ */
3249
+ 'variable': '',
3250
 
3251
+ /**
3252
+ * Used to import variables into the compiled template.
3253
+ *
3254
+ * @memberOf _.templateSettings
3255
+ * @type {Object}
3256
+ */
3257
+ 'imports': {
3258
 
3259
+ /**
3260
+ * A reference to the `lodash` function.
3261
+ *
3262
+ * @memberOf _.templateSettings.imports
3263
+ * @type {Function}
3264
+ */
3265
+ '_': lodash
3266
+ }
3267
+ };
3268
 
3269
+ // Ensure wrappers are instances of `baseLodash`.
3270
+ lodash.prototype = baseLodash.prototype;
3271
+ lodash.prototype.constructor = lodash;
3272
 
3273
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
3274
+ LodashWrapper.prototype.constructor = LodashWrapper;
3275
 
3276
+ /*------------------------------------------------------------------------*/
3277
 
3278
+ /**
3279
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
3280
+ *
3281
+ * @private
3282
+ * @constructor
3283
+ * @param {*} value The value to wrap.
3284
+ */
3285
+ function LazyWrapper(value) {
3286
+ this.__wrapped__ = value;
3287
+ this.__actions__ = [];
3288
+ this.__dir__ = 1;
3289
+ this.__filtered__ = false;
3290
+ this.__iteratees__ = [];
3291
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
3292
+ this.__views__ = [];
3293
+ }
3294
 
3295
+ /**
3296
+ * Creates a clone of the lazy wrapper object.
3297
+ *
3298
+ * @private
3299
+ * @name clone
3300
+ * @memberOf LazyWrapper
3301
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
3302
+ */
3303
+ function lazyClone() {
3304
+ var result = new LazyWrapper(this.__wrapped__);
3305
+ result.__actions__ = copyArray(this.__actions__);
3306
+ result.__dir__ = this.__dir__;
3307
+ result.__filtered__ = this.__filtered__;
3308
+ result.__iteratees__ = copyArray(this.__iteratees__);
3309
+ result.__takeCount__ = this.__takeCount__;
3310
+ result.__views__ = copyArray(this.__views__);
3311
+ return result;
3312
+ }
3313
 
3314
+ /**
3315
+ * Reverses the direction of lazy iteration.
3316
+ *
3317
+ * @private
3318
+ * @name reverse
3319
+ * @memberOf LazyWrapper
3320
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
3321
+ */
3322
+ function lazyReverse() {
3323
+ if (this.__filtered__) {
3324
+ var result = new LazyWrapper(this);
3325
+ result.__dir__ = -1;
3326
+ result.__filtered__ = true;
3327
+ } else {
3328
+ result = this.clone();
3329
+ result.__dir__ *= -1;
3330
+ }
3331
+ return result;
3332
+ }
3333
 
3334
+ /**
3335
+ * Extracts the unwrapped value from its lazy wrapper.
3336
+ *
3337
+ * @private
3338
+ * @name value
3339
+ * @memberOf LazyWrapper
3340
+ * @returns {*} Returns the unwrapped value.
3341
+ */
3342
+ function lazyValue() {
3343
+ var array = this.__wrapped__.value(),
3344
+ dir = this.__dir__,
3345
+ isArr = isArray(array),
3346
+ isRight = dir < 0,
3347
+ arrLength = isArr ? array.length : 0,
3348
+ view = getView(0, arrLength, this.__views__),
3349
+ start = view.start,
3350
+ end = view.end,
3351
+ length = end - start,
3352
+ index = isRight ? end : (start - 1),
3353
+ iteratees = this.__iteratees__,
3354
+ iterLength = iteratees.length,
3355
+ resIndex = 0,
3356
+ takeCount = nativeMin(length, this.__takeCount__);
3357
 
3358
+ if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
3359
+ return baseWrapperValue(array, this.__actions__);
3360
+ }
3361
+ var result = [];
3362
 
3363
+ outer:
3364
+ while (length-- && resIndex < takeCount) {
3365
+ index += dir;
 
 
3366
 
3367
+ var iterIndex = -1,
3368
+ value = array[index];
 
 
 
3369
 
3370
+ while (++iterIndex < iterLength) {
3371
+ var data = iteratees[iterIndex],
3372
+ iteratee = data.iteratee,
3373
+ type = data.type,
3374
+ computed = iteratee(value);
3375
 
3376
+ if (type == LAZY_MAP_FLAG) {
3377
+ value = computed;
3378
+ } else if (!computed) {
3379
+ if (type == LAZY_FILTER_FLAG) {
3380
+ continue outer;
3381
+ } else {
3382
+ break outer;
3383
+ }
3384
+ }
3385
+ }
3386
+ result[resIndex++] = value;
3387
+ }
3388
+ return result;
3389
+ }
3390
 
3391
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
3392
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
3393
+ LazyWrapper.prototype.constructor = LazyWrapper;
3394
 
3395
+ /*------------------------------------------------------------------------*/
 
 
 
 
 
 
 
 
 
3396
 
3397
+ /**
3398
+ * Creates a hash object.
3399
+ *
3400
+ * @private
3401
+ * @constructor
3402
+ * @param {Array} [entries] The key-value pairs to cache.
3403
+ */
3404
+ function Hash(entries) {
3405
+ var index = -1,
3406
+ length = entries == null ? 0 : entries.length;
3407
 
3408
+ this.clear();
3409
+ while (++index < length) {
3410
+ var entry = entries[index];
3411
+ this.set(entry[0], entry[1]);
3412
+ }
3413
+ }
3414
 
3415
+ /**
3416
+ * Removes all key-value entries from the hash.
3417
+ *
3418
+ * @private
3419
+ * @name clear
3420
+ * @memberOf Hash
3421
+ */
3422
+ function hashClear() {
3423
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
3424
+ this.size = 0;
3425
+ }
3426
 
3427
+ /**
3428
+ * Removes `key` and its value from the hash.
3429
+ *
3430
+ * @private
3431
+ * @name delete
3432
+ * @memberOf Hash
3433
+ * @param {Object} hash The hash to modify.
3434
+ * @param {string} key The key of the value to remove.
3435
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3436
+ */
3437
+ function hashDelete(key) {
3438
+ var result = this.has(key) && delete this.__data__[key];
3439
+ this.size -= result ? 1 : 0;
3440
+ return result;
3441
+ }
3442
 
3443
+ /**
3444
+ * Gets the hash value for `key`.
3445
+ *
3446
+ * @private
3447
+ * @name get
3448
+ * @memberOf Hash
3449
+ * @param {string} key The key of the value to get.
3450
+ * @returns {*} Returns the entry value.
3451
+ */
3452
+ function hashGet(key) {
3453
+ var data = this.__data__;
3454
+ if (nativeCreate) {
3455
+ var result = data[key];
3456
+ return result === HASH_UNDEFINED ? undefined : result;
3457
+ }
3458
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
3459
+ }
3460
 
3461
+ /**
3462
+ * Checks if a hash value for `key` exists.
3463
+ *
3464
+ * @private
3465
+ * @name has
3466
+ * @memberOf Hash
3467
+ * @param {string} key The key of the entry to check.
3468
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3469
+ */
3470
+ function hashHas(key) {
3471
+ var data = this.__data__;
3472
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
3473
+ }
3474
 
3475
+ /**
3476
+ * Sets the hash `key` to `value`.
3477
+ *
3478
+ * @private
3479
+ * @name set
3480
+ * @memberOf Hash
3481
+ * @param {string} key The key of the value to set.
3482
+ * @param {*} value The value to set.
3483
+ * @returns {Object} Returns the hash instance.
3484
+ */
3485
+ function hashSet(key, value) {
3486
+ var data = this.__data__;
3487
+ this.size += this.has(key) ? 0 : 1;
3488
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
3489
+ return this;
3490
+ }
3491
 
3492
+ // Add methods to `Hash`.
3493
+ Hash.prototype.clear = hashClear;
3494
+ Hash.prototype['delete'] = hashDelete;
3495
+ Hash.prototype.get = hashGet;
3496
+ Hash.prototype.has = hashHas;
3497
+ Hash.prototype.set = hashSet;
3498
 
3499
+ /*------------------------------------------------------------------------*/
 
 
 
3500
 
3501
+ /**
3502
+ * Creates an list cache object.
3503
+ *
3504
+ * @private
3505
+ * @constructor
3506
+ * @param {Array} [entries] The key-value pairs to cache.
3507
+ */
3508
+ function ListCache(entries) {
3509
+ var index = -1,
3510
+ length = entries == null ? 0 : entries.length;
3511
 
3512
+ this.clear();
3513
+ while (++index < length) {
3514
+ var entry = entries[index];
3515
+ this.set(entry[0], entry[1]);
3516
+ }
3517
+ }
3518
 
3519
+ /**
3520
+ * Removes all key-value entries from the list cache.
3521
+ *
3522
+ * @private
3523
+ * @name clear
3524
+ * @memberOf ListCache
3525
+ */
3526
+ function listCacheClear() {
3527
+ this.__data__ = [];
3528
+ this.size = 0;
3529
+ }
3530
 
3531
+ /**
3532
+ * Removes `key` and its value from the list cache.
3533
+ *
3534
+ * @private
3535
+ * @name delete
3536
+ * @memberOf ListCache
3537
+ * @param {string} key The key of the value to remove.
3538
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3539
+ */
3540
+ function listCacheDelete(key) {
3541
+ var data = this.__data__,
3542
+ index = assocIndexOf(data, key);
3543
 
3544
+ if (index < 0) {
3545
+ return false;
3546
+ }
3547
+ var lastIndex = data.length - 1;
3548
+ if (index == lastIndex) {
3549
+ data.pop();
3550
+ } else {
3551
+ splice.call(data, index, 1);
3552
+ }
3553
+ --this.size;
3554
+ return true;
3555
+ }
3556
 
3557
+ /**
3558
+ * Gets the list cache value for `key`.
3559
+ *
3560
+ * @private
3561
+ * @name get
3562
+ * @memberOf ListCache
3563
+ * @param {string} key The key of the value to get.
3564
+ * @returns {*} Returns the entry value.
3565
+ */
3566
+ function listCacheGet(key) {
3567
+ var data = this.__data__,
3568
+ index = assocIndexOf(data, key);
3569
 
3570
+ return index < 0 ? undefined : data[index][1];
3571
+ }
3572
 
3573
+ /**
3574
+ * Checks if a list cache value for `key` exists.
3575
+ *
3576
+ * @private
3577
+ * @name has
3578
+ * @memberOf ListCache
3579
+ * @param {string} key The key of the entry to check.
3580
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3581
+ */
3582
+ function listCacheHas(key) {
3583
+ return assocIndexOf(this.__data__, key) > -1;
3584
+ }
3585
 
3586
+ /**
3587
+ * Sets the list cache `key` to `value`.
3588
+ *
3589
+ * @private
3590
+ * @name set
3591
+ * @memberOf ListCache
3592
+ * @param {string} key The key of the value to set.
3593
+ * @param {*} value The value to set.
3594
+ * @returns {Object} Returns the list cache instance.
3595
+ */
3596
+ function listCacheSet(key, value) {
3597
+ var data = this.__data__,
3598
+ index = assocIndexOf(data, key);
3599
 
3600
+ if (index < 0) {
3601
+ ++this.size;
3602
+ data.push([key, value]);
3603
+ } else {
3604
+ data[index][1] = value;
3605
+ }
3606
+ return this;
3607
+ }
3608
 
3609
+ // Add methods to `ListCache`.
3610
+ ListCache.prototype.clear = listCacheClear;
3611
+ ListCache.prototype['delete'] = listCacheDelete;
3612
+ ListCache.prototype.get = listCacheGet;
3613
+ ListCache.prototype.has = listCacheHas;
3614
+ ListCache.prototype.set = listCacheSet;
3615
 
3616
+ /*------------------------------------------------------------------------*/
 
 
 
 
 
3617
 
3618
+ /**
3619
+ * Creates a map cache object to store key-value pairs.
3620
+ *
3621
+ * @private
3622
+ * @constructor
3623
+ * @param {Array} [entries] The key-value pairs to cache.
3624
+ */
3625
+ function MapCache(entries) {
3626
+ var index = -1,
3627
+ length = entries == null ? 0 : entries.length;
3628
 
3629
+ this.clear();
3630
+ while (++index < length) {
3631
+ var entry = entries[index];
3632
+ this.set(entry[0], entry[1]);
3633
+ }
3634
+ }
3635
 
3636
+ /**
3637
+ * Removes all key-value entries from the map.
3638
+ *
3639
+ * @private
3640
+ * @name clear
3641
+ * @memberOf MapCache
3642
+ */
3643
+ function mapCacheClear() {
3644
+ this.size = 0;
3645
+ this.__data__ = {
3646
+ 'hash': new Hash,
3647
+ 'map': new (Map || ListCache),
3648
+ 'string': new Hash
3649
+ };
3650
+ }
3651
 
3652
+ /**
3653
+ * Removes `key` and its value from the map.
3654
+ *
3655
+ * @private
3656
+ * @name delete
3657
+ * @memberOf MapCache
3658
+ * @param {string} key The key of the value to remove.
3659
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3660
+ */
3661
+ function mapCacheDelete(key) {
3662
+ var result = getMapData(this, key)['delete'](key);
3663
+ this.size -= result ? 1 : 0;
3664
+ return result;
3665
+ }
3666
 
3667
+ /**
3668
+ * Gets the map value for `key`.
3669
+ *
3670
+ * @private
3671
+ * @name get
3672
+ * @memberOf MapCache
3673
+ * @param {string} key The key of the value to get.
3674
+ * @returns {*} Returns the entry value.
3675
+ */
3676
+ function mapCacheGet(key) {
3677
+ return getMapData(this, key).get(key);
3678
+ }
3679
 
3680
+ /**
3681
+ * Checks if a map value for `key` exists.
3682
+ *
3683
+ * @private
3684
+ * @name has
3685
+ * @memberOf MapCache
3686
+ * @param {string} key The key of the entry to check.
3687
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3688
+ */
3689
+ function mapCacheHas(key) {
3690
+ return getMapData(this, key).has(key);
3691
+ }
3692
 
3693
+ /**
3694
+ * Sets the map `key` to `value`.
3695
+ *
3696
+ * @private
3697
+ * @name set
3698
+ * @memberOf MapCache
3699
+ * @param {string} key The key of the value to set.
3700
+ * @param {*} value The value to set.
3701
+ * @returns {Object} Returns the map cache instance.
3702
+ */
3703
+ function mapCacheSet(key, value) {
3704
+ var data = getMapData(this, key),
3705
+ size = data.size;
3706
 
3707
+ data.set(key, value);
3708
+ this.size += data.size == size ? 0 : 1;
3709
+ return this;
3710
+ }
3711
 
3712
+ // Add methods to `MapCache`.
3713
+ MapCache.prototype.clear = mapCacheClear;
3714
+ MapCache.prototype['delete'] = mapCacheDelete;
3715
+ MapCache.prototype.get = mapCacheGet;
3716
+ MapCache.prototype.has = mapCacheHas;
3717
+ MapCache.prototype.set = mapCacheSet;
3718
 
3719
+ /*------------------------------------------------------------------------*/
 
 
3720
 
3721
+ /**
3722
+ *
3723
+ * Creates an array cache object to store unique values.
3724
+ *
3725
+ * @private
3726
+ * @constructor
3727
+ * @param {Array} [values] The values to cache.
3728
+ */
3729
+ function SetCache(values) {
3730
+ var index = -1,
3731
+ length = values == null ? 0 : values.length;
3732
 
3733
+ this.__data__ = new MapCache;
3734
+ while (++index < length) {
3735
+ this.add(values[index]);
3736
+ }
3737
+ }
 
 
 
 
 
 
 
3738
 
3739
+ /**
3740
+ * Adds `value` to the array cache.
3741
+ *
3742
+ * @private
3743
+ * @name add
3744
+ * @memberOf SetCache
3745
+ * @alias push
3746
+ * @param {*} value The value to cache.
3747
+ * @returns {Object} Returns the cache instance.
3748
+ */
3749
+ function setCacheAdd(value) {
3750
+ this.__data__.set(value, HASH_UNDEFINED);
3751
+ return this;
3752
+ }
3753
 
3754
+ /**
3755
+ * Checks if `value` is in the array cache.
3756
+ *
3757
+ * @private
3758
+ * @name has
3759
+ * @memberOf SetCache
3760
+ * @param {*} value The value to search for.
3761
+ * @returns {number} Returns `true` if `value` is found, else `false`.
3762
+ */
3763
+ function setCacheHas(value) {
3764
+ return this.__data__.has(value);
3765
+ }
3766
 
3767
+ // Add methods to `SetCache`.
3768
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
3769
+ SetCache.prototype.has = setCacheHas;
3770
 
3771
+ /*------------------------------------------------------------------------*/
3772
 
3773
+ /**
3774
+ * Creates a stack cache object to store key-value pairs.
3775
+ *
3776
+ * @private
3777
+ * @constructor
3778
+ * @param {Array} [entries] The key-value pairs to cache.
3779
+ */
3780
+ function Stack(entries) {
3781
+ var data = this.__data__ = new ListCache(entries);
3782
+ this.size = data.size;
 
 
 
3783
  }
 
 
 
3784
 
3785
+ /**
3786
+ * Removes all key-value entries from the stack.
3787
+ *
3788
+ * @private
3789
+ * @name clear
3790
+ * @memberOf Stack
3791
+ */
3792
+ function stackClear() {
3793
+ this.__data__ = new ListCache;
3794
+ this.size = 0;
3795
+ }
3796
 
3797
+ /**
3798
+ * Removes `key` and its value from the stack.
3799
+ *
3800
+ * @private
3801
+ * @name delete
3802
+ * @memberOf Stack
3803
+ * @param {string} key The key of the value to remove.
3804
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
3805
+ */
3806
+ function stackDelete(key) {
3807
+ var data = this.__data__,
3808
+ result = data['delete'](key);
3809
 
3810
+ this.size = data.size;
3811
+ return result;
3812
+ }
3813
 
3814
+ /**
3815
+ * Gets the stack value for `key`.
3816
+ *
3817
+ * @private
3818
+ * @name get
3819
+ * @memberOf Stack
3820
+ * @param {string} key The key of the value to get.
3821
+ * @returns {*} Returns the entry value.
3822
+ */
3823
+ function stackGet(key) {
3824
+ return this.__data__.get(key);
3825
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3826
 
3827
+ /**
3828
+ * Checks if a stack value for `key` exists.
3829
+ *
3830
+ * @private
3831
+ * @name has
3832
+ * @memberOf Stack
3833
+ * @param {string} key The key of the entry to check.
3834
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
3835
+ */
3836
+ function stackHas(key) {
3837
+ return this.__data__.has(key);
3838
+ }
3839
 
3840
+ /**
3841
+ * Sets the stack `key` to `value`.
3842
+ *
3843
+ * @private
3844
+ * @name set
3845
+ * @memberOf Stack
3846
+ * @param {string} key The key of the value to set.
3847
+ * @param {*} value The value to set.
3848
+ * @returns {Object} Returns the stack cache instance.
3849
+ */
3850
+ function stackSet(key, value) {
3851
+ var data = this.__data__;
3852
+ if (data instanceof ListCache) {
3853
+ var pairs = data.__data__;
3854
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
3855
+ pairs.push([key, value]);
3856
+ this.size = ++data.size;
3857
+ return this;
3858
+ }
3859
+ data = this.__data__ = new MapCache(pairs);
3860
+ }
3861
+ data.set(key, value);
3862
+ this.size = data.size;
3863
+ return this;
3864
+ }
3865
 
3866
+ // Add methods to `Stack`.
3867
+ Stack.prototype.clear = stackClear;
3868
+ Stack.prototype['delete'] = stackDelete;
3869
+ Stack.prototype.get = stackGet;
3870
+ Stack.prototype.has = stackHas;
3871
+ Stack.prototype.set = stackSet;
3872
 
3873
+ /*------------------------------------------------------------------------*/
3874
 
3875
+ /**
3876
+ * Creates an array of the enumerable property names of the array-like `value`.
3877
+ *
3878
+ * @private
3879
+ * @param {*} value The value to query.
3880
+ * @param {boolean} inherited Specify returning inherited property names.
3881
+ * @returns {Array} Returns the array of property names.
3882
+ */
3883
+ function arrayLikeKeys(value, inherited) {
3884
+ var isArr = isArray(value),
3885
+ isArg = !isArr && isArguments(value),
3886
+ isBuff = !isArr && !isArg && isBuffer(value),
3887
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
3888
+ skipIndexes = isArr || isArg || isBuff || isType,
3889
+ result = skipIndexes ? baseTimes(value.length, String) : [],
3890
+ length = result.length;
3891
 
3892
+ for (var key in value) {
3893
+ if ((inherited || hasOwnProperty.call(value, key)) &&
3894
+ !(skipIndexes && (
3895
+ // Safari 9 has enumerable `arguments.length` in strict mode.
3896
+ key == 'length' ||
3897
+ // Node.js 0.10 has enumerable non-index properties on buffers.
3898
+ (isBuff && (key == 'offset' || key == 'parent')) ||
3899
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
3900
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
3901
+ // Skip index properties.
3902
+ isIndex(key, length)
3903
+ ))) {
3904
+ result.push(key);
3905
+ }
3906
+ }
3907
+ return result;
3908
+ }
3909
 
3910
+ /**
3911
+ * A specialized version of `_.sample` for arrays.
3912
+ *
3913
+ * @private
3914
+ * @param {Array} array The array to sample.
3915
+ * @returns {*} Returns the random element.
3916
+ */
3917
+ function arraySample(array) {
3918
+ var length = array.length;
3919
+ return length ? array[baseRandom(0, length - 1)] : undefined;
3920
+ }
3921
 
3922
+ /**
3923
+ * A specialized version of `_.sampleSize` for arrays.
3924
+ *
3925
+ * @private
3926
+ * @param {Array} array The array to sample.
3927
+ * @param {number} n The number of elements to sample.
3928
+ * @returns {Array} Returns the random elements.
3929
+ */
3930
+ function arraySampleSize(array, n) {
3931
+ return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
3932
+ }
3933
 
3934
+ /**
3935
+ * A specialized version of `_.shuffle` for arrays.
3936
+ *
3937
+ * @private
3938
+ * @param {Array} array The array to shuffle.
3939
+ * @returns {Array} Returns the new shuffled array.
3940
+ */
3941
+ function arrayShuffle(array) {
3942
+ return shuffleSelf(copyArray(array));
3943
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3944
 
3945
+ /**
3946
+ * This function is like `assignValue` except that it doesn't assign
3947
+ * `undefined` values.
3948
+ *
3949
+ * @private
3950
+ * @param {Object} object The object to modify.
3951
+ * @param {string} key The key of the property to assign.
3952
+ * @param {*} value The value to assign.
3953
+ */
3954
+ function assignMergeValue(object, key, value) {
3955
+ if ((value !== undefined && !eq(object[key], value)) ||
3956
+ (value === undefined && !(key in object))) {
3957
+ baseAssignValue(object, key, value);
3958
+ }
3959
+ }
3960
 
3961
+ /**
3962
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
3963
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3964
+ * for equality comparisons.
3965
+ *
3966
+ * @private
3967
+ * @param {Object} object The object to modify.
3968
+ * @param {string} key The key of the property to assign.
3969
+ * @param {*} value The value to assign.
3970
+ */
3971
+ function assignValue(object, key, value) {
3972
+ var objValue = object[key];
3973
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
3974
+ (value === undefined && !(key in object))) {
3975
+ baseAssignValue(object, key, value);
3976
+ }
3977
+ }
3978
 
3979
+ /**
3980
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
3981
+ *
3982
+ * @private
3983
+ * @param {Array} array The array to inspect.
3984
+ * @param {*} key The key to search for.
3985
+ * @returns {number} Returns the index of the matched value, else `-1`.
3986
+ */
3987
+ function assocIndexOf(array, key) {
3988
+ var length = array.length;
3989
+ while (length--) {
3990
+ if (eq(array[length][0], key)) {
3991
+ return length;
3992
+ }
3993
+ }
3994
+ return -1;
3995
+ }
3996
 
3997
+ /**
3998
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
3999
+ * by `iteratee` and values set by `setter`.
4000
+ *
4001
+ * @private
4002
+ * @param {Array|Object} collection The collection to iterate over.
4003
+ * @param {Function} setter The function to set `accumulator` values.
4004
+ * @param {Function} iteratee The iteratee to transform keys.
4005
+ * @param {Object} accumulator The initial aggregated object.
4006
+ * @returns {Function} Returns `accumulator`.
4007
+ */
4008
+ function baseAggregator(collection, setter, iteratee, accumulator) {
4009
+ baseEach(collection, function(value, key, collection) {
4010
+ setter(accumulator, value, iteratee(value), collection);
4011
+ });
4012
+ return accumulator;
4013
+ }
4014
 
4015
+ /**
4016
+ * The base implementation of `_.assign` without support for multiple sources
4017
+ * or `customizer` functions.
4018
+ *
4019
+ * @private
4020
+ * @param {Object} object The destination object.
4021
+ * @param {Object} source The source object.
4022
+ * @returns {Object} Returns `object`.
4023
+ */
4024
+ function baseAssign(object, source) {
4025
+ return object && copyObject(source, keys(source), object);
4026
+ }
4027
 
4028
+ /**
4029
+ * The base implementation of `_.assignIn` without support for multiple sources
4030
+ * or `customizer` functions.
4031
+ *
4032
+ * @private
4033
+ * @param {Object} object The destination object.
4034
+ * @param {Object} source The source object.
4035
+ * @returns {Object} Returns `object`.
4036
+ */
4037
+ function baseAssignIn(object, source) {
4038
+ return object && copyObject(source, keysIn(source), object);
4039
+ }
4040
 
4041
+ /**
4042
+ * The base implementation of `assignValue` and `assignMergeValue` without
4043
+ * value checks.
4044
+ *
4045
+ * @private
4046
+ * @param {Object} object The object to modify.
4047
+ * @param {string} key The key of the property to assign.
4048
+ * @param {*} value The value to assign.
4049
+ */
4050
+ function baseAssignValue(object, key, value) {
4051
+ if (key == '__proto__' && defineProperty) {
4052
+ defineProperty(object, key, {
4053
+ 'configurable': true,
4054
+ 'enumerable': true,
4055
+ 'value': value,
4056
+ 'writable': true
4057
+ });
4058
+ } else {
4059
+ object[key] = value;
4060
+ }
4061
+ }
4062
 
4063
+ /**
4064
+ * The base implementation of `_.at` without support for individual paths.
4065
+ *
4066
+ * @private
4067
+ * @param {Object} object The object to iterate over.
4068
+ * @param {string[]} paths The property paths to pick.
4069
+ * @returns {Array} Returns the picked elements.
4070
+ */
4071
+ function baseAt(object, paths) {
4072
+ var index = -1,
4073
+ length = paths.length,
4074
+ result = Array(length),
4075
+ skip = object == null;
4076
 
4077
+ while (++index < length) {
4078
+ result[index] = skip ? undefined : get(object, paths[index]);
4079
+ }
4080
+ return result;
4081
+ }
 
4082
 
4083
+ /**
4084
+ * The base implementation of `_.clamp` which doesn't coerce arguments.
4085
+ *
4086
+ * @private
4087
+ * @param {number} number The number to clamp.
4088
+ * @param {number} [lower] The lower bound.
4089
+ * @param {number} upper The upper bound.
4090
+ * @returns {number} Returns the clamped number.
4091
+ */
4092
+ function baseClamp(number, lower, upper) {
4093
+ if (number === number) {
4094
+ if (upper !== undefined) {
4095
+ number = number <= upper ? number : upper;
4096
+ }
4097
+ if (lower !== undefined) {
4098
+ number = number >= lower ? number : lower;
4099
+ }
4100
+ }
4101
+ return number;
4102
+ }
4103
 
4104
+ /**
4105
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
4106
+ * traversed objects.
4107
+ *
4108
+ * @private
4109
+ * @param {*} value The value to clone.
4110
+ * @param {boolean} bitmask The bitmask flags.
4111
+ * 1 - Deep clone
4112
+ * 2 - Flatten inherited properties
4113
+ * 4 - Clone symbols
4114
+ * @param {Function} [customizer] The function to customize cloning.
4115
+ * @param {string} [key] The key of `value`.
4116
+ * @param {Object} [object] The parent object of `value`.
4117
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
4118
+ * @returns {*} Returns the cloned value.
4119
+ */
4120
+ function baseClone(value, bitmask, customizer, key, object, stack) {
4121
+ var result,
4122
+ isDeep = bitmask & CLONE_DEEP_FLAG,
4123
+ isFlat = bitmask & CLONE_FLAT_FLAG,
4124
+ isFull = bitmask & CLONE_SYMBOLS_FLAG;
4125
 
4126
+ if (customizer) {
4127
+ result = object ? customizer(value, key, object, stack) : customizer(value);
4128
+ }
4129
+ if (result !== undefined) {
4130
+ return result;
4131
+ }
4132
+ if (!isObject(value)) {
4133
+ return value;
4134
+ }
4135
+ var isArr = isArray(value);
4136
+ if (isArr) {
4137
+ result = initCloneArray(value);
4138
+ if (!isDeep) {
4139
+ return copyArray(value, result);
4140
+ }
4141
+ } else {
4142
+ var tag = getTag(value),
4143
+ isFunc = tag == funcTag || tag == genTag;
4144
 
4145
+ if (isBuffer(value)) {
4146
+ return cloneBuffer(value, isDeep);
4147
+ }
4148
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
4149
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
4150
+ if (!isDeep) {
4151
+ return isFlat
4152
+ ? copySymbolsIn(value, baseAssignIn(result, value))
4153
+ : copySymbols(value, baseAssign(result, value));
4154
+ }
4155
+ } else {
4156
+ if (!cloneableTags[tag]) {
4157
+ return object ? value : {};
4158
+ }
4159
+ result = initCloneByTag(value, tag, isDeep);
4160
+ }
4161
+ }
4162
+ // Check for circular references and return its corresponding clone.
4163
+ stack || (stack = new Stack);
4164
+ var stacked = stack.get(value);
4165
+ if (stacked) {
4166
+ return stacked;
4167
+ }
4168
+ stack.set(value, result);
4169
 
4170
+ if (isSet(value)) {
4171
+ value.forEach(function(subValue) {
4172
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
4173
+ });
4174
 
4175
+ return result;
4176
+ }
 
 
 
 
 
4177
 
4178
+ if (isMap(value)) {
4179
+ value.forEach(function(subValue, key) {
4180
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
4181
+ });
4182
 
4183
+ return result;
4184
+ }
4185
 
4186
+ var keysFunc = isFull
4187
+ ? (isFlat ? getAllKeysIn : getAllKeys)
4188
+ : (isFlat ? keysIn : keys);
 
4189
 
4190
+ var props = isArr ? undefined : keysFunc(value);
4191
+ arrayEach(props || value, function(subValue, key) {
4192
+ if (props) {
4193
+ key = subValue;
4194
+ subValue = value[key];
4195
+ }
4196
+ // Recursively populate clone (susceptible to call stack limits).
4197
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
4198
  });
4199
+ return result;
 
4200
  }
 
 
4201
 
4202
+ /**
4203
+ * The base implementation of `_.conforms` which doesn't clone `source`.
4204
+ *
4205
+ * @private
4206
+ * @param {Object} source The object of property predicates to conform to.
4207
+ * @returns {Function} Returns the new spec function.
4208
+ */
4209
+ function baseConforms(source) {
4210
+ var props = keys(source);
4211
+ return function(object) {
4212
+ return baseConformsTo(object, source, props);
4213
+ };
4214
  }
4215
+
4216
+ /**
4217
+ * The base implementation of `_.conformsTo` which accepts `props` to check.
4218
+ *
4219
+ * @private
4220
+ * @param {Object} object The object to inspect.
4221
+ * @param {Object} source The object of property predicates to conform to.
4222
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
4223
+ */
4224
+ function baseConformsTo(object, source, props) {
4225
+ var length = props.length;
4226
+ if (object == null) {
4227
+ return !length;
4228
  }
4229
+ object = Object(object);
4230
+ while (length--) {
4231
+ var key = props[length],
4232
+ predicate = source[key],
4233
+ value = object[key];
4234
+
4235
+ if ((value === undefined && !(key in object)) || !predicate(value)) {
4236
+ return false;
4237
+ }
4238
  }
4239
+ return true;
4240
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4241
 
4242
+ /**
4243
+ * The base implementation of `_.delay` and `_.defer` which accepts `args`
4244
+ * to provide to `func`.
4245
+ *
4246
+ * @private
4247
+ * @param {Function} func The function to delay.
4248
+ * @param {number} wait The number of milliseconds to delay invocation.
4249
+ * @param {Array} args The arguments to provide to `func`.
4250
+ * @returns {number|Object} Returns the timer id or timeout object.
4251
+ */
4252
+ function baseDelay(func, wait, args) {
4253
+ if (typeof func != 'function') {
4254
+ throw new TypeError(FUNC_ERROR_TEXT);
4255
+ }
4256
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
4257
+ }
4258
 
4259
+ /**
4260
+ * The base implementation of methods like `_.difference` without support
4261
+ * for excluding multiple arrays or iteratee shorthands.
4262
+ *
4263
+ * @private
4264
+ * @param {Array} array The array to inspect.
4265
+ * @param {Array} values The values to exclude.
4266
+ * @param {Function} [iteratee] The iteratee invoked per element.
4267
+ * @param {Function} [comparator] The comparator invoked per element.
4268
+ * @returns {Array} Returns the new array of filtered values.
4269
+ */
4270
+ function baseDifference(array, values, iteratee, comparator) {
4271
+ var index = -1,
4272
+ includes = arrayIncludes,
4273
+ isCommon = true,
4274
+ length = array.length,
4275
+ result = [],
4276
+ valuesLength = values.length;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4277
 
4278
+ if (!length) {
4279
+ return result;
4280
+ }
4281
+ if (iteratee) {
4282
+ values = arrayMap(values, baseUnary(iteratee));
4283
+ }
4284
+ if (comparator) {
4285
+ includes = arrayIncludesWith;
4286
+ isCommon = false;
4287
+ }
4288
+ else if (values.length >= LARGE_ARRAY_SIZE) {
4289
+ includes = cacheHas;
4290
+ isCommon = false;
4291
+ values = new SetCache(values);
4292
+ }
4293
+ outer:
4294
+ while (++index < length) {
4295
+ var value = array[index],
4296
+ computed = iteratee == null ? value : iteratee(value);
4297
 
4298
+ value = (comparator || value !== 0) ? value : 0;
4299
+ if (isCommon && computed === computed) {
4300
+ var valuesIndex = valuesLength;
4301
+ while (valuesIndex--) {
4302
+ if (values[valuesIndex] === computed) {
4303
+ continue outer;
4304
+ }
4305
+ }
4306
+ result.push(value);
4307
+ }
4308
+ else if (!includes(values, computed, comparator)) {
4309
+ result.push(value);
4310
  }
4311
  }
4312
+ return result;
4313
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4314
 
4315
+ /**
4316
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
4317
+ *
4318
+ * @private
4319
+ * @param {Array|Object} collection The collection to iterate over.
4320
+ * @param {Function} iteratee The function invoked per iteration.
4321
+ * @returns {Array|Object} Returns `collection`.
4322
+ */
4323
+ var baseEach = createBaseEach(baseForOwn);
4324
 
4325
+ /**
4326
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
4327
+ *
4328
+ * @private
4329
+ * @param {Array|Object} collection The collection to iterate over.
4330
+ * @param {Function} iteratee The function invoked per iteration.
4331
+ * @returns {Array|Object} Returns `collection`.
4332
+ */
4333
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
4334
 
4335
+ /**
4336
+ * The base implementation of `_.every` without support for iteratee shorthands.
4337
+ *
4338
+ * @private
4339
+ * @param {Array|Object} collection The collection to iterate over.
4340
+ * @param {Function} predicate The function invoked per iteration.
4341
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
4342
+ * else `false`
4343
+ */
4344
+ function baseEvery(collection, predicate) {
4345
+ var result = true;
4346
+ baseEach(collection, function(value, index, collection) {
4347
+ result = !!predicate(value, index, collection);
4348
+ return result;
4349
+ });
4350
+ return result;
4351
+ }
4352
 
4353
+ /**
4354
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
4355
+ * `comparator` to determine the extremum value.
4356
+ *
4357
+ * @private
4358
+ * @param {Array} array The array to iterate over.
4359
+ * @param {Function} iteratee The iteratee invoked per iteration.
4360
+ * @param {Function} comparator The comparator used to compare values.
4361
+ * @returns {*} Returns the extremum value.
4362
+ */
4363
+ function baseExtremum(array, iteratee, comparator) {
4364
+ var index = -1,
4365
+ length = array.length;
4366
 
4367
+ while (++index < length) {
4368
+ var value = array[index],
4369
+ current = iteratee(value);
 
 
 
4370
 
4371
+ if (current != null && (computed === undefined
4372
+ ? (current === current && !isSymbol(current))
4373
+ : comparator(current, computed)
4374
+ )) {
4375
+ var computed = current,
4376
+ result = value;
4377
+ }
4378
+ }
4379
+ return result;
4380
+ }
4381
 
4382
+ /**
4383
+ * The base implementation of `_.fill` without an iteratee call guard.
4384
+ *
4385
+ * @private
4386
+ * @param {Array} array The array to fill.
4387
+ * @param {*} value The value to fill `array` with.
4388
+ * @param {number} [start=0] The start position.
4389
+ * @param {number} [end=array.length] The end position.
4390
+ * @returns {Array} Returns `array`.
4391
+ */
4392
+ function baseFill(array, value, start, end) {
4393
+ var length = array.length;
4394
 
4395
+ start = toInteger(start);
4396
+ if (start < 0) {
4397
+ start = -start > length ? 0 : (length + start);
4398
+ }
4399
+ end = (end === undefined || end > length) ? length : toInteger(end);
4400
+ if (end < 0) {
4401
+ end += length;
4402
+ }
4403
+ end = start > end ? 0 : toLength(end);
4404
+ while (start < end) {
4405
+ array[start++] = value;
4406
+ }
4407
+ return array;
4408
+ }
4409
 
4410
+ /**
4411
+ * The base implementation of `_.filter` without support for iteratee shorthands.
4412
+ *
4413
+ * @private
4414
+ * @param {Array|Object} collection The collection to iterate over.
4415
+ * @param {Function} predicate The function invoked per iteration.
4416
+ * @returns {Array} Returns the new filtered array.
4417
+ */
4418
+ function baseFilter(collection, predicate) {
4419
+ var result = [];
4420
+ baseEach(collection, function(value, index, collection) {
4421
+ if (predicate(value, index, collection)) {
4422
+ result.push(value);
4423
+ }
4424
+ });
4425
+ return result;
4426
+ }
4427
 
4428
+ /**
4429
+ * The base implementation of `_.flatten` with support for restricting flattening.
4430
+ *
4431
+ * @private
4432
+ * @param {Array} array The array to flatten.
4433
+ * @param {number} depth The maximum recursion depth.
4434
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
4435
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
4436
+ * @param {Array} [result=[]] The initial result value.
4437
+ * @returns {Array} Returns the new flattened array.
4438
+ */
4439
+ function baseFlatten(array, depth, predicate, isStrict, result) {
4440
+ var index = -1,
4441
+ length = array.length;
4442
 
4443
+ predicate || (predicate = isFlattenable);
4444
+ result || (result = []);
 
 
 
 
 
4445
 
4446
+ while (++index < length) {
4447
+ var value = array[index];
4448
+ if (depth > 0 && predicate(value)) {
4449
+ if (depth > 1) {
4450
+ // Recursively flatten arrays (susceptible to call stack limits).
4451
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
4452
+ } else {
4453
+ arrayPush(result, value);
4454
+ }
4455
+ } else if (!isStrict) {
4456
+ result[result.length] = value;
4457
+ }
4458
+ }
4459
+ return result;
4460
+ }
4461
 
4462
+ /**
4463
+ * The base implementation of `baseForOwn` which iterates over `object`
4464
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
4465
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
4466
+ *
4467
+ * @private
4468
+ * @param {Object} object The object to iterate over.
4469
+ * @param {Function} iteratee The function invoked per iteration.
4470
+ * @param {Function} keysFunc The function to get the keys of `object`.
4471
+ * @returns {Object} Returns `object`.
4472
+ */
4473
+ var baseFor = createBaseFor();
4474
 
4475
+ /**
4476
+ * This function is like `baseFor` except that it iterates over properties
4477
+ * in the opposite order.
4478
+ *
4479
+ * @private
4480
+ * @param {Object} object The object to iterate over.
4481
+ * @param {Function} iteratee The function invoked per iteration.
4482
+ * @param {Function} keysFunc The function to get the keys of `object`.
4483
+ * @returns {Object} Returns `object`.
4484
+ */
4485
+ var baseForRight = createBaseFor(true);
 
4486
 
4487
+ /**
4488
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
4489
+ *
4490
+ * @private
4491
+ * @param {Object} object The object to iterate over.
4492
+ * @param {Function} iteratee The function invoked per iteration.
4493
+ * @returns {Object} Returns `object`.
4494
+ */
4495
+ function baseForOwn(object, iteratee) {
4496
+ return object && baseFor(object, iteratee, keys);
4497
+ }
4498
 
4499
+ /**
4500
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
4501
+ *
4502
+ * @private
4503
+ * @param {Object} object The object to iterate over.
4504
+ * @param {Function} iteratee The function invoked per iteration.
4505
+ * @returns {Object} Returns `object`.
4506
+ */
4507
+ function baseForOwnRight(object, iteratee) {
4508
+ return object && baseForRight(object, iteratee, keys);
4509
+ }
4510
 
4511
+ /**
4512
+ * The base implementation of `_.functions` which creates an array of
4513
+ * `object` function property names filtered from `props`.
4514
+ *
4515
+ * @private
4516
+ * @param {Object} object The object to inspect.
4517
+ * @param {Array} props The property names to filter.
4518
+ * @returns {Array} Returns the function names.
4519
+ */
4520
+ function baseFunctions(object, props) {
4521
+ return arrayFilter(props, function(key) {
4522
+ return isFunction(object[key]);
4523
+ });
4524
+ }
4525
 
4526
+ /**
4527
+ * The base implementation of `_.get` without support for default values.
4528
+ *
4529
+ * @private
4530
+ * @param {Object} object The object to query.
4531
+ * @param {Array|string} path The path of the property to get.
4532
+ * @returns {*} Returns the resolved value.
4533
+ */
4534
+ function baseGet(object, path) {
4535
+ path = castPath(path, object);
 
 
 
 
 
 
 
 
 
 
 
4536
 
4537
+ var index = 0,
4538
+ length = path.length;
 
 
 
 
 
 
 
 
 
4539
 
4540
+ while (object != null && index < length) {
4541
+ object = object[toKey(path[index++])];
4542
+ }
4543
+ return (index && index == length) ? object : undefined;
4544
+ }
4545
 
4546
+ /**
4547
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
4548
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
4549
+ * symbols of `object`.
4550
+ *
4551
+ * @private
4552
+ * @param {Object} object The object to query.
4553
+ * @param {Function} keysFunc The function to get the keys of `object`.
4554
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
4555
+ * @returns {Array} Returns the array of property names and symbols.
4556
+ */
4557
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
4558
+ var result = keysFunc(object);
4559
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
4560
+ }
4561
 
4562
+ /**
4563
+ * The base implementation of `getTag` without fallbacks for buggy environments.
4564
+ *
4565
+ * @private
4566
+ * @param {*} value The value to query.
4567
+ * @returns {string} Returns the `toStringTag`.
4568
+ */
4569
+ function baseGetTag(value) {
4570
+ if (value == null) {
4571
+ return value === undefined ? undefinedTag : nullTag;
4572
+ }
4573
+ return (symToStringTag && symToStringTag in Object(value))
4574
+ ? getRawTag(value)
4575
+ : objectToString(value);
4576
+ }
4577
 
4578
+ /**
4579
+ * The base implementation of `_.gt` which doesn't coerce arguments.
4580
+ *
4581
+ * @private
4582
+ * @param {*} value The value to compare.
4583
+ * @param {*} other The other value to compare.
4584
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
4585
+ * else `false`.
4586
+ */
4587
+ function baseGt(value, other) {
4588
+ return value > other;
4589
+ }
4590
 
4591
+ /**
4592
+ * The base implementation of `_.has` without support for deep paths.
4593
+ *
4594
+ * @private
4595
+ * @param {Object} [object] The object to query.
4596
+ * @param {Array|string} key The key to check.
4597
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
4598
+ */
4599
+ function baseHas(object, key) {
4600
+ return object != null && hasOwnProperty.call(object, key);
4601
+ }
4602
 
4603
+ /**
4604
+ * The base implementation of `_.hasIn` without support for deep paths.
4605
+ *
4606
+ * @private
4607
+ * @param {Object} [object] The object to query.
4608
+ * @param {Array|string} key The key to check.
4609
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
4610
+ */
4611
+ function baseHasIn(object, key) {
4612
+ return object != null && key in Object(object);
4613
+ }
4614
 
4615
+ /**
4616
+ * The base implementation of `_.inRange` which doesn't coerce arguments.
4617
+ *
4618
+ * @private
4619
+ * @param {number} number The number to check.
4620
+ * @param {number} start The start of the range.
4621
+ * @param {number} end The end of the range.
4622
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
4623
+ */
4624
+ function baseInRange(number, start, end) {
4625
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
4626
+ }
4627
 
4628
+ /**
4629
+ * The base implementation of methods like `_.intersection`, without support
4630
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
4631
+ *
4632
+ * @private
4633
+ * @param {Array} arrays The arrays to inspect.
4634
+ * @param {Function} [iteratee] The iteratee invoked per element.
4635
+ * @param {Function} [comparator] The comparator invoked per element.
4636
+ * @returns {Array} Returns the new array of shared values.
4637
+ */
4638
+ function baseIntersection(arrays, iteratee, comparator) {
4639
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
4640
+ length = arrays[0].length,
4641
+ othLength = arrays.length,
4642
+ othIndex = othLength,
4643
+ caches = Array(othLength),
4644
+ maxLength = Infinity,
4645
+ result = [];
4646
 
4647
+ while (othIndex--) {
4648
+ var array = arrays[othIndex];
4649
+ if (othIndex && iteratee) {
4650
+ array = arrayMap(array, baseUnary(iteratee));
4651
+ }
4652
+ maxLength = nativeMin(array.length, maxLength);
4653
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
4654
+ ? new SetCache(othIndex && array)
4655
+ : undefined;
4656
+ }
4657
+ array = arrays[0];
4658
 
4659
+ var index = -1,
4660
+ seen = caches[0];
4661
 
4662
+ outer:
4663
+ while (++index < length && result.length < maxLength) {
4664
+ var value = array[index],
4665
+ computed = iteratee ? iteratee(value) : value;
4666
 
4667
+ value = (comparator || value !== 0) ? value : 0;
4668
+ if (!(seen
4669
+ ? cacheHas(seen, computed)
4670
+ : includes(result, computed, comparator)
4671
+ )) {
4672
+ othIndex = othLength;
4673
+ while (--othIndex) {
4674
+ var cache = caches[othIndex];
4675
+ if (!(cache
4676
+ ? cacheHas(cache, computed)
4677
+ : includes(arrays[othIndex], computed, comparator))
4678
+ ) {
4679
+ continue outer;
4680
+ }
4681
+ }
4682
+ if (seen) {
4683
+ seen.push(computed);
4684
+ }
4685
+ result.push(value);
4686
+ }
4687
+ }
4688
+ return result;
4689
+ }
4690
 
4691
+ /**
4692
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
4693
+ * `object` with values transformed by `iteratee` and set by `setter`.
4694
+ *
4695
+ * @private
4696
+ * @param {Object} object The object to iterate over.
4697
+ * @param {Function} setter The function to set `accumulator` values.
4698
+ * @param {Function} iteratee The iteratee to transform values.
4699
+ * @param {Object} accumulator The initial inverted object.
4700
+ * @returns {Function} Returns `accumulator`.
4701
+ */
4702
+ function baseInverter(object, setter, iteratee, accumulator) {
4703
+ baseForOwn(object, function(value, key, object) {
4704
+ setter(accumulator, iteratee(value), key, object);
4705
+ });
4706
+ return accumulator;
4707
+ }
4708
 
4709
+ /**
4710
+ * The base implementation of `_.invoke` without support for individual
4711
+ * method arguments.
4712
+ *
4713
+ * @private
4714
+ * @param {Object} object The object to query.
4715
+ * @param {Array|string} path The path of the method to invoke.
4716
+ * @param {Array} args The arguments to invoke the method with.
4717
+ * @returns {*} Returns the result of the invoked method.
4718
+ */
4719
+ function baseInvoke(object, path, args) {
4720
+ path = castPath(path, object);
4721
+ object = parent(object, path);
4722
+ var func = object == null ? object : object[toKey(last(path))];
4723
+ return func == null ? undefined : apply(func, object, args);
4724
+ }
4725
 
4726
+ /**
4727
+ * The base implementation of `_.isArguments`.
4728
+ *
4729
+ * @private
4730
+ * @param {*} value The value to check.
4731
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
4732
+ */
4733
+ function baseIsArguments(value) {
4734
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
4735
+ }
4736
 
4737
+ /**
4738
+ * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
4739
+ *
4740
+ * @private
4741
+ * @param {*} value The value to check.
4742
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
4743
+ */
4744
+ function baseIsArrayBuffer(value) {
4745
+ return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
4746
+ }
4747
 
4748
+ /**
4749
+ * The base implementation of `_.isDate` without Node.js optimizations.
4750
+ *
4751
+ * @private
4752
+ * @param {*} value The value to check.
4753
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
4754
+ */
4755
+ function baseIsDate(value) {
4756
+ return isObjectLike(value) && baseGetTag(value) == dateTag;
4757
+ }
4758
 
4759
+ /**
4760
+ * The base implementation of `_.isEqual` which supports partial comparisons
4761
+ * and tracks traversed objects.
4762
+ *
4763
+ * @private
4764
+ * @param {*} value The value to compare.
4765
+ * @param {*} other The other value to compare.
4766
+ * @param {boolean} bitmask The bitmask flags.
4767
+ * 1 - Unordered comparison
4768
+ * 2 - Partial comparison
4769
+ * @param {Function} [customizer] The function to customize comparisons.
4770
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
4771
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
4772
+ */
4773
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
4774
+ if (value === other) {
4775
+ return true;
4776
+ }
4777
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
4778
+ return value !== value && other !== other;
4779
+ }
4780
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
4781
+ }
4782
 
4783
+ /**
4784
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
4785
+ * deep comparisons and tracks traversed objects enabling objects with circular
4786
+ * references to be compared.
4787
+ *
4788
+ * @private
4789
+ * @param {Object} object The object to compare.
4790
+ * @param {Object} other The other object to compare.
4791
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
4792
+ * @param {Function} customizer The function to customize comparisons.
4793
+ * @param {Function} equalFunc The function to determine equivalents of values.
4794
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
4795
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
4796
+ */
4797
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
4798
+ var objIsArr = isArray(object),
4799
+ othIsArr = isArray(other),
4800
+ objTag = objIsArr ? arrayTag : getTag(object),
4801
+ othTag = othIsArr ? arrayTag : getTag(other);
4802
 
4803
+ objTag = objTag == argsTag ? objectTag : objTag;
4804
+ othTag = othTag == argsTag ? objectTag : othTag;
 
4805
 
4806
+ var objIsObj = objTag == objectTag,
4807
+ othIsObj = othTag == objectTag,
4808
+ isSameTag = objTag == othTag;
 
 
 
 
4809
 
4810
+ if (isSameTag && isBuffer(object)) {
4811
+ if (!isBuffer(other)) {
4812
+ return false;
4813
+ }
4814
+ objIsArr = true;
4815
+ objIsObj = false;
4816
+ }
4817
+ if (isSameTag && !objIsObj) {
4818
+ stack || (stack = new Stack);
4819
+ return (objIsArr || isTypedArray(object))
4820
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
4821
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
4822
+ }
4823
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
4824
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
4825
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
4826
 
4827
+ if (objIsWrapped || othIsWrapped) {
4828
+ var objUnwrapped = objIsWrapped ? object.value() : object,
4829
+ othUnwrapped = othIsWrapped ? other.value() : other;
4830
 
4831
+ stack || (stack = new Stack);
4832
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
4833
+ }
4834
+ }
4835
+ if (!isSameTag) {
4836
+ return false;
4837
+ }
4838
+ stack || (stack = new Stack);
4839
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
4840
+ }
4841
 
4842
+ /**
4843
+ * The base implementation of `_.isMap` without Node.js optimizations.
4844
+ *
4845
+ * @private
4846
+ * @param {*} value The value to check.
4847
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
4848
+ */
4849
+ function baseIsMap(value) {
4850
+ return isObjectLike(value) && getTag(value) == mapTag;
4851
+ }
4852
 
4853
+ /**
4854
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
4855
+ *
4856
+ * @private
4857
+ * @param {Object} object The object to inspect.
4858
+ * @param {Object} source The object of property values to match.
4859
+ * @param {Array} matchData The property names, values, and compare flags to match.
4860
+ * @param {Function} [customizer] The function to customize comparisons.
4861
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
4862
+ */
4863
+ function baseIsMatch(object, source, matchData, customizer) {
4864
+ var index = matchData.length,
4865
+ length = index,
4866
+ noCustomizer = !customizer;
4867
 
4868
+ if (object == null) {
4869
+ return !length;
4870
+ }
4871
+ object = Object(object);
4872
+ while (index--) {
4873
+ var data = matchData[index];
4874
+ if ((noCustomizer && data[2])
4875
+ ? data[1] !== object[data[0]]
4876
+ : !(data[0] in object)
4877
+ ) {
4878
+ return false;
4879
+ }
4880
+ }
4881
+ while (++index < length) {
4882
+ data = matchData[index];
4883
+ var key = data[0],
4884
+ objValue = object[key],
4885
+ srcValue = data[1];
4886
+
4887
+ if (noCustomizer && data[2]) {
4888
+ if (objValue === undefined && !(key in object)) {
4889
+ return false;
4890
+ }
4891
+ } else {
4892
+ var stack = new Stack;
4893
+ if (customizer) {
4894
+ var result = customizer(objValue, srcValue, key, object, source, stack);
4895
+ }
4896
+ if (!(result === undefined
4897
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
4898
+ : result
4899
+ )) {
4900
+ return false;
4901
+ }
4902
+ }
4903
+ }
4904
+ return true;
4905
+ }
4906
 
4907
+ /**
4908
+ * The base implementation of `_.isNative` without bad shim checks.
4909
+ *
4910
+ * @private
4911
+ * @param {*} value The value to check.
4912
+ * @returns {boolean} Returns `true` if `value` is a native function,
4913
+ * else `false`.
4914
+ */
4915
+ function baseIsNative(value) {
4916
+ if (!isObject(value) || isMasked(value)) {
4917
+ return false;
4918
+ }
4919
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
4920
+ return pattern.test(toSource(value));
4921
+ }
4922
 
4923
+ /**
4924
+ * The base implementation of `_.isRegExp` without Node.js optimizations.
4925
+ *
4926
+ * @private
4927
+ * @param {*} value The value to check.
4928
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
4929
+ */
4930
+ function baseIsRegExp(value) {
4931
+ return isObjectLike(value) && baseGetTag(value) == regexpTag;
4932
+ }
4933
 
4934
+ /**
4935
+ * The base implementation of `_.isSet` without Node.js optimizations.
4936
+ *
4937
+ * @private
4938
+ * @param {*} value The value to check.
4939
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
4940
+ */
4941
+ function baseIsSet(value) {
4942
+ return isObjectLike(value) && getTag(value) == setTag;
4943
+ }
4944
 
4945
+ /**
4946
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
4947
+ *
4948
+ * @private
4949
+ * @param {*} value The value to check.
4950
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
4951
+ */
4952
+ function baseIsTypedArray(value) {
4953
+ return isObjectLike(value) &&
4954
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
4955
+ }
4956
 
4957
+ /**
4958
+ * The base implementation of `_.iteratee`.
4959
+ *
4960
+ * @private
4961
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
4962
+ * @returns {Function} Returns the iteratee.
4963
+ */
4964
+ function baseIteratee(value) {
4965
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
4966
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
4967
+ if (typeof value == 'function') {
4968
+ return value;
4969
+ }
4970
+ if (value == null) {
4971
+ return identity;
4972
+ }
4973
+ if (typeof value == 'object') {
4974
+ return isArray(value)
4975
+ ? baseMatchesProperty(value[0], value[1])
4976
+ : baseMatches(value);
4977
+ }
4978
+ return property(value);
4979
+ }
4980
 
4981
+ /**
4982
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
4983
+ *
4984
+ * @private
4985
+ * @param {Object} object The object to query.
4986
+ * @returns {Array} Returns the array of property names.
4987
+ */
4988
+ function baseKeys(object) {
4989
+ if (!isPrototype(object)) {
4990
+ return nativeKeys(object);
4991
+ }
4992
+ var result = [];
4993
+ for (var key in Object(object)) {
4994
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
4995
+ result.push(key);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4996
  }
4997
+ }
4998
+ return result;
4999
+ }
5000
+
5001
+ /**
5002
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
5003
+ *
5004
+ * @private
5005
+ * @param {Object} object The object to query.
5006
+ * @returns {Array} Returns the array of property names.
5007
+ */
5008
+ function baseKeysIn(object) {
5009
+ if (!isObject(object)) {
5010
+ return nativeKeysIn(object);
5011
+ }
5012
+ var isProto = isPrototype(object),
5013
+ result = [];
5014
+
5015
+ for (var key in object) {
5016
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
5017
+ result.push(key);
5018
  }
5019
+ }
5020
+ return result;
5021
+ }
5022
+
5023
+ /**
5024
+ * The base implementation of `_.lt` which doesn't coerce arguments.
5025
+ *
5026
+ * @private
5027
+ * @param {*} value The value to compare.
5028
+ * @param {*} other The other value to compare.
5029
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
5030
+ * else `false`.
5031
+ */
5032
+ function baseLt(value, other) {
5033
+ return value < other;
5034
+ }
5035
+
5036
+ /**
5037
+ * The base implementation of `_.map` without support for iteratee shorthands.
5038
+ *
5039
+ * @private
5040
+ * @param {Array|Object} collection The collection to iterate over.
5041
+ * @param {Function} iteratee The function invoked per iteration.
5042
+ * @returns {Array} Returns the new mapped array.
5043
+ */
5044
+ function baseMap(collection, iteratee) {
5045
+ var index = -1,
5046
+ result = isArrayLike(collection) ? Array(collection.length) : [];
5047
+
5048
+ baseEach(collection, function(value, key, collection) {
5049
+ result[++index] = iteratee(value, key, collection);
5050
+ });
5051
+ return result;
5052
+ }
5053
+
5054
+ /**
5055
+ * The base implementation of `_.matches` which doesn't clone `source`.
5056
+ *
5057
+ * @private
5058
+ * @param {Object} source The object of property values to match.
5059
+ * @returns {Function} Returns the new spec function.
5060
+ */
5061
+ function baseMatches(source) {
5062
+ var matchData = getMatchData(source);
5063
+ if (matchData.length == 1 && matchData[0][2]) {
5064
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
5065
+ }
5066
+ return function(object) {
5067
+ return object === source || baseIsMatch(object, source, matchData);
5068
+ };
5069
+ }
5070
+
5071
+ /**
5072
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
5073
+ *
5074
+ * @private
5075
+ * @param {string} path The path of the property to get.
5076
+ * @param {*} srcValue The value to match.
5077
+ * @returns {Function} Returns the new spec function.
5078
+ */
5079
+ function baseMatchesProperty(path, srcValue) {
5080
+ if (isKey(path) && isStrictComparable(srcValue)) {
5081
+ return matchesStrictComparable(toKey(path), srcValue);
5082
+ }
5083
+ return function(object) {
5084
+ var objValue = get(object, path);
5085
+ return (objValue === undefined && objValue === srcValue)
5086
+ ? hasIn(object, path)
5087
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
5088
+ };
5089
+ }
5090
+
5091
+ /**
5092
+ * The base implementation of `_.merge` without support for multiple sources.
5093
+ *
5094
+ * @private
5095
+ * @param {Object} object The destination object.
5096
+ * @param {Object} source The source object.
5097
+ * @param {number} srcIndex The index of `source`.
5098
+ * @param {Function} [customizer] The function to customize merged values.
5099
+ * @param {Object} [stack] Tracks traversed source values and their merged
5100
+ * counterparts.
5101
+ */
5102
+ function baseMerge(object, source, srcIndex, customizer, stack) {
5103
+ if (object === source) {
5104
+ return;
5105
+ }
5106
+ baseFor(source, function(srcValue, key) {
5107
+ if (isObject(srcValue)) {
5108
+ stack || (stack = new Stack);
5109
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
5110
  }
5111
+ else {
5112
+ var newValue = customizer
5113
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
5114
+ : undefined;
5115
+
5116
+ if (newValue === undefined) {
5117
+ newValue = srcValue;
5118
+ }
5119
+ assignMergeValue(object, key, newValue);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5120
  }
5121
+ }, keysIn);
5122
+ }
5123
+
5124
+ /**
5125
+ * A specialized version of `baseMerge` for arrays and objects which performs
5126
+ * deep merges and tracks traversed objects enabling objects with circular
5127
+ * references to be merged.
5128
+ *
5129
+ * @private
5130
+ * @param {Object} object The destination object.
5131
+ * @param {Object} source The source object.
5132
+ * @param {string} key The key of the value to merge.
5133
+ * @param {number} srcIndex The index of `source`.
5134
+ * @param {Function} mergeFunc The function to merge values.
5135
+ * @param {Function} [customizer] The function to customize assigned values.
5136
+ * @param {Object} [stack] Tracks traversed source values and their merged
5137
+ * counterparts.
5138
+ */
5139
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
5140
+ var objValue = safeGet(object, key),
5141
+ srcValue = safeGet(source, key),
5142
+ stacked = stack.get(srcValue);
5143
+
5144
+ if (stacked) {
5145
+ assignMergeValue(object, key, stacked);
5146
+ return;
5147
+ }
5148
+ var newValue = customizer
5149
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
5150
+ : undefined;
5151
+
5152
+ var isCommon = newValue === undefined;
5153
+
5154
+ if (isCommon) {
5155
+ var isArr = isArray(srcValue),
5156
+ isBuff = !isArr && isBuffer(srcValue),
5157
+ isTyped = !isArr && !isBuff && isTypedArray(srcValue);
5158
+
5159
+ newValue = srcValue;
5160
+ if (isArr || isBuff || isTyped) {
5161
+ if (isArray(objValue)) {
5162
+ newValue = objValue;
5163
+ }
5164
+ else if (isArrayLikeObject(objValue)) {
5165
+ newValue = copyArray(objValue);
5166
+ }
5167
+ else if (isBuff) {
5168
+ isCommon = false;
5169
+ newValue = cloneBuffer(srcValue, true);
5170
+ }
5171
+ else if (isTyped) {
5172
+ isCommon = false;
5173
+ newValue = cloneTypedArray(srcValue, true);
5174
+ }
5175
+ else {
5176
+ newValue = [];
5177
+ }
5178
  }
5179
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
5180
+ newValue = objValue;
5181
+ if (isArguments(objValue)) {
5182
+ newValue = toPlainObject(objValue);
5183
+ }
5184
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
5185
+ newValue = initCloneObject(srcValue);
5186
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5187
  }
5188
+ else {
5189
+ isCommon = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5190
  }
5191
+ }
5192
+ if (isCommon) {
5193
+ // Recursively merge objects and arrays (susceptible to call stack limits).
5194
+ stack.set(srcValue, newValue);
5195
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
5196
+ stack['delete'](srcValue);
5197
+ }
5198
+ assignMergeValue(object, key, newValue);
5199
+ }
5200
+
5201
+ /**
5202
+ * The base implementation of `_.nth` which doesn't coerce arguments.
5203
+ *
5204
+ * @private
5205
+ * @param {Array} array The array to query.
5206
+ * @param {number} n The index of the element to return.
5207
+ * @returns {*} Returns the nth element of `array`.
5208
+ */
5209
+ function baseNth(array, n) {
5210
+ var length = array.length;
5211
+ if (!length) {
5212
+ return;
5213
+ }
5214
+ n += n < 0 ? length : 0;
5215
+ return isIndex(n, length) ? array[n] : undefined;
5216
+ }
5217
+
5218
+ /**
5219
+ * The base implementation of `_.orderBy` without param guards.
5220
+ *
5221
+ * @private
5222
+ * @param {Array|Object} collection The collection to iterate over.
5223
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
5224
+ * @param {string[]} orders The sort orders of `iteratees`.
5225
+ * @returns {Array} Returns the new sorted array.
5226
+ */
5227
+ function baseOrderBy(collection, iteratees, orders) {
5228
+ var index = -1;
5229
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
5230
+
5231
+ var result = baseMap(collection, function(value, key, collection) {
5232
+ var criteria = arrayMap(iteratees, function(iteratee) {
5233
+ return iteratee(value);
5234
+ });
5235
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
5236
+ });
5237
+
5238
+ return baseSortBy(result, function(object, other) {
5239
+ return compareMultiple(object, other, orders);
5240
+ });
5241
+ }
5242
+
5243
+ /**
5244
+ * The base implementation of `_.pick` without support for individual
5245
+ * property identifiers.
5246
+ *
5247
+ * @private
5248
+ * @param {Object} object The source object.
5249
+ * @param {string[]} paths The property paths to pick.
5250
+ * @returns {Object} Returns the new object.
5251
+ */
5252
+ function basePick(object, paths) {
5253
+ return basePickBy(object, paths, function(value, path) {
5254
+ return hasIn(object, path);
5255
+ });
5256
+ }
5257
+
5258
+ /**
5259
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
5260
+ *
5261
+ * @private
5262
+ * @param {Object} object The source object.
5263
+ * @param {string[]} paths The property paths to pick.
5264
+ * @param {Function} predicate The function invoked per property.
5265
+ * @returns {Object} Returns the new object.
5266
+ */
5267
+ function basePickBy(object, paths, predicate) {
5268
+ var index = -1,
5269
+ length = paths.length,
5270
+ result = {};
5271
+
5272
+ while (++index < length) {
5273
+ var path = paths[index],
5274
+ value = baseGet(object, path);
5275
+
5276
+ if (predicate(value, path)) {
5277
+ baseSet(result, castPath(path, object), value);
5278
  }
5279
+ }
5280
+ return result;
5281
+ }
5282
+
5283
+ /**
5284
+ * A specialized version of `baseProperty` which supports deep paths.
5285
+ *
5286
+ * @private
5287
+ * @param {Array|string} path The path of the property to get.
5288
+ * @returns {Function} Returns the new accessor function.
5289
+ */
5290
+ function basePropertyDeep(path) {
5291
+ return function(object) {
5292
+ return baseGet(object, path);
5293
+ };
5294
+ }
5295
+
5296
+ /**
5297
+ * The base implementation of `_.pullAllBy` without support for iteratee
5298
+ * shorthands.
5299
+ *
5300
+ * @private
5301
+ * @param {Array} array The array to modify.
5302
+ * @param {Array} values The values to remove.
5303
+ * @param {Function} [iteratee] The iteratee invoked per element.
5304
+ * @param {Function} [comparator] The comparator invoked per element.
5305
+ * @returns {Array} Returns `array`.
5306
+ */
5307
+ function basePullAll(array, values, iteratee, comparator) {
5308
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
5309
+ index = -1,
5310
+ length = values.length,
5311
+ seen = array;
5312
+
5313
+ if (array === values) {
5314
+ values = copyArray(values);
5315
+ }
5316
+ if (iteratee) {
5317
+ seen = arrayMap(array, baseUnary(iteratee));
5318
+ }
5319
+ while (++index < length) {
5320
+ var fromIndex = 0,
5321
+ value = values[index],
5322
+ computed = iteratee ? iteratee(value) : value;
5323
+
5324
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
5325
+ if (seen !== array) {
5326
+ splice.call(seen, fromIndex, 1);
5327
+ }
5328
+ splice.call(array, fromIndex, 1);
5329
  }
5330
+ }
5331
+ return array;
5332
+ }
5333
+
5334
+ /**
5335
+ * The base implementation of `_.pullAt` without support for individual
5336
+ * indexes or capturing the removed elements.
5337
+ *
5338
+ * @private
5339
+ * @param {Array} array The array to modify.
5340
+ * @param {number[]} indexes The indexes of elements to remove.
5341
+ * @returns {Array} Returns `array`.
5342
+ */
5343
+ function basePullAt(array, indexes) {
5344
+ var length = array ? indexes.length : 0,
5345
+ lastIndex = length - 1;
5346
+
5347
+ while (length--) {
5348
+ var index = indexes[length];
5349
+ if (length == lastIndex || index !== previous) {
5350
+ var previous = index;
5351
+ if (isIndex(index)) {
5352
+ splice.call(array, index, 1);
5353
+ } else {
5354
+ baseUnset(array, index);
5355
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5356
  }
5357
+ }
5358
+ return array;
5359
+ }
5360
+
5361
+ /**
5362
+ * The base implementation of `_.random` without support for returning
5363
+ * floating-point numbers.
5364
+ *
5365
+ * @private
5366
+ * @param {number} lower The lower bound.
5367
+ * @param {number} upper The upper bound.
5368
+ * @returns {number} Returns the random number.
5369
+ */
5370
+ function baseRandom(lower, upper) {
5371
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
5372
+ }
5373
+
5374
+ /**
5375
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
5376
+ * coerce arguments.
5377
+ *
5378
+ * @private
5379
+ * @param {number} start The start of the range.
5380
+ * @param {number} end The end of the range.
5381
+ * @param {number} step The value to increment or decrement by.
5382
+ * @param {boolean} [fromRight] Specify iterating from right to left.
5383
+ * @returns {Array} Returns the range of numbers.
5384
+ */
5385
+ function baseRange(start, end, step, fromRight) {
5386
+ var index = -1,
5387
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
5388
+ result = Array(length);
5389
+
5390
+ while (length--) {
5391
+ result[fromRight ? length : ++index] = start;
5392
+ start += step;
5393
+ }
5394
+ return result;
5395
+ }
5396
+
5397
+ /**
5398
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
5399
+ *
5400
+ * @private
5401
+ * @param {string} string The string to repeat.
5402
+ * @param {number} n The number of times to repeat the string.
5403
+ * @returns {string} Returns the repeated string.
5404
+ */
5405
+ function baseRepeat(string, n) {
5406
+ var result = '';
5407
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
5408
+ return result;
5409
+ }
5410
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
5411
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
5412
+ do {
5413
+ if (n % 2) {
5414
+ result += string;
5415
  }
5416
+ n = nativeFloor(n / 2);
5417
+ if (n) {
5418
+ string += string;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5419
  }
5420
+ } while (n);
5421
+
5422
+ return result;
5423
+ }
5424
+
5425
+ /**
5426
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
5427
+ *
5428
+ * @private
5429
+ * @param {Function} func The function to apply a rest parameter to.
5430
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
5431
+ * @returns {Function} Returns the new function.
5432
+ */
5433
+ function baseRest(func, start) {
5434
+ return setToString(overRest(func, start, identity), func + '');
5435
+ }
5436
+
5437
+ /**
5438
+ * The base implementation of `_.sample`.
5439
+ *
5440
+ * @private
5441
+ * @param {Array|Object} collection The collection to sample.
5442
+ * @returns {*} Returns the random element.
5443
+ */
5444
+ function baseSample(collection) {
5445
+ return arraySample(values(collection));
5446
+ }
5447
+
5448
+ /**
5449
+ * The base implementation of `_.sampleSize` without param guards.
5450
+ *
5451
+ * @private
5452
+ * @param {Array|Object} collection The collection to sample.
5453
+ * @param {number} n The number of elements to sample.
5454
+ * @returns {Array} Returns the random elements.
5455
+ */
5456
+ function baseSampleSize(collection, n) {
5457
+ var array = values(collection);
5458
+ return shuffleSelf(array, baseClamp(n, 0, array.length));
5459
+ }
5460
+
5461
+ /**
5462
+ * The base implementation of `_.set`.
5463
+ *
5464
+ * @private
5465
+ * @param {Object} object The object to modify.
5466
+ * @param {Array|string} path The path of the property to set.
5467
+ * @param {*} value The value to set.
5468
+ * @param {Function} [customizer] The function to customize path creation.
5469
+ * @returns {Object} Returns `object`.
5470
+ */
5471
+ function baseSet(object, path, value, customizer) {
5472
+ if (!isObject(object)) {
5473
+ return object;
5474
+ }
5475
+ path = castPath(path, object);
5476
+
5477
+ var index = -1,
5478
+ length = path.length,
5479
+ lastIndex = length - 1,
5480
+ nested = object;
5481
+
5482
+ while (nested != null && ++index < length) {
5483
+ var key = toKey(path[index]),
5484
+ newValue = value;
5485
+
5486
+ if (index != lastIndex) {
5487
+ var objValue = nested[key];
5488
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
5489
+ if (newValue === undefined) {
5490
+ newValue = isObject(objValue)
5491
+ ? objValue
5492
+ : (isIndex(path[index + 1]) ? [] : {});
5493
+ }
5494
  }
5495
+ assignValue(nested, key, newValue);
5496
+ nested = nested[key];
5497
+ }
5498
+ return object;
5499
+ }
5500
+
5501
+ /**
5502
+ * The base implementation of `setData` without support for hot loop shorting.
5503
+ *
5504
+ * @private
5505
+ * @param {Function} func The function to associate metadata with.
5506
+ * @param {*} data The metadata.
5507
+ * @returns {Function} Returns `func`.
5508
+ */
5509
+ var baseSetData = !metaMap ? identity : function(func, data) {
5510
+ metaMap.set(func, data);
5511
+ return func;
5512
+ };
5513
+
5514
+ /**
5515
+ * The base implementation of `setToString` without support for hot loop shorting.
5516
+ *
5517
+ * @private
5518
+ * @param {Function} func The function to modify.
5519
+ * @param {Function} string The `toString` result.
5520
+ * @returns {Function} Returns `func`.
5521
+ */
5522
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
5523
+ return defineProperty(func, 'toString', {
5524
+ 'configurable': true,
5525
+ 'enumerable': false,
5526
+ 'value': constant(string),
5527
+ 'writable': true
5528
+ });
5529
+ };
5530
+
5531
+ /**
5532
+ * The base implementation of `_.shuffle`.
5533
+ *
5534
+ * @private
5535
+ * @param {Array|Object} collection The collection to shuffle.
5536
+ * @returns {Array} Returns the new shuffled array.
5537
+ */
5538
+ function baseShuffle(collection) {
5539
+ return shuffleSelf(values(collection));
5540
+ }
5541
+
5542
+ /**
5543
+ * The base implementation of `_.slice` without an iteratee call guard.
5544
+ *
5545
+ * @private
5546
+ * @param {Array} array The array to slice.
5547
+ * @param {number} [start=0] The start position.
5548
+ * @param {number} [end=array.length] The end position.
5549
+ * @returns {Array} Returns the slice of `array`.
5550
+ */
5551
+ function baseSlice(array, start, end) {
5552
+ var index = -1,
5553
+ length = array.length;
5554
+
5555
+ if (start < 0) {
5556
+ start = -start > length ? 0 : (length + start);
5557
+ }
5558
+ end = end > length ? length : end;
5559
+ if (end < 0) {
5560
+ end += length;
5561
+ }
5562
+ length = start > end ? 0 : ((end - start) >>> 0);
5563
+ start >>>= 0;
5564
+
5565
+ var result = Array(length);
5566
+ while (++index < length) {
5567
+ result[index] = array[index + start];
5568
+ }
5569
+ return result;
5570
+ }
5571
+
5572
+ /**
5573
+ * The base implementation of `_.some` without support for iteratee shorthands.
5574
+ *
5575
+ * @private
5576
+ * @param {Array|Object} collection The collection to iterate over.
5577
+ * @param {Function} predicate The function invoked per iteration.
5578
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
5579
+ * else `false`.
5580
+ */
5581
+ function baseSome(collection, predicate) {
5582
+ var result;
5583
+
5584
+ baseEach(collection, function(value, index, collection) {
5585
+ result = predicate(value, index, collection);
5586
+ return !result;
5587
+ });
5588
+ return !!result;
5589
+ }
5590
+
5591
+ /**
5592
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
5593
+ * performs a binary search of `array` to determine the index at which `value`
5594
+ * should be inserted into `array` in order to maintain its sort order.
5595
+ *
5596
+ * @private
5597
+ * @param {Array} array The sorted array to inspect.
5598
+ * @param {*} value The value to evaluate.
5599
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
5600
+ * @returns {number} Returns the index at which `value` should be inserted
5601
+ * into `array`.
5602
+ */
5603
+ function baseSortedIndex(array, value, retHighest) {
5604
+ var low = 0,
5605
+ high = array == null ? low : array.length;
5606
+
5607
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
5608
+ while (low < high) {
5609
+ var mid = (low + high) >>> 1,
5610
+ computed = array[mid];
5611
+
5612
+ if (computed !== null && !isSymbol(computed) &&
5613
+ (retHighest ? (computed <= value) : (computed < value))) {
5614
+ low = mid + 1;
5615
+ } else {
5616
+ high = mid;
5617
+ }
5618
  }
5619
+ return high;
5620
+ }
5621
+ return baseSortedIndexBy(array, value, identity, retHighest);
5622
+ }
5623
+
5624
+ /**
5625
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
5626
+ * which invokes `iteratee` for `value` and each element of `array` to compute
5627
+ * their sort ranking. The iteratee is invoked with one argument; (value).
5628
+ *
5629
+ * @private
5630
+ * @param {Array} array The sorted array to inspect.
5631
+ * @param {*} value The value to evaluate.
5632
+ * @param {Function} iteratee The iteratee invoked per element.
5633
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
5634
+ * @returns {number} Returns the index at which `value` should be inserted
5635
+ * into `array`.
5636
+ */
5637
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
5638
+ value = iteratee(value);
5639
+
5640
+ var low = 0,
5641
+ high = array == null ? 0 : array.length,
5642
+ valIsNaN = value !== value,
5643
+ valIsNull = value === null,
5644
+ valIsSymbol = isSymbol(value),
5645
+ valIsUndefined = value === undefined;
5646
+
5647
+ while (low < high) {
5648
+ var mid = nativeFloor((low + high) / 2),
5649
+ computed = iteratee(array[mid]),
5650
+ othIsDefined = computed !== undefined,
5651
+ othIsNull = computed === null,
5652
+ othIsReflexive = computed === computed,
5653
+ othIsSymbol = isSymbol(computed);
5654
+
5655
+ if (valIsNaN) {
5656
+ var setLow = retHighest || othIsReflexive;
5657
+ } else if (valIsUndefined) {
5658
+ setLow = othIsReflexive && (retHighest || othIsDefined);
5659
+ } else if (valIsNull) {
5660
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
5661
+ } else if (valIsSymbol) {
5662
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
5663
+ } else if (othIsNull || othIsSymbol) {
5664
+ setLow = false;
5665
+ } else {
5666
+ setLow = retHighest ? (computed <= value) : (computed < value);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5667
  }
5668
+ if (setLow) {
5669
+ low = mid + 1;
5670
+ } else {
5671
+ high = mid;
 
 
 
 
 
 
 
 
5672
  }
5673
+ }
5674
+ return nativeMin(high, MAX_ARRAY_INDEX);
5675
+ }
5676
+
5677
+ /**
5678
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
5679
+ * support for iteratee shorthands.
5680
+ *
5681
+ * @private
5682
+ * @param {Array} array The array to inspect.
5683
+ * @param {Function} [iteratee] The iteratee invoked per element.
5684
+ * @returns {Array} Returns the new duplicate free array.
5685
+ */
5686
+ function baseSortedUniq(array, iteratee) {
5687
+ var index = -1,
5688
+ length = array.length,
5689
+ resIndex = 0,
5690
+ result = [];
5691
+
5692
+ while (++index < length) {
5693
+ var value = array[index],
5694
+ computed = iteratee ? iteratee(value) : value;
5695
+
5696
+ if (!index || !eq(computed, seen)) {
5697
+ var seen = computed;
5698
+ result[resIndex++] = value === 0 ? 0 : value;
5699
  }
5700
+ }
5701
+ return result;
5702
+ }
5703
+
5704
+ /**
5705
+ * The base implementation of `_.toNumber` which doesn't ensure correct
5706
+ * conversions of binary, hexadecimal, or octal string values.
5707
+ *
5708
+ * @private
5709
+ * @param {*} value The value to process.
5710
+ * @returns {number} Returns the number.
5711
+ */
5712
+ function baseToNumber(value) {
5713
+ if (typeof value == 'number') {
5714
+ return value;
5715
+ }
5716
+ if (isSymbol(value)) {
5717
+ return NAN;
5718
+ }
5719
+ return +value;
5720
+ }
5721
+
5722
+ /**
5723
+ * The base implementation of `_.toString` which doesn't convert nullish
5724
+ * values to empty strings.
5725
+ *
5726
+ * @private
5727
+ * @param {*} value The value to process.
5728
+ * @returns {string} Returns the string.
5729
+ */
5730
+ function baseToString(value) {
5731
+ // Exit early for strings to avoid a performance hit in some environments.
5732
+ if (typeof value == 'string') {
5733
+ return value;
5734
+ }
5735
+ if (isArray(value)) {
5736
+ // Recursively convert values (susceptible to call stack limits).
5737
+ return arrayMap(value, baseToString) + '';
5738
+ }
5739
+ if (isSymbol(value)) {
5740
+ return symbolToString ? symbolToString.call(value) : '';
5741
+ }
5742
+ var result = (value + '');
5743
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
5744
+ }
5745
+
5746
+ /**
5747
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
5748
+ *
5749
+ * @private
5750
+ * @param {Array} array The array to inspect.
5751
+ * @param {Function} [iteratee] The iteratee invoked per element.
5752
+ * @param {Function} [comparator] The comparator invoked per element.
5753
+ * @returns {Array} Returns the new duplicate free array.
5754
+ */
5755
+ function baseUniq(array, iteratee, comparator) {
5756
+ var index = -1,
5757
+ includes = arrayIncludes,
5758
+ length = array.length,
5759
+ isCommon = true,
5760
+ result = [],
5761
+ seen = result;
5762
+
5763
+ if (comparator) {
5764
+ isCommon = false;
5765
+ includes = arrayIncludesWith;
5766
+ }
5767
+ else if (length >= LARGE_ARRAY_SIZE) {
5768
+ var set = iteratee ? null : createSet(array);
5769
+ if (set) {
5770
+ return setToArray(set);
 
 
 
 
 
 
 
 
 
 
 
5771
  }
5772
+ isCommon = false;
5773
+ includes = cacheHas;
5774
+ seen = new SetCache;
5775
+ }
5776
+ else {
5777
+ seen = iteratee ? [] : result;
5778
+ }
5779
+ outer:
5780
+ while (++index < length) {
5781
+ var value = array[index],
5782
+ computed = iteratee ? iteratee(value) : value;
5783
+
5784
+ value = (comparator || value !== 0) ? value : 0;
5785
+ if (isCommon && computed === computed) {
5786
+ var seenIndex = seen.length;
5787
+ while (seenIndex--) {
5788
+ if (seen[seenIndex] === computed) {
5789
+ continue outer;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5790
  }
5791
+ }
5792
+ if (iteratee) {
5793
+ seen.push(computed);
5794
+ }
5795
+ result.push(value);
5796
  }
5797
+ else if (!includes(seen, computed, comparator)) {
5798
+ if (seen !== result) {
5799
+ seen.push(computed);
5800
+ }
5801
+ result.push(value);
5802
  }
5803
+ }
5804
+ return result;
5805
+ }
5806
+
5807
+ /**
5808
+ * The base implementation of `_.unset`.
5809
+ *
5810
+ * @private
5811
+ * @param {Object} object The object to modify.
5812
+ * @param {Array|string} path The property path to unset.
5813
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
5814
+ */
5815
+ function baseUnset(object, path) {
5816
+ path = castPath(path, object);
5817
+ object = parent(object, path);
5818
+ return object == null || delete object[toKey(last(path))];
5819
+ }
5820
+
5821
+ /**
5822
+ * The base implementation of `_.update`.
5823
+ *
5824
+ * @private
5825
+ * @param {Object} object The object to modify.
5826
+ * @param {Array|string} path The path of the property to update.
5827
+ * @param {Function} updater The function to produce the updated value.
5828
+ * @param {Function} [customizer] The function to customize path creation.
5829
+ * @returns {Object} Returns `object`.
5830
+ */
5831
+ function baseUpdate(object, path, updater, customizer) {
5832
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
5833
+ }
5834
+
5835
+ /**
5836
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
5837
+ * without support for iteratee shorthands.
5838
+ *
5839
+ * @private
5840
+ * @param {Array} array The array to query.
5841
+ * @param {Function} predicate The function invoked per iteration.
5842
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
5843
+ * @param {boolean} [fromRight] Specify iterating from right to left.
5844
+ * @returns {Array} Returns the slice of `array`.
5845
+ */
5846
+ function baseWhile(array, predicate, isDrop, fromRight) {
5847
+ var length = array.length,
5848
+ index = fromRight ? length : -1;
5849
+
5850
+ while ((fromRight ? index-- : ++index < length) &&
5851
+ predicate(array[index], index, array)) {}
5852
+
5853
+ return isDrop
5854
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
5855
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
5856
+ }
5857
+
5858
+ /**
5859
+ * The base implementation of `wrapperValue` which returns the result of
5860
+ * performing a sequence of actions on the unwrapped `value`, where each
5861
+ * successive action is supplied the return value of the previous.
5862
+ *
5863
+ * @private
5864
+ * @param {*} value The unwrapped value.
5865
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
5866
+ * @returns {*} Returns the resolved value.
5867
+ */
5868
+ function baseWrapperValue(value, actions) {
5869
+ var result = value;
5870
+ if (result instanceof LazyWrapper) {
5871
+ result = result.value();
5872
+ }
5873
+ return arrayReduce(actions, function(result, action) {
5874
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
5875
+ }, result);
5876
+ }
5877
+
5878
+ /**
5879
+ * The base implementation of methods like `_.xor`, without support for
5880
+ * iteratee shorthands, that accepts an array of arrays to inspect.
5881
+ *
5882
+ * @private
5883
+ * @param {Array} arrays The arrays to inspect.
5884
+ * @param {Function} [iteratee] The iteratee invoked per element.
5885
+ * @param {Function} [comparator] The comparator invoked per element.
5886
+ * @returns {Array} Returns the new array of values.
5887
+ */
5888
+ function baseXor(arrays, iteratee, comparator) {
5889
+ var length = arrays.length;
5890
+ if (length < 2) {
5891
+ return length ? baseUniq(arrays[0]) : [];
5892
+ }
5893
+ var index = -1,
5894
+ result = Array(length);
5895
+
5896
+ while (++index < length) {
5897
+ var array = arrays[index],
5898
+ othIndex = -1;
5899
+
5900
+ while (++othIndex < length) {
5901
+ if (othIndex != index) {
5902
+ result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
5903
+ }
5904
  }
5905
+ }
5906
+ return baseUniq(baseFlatten(result, 1), iteratee, comparator);
5907
+ }
5908
+
5909
+ /**
5910
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
5911
+ *
5912
+ * @private
5913
+ * @param {Array} props The property identifiers.
5914
+ * @param {Array} values The property values.
5915
+ * @param {Function} assignFunc The function to assign values.
5916
+ * @returns {Object} Returns the new object.
5917
+ */
5918
+ function baseZipObject(props, values, assignFunc) {
5919
+ var index = -1,
5920
+ length = props.length,
5921
+ valsLength = values.length,
5922
+ result = {};
5923
+
5924
+ while (++index < length) {
5925
+ var value = index < valsLength ? values[index] : undefined;
5926
+ assignFunc(result, props[index], value);
5927
+ }
5928
+ return result;
5929
+ }
5930
+
5931
+ /**
5932
+ * Casts `value` to an empty array if it's not an array like object.
5933
+ *
5934
+ * @private
5935
+ * @param {*} value The value to inspect.
5936
+ * @returns {Array|Object} Returns the cast array-like object.
5937
+ */
5938
+ function castArrayLikeObject(value) {
5939
+ return isArrayLikeObject(value) ? value : [];
5940
+ }
5941
+
5942
+ /**
5943
+ * Casts `value` to `identity` if it's not a function.
5944
+ *
5945
+ * @private
5946
+ * @param {*} value The value to inspect.
5947
+ * @returns {Function} Returns cast function.
5948
+ */
5949
+ function castFunction(value) {
5950
+ return typeof value == 'function' ? value : identity;
5951
+ }
5952
+
5953
+ /**
5954
+ * Casts `value` to a path array if it's not one.
5955
+ *
5956
+ * @private
5957
+ * @param {*} value The value to inspect.
5958
+ * @param {Object} [object] The object to query keys on.
5959
+ * @returns {Array} Returns the cast property path array.
5960
+ */
5961
+ function castPath(value, object) {
5962
+ if (isArray(value)) {
5963
+ return value;
5964
+ }
5965
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
5966
+ }
5967
+
5968
+ /**
5969
+ * A `baseRest` alias which can be replaced with `identity` by module
5970
+ * replacement plugins.
5971
+ *
5972
+ * @private
5973
+ * @type {Function}
5974
+ * @param {Function} func The function to apply a rest parameter to.
5975
+ * @returns {Function} Returns the new function.
5976
+ */
5977
+ var castRest = baseRest;
5978
+
5979
+ /**
5980
+ * Casts `array` to a slice if it's needed.
5981
+ *
5982
+ * @private
5983
+ * @param {Array} array The array to inspect.
5984
+ * @param {number} start The start position.
5985
+ * @param {number} [end=array.length] The end position.
5986
+ * @returns {Array} Returns the cast slice.
5987
+ */
5988
+ function castSlice(array, start, end) {
5989
+ var length = array.length;
5990
+ end = end === undefined ? length : end;
5991
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
5992
+ }
5993
+
5994
+ /**
5995
+ * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
5996
+ *
5997
+ * @private
5998
+ * @param {number|Object} id The timer id or timeout object of the timer to clear.
5999
+ */
6000
+ var clearTimeout = ctxClearTimeout || function(id) {
6001
+ return root.clearTimeout(id);
6002
+ };
6003
+
6004
+ /**
6005
+ * Creates a clone of `buffer`.
6006
+ *
6007
+ * @private
6008
+ * @param {Buffer} buffer The buffer to clone.
6009
+ * @param {boolean} [isDeep] Specify a deep clone.
6010
+ * @returns {Buffer} Returns the cloned buffer.
6011
+ */
6012
+ function cloneBuffer(buffer, isDeep) {
6013
+ if (isDeep) {
6014
+ return buffer.slice();
6015
+ }
6016
+ var length = buffer.length,
6017
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
6018
+
6019
+ buffer.copy(result);
6020
+ return result;
6021
+ }
6022
+
6023
+ /**
6024
+ * Creates a clone of `arrayBuffer`.
6025
+ *
6026
+ * @private
6027
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
6028
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
6029
+ */
6030
+ function cloneArrayBuffer(arrayBuffer) {
6031
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
6032
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
6033
+ return result;
6034
+ }
6035
+
6036
+ /**
6037
+ * Creates a clone of `dataView`.
6038
+ *
6039
+ * @private
6040
+ * @param {Object} dataView The data view to clone.
6041
+ * @param {boolean} [isDeep] Specify a deep clone.
6042
+ * @returns {Object} Returns the cloned data view.
6043
+ */
6044
+ function cloneDataView(dataView, isDeep) {
6045
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
6046
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
6047
+ }
6048
+
6049
+ /**
6050
+ * Creates a clone of `regexp`.
6051
+ *
6052
+ * @private
6053
+ * @param {Object} regexp The regexp to clone.
6054
+ * @returns {Object} Returns the cloned regexp.
6055
+ */
6056
+ function cloneRegExp(regexp) {
6057
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
6058
+ result.lastIndex = regexp.lastIndex;
6059
+ return result;
6060
+ }
6061
+
6062
+ /**
6063
+ * Creates a clone of the `symbol` object.
6064
+ *
6065
+ * @private
6066
+ * @param {Object} symbol The symbol object to clone.
6067
+ * @returns {Object} Returns the cloned symbol object.
6068
+ */
6069
+ function cloneSymbol(symbol) {
6070
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
6071
+ }
6072
+
6073
+ /**
6074
+ * Creates a clone of `typedArray`.
6075
+ *
6076
+ * @private
6077
+ * @param {Object} typedArray The typed array to clone.
6078
+ * @param {boolean} [isDeep] Specify a deep clone.
6079
+ * @returns {Object} Returns the cloned typed array.
6080
+ */
6081
+ function cloneTypedArray(typedArray, isDeep) {
6082
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
6083
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
6084
+ }
6085
+
6086
+ /**
6087
+ * Compares values to sort them in ascending order.
6088
+ *
6089
+ * @private
6090
+ * @param {*} value The value to compare.
6091
+ * @param {*} other The other value to compare.
6092
+ * @returns {number} Returns the sort order indicator for `value`.
6093
+ */
6094
+ function compareAscending(value, other) {
6095
+ if (value !== other) {
6096
+ var valIsDefined = value !== undefined,
6097
+ valIsNull = value === null,
6098
+ valIsReflexive = value === value,
6099
+ valIsSymbol = isSymbol(value);
6100
+
6101
+ var othIsDefined = other !== undefined,
6102
+ othIsNull = other === null,
6103
+ othIsReflexive = other === other,
6104
+ othIsSymbol = isSymbol(other);
6105
+
6106
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
6107
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
6108
+ (valIsNull && othIsDefined && othIsReflexive) ||
6109
+ (!valIsDefined && othIsReflexive) ||
6110
+ !valIsReflexive) {
6111
+ return 1;
6112
  }
6113
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
6114
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
6115
+ (othIsNull && valIsDefined && valIsReflexive) ||
6116
+ (!othIsDefined && valIsReflexive) ||
6117
+ !othIsReflexive) {
6118
+ return -1;
6119
  }
6120
+ }
6121
+ return 0;
6122
+ }
6123
+
6124
+ /**
6125
+ * Used by `_.orderBy` to compare multiple properties of a value to another
6126
+ * and stable sort them.
6127
+ *
6128
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
6129
+ * specify an order of "desc" for descending or "asc" for ascending sort order
6130
+ * of corresponding values.
6131
+ *
6132
+ * @private
6133
+ * @param {Object} object The object to compare.
6134
+ * @param {Object} other The other object to compare.
6135
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
6136
+ * @returns {number} Returns the sort order indicator for `object`.
6137
+ */
6138
+ function compareMultiple(object, other, orders) {
6139
+ var index = -1,
6140
+ objCriteria = object.criteria,
6141
+ othCriteria = other.criteria,
6142
+ length = objCriteria.length,
6143
+ ordersLength = orders.length;
6144
+
6145
+ while (++index < length) {
6146
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
6147
+ if (result) {
6148
+ if (index >= ordersLength) {
6149
+ return result;
6150
+ }
6151
+ var order = orders[index];
6152
+ return result * (order == 'desc' ? -1 : 1);
6153
  }
6154
+ }
6155
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
6156
+ // that causes it, under certain circumstances, to provide the same value for
6157
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
6158
+ // for more details.
6159
+ //
6160
+ // This also ensures a stable sort in V8 and other engines.
6161
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
6162
+ return object.index - other.index;
6163
+ }
6164
+
6165
+ /**
6166
+ * Creates an array that is the composition of partially applied arguments,
6167
+ * placeholders, and provided arguments into a single array of arguments.
6168
+ *
6169
+ * @private
6170
+ * @param {Array} args The provided arguments.
6171
+ * @param {Array} partials The arguments to prepend to those provided.
6172
+ * @param {Array} holders The `partials` placeholder indexes.
6173
+ * @params {boolean} [isCurried] Specify composing for a curried function.
6174
+ * @returns {Array} Returns the new array of composed arguments.
6175
+ */
6176
+ function composeArgs(args, partials, holders, isCurried) {
6177
+ var argsIndex = -1,
6178
+ argsLength = args.length,
6179
+ holdersLength = holders.length,
6180
+ leftIndex = -1,
6181
+ leftLength = partials.length,
6182
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
6183
+ result = Array(leftLength + rangeLength),
6184
+ isUncurried = !isCurried;
6185
+
6186
+ while (++leftIndex < leftLength) {
6187
+ result[leftIndex] = partials[leftIndex];
6188
+ }
6189
+ while (++argsIndex < holdersLength) {
6190
+ if (isUncurried || argsIndex < argsLength) {
6191
+ result[holders[argsIndex]] = args[argsIndex];
6192
  }
6193
+ }
6194
+ while (rangeLength--) {
6195
+ result[leftIndex++] = args[argsIndex++];
6196
+ }
6197
+ return result;
6198
+ }
6199
+
6200
+ /**
6201
+ * This function is like `composeArgs` except that the arguments composition
6202
+ * is tailored for `_.partialRight`.
6203
+ *
6204
+ * @private
6205
+ * @param {Array} args The provided arguments.
6206
+ * @param {Array} partials The arguments to append to those provided.
6207
+ * @param {Array} holders The `partials` placeholder indexes.
6208
+ * @params {boolean} [isCurried] Specify composing for a curried function.
6209
+ * @returns {Array} Returns the new array of composed arguments.
6210
+ */
6211
+ function composeArgsRight(args, partials, holders, isCurried) {
6212
+ var argsIndex = -1,
6213
+ argsLength = args.length,
6214
+ holdersIndex = -1,
6215
+ holdersLength = holders.length,
6216
+ rightIndex = -1,
6217
+ rightLength = partials.length,
6218
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
6219
+ result = Array(rangeLength + rightLength),
6220
+ isUncurried = !isCurried;
6221
+
6222
+ while (++argsIndex < rangeLength) {
6223
+ result[argsIndex] = args[argsIndex];
6224
+ }
6225
+ var offset = argsIndex;
6226
+ while (++rightIndex < rightLength) {
6227
+ result[offset + rightIndex] = partials[rightIndex];
6228
+ }
6229
+ while (++holdersIndex < holdersLength) {
6230
+ if (isUncurried || argsIndex < argsLength) {
6231
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
6232
  }
6233
+ }
6234
+ return result;
6235
+ }
6236
+
6237
+ /**
6238
+ * Copies the values of `source` to `array`.
6239
+ *
6240
+ * @private
6241
+ * @param {Array} source The array to copy values from.
6242
+ * @param {Array} [array=[]] The array to copy values to.
6243
+ * @returns {Array} Returns `array`.
6244
+ */
6245
+ function copyArray(source, array) {
6246
+ var index = -1,
6247
+ length = source.length;
6248
+
6249
+ array || (array = Array(length));
6250
+ while (++index < length) {
6251
+ array[index] = source[index];
6252
+ }
6253
+ return array;
6254
+ }
6255
+
6256
+ /**
6257
+ * Copies properties of `source` to `object`.
6258
+ *
6259
+ * @private
6260
+ * @param {Object} source The object to copy properties from.
6261
+ * @param {Array} props The property identifiers to copy.
6262
+ * @param {Object} [object={}] The object to copy properties to.
6263
+ * @param {Function} [customizer] The function to customize copied values.
6264
+ * @returns {Object} Returns `object`.
6265
+ */
6266
+ function copyObject(source, props, object, customizer) {
6267
+ var isNew = !object;
6268
+ object || (object = {});
6269
+
6270
+ var index = -1,
6271
+ length = props.length;
6272
+
6273
+ while (++index < length) {
6274
+ var key = props[index];
6275
+
6276
+ var newValue = customizer
6277
+ ? customizer(object[key], source[key], key, object, source)
6278
+ : undefined;
6279
+
6280
+ if (newValue === undefined) {
6281
+ newValue = source[key];
6282
  }
6283
+ if (isNew) {
6284
+ baseAssignValue(object, key, newValue);
6285
+ } else {
6286
+ assignValue(object, key, newValue);
 
 
6287
  }
6288
+ }
6289
+ return object;
6290
+ }
6291
+
6292
+ /**
6293
+ * Copies own symbols of `source` to `object`.
6294
+ *
6295
+ * @private
6296
+ * @param {Object} source The object to copy symbols from.
6297
+ * @param {Object} [object={}] The object to copy symbols to.
6298
+ * @returns {Object} Returns `object`.
6299
+ */
6300
+ function copySymbols(source, object) {
6301
+ return copyObject(source, getSymbols(source), object);
6302
+ }
6303
+
6304
+ /**
6305
+ * Copies own and inherited symbols of `source` to `object`.
6306
+ *
6307
+ * @private
6308
+ * @param {Object} source The object to copy symbols from.
6309
+ * @param {Object} [object={}] The object to copy symbols to.
6310
+ * @returns {Object} Returns `object`.
6311
+ */
6312
+ function copySymbolsIn(source, object) {
6313
+ return copyObject(source, getSymbolsIn(source), object);
6314
+ }
6315
+
6316
+ /**
6317
+ * Creates a function like `_.groupBy`.
6318
+ *
6319
+ * @private
6320
+ * @param {Function} setter The function to set accumulator values.
6321
+ * @param {Function} [initializer] The accumulator object initializer.
6322
+ * @returns {Function} Returns the new aggregator function.
6323
+ */
6324
+ function createAggregator(setter, initializer) {
6325
+ return function(collection, iteratee) {
6326
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
6327
+ accumulator = initializer ? initializer() : {};
6328
+
6329
+ return func(collection, setter, getIteratee(iteratee, 2), accumulator);
6330
+ };
6331
+ }
6332
+
6333
+ /**
6334
+ * Creates a function like `_.assign`.
6335
+ *
6336
+ * @private
6337
+ * @param {Function} assigner The function to assign values.
6338
+ * @returns {Function} Returns the new assigner function.
6339
+ */
6340
+ function createAssigner(assigner) {
6341
+ return baseRest(function(object, sources) {
6342
+ var index = -1,
6343
+ length = sources.length,
6344
+ customizer = length > 1 ? sources[length - 1] : undefined,
6345
+ guard = length > 2 ? sources[2] : undefined;
6346
+
6347
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
6348
+ ? (length--, customizer)
6349
+ : undefined;
6350
+
6351
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
6352
+ customizer = length < 3 ? undefined : customizer;
6353
+ length = 1;
6354
  }
6355
+ object = Object(object);
6356
+ while (++index < length) {
6357
+ var source = sources[index];
6358
+ if (source) {
6359
+ assigner(object, source, index, customizer);
6360
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6361
  }
6362
+ return object;
6363
+ });
6364
+ }
6365
+
6366
+ /**
6367
+ * Creates a `baseEach` or `baseEachRight` function.
6368
+ *
6369
+ * @private
6370
+ * @param {Function} eachFunc The function to iterate over a collection.
6371
+ * @param {boolean} [fromRight] Specify iterating from right to left.
6372
+ * @returns {Function} Returns the new base function.
6373
+ */
6374
+ function createBaseEach(eachFunc, fromRight) {
6375
+ return function(collection, iteratee) {
6376
+ if (collection == null) {
6377
+ return collection;
6378
  }
6379
+ if (!isArrayLike(collection)) {
6380
+ return eachFunc(collection, iteratee);
 
 
 
 
 
6381
  }
6382
+ var length = collection.length,
6383
+ index = fromRight ? length : -1,
6384
+ iterable = Object(collection);
6385
+
6386
+ while ((fromRight ? index-- : ++index < length)) {
6387
+ if (iteratee(iterable[index], index, iterable) === false) {
6388
+ break;
6389
+ }
6390
  }
6391
+ return collection;
6392
+ };
6393
+ }
6394
+
6395
+ /**
6396
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
6397
+ *
6398
+ * @private
6399
+ * @param {boolean} [fromRight] Specify iterating from right to left.
6400
+ * @returns {Function} Returns the new base function.
6401
+ */
6402
+ function createBaseFor(fromRight) {
6403
+ return function(object, iteratee, keysFunc) {
6404
+ var index = -1,
6405
+ iterable = Object(object),
6406
+ props = keysFunc(object),
6407
+ length = props.length;
6408
+
6409
+ while (length--) {
6410
+ var key = props[fromRight ? length : ++index];
6411
+ if (iteratee(iterable[key], key, iterable) === false) {
6412
+ break;
6413
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6414
  }
6415
+ return object;
6416
+ };
6417
+ }
6418
+
6419
+ /**
6420
+ * Creates a function that wraps `func` to invoke it with the optional `this`
6421
+ * binding of `thisArg`.
6422
+ *
6423
+ * @private
6424
+ * @param {Function} func The function to wrap.
6425
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6426
+ * @param {*} [thisArg] The `this` binding of `func`.
6427
+ * @returns {Function} Returns the new wrapped function.
6428
+ */
6429
+ function createBind(func, bitmask, thisArg) {
6430
+ var isBind = bitmask & WRAP_BIND_FLAG,
6431
+ Ctor = createCtor(func);
6432
+
6433
+ function wrapper() {
6434
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6435
+ return fn.apply(isBind ? thisArg : this, arguments);
6436
+ }
6437
+ return wrapper;
6438
+ }
6439
+
6440
+ /**
6441
+ * Creates a function like `_.lowerFirst`.
6442
+ *
6443
+ * @private
6444
+ * @param {string} methodName The name of the `String` case method to use.
6445
+ * @returns {Function} Returns the new case function.
6446
+ */
6447
+ function createCaseFirst(methodName) {
6448
+ return function(string) {
6449
+ string = toString(string);
6450
+
6451
+ var strSymbols = hasUnicode(string)
6452
+ ? stringToArray(string)
6453
+ : undefined;
6454
+
6455
+ var chr = strSymbols
6456
+ ? strSymbols[0]
6457
+ : string.charAt(0);
6458
+
6459
+ var trailing = strSymbols
6460
+ ? castSlice(strSymbols, 1).join('')
6461
+ : string.slice(1);
6462
+
6463
+ return chr[methodName]() + trailing;
6464
+ };
6465
+ }
6466
+
6467
+ /**
6468
+ * Creates a function like `_.camelCase`.
6469
+ *
6470
+ * @private
6471
+ * @param {Function} callback The function to combine each word.
6472
+ * @returns {Function} Returns the new compounder function.
6473
+ */
6474
+ function createCompounder(callback) {
6475
+ return function(string) {
6476
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
6477
+ };
6478
+ }
6479
+
6480
+ /**
6481
+ * Creates a function that produces an instance of `Ctor` regardless of
6482
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
6483
+ *
6484
+ * @private
6485
+ * @param {Function} Ctor The constructor to wrap.
6486
+ * @returns {Function} Returns the new wrapped function.
6487
+ */
6488
+ function createCtor(Ctor) {
6489
+ return function() {
6490
+ // Use a `switch` statement to work with class constructors. See
6491
+ // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
6492
+ // for more details.
6493
+ var args = arguments;
6494
+ switch (args.length) {
6495
+ case 0: return new Ctor;
6496
+ case 1: return new Ctor(args[0]);
6497
+ case 2: return new Ctor(args[0], args[1]);
6498
+ case 3: return new Ctor(args[0], args[1], args[2]);
6499
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
6500
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
6501
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
6502
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
6503
  }
6504
+ var thisBinding = baseCreate(Ctor.prototype),
6505
+ result = Ctor.apply(thisBinding, args);
6506
+
6507
+ // Mimic the constructor's `return` behavior.
6508
+ // See https://es5.github.io/#x13.2.2 for more details.
6509
+ return isObject(result) ? result : thisBinding;
6510
+ };
6511
+ }
6512
+
6513
+ /**
6514
+ * Creates a function that wraps `func` to enable currying.
6515
+ *
6516
+ * @private
6517
+ * @param {Function} func The function to wrap.
6518
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6519
+ * @param {number} arity The arity of `func`.
6520
+ * @returns {Function} Returns the new wrapped function.
6521
+ */
6522
+ function createCurry(func, bitmask, arity) {
6523
+ var Ctor = createCtor(func);
6524
+
6525
+ function wrapper() {
6526
+ var length = arguments.length,
6527
+ args = Array(length),
6528
+ index = length,
6529
+ placeholder = getHolder(wrapper);
6530
+
6531
+ while (index--) {
6532
+ args[index] = arguments[index];
6533
  }
6534
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
6535
+ ? []
6536
+ : replaceHolders(args, placeholder);
6537
+
6538
+ length -= holders.length;
6539
+ if (length < arity) {
6540
+ return createRecurry(
6541
+ func, bitmask, createHybrid, wrapper.placeholder, undefined,
6542
+ args, holders, undefined, undefined, arity - length);
 
6543
  }
6544
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6545
+ return apply(fn, this, args);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6546
  }
6547
+ return wrapper;
6548
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6549
 
6550
+ /**
6551
+ * Creates a `_.find` or `_.findLast` function.
6552
+ *
6553
+ * @private
6554
+ * @param {Function} findIndexFunc The function to find the collection index.
6555
+ * @returns {Function} Returns the new find function.
6556
+ */
6557
+ function createFind(findIndexFunc) {
6558
+ return function(collection, predicate, fromIndex) {
6559
+ var iterable = Object(collection);
6560
+ if (!isArrayLike(collection)) {
6561
+ var iteratee = getIteratee(predicate, 3);
6562
+ collection = keys(collection);
6563
+ predicate = function(key) { return iteratee(iterable[key], key, iterable); };
6564
+ }
6565
+ var index = findIndexFunc(collection, predicate, fromIndex);
6566
+ return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
6567
+ };
6568
+ }
6569
 
6570
+ /**
6571
+ * Creates a `_.flow` or `_.flowRight` function.
6572
+ *
6573
+ * @private
6574
+ * @param {boolean} [fromRight] Specify iterating from right to left.
6575
+ * @returns {Function} Returns the new flow function.
6576
+ */
6577
+ function createFlow(fromRight) {
6578
+ return flatRest(function(funcs) {
6579
+ var length = funcs.length,
6580
+ index = length,
6581
+ prereq = LodashWrapper.prototype.thru;
6582
 
6583
+ if (fromRight) {
6584
+ funcs.reverse();
6585
+ }
6586
+ while (index--) {
6587
+ var func = funcs[index];
6588
+ if (typeof func != 'function') {
6589
+ throw new TypeError(FUNC_ERROR_TEXT);
6590
+ }
6591
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
6592
+ var wrapper = new LodashWrapper([], true);
6593
+ }
6594
+ }
6595
+ index = wrapper ? index : length;
6596
+ while (++index < length) {
6597
+ func = funcs[index];
6598
 
6599
+ var funcName = getFuncName(func),
6600
+ data = funcName == 'wrapper' ? getData(func) : undefined;
 
6601
 
6602
+ if (data && isLaziable(data[0]) &&
6603
+ data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
6604
+ !data[4].length && data[9] == 1
6605
+ ) {
6606
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
6607
+ } else {
6608
+ wrapper = (func.length == 1 && isLaziable(func))
6609
+ ? wrapper[funcName]()
6610
+ : wrapper.thru(func);
6611
+ }
6612
+ }
6613
+ return function() {
6614
+ var args = arguments,
6615
+ value = args[0];
6616
 
6617
+ if (wrapper && args.length == 1 && isArray(value)) {
6618
+ return wrapper.plant(value).value();
6619
+ }
6620
+ var index = 0,
6621
+ result = length ? funcs[index].apply(this, args) : value;
6622
 
6623
+ while (++index < length) {
6624
+ result = funcs[index].call(this, result);
6625
+ }
6626
+ return result;
6627
+ };
6628
+ });
6629
+ }
6630
 
6631
+ /**
6632
+ * Creates a function that wraps `func` to invoke it with optional `this`
6633
+ * binding of `thisArg`, partial application, and currying.
6634
+ *
6635
+ * @private
6636
+ * @param {Function|string} func The function or method name to wrap.
6637
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6638
+ * @param {*} [thisArg] The `this` binding of `func`.
6639
+ * @param {Array} [partials] The arguments to prepend to those provided to
6640
+ * the new function.
6641
+ * @param {Array} [holders] The `partials` placeholder indexes.
6642
+ * @param {Array} [partialsRight] The arguments to append to those provided
6643
+ * to the new function.
6644
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
6645
+ * @param {Array} [argPos] The argument positions of the new function.
6646
+ * @param {number} [ary] The arity cap of `func`.
6647
+ * @param {number} [arity] The arity of `func`.
6648
+ * @returns {Function} Returns the new wrapped function.
6649
+ */
6650
+ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
6651
+ var isAry = bitmask & WRAP_ARY_FLAG,
6652
+ isBind = bitmask & WRAP_BIND_FLAG,
6653
+ isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
6654
+ isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
6655
+ isFlip = bitmask & WRAP_FLIP_FLAG,
6656
+ Ctor = isBindKey ? undefined : createCtor(func);
6657
 
6658
+ function wrapper() {
6659
+ var length = arguments.length,
6660
+ args = Array(length),
6661
+ index = length;
 
 
 
 
 
 
 
 
6662
 
6663
+ while (index--) {
6664
+ args[index] = arguments[index];
6665
+ }
6666
+ if (isCurried) {
6667
+ var placeholder = getHolder(wrapper),
6668
+ holdersCount = countHolders(args, placeholder);
6669
+ }
6670
+ if (partials) {
6671
+ args = composeArgs(args, partials, holders, isCurried);
6672
+ }
6673
+ if (partialsRight) {
6674
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
6675
+ }
6676
+ length -= holdersCount;
6677
+ if (isCurried && length < arity) {
6678
+ var newHolders = replaceHolders(args, placeholder);
6679
+ return createRecurry(
6680
+ func, bitmask, createHybrid, wrapper.placeholder, thisArg,
6681
+ args, newHolders, argPos, ary, arity - length
6682
+ );
6683
+ }
6684
+ var thisBinding = isBind ? thisArg : this,
6685
+ fn = isBindKey ? thisBinding[func] : func;
6686
 
6687
+ length = args.length;
6688
+ if (argPos) {
6689
+ args = reorder(args, argPos);
6690
+ } else if (isFlip && length > 1) {
6691
+ args.reverse();
6692
+ }
6693
+ if (isAry && ary < length) {
6694
+ args.length = ary;
6695
+ }
6696
+ if (this && this !== root && this instanceof wrapper) {
6697
+ fn = Ctor || createCtor(fn);
6698
+ }
6699
+ return fn.apply(thisBinding, args);
6700
+ }
6701
+ return wrapper;
6702
+ }
6703
 
6704
+ /**
6705
+ * Creates a function like `_.invertBy`.
6706
+ *
6707
+ * @private
6708
+ * @param {Function} setter The function to set accumulator values.
6709
+ * @param {Function} toIteratee The function to resolve iteratees.
6710
+ * @returns {Function} Returns the new inverter function.
6711
+ */
6712
+ function createInverter(setter, toIteratee) {
6713
+ return function(object, iteratee) {
6714
+ return baseInverter(object, setter, toIteratee(iteratee), {});
6715
+ };
6716
+ }
6717
 
6718
+ /**
6719
+ * Creates a function that performs a mathematical operation on two values.
6720
+ *
6721
+ * @private
6722
+ * @param {Function} operator The function to perform the operation.
6723
+ * @param {number} [defaultValue] The value used for `undefined` arguments.
6724
+ * @returns {Function} Returns the new mathematical operation function.
6725
+ */
6726
+ function createMathOperation(operator, defaultValue) {
6727
+ return function(value, other) {
6728
+ var result;
6729
+ if (value === undefined && other === undefined) {
6730
+ return defaultValue;
6731
+ }
6732
+ if (value !== undefined) {
6733
+ result = value;
6734
+ }
6735
+ if (other !== undefined) {
6736
+ if (result === undefined) {
6737
+ return other;
6738
+ }
6739
+ if (typeof value == 'string' || typeof other == 'string') {
6740
+ value = baseToString(value);
6741
+ other = baseToString(other);
6742
+ } else {
6743
+ value = baseToNumber(value);
6744
+ other = baseToNumber(other);
6745
+ }
6746
+ result = operator(value, other);
6747
+ }
6748
+ return result;
6749
+ };
6750
+ }
6751
 
6752
+ /**
6753
+ * Creates a function like `_.over`.
6754
+ *
6755
+ * @private
6756
+ * @param {Function} arrayFunc The function to iterate over iteratees.
6757
+ * @returns {Function} Returns the new over function.
6758
+ */
6759
+ function createOver(arrayFunc) {
6760
+ return flatRest(function(iteratees) {
6761
+ iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
6762
+ return baseRest(function(args) {
6763
+ var thisArg = this;
6764
+ return arrayFunc(iteratees, function(iteratee) {
6765
+ return apply(iteratee, thisArg, args);
6766
+ });
6767
+ });
6768
+ });
6769
+ }
6770
 
6771
+ /**
6772
+ * Creates the padding for `string` based on `length`. The `chars` string
6773
+ * is truncated if the number of characters exceeds `length`.
6774
+ *
6775
+ * @private
6776
+ * @param {number} length The padding length.
6777
+ * @param {string} [chars=' '] The string used as padding.
6778
+ * @returns {string} Returns the padding for `string`.
6779
+ */
6780
+ function createPadding(length, chars) {
6781
+ chars = chars === undefined ? ' ' : baseToString(chars);
6782
 
6783
+ var charsLength = chars.length;
6784
+ if (charsLength < 2) {
6785
+ return charsLength ? baseRepeat(chars, length) : chars;
6786
+ }
6787
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
6788
+ return hasUnicode(chars)
6789
+ ? castSlice(stringToArray(result), 0, length).join('')
6790
+ : result.slice(0, length);
6791
+ }
6792
 
6793
+ /**
6794
+ * Creates a function that wraps `func` to invoke it with the `this` binding
6795
+ * of `thisArg` and `partials` prepended to the arguments it receives.
6796
+ *
6797
+ * @private
6798
+ * @param {Function} func The function to wrap.
6799
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6800
+ * @param {*} thisArg The `this` binding of `func`.
6801
+ * @param {Array} partials The arguments to prepend to those provided to
6802
+ * the new function.
6803
+ * @returns {Function} Returns the new wrapped function.
6804
+ */
6805
+ function createPartial(func, bitmask, thisArg, partials) {
6806
+ var isBind = bitmask & WRAP_BIND_FLAG,
6807
+ Ctor = createCtor(func);
6808
 
6809
+ function wrapper() {
6810
+ var argsIndex = -1,
6811
+ argsLength = arguments.length,
6812
+ leftIndex = -1,
6813
+ leftLength = partials.length,
6814
+ args = Array(leftLength + argsLength),
6815
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
6816
 
6817
+ while (++leftIndex < leftLength) {
6818
+ args[leftIndex] = partials[leftIndex];
6819
+ }
6820
+ while (argsLength--) {
6821
+ args[leftIndex++] = arguments[++argsIndex];
6822
+ }
6823
+ return apply(fn, isBind ? thisArg : this, args);
6824
+ }
6825
+ return wrapper;
6826
+ }
6827
 
6828
+ /**
6829
+ * Creates a `_.range` or `_.rangeRight` function.
6830
+ *
6831
+ * @private
6832
+ * @param {boolean} [fromRight] Specify iterating from right to left.
6833
+ * @returns {Function} Returns the new range function.
6834
+ */
6835
+ function createRange(fromRight) {
6836
+ return function(start, end, step) {
6837
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
6838
+ end = step = undefined;
6839
+ }
6840
+ // Ensure the sign of `-0` is preserved.
6841
+ start = toFinite(start);
6842
+ if (end === undefined) {
6843
+ end = start;
6844
+ start = 0;
6845
+ } else {
6846
+ end = toFinite(end);
6847
+ }
6848
+ step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
6849
+ return baseRange(start, end, step, fromRight);
6850
+ };
6851
+ }
6852
 
6853
+ /**
6854
+ * Creates a function that performs a relational operation on two values.
6855
+ *
6856
+ * @private
6857
+ * @param {Function} operator The function to perform the operation.
6858
+ * @returns {Function} Returns the new relational operation function.
6859
+ */
6860
+ function createRelationalOperation(operator) {
6861
+ return function(value, other) {
6862
+ if (!(typeof value == 'string' && typeof other == 'string')) {
6863
+ value = toNumber(value);
6864
+ other = toNumber(other);
6865
+ }
6866
+ return operator(value, other);
6867
+ };
6868
+ }
6869
 
6870
+ /**
6871
+ * Creates a function that wraps `func` to continue currying.
6872
+ *
6873
+ * @private
6874
+ * @param {Function} func The function to wrap.
6875
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
6876
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
6877
+ * @param {*} placeholder The placeholder value.
6878
+ * @param {*} [thisArg] The `this` binding of `func`.
6879
+ * @param {Array} [partials] The arguments to prepend to those provided to
6880
+ * the new function.
6881
+ * @param {Array} [holders] The `partials` placeholder indexes.
6882
+ * @param {Array} [argPos] The argument positions of the new function.
6883
+ * @param {number} [ary] The arity cap of `func`.
6884
+ * @param {number} [arity] The arity of `func`.
6885
+ * @returns {Function} Returns the new wrapped function.
6886
+ */
6887
+ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
6888
+ var isCurry = bitmask & WRAP_CURRY_FLAG,
6889
+ newHolders = isCurry ? holders : undefined,
6890
+ newHoldersRight = isCurry ? undefined : holders,
6891
+ newPartials = isCurry ? partials : undefined,
6892
+ newPartialsRight = isCurry ? undefined : partials;
6893
 
6894
+ bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
6895
+ bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
 
6896
 
6897
+ if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
6898
+ bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
6899
+ }
6900
+ var newData = [
6901
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
6902
+ newHoldersRight, argPos, ary, arity
6903
+ ];
6904
 
6905
+ var result = wrapFunc.apply(undefined, newData);
6906
+ if (isLaziable(func)) {
6907
+ setData(result, newData);
6908
+ }
6909
+ result.placeholder = placeholder;
6910
+ return setWrapToString(result, func, bitmask);
6911
+ }
6912
 
6913
+ /**
6914
+ * Creates a function like `_.round`.
6915
+ *
6916
+ * @private
6917
+ * @param {string} methodName The name of the `Math` method to use when rounding.
6918
+ * @returns {Function} Returns the new round function.
6919
+ */
6920
+ function createRound(methodName) {
6921
+ var func = Math[methodName];
6922
+ return function(number, precision) {
6923
+ number = toNumber(number);
6924
+ precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
6925
+ if (precision) {
6926
+ // Shift with exponential notation to avoid floating-point issues.
6927
+ // See [MDN](https://mdn.io/round#Examples) for more details.
6928
+ var pair = (toString(number) + 'e').split('e'),
6929
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
6930
 
6931
+ pair = (toString(value) + 'e').split('e');
6932
+ return +(pair[0] + 'e' + (+pair[1] - precision));
6933
+ }
6934
+ return func(number);
6935
+ };
6936
+ }
6937
 
6938
+ /**
6939
+ * Creates a set object of `values`.
6940
+ *
6941
+ * @private
6942
+ * @param {Array} values The values to add to the set.
6943
+ * @returns {Object} Returns the new set.
6944
+ */
6945
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
6946
+ return new Set(values);
6947
+ };
6948
 
6949
+ /**
6950
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
6951
+ *
6952
+ * @private
6953
+ * @param {Function} keysFunc The function to get the keys of a given object.
6954
+ * @returns {Function} Returns the new pairs function.
6955
+ */
6956
+ function createToPairs(keysFunc) {
6957
+ return function(object) {
6958
+ var tag = getTag(object);
6959
+ if (tag == mapTag) {
6960
+ return mapToArray(object);
6961
+ }
6962
+ if (tag == setTag) {
6963
+ return setToPairs(object);
6964
+ }
6965
+ return baseToPairs(object, keysFunc(object));
6966
+ };
6967
+ }
6968
 
6969
+ /**
6970
+ * Creates a function that either curries or invokes `func` with optional
6971
+ * `this` binding and partially applied arguments.
6972
+ *
6973
+ * @private
6974
+ * @param {Function|string} func The function or method name to wrap.
6975
+ * @param {number} bitmask The bitmask flags.
6976
+ * 1 - `_.bind`
6977
+ * 2 - `_.bindKey`
6978
+ * 4 - `_.curry` or `_.curryRight` of a bound function
6979
+ * 8 - `_.curry`
6980
+ * 16 - `_.curryRight`
6981
+ * 32 - `_.partial`
6982
+ * 64 - `_.partialRight`
6983
+ * 128 - `_.rearg`
6984
+ * 256 - `_.ary`
6985
+ * 512 - `_.flip`
6986
+ * @param {*} [thisArg] The `this` binding of `func`.
6987
+ * @param {Array} [partials] The arguments to be partially applied.
6988
+ * @param {Array} [holders] The `partials` placeholder indexes.
6989
+ * @param {Array} [argPos] The argument positions of the new function.
6990
+ * @param {number} [ary] The arity cap of `func`.
6991
+ * @param {number} [arity] The arity of `func`.
6992
+ * @returns {Function} Returns the new wrapped function.
6993
+ */
6994
+ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
6995
+ var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
6996
+ if (!isBindKey && typeof func != 'function') {
6997
+ throw new TypeError(FUNC_ERROR_TEXT);
6998
+ }
6999
+ var length = partials ? partials.length : 0;
7000
+ if (!length) {
7001
+ bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
7002
+ partials = holders = undefined;
7003
+ }
7004
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
7005
+ arity = arity === undefined ? arity : toInteger(arity);
7006
+ length -= holders ? holders.length : 0;
7007
 
7008
+ if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
7009
+ var partialsRight = partials,
7010
+ holdersRight = holders;
 
 
 
 
 
7011
 
7012
+ partials = holders = undefined;
7013
+ }
7014
+ var data = isBindKey ? undefined : getData(func);
7015
 
7016
+ var newData = [
7017
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
7018
+ argPos, ary, arity
7019
+ ];
7020
 
7021
+ if (data) {
7022
+ mergeData(newData, data);
7023
+ }
7024
+ func = newData[0];
7025
+ bitmask = newData[1];
7026
+ thisArg = newData[2];
7027
+ partials = newData[3];
7028
+ holders = newData[4];
7029
+ arity = newData[9] = newData[9] === undefined
7030
+ ? (isBindKey ? 0 : func.length)
7031
+ : nativeMax(newData[9] - length, 0);
7032
 
7033
+ if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
7034
+ bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
7035
+ }
7036
+ if (!bitmask || bitmask == WRAP_BIND_FLAG) {
7037
+ var result = createBind(func, bitmask, thisArg);
7038
+ } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
7039
+ result = createCurry(func, bitmask, arity);
7040
+ } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
7041
+ result = createPartial(func, bitmask, thisArg, partials);
7042
+ } else {
7043
+ result = createHybrid.apply(undefined, newData);
7044
+ }
7045
+ var setter = data ? baseSetData : setData;
7046
+ return setWrapToString(setter(result, newData), func, bitmask);
7047
+ }
7048
 
7049
+ /**
7050
+ * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
7051
+ * of source objects to the destination object for all destination properties
7052
+ * that resolve to `undefined`.
7053
+ *
7054
+ * @private
7055
+ * @param {*} objValue The destination value.
7056
+ * @param {*} srcValue The source value.
7057
+ * @param {string} key The key of the property to assign.
7058
+ * @param {Object} object The parent object of `objValue`.
7059
+ * @returns {*} Returns the value to assign.
7060
+ */
7061
+ function customDefaultsAssignIn(objValue, srcValue, key, object) {
7062
+ if (objValue === undefined ||
7063
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
7064
+ return srcValue;
7065
+ }
7066
+ return objValue;
7067
+ }
7068
 
7069
+ /**
7070
+ * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
7071
+ * objects into destination objects that are passed thru.
7072
+ *
7073
+ * @private
7074
+ * @param {*} objValue The destination value.
7075
+ * @param {*} srcValue The source value.
7076
+ * @param {string} key The key of the property to merge.
7077
+ * @param {Object} object The parent object of `objValue`.
7078
+ * @param {Object} source The parent object of `srcValue`.
7079
+ * @param {Object} [stack] Tracks traversed source values and their merged
7080
+ * counterparts.
7081
+ * @returns {*} Returns the value to assign.
7082
+ */
7083
+ function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
7084
+ if (isObject(objValue) && isObject(srcValue)) {
7085
+ // Recursively merge objects and arrays (susceptible to call stack limits).
7086
+ stack.set(srcValue, objValue);
7087
+ baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
7088
+ stack['delete'](srcValue);
7089
+ }
7090
+ return objValue;
7091
+ }
7092
 
7093
+ /**
7094
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
7095
+ * objects.
7096
+ *
7097
+ * @private
7098
+ * @param {*} value The value to inspect.
7099
+ * @param {string} key The key of the property to inspect.
7100
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
7101
+ */
7102
+ function customOmitClone(value) {
7103
+ return isPlainObject(value) ? undefined : value;
7104
+ }
7105
 
7106
+ /**
7107
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
7108
+ * partial deep comparisons.
7109
+ *
7110
+ * @private
7111
+ * @param {Array} array The array to compare.
7112
+ * @param {Array} other The other array to compare.
7113
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7114
+ * @param {Function} customizer The function to customize comparisons.
7115
+ * @param {Function} equalFunc The function to determine equivalents of values.
7116
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
7117
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
7118
+ */
7119
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
7120
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7121
+ arrLength = array.length,
7122
+ othLength = other.length;
7123
 
7124
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
7125
+ return false;
7126
+ }
7127
+ // Assume cyclic values are equal.
7128
+ var stacked = stack.get(array);
7129
+ if (stacked && stack.get(other)) {
7130
+ return stacked == other;
7131
+ }
7132
+ var index = -1,
7133
+ result = true,
7134
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
7135
 
7136
+ stack.set(array, other);
7137
+ stack.set(other, array);
7138
 
7139
+ // Ignore non-index properties.
7140
+ while (++index < arrLength) {
7141
+ var arrValue = array[index],
7142
+ othValue = other[index];
7143
 
7144
+ if (customizer) {
7145
+ var compared = isPartial
7146
+ ? customizer(othValue, arrValue, index, other, array, stack)
7147
+ : customizer(arrValue, othValue, index, array, other, stack);
7148
+ }
7149
+ if (compared !== undefined) {
7150
+ if (compared) {
7151
+ continue;
7152
+ }
7153
+ result = false;
7154
+ break;
7155
+ }
7156
+ // Recursively compare arrays (susceptible to call stack limits).
7157
+ if (seen) {
7158
+ if (!arraySome(other, function(othValue, othIndex) {
7159
+ if (!cacheHas(seen, othIndex) &&
7160
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
7161
+ return seen.push(othIndex);
7162
+ }
7163
+ })) {
7164
+ result = false;
7165
+ break;
7166
+ }
7167
+ } else if (!(
7168
+ arrValue === othValue ||
7169
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
7170
+ )) {
7171
+ result = false;
7172
+ break;
7173
+ }
7174
+ }
7175
+ stack['delete'](array);
7176
+ stack['delete'](other);
7177
+ return result;
7178
+ }
7179
 
7180
+ /**
7181
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
7182
+ * the same `toStringTag`.
7183
+ *
7184
+ * **Note:** This function only supports comparing values with tags of
7185
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
7186
+ *
7187
+ * @private
7188
+ * @param {Object} object The object to compare.
7189
+ * @param {Object} other The other object to compare.
7190
+ * @param {string} tag The `toStringTag` of the objects to compare.
7191
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7192
+ * @param {Function} customizer The function to customize comparisons.
7193
+ * @param {Function} equalFunc The function to determine equivalents of values.
7194
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
7195
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7196
+ */
7197
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
7198
+ switch (tag) {
7199
+ case dataViewTag:
7200
+ if ((object.byteLength != other.byteLength) ||
7201
+ (object.byteOffset != other.byteOffset)) {
7202
+ return false;
7203
+ }
7204
+ object = object.buffer;
7205
+ other = other.buffer;
7206
 
7207
+ case arrayBufferTag:
7208
+ if ((object.byteLength != other.byteLength) ||
7209
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
7210
+ return false;
7211
+ }
7212
+ return true;
7213
 
7214
+ case boolTag:
7215
+ case dateTag:
7216
+ case numberTag:
7217
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
7218
+ // Invalid dates are coerced to `NaN`.
7219
+ return eq(+object, +other);
7220
 
7221
+ case errorTag:
7222
+ return object.name == other.name && object.message == other.message;
7223
 
7224
+ case regexpTag:
7225
+ case stringTag:
7226
+ // Coerce regexes to strings and treat strings, primitives and objects,
7227
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
7228
+ // for more details.
7229
+ return object == (other + '');
7230
 
7231
+ case mapTag:
7232
+ var convert = mapToArray;
7233
 
7234
+ case setTag:
7235
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
7236
+ convert || (convert = setToArray);
 
7237
 
7238
+ if (object.size != other.size && !isPartial) {
7239
+ return false;
7240
+ }
7241
+ // Assume cyclic values are equal.
7242
+ var stacked = stack.get(object);
7243
+ if (stacked) {
7244
+ return stacked == other;
7245
+ }
7246
+ bitmask |= COMPARE_UNORDERED_FLAG;
7247
 
7248
+ // Recursively compare objects (susceptible to call stack limits).
7249
+ stack.set(object, other);
7250
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
7251
+ stack['delete'](object);
7252
+ return result;
7253
 
7254
+ case symbolTag:
7255
+ if (symbolValueOf) {
7256
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
7257
+ }
7258
  }
7259
+ return false;
7260
+ }
7261
 
7262
+ /**
7263
+ * A specialized version of `baseIsEqualDeep` for objects with support for
7264
+ * partial deep comparisons.
7265
+ *
7266
+ * @private
7267
+ * @param {Object} object The object to compare.
7268
+ * @param {Object} other The other object to compare.
7269
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
7270
+ * @param {Function} customizer The function to customize comparisons.
7271
+ * @param {Function} equalFunc The function to determine equivalents of values.
7272
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
7273
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
7274
+ */
7275
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
7276
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
7277
+ objProps = getAllKeys(object),
7278
+ objLength = objProps.length,
7279
+ othProps = getAllKeys(other),
7280
+ othLength = othProps.length;
7281
 
7282
+ if (objLength != othLength && !isPartial) {
7283
+ return false;
7284
+ }
7285
+ var index = objLength;
7286
+ while (index--) {
7287
+ var key = objProps[index];
7288
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
7289
+ return false;
7290
+ }
7291
+ }
7292
+ // Assume cyclic values are equal.
7293
+ var stacked = stack.get(object);
7294
+ if (stacked && stack.get(other)) {
7295
+ return stacked == other;
7296
+ }
7297
+ var result = true;
7298
+ stack.set(object, other);
7299
+ stack.set(other, object);
7300
 
7301
+ var skipCtor = isPartial;
7302
+ while (++index < objLength) {
7303
+ key = objProps[index];
7304
+ var objValue = object[key],
7305
+ othValue = other[key];
7306
 
7307
+ if (customizer) {
7308
+ var compared = isPartial
7309
+ ? customizer(othValue, objValue, key, other, object, stack)
7310
+ : customizer(objValue, othValue, key, object, other, stack);
7311
+ }
7312
+ // Recursively compare objects (susceptible to call stack limits).
7313
+ if (!(compared === undefined
7314
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
7315
+ : compared
7316
+ )) {
7317
+ result = false;
 
7318
  break;
7319
+ }
7320
+ skipCtor || (skipCtor = key == 'constructor');
7321
  }
7322
+ if (result && !skipCtor) {
7323
+ var objCtor = object.constructor,
7324
+ othCtor = other.constructor;
7325
 
7326
+ // Non `Object` object instances with different constructors are not equal.
7327
+ if (objCtor != othCtor &&
7328
+ ('constructor' in object && 'constructor' in other) &&
7329
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
7330
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
7331
+ result = false;
7332
+ }
7333
  }
7334
+ stack['delete'](object);
7335
+ stack['delete'](other);
7336
+ return result;
7337
+ }
 
 
 
7338
 
7339
+ /**
7340
+ * A specialized version of `baseRest` which flattens the rest array.
7341
+ *
7342
+ * @private
7343
+ * @param {Function} func The function to apply a rest parameter to.
7344
+ * @returns {Function} Returns the new function.
7345
+ */
7346
+ function flatRest(func) {
7347
+ return setToString(overRest(func, undefined, flatten), func + '');
7348
+ }
7349
 
7350
+ /**
7351
+ * Creates an array of own enumerable property names and symbols of `object`.
7352
+ *
7353
+ * @private
7354
+ * @param {Object} object The object to query.
7355
+ * @returns {Array} Returns the array of property names and symbols.
7356
+ */
7357
+ function getAllKeys(object) {
7358
+ return baseGetAllKeys(object, keys, getSymbols);
7359
+ }
7360
 
7361
+ /**
7362
+ * Creates an array of own and inherited enumerable property names and
7363
+ * symbols of `object`.
7364
+ *
7365
+ * @private
7366
+ * @param {Object} object The object to query.
7367
+ * @returns {Array} Returns the array of property names and symbols.
7368
+ */
7369
+ function getAllKeysIn(object) {
7370
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
7371
+ }
7372
 
7373
+ /**
7374
+ * Gets metadata for `func`.
7375
+ *
7376
+ * @private
7377
+ * @param {Function} func The function to query.
7378
+ * @returns {*} Returns the metadata for `func`.
7379
+ */
7380
+ var getData = !metaMap ? noop : function(func) {
7381
+ return metaMap.get(func);
7382
+ };
7383
 
7384
+ /**
7385
+ * Gets the name of `func`.
7386
+ *
7387
+ * @private
7388
+ * @param {Function} func The function to query.
7389
+ * @returns {string} Returns the function name.
7390
+ */
7391
+ function getFuncName(func) {
7392
+ var result = (func.name + ''),
7393
+ array = realNames[result],
7394
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
7395
 
7396
+ while (length--) {
7397
+ var data = array[length],
7398
+ otherFunc = data.func;
7399
+ if (otherFunc == null || otherFunc == func) {
7400
+ return data.name;
7401
+ }
 
 
 
7402
  }
7403
+ return result;
7404
  }
 
 
 
 
 
7405
 
7406
+ /**
7407
+ * Gets the argument placeholder value for `func`.
7408
+ *
7409
+ * @private
7410
+ * @param {Function} func The function to inspect.
7411
+ * @returns {*} Returns the placeholder value.
7412
+ */
7413
+ function getHolder(func) {
7414
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
7415
+ return object.placeholder;
7416
  }
 
 
 
 
 
 
 
 
 
 
7417
 
7418
+ /**
7419
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
7420
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
7421
+ * If arguments are provided, the chosen function is invoked with them and
7422
+ * its result is returned.
7423
+ *
7424
+ * @private
7425
+ * @param {*} [value] The value to convert to an iteratee.
7426
+ * @param {number} [arity] The arity of the created iteratee.
7427
+ * @returns {Function} Returns the chosen function or its result.
7428
+ */
7429
+ function getIteratee() {
7430
+ var result = lodash.iteratee || iteratee;
7431
+ result = result === iteratee ? baseIteratee : result;
7432
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
7433
  }
 
 
 
 
 
 
 
 
7434
 
7435
+ /**
7436
+ * Gets the data for `map`.
7437
+ *
7438
+ * @private
7439
+ * @param {Object} map The map to query.
7440
+ * @param {string} key The reference key.
7441
+ * @returns {*} Returns the map data.
7442
+ */
7443
+ function getMapData(map, key) {
7444
+ var data = map.__data__;
7445
+ return isKeyable(key)
7446
+ ? data[typeof key == 'string' ? 'string' : 'hash']
7447
+ : data.map;
7448
+ }
7449
 
7450
+ /**
7451
+ * Gets the property names, values, and compare flags of `object`.
7452
+ *
7453
+ * @private
7454
+ * @param {Object} object The object to query.
7455
+ * @returns {Array} Returns the match data of `object`.
7456
+ */
7457
+ function getMatchData(object) {
7458
+ var result = keys(object),
7459
+ length = result.length;
7460
 
7461
+ while (length--) {
7462
+ var key = result[length],
7463
+ value = object[key];
7464
+
7465
+ result[length] = [key, value, isStrictComparable(value)];
7466
  }
7467
+ return result;
7468
  }
 
 
 
 
7469
 
7470
+ /**
7471
+ * Gets the native function at `key` of `object`.
7472
+ *
7473
+ * @private
7474
+ * @param {Object} object The object to query.
7475
+ * @param {string} key The key of the method to get.
7476
+ * @returns {*} Returns the function if it's native, else `undefined`.
7477
+ */
7478
+ function getNative(object, key) {
7479
+ var value = getValue(object, key);
7480
+ return baseIsNative(value) ? value : undefined;
7481
+ }
 
 
 
 
 
 
 
 
7482
 
7483
+ /**
7484
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
7485
+ *
7486
+ * @private
7487
+ * @param {*} value The value to query.
7488
+ * @returns {string} Returns the raw `toStringTag`.
7489
+ */
7490
+ function getRawTag(value) {
7491
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
7492
+ tag = value[symToStringTag];
7493
 
7494
+ try {
7495
+ value[symToStringTag] = undefined;
7496
+ var unmasked = true;
7497
+ } catch (e) {}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7498
 
7499
+ var result = nativeObjectToString.call(value);
7500
+ if (unmasked) {
7501
+ if (isOwn) {
7502
+ value[symToStringTag] = tag;
7503
+ } else {
7504
+ delete value[symToStringTag];
7505
+ }
7506
+ }
7507
+ return result;
7508
+ }
7509
 
7510
+ /**
7511
+ * Creates an array of the own enumerable symbols of `object`.
7512
+ *
7513
+ * @private
7514
+ * @param {Object} object The object to query.
7515
+ * @returns {Array} Returns the array of symbols.
7516
+ */
7517
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
7518
+ if (object == null) {
7519
+ return [];
7520
+ }
7521
+ object = Object(object);
7522
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
7523
+ return propertyIsEnumerable.call(object, symbol);
7524
+ });
7525
+ };
7526
 
7527
+ /**
7528
+ * Creates an array of the own and inherited enumerable symbols of `object`.
7529
+ *
7530
+ * @private
7531
+ * @param {Object} object The object to query.
7532
+ * @returns {Array} Returns the array of symbols.
7533
+ */
7534
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
7535
+ var result = [];
7536
+ while (object) {
7537
+ arrayPush(result, getSymbols(object));
7538
+ object = getPrototype(object);
7539
+ }
7540
+ return result;
7541
+ };
7542
 
7543
+ /**
7544
+ * Gets the `toStringTag` of `value`.
7545
+ *
7546
+ * @private
7547
+ * @param {*} value The value to query.
7548
+ * @returns {string} Returns the `toStringTag`.
7549
+ */
7550
+ var getTag = baseGetTag;
7551
 
7552
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
7553
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
7554
+ (Map && getTag(new Map) != mapTag) ||
7555
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
7556
+ (Set && getTag(new Set) != setTag) ||
7557
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
7558
+ getTag = function(value) {
7559
+ var result = baseGetTag(value),
7560
+ Ctor = result == objectTag ? value.constructor : undefined,
7561
+ ctorString = Ctor ? toSource(Ctor) : '';
7562
 
7563
+ if (ctorString) {
7564
+ switch (ctorString) {
7565
+ case dataViewCtorString: return dataViewTag;
7566
+ case mapCtorString: return mapTag;
7567
+ case promiseCtorString: return promiseTag;
7568
+ case setCtorString: return setTag;
7569
+ case weakMapCtorString: return weakMapTag;
7570
+ }
7571
+ }
7572
+ return result;
7573
+ };
7574
+ }
7575
 
7576
+ /**
7577
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
7578
+ *
7579
+ * @private
7580
+ * @param {number} start The start of the view.
7581
+ * @param {number} end The end of the view.
7582
+ * @param {Array} transforms The transformations to apply to the view.
7583
+ * @returns {Object} Returns an object containing the `start` and `end`
7584
+ * positions of the view.
7585
+ */
7586
+ function getView(start, end, transforms) {
7587
+ var index = -1,
7588
+ length = transforms.length;
7589
 
7590
+ while (++index < length) {
7591
+ var data = transforms[index],
7592
+ size = data.size;
7593
 
7594
+ switch (data.type) {
7595
+ case 'drop': start += size; break;
7596
+ case 'dropRight': end -= size; break;
7597
+ case 'take': end = nativeMin(end, start + size); break;
7598
+ case 'takeRight': start = nativeMax(start, end - size); break;
7599
+ }
7600
+ }
7601
+ return { 'start': start, 'end': end };
7602
+ }
7603
 
7604
+ /**
7605
+ * Extracts wrapper details from the `source` body comment.
7606
+ *
7607
+ * @private
7608
+ * @param {string} source The source to inspect.
7609
+ * @returns {Array} Returns the wrapper details.
7610
+ */
7611
+ function getWrapDetails(source) {
7612
+ var match = source.match(reWrapDetails);
7613
+ return match ? match[1].split(reSplitDetails) : [];
7614
+ }
7615
 
7616
+ /**
7617
+ * Checks if `path` exists on `object`.
7618
+ *
7619
+ * @private
7620
+ * @param {Object} object The object to query.
7621
+ * @param {Array|string} path The path to check.
7622
+ * @param {Function} hasFunc The function to check properties.
7623
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
7624
+ */
7625
+ function hasPath(object, path, hasFunc) {
7626
+ path = castPath(path, object);
7627
 
7628
+ var index = -1,
7629
+ length = path.length,
7630
+ result = false;
7631
 
7632
+ while (++index < length) {
7633
+ var key = toKey(path[index]);
7634
+ if (!(result = object != null && hasFunc(object, key))) {
7635
+ break;
7636
+ }
7637
+ object = object[key];
7638
+ }
7639
+ if (result || ++index != length) {
7640
+ return result;
7641
+ }
7642
+ length = object == null ? 0 : object.length;
7643
+ return !!length && isLength(length) && isIndex(key, length) &&
7644
+ (isArray(object) || isArguments(object));
7645
+ }
7646
 
7647
+ /**
7648
+ * Initializes an array clone.
7649
+ *
7650
+ * @private
7651
+ * @param {Array} array The array to clone.
7652
+ * @returns {Array} Returns the initialized clone.
7653
+ */
7654
+ function initCloneArray(array) {
7655
+ var length = array.length,
7656
+ result = new array.constructor(length);
7657
 
7658
+ // Add properties assigned by `RegExp#exec`.
7659
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
7660
+ result.index = array.index;
7661
+ result.input = array.input;
7662
+ }
7663
+ return result;
7664
+ }
7665
 
7666
+ /**
7667
+ * Initializes an object clone.
7668
+ *
7669
+ * @private
7670
+ * @param {Object} object The object to clone.
7671
+ * @returns {Object} Returns the initialized clone.
7672
+ */
7673
+ function initCloneObject(object) {
7674
+ return (typeof object.constructor == 'function' && !isPrototype(object))
7675
+ ? baseCreate(getPrototype(object))
7676
+ : {};
7677
+ }
7678
 
7679
+ /**
7680
+ * Initializes an object clone based on its `toStringTag`.
7681
+ *
7682
+ * **Note:** This function only supports cloning values with tags of
7683
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
7684
+ *
7685
+ * @private
7686
+ * @param {Object} object The object to clone.
7687
+ * @param {string} tag The `toStringTag` of the object to clone.
7688
+ * @param {boolean} [isDeep] Specify a deep clone.
7689
+ * @returns {Object} Returns the initialized clone.
7690
+ */
7691
+ function initCloneByTag(object, tag, isDeep) {
7692
+ var Ctor = object.constructor;
7693
+ switch (tag) {
7694
+ case arrayBufferTag:
7695
+ return cloneArrayBuffer(object);
7696
 
7697
+ case boolTag:
7698
+ case dateTag:
7699
+ return new Ctor(+object);
7700
 
7701
+ case dataViewTag:
7702
+ return cloneDataView(object, isDeep);
7703
 
7704
+ case float32Tag: case float64Tag:
7705
+ case int8Tag: case int16Tag: case int32Tag:
7706
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
7707
+ return cloneTypedArray(object, isDeep);
7708
 
7709
+ case mapTag:
7710
+ return new Ctor;
7711
 
7712
+ case numberTag:
7713
+ case stringTag:
7714
+ return new Ctor(object);
7715
 
7716
+ case regexpTag:
7717
+ return cloneRegExp(object);
7718
 
7719
+ case setTag:
7720
+ return new Ctor;
7721
 
7722
+ case symbolTag:
7723
+ return cloneSymbol(object);
7724
+ }
7725
+ }
7726
 
7727
+ /**
7728
+ * Inserts wrapper `details` in a comment at the top of the `source` body.
7729
+ *
7730
+ * @private
7731
+ * @param {string} source The source to modify.
7732
+ * @returns {Array} details The details to insert.
7733
+ * @returns {string} Returns the modified source.
7734
+ */
7735
+ function insertWrapDetails(source, details) {
7736
+ var length = details.length;
7737
+ if (!length) {
7738
+ return source;
7739
+ }
7740
+ var lastIndex = length - 1;
7741
+ details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
7742
+ details = details.join(length > 2 ? ', ' : ' ');
7743
+ return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
7744
+ }
7745
 
7746
+ /**
7747
+ * Checks if `value` is a flattenable `arguments` object or array.
7748
+ *
7749
+ * @private
7750
+ * @param {*} value The value to check.
7751
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
7752
+ */
7753
+ function isFlattenable(value) {
7754
+ return isArray(value) || isArguments(value) ||
7755
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
7756
+ }
7757
 
7758
+ /**
7759
+ * Checks if `value` is a valid array-like index.
7760
+ *
7761
+ * @private
7762
+ * @param {*} value The value to check.
7763
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
7764
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
7765
+ */
7766
+ function isIndex(value, length) {
7767
+ var type = typeof value;
7768
+ length = length == null ? MAX_SAFE_INTEGER : length;
7769
 
7770
+ return !!length &&
7771
+ (type == 'number' ||
7772
+ (type != 'symbol' && reIsUint.test(value))) &&
7773
+ (value > -1 && value % 1 == 0 && value < length);
7774
+ }
7775
 
7776
+ /**
7777
+ * Checks if the given arguments are from an iteratee call.
7778
+ *
7779
+ * @private
7780
+ * @param {*} value The potential iteratee value argument.
7781
+ * @param {*} index The potential iteratee index or key argument.
7782
+ * @param {*} object The potential iteratee object argument.
7783
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
7784
+ * else `false`.
7785
+ */
7786
+ function isIterateeCall(value, index, object) {
7787
+ if (!isObject(object)) {
7788
+ return false;
7789
+ }
7790
+ var type = typeof index;
7791
+ if (type == 'number'
7792
+ ? (isArrayLike(object) && isIndex(index, object.length))
7793
+ : (type == 'string' && index in object)
7794
+ ) {
7795
+ return eq(object[index], value);
7796
+ }
7797
+ return false;
7798
+ }
7799
 
7800
+ /**
7801
+ * Checks if `value` is a property name and not a property path.
7802
+ *
7803
+ * @private
7804
+ * @param {*} value The value to check.
7805
+ * @param {Object} [object] The object to query keys on.
7806
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
7807
+ */
7808
+ function isKey(value, object) {
7809
+ if (isArray(value)) {
7810
+ return false;
7811
+ }
7812
+ var type = typeof value;
7813
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
7814
+ value == null || isSymbol(value)) {
7815
+ return true;
7816
+ }
7817
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
7818
+ (object != null && value in Object(object));
7819
+ }
7820
 
7821
+ /**
7822
+ * Checks if `value` is suitable for use as unique object key.
7823
+ *
7824
+ * @private
7825
+ * @param {*} value The value to check.
7826
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
7827
+ */
7828
+ function isKeyable(value) {
7829
+ var type = typeof value;
7830
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
7831
+ ? (value !== '__proto__')
7832
+ : (value === null);
7833
+ }
7834
 
7835
+ /**
7836
+ * Checks if `func` has a lazy counterpart.
7837
+ *
7838
+ * @private
7839
+ * @param {Function} func The function to check.
7840
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
7841
+ * else `false`.
7842
+ */
7843
+ function isLaziable(func) {
7844
+ var funcName = getFuncName(func),
7845
+ other = lodash[funcName];
7846
 
7847
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
7848
+ return false;
7849
+ }
7850
+ if (func === other) {
7851
+ return true;
7852
+ }
7853
+ var data = getData(other);
7854
+ return !!data && func === data[0];
7855
+ }
7856
 
7857
+ /**
7858
+ * Checks if `func` has its source masked.
7859
+ *
7860
+ * @private
7861
+ * @param {Function} func The function to check.
7862
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
7863
+ */
7864
+ function isMasked(func) {
7865
+ return !!maskSrcKey && (maskSrcKey in func);
7866
+ }
7867
 
7868
+ /**
7869
+ * Checks if `func` is capable of being masked.
7870
+ *
7871
+ * @private
7872
+ * @param {*} value The value to check.
7873
+ * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
7874
+ */
7875
+ var isMaskable = coreJsData ? isFunction : stubFalse;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7876
 
7877
+ /**
7878
+ * Checks if `value` is likely a prototype object.
7879
+ *
7880
+ * @private
7881
+ * @param {*} value The value to check.
7882
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
7883
+ */
7884
+ function isPrototype(value) {
7885
+ var Ctor = value && value.constructor,
7886
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
7887
 
7888
+ return value === proto;
7889
+ }
7890
 
7891
+ /**
7892
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
7893
+ *
7894
+ * @private
7895
+ * @param {*} value The value to check.
7896
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
7897
+ * equality comparisons, else `false`.
7898
+ */
7899
+ function isStrictComparable(value) {
7900
+ return value === value && !isObject(value);
7901
+ }
7902
 
7903
+ /**
7904
+ * A specialized version of `matchesProperty` for source values suitable
7905
+ * for strict equality comparisons, i.e. `===`.
7906
+ *
7907
+ * @private
7908
+ * @param {string} key The key of the property to get.
7909
+ * @param {*} srcValue The value to match.
7910
+ * @returns {Function} Returns the new spec function.
7911
+ */
7912
+ function matchesStrictComparable(key, srcValue) {
7913
+ return function(object) {
7914
+ if (object == null) {
7915
+ return false;
7916
  }
7917
+ return object[key] === srcValue &&
7918
+ (srcValue !== undefined || (key in Object(object)));
7919
+ };
7920
+ }
 
 
7921
 
7922
+ /**
7923
+ * A specialized version of `_.memoize` which clears the memoized function's
7924
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
7925
+ *
7926
+ * @private
7927
+ * @param {Function} func The function to have its output memoized.
7928
+ * @returns {Function} Returns the new memoized function.
7929
+ */
7930
+ function memoizeCapped(func) {
7931
+ var result = memoize(func, function(key) {
7932
+ if (cache.size === MAX_MEMOIZE_SIZE) {
7933
+ cache.clear();
7934
+ }
7935
+ return key;
7936
+ });
7937
 
7938
+ var cache = result.cache;
7939
+ return result;
7940
+ }
7941
 
7942
+ /**
7943
+ * Merges the function metadata of `source` into `data`.
7944
+ *
7945
+ * Merging metadata reduces the number of wrappers used to invoke a function.
7946
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
7947
+ * may be applied regardless of execution order. Methods like `_.ary` and
7948
+ * `_.rearg` modify function arguments, making the order in which they are
7949
+ * executed important, preventing the merging of metadata. However, we make
7950
+ * an exception for a safe combined case where curried functions have `_.ary`
7951
+ * and or `_.rearg` applied.
7952
+ *
7953
+ * @private
7954
+ * @param {Array} data The destination metadata.
7955
+ * @param {Array} source The source metadata.
7956
+ * @returns {Array} Returns `data`.
7957
+ */
7958
+ function mergeData(data, source) {
7959
+ var bitmask = data[1],
7960
+ srcBitmask = source[1],
7961
+ newBitmask = bitmask | srcBitmask,
7962
+ isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
7963
 
7964
+ var isCombo =
7965
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
7966
+ ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
7967
+ ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
7968
 
7969
+ // Exit early if metadata can't be merged.
7970
+ if (!(isCommon || isCombo)) {
7971
+ return data;
7972
+ }
7973
+ // Use source `thisArg` if available.
7974
+ if (srcBitmask & WRAP_BIND_FLAG) {
7975
+ data[2] = source[2];
7976
+ // Set when currying a bound function.
7977
+ newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
7978
+ }
7979
+ // Compose partial arguments.
7980
+ var value = source[3];
7981
+ if (value) {
7982
+ var partials = data[3];
7983
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
7984
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
7985
+ }
7986
+ // Compose partial right arguments.
7987
+ value = source[5];
7988
+ if (value) {
7989
+ partials = data[5];
7990
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
7991
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
7992
+ }
7993
+ // Use source `argPos` if available.
7994
+ value = source[7];
7995
+ if (value) {
7996
+ data[7] = value;
7997
+ }
7998
+ // Use source `ary` if it's smaller.
7999
+ if (srcBitmask & WRAP_ARY_FLAG) {
8000
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
8001
+ }
8002
+ // Use source `arity` if one is not provided.
8003
+ if (data[9] == null) {
8004
+ data[9] = source[9];
8005
+ }
8006
+ // Use source `func` and merge bitmasks.
8007
+ data[0] = source[0];
8008
+ data[1] = newBitmask;
8009
 
8010
+ return data;
8011
+ }
8012
 
8013
+ /**
8014
+ * This function is like
8015
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
8016
+ * except that it includes inherited enumerable properties.
8017
+ *
8018
+ * @private
8019
+ * @param {Object} object The object to query.
8020
+ * @returns {Array} Returns the array of property names.
8021
+ */
8022
+ function nativeKeysIn(object) {
8023
+ var result = [];
8024
+ if (object != null) {
8025
+ for (var key in Object(object)) {
8026
+ result.push(key);
8027
+ }
8028
+ }
8029
+ return result;
8030
+ }
8031
 
8032
+ /**
8033
+ * Converts `value` to a string using `Object.prototype.toString`.
8034
+ *
8035
+ * @private
8036
+ * @param {*} value The value to convert.
8037
+ * @returns {string} Returns the converted string.
8038
+ */
8039
+ function objectToString(value) {
8040
+ return nativeObjectToString.call(value);
8041
+ }
8042
 
8043
+ /**
8044
+ * A specialized version of `baseRest` which transforms the rest array.
8045
+ *
8046
+ * @private
8047
+ * @param {Function} func The function to apply a rest parameter to.
8048
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
8049
+ * @param {Function} transform The rest array transform.
8050
+ * @returns {Function} Returns the new function.
8051
+ */
8052
+ function overRest(func, start, transform) {
8053
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
8054
+ return function() {
8055
+ var args = arguments,
8056
+ index = -1,
8057
+ length = nativeMax(args.length - start, 0),
8058
+ array = Array(length);
8059
 
8060
+ while (++index < length) {
8061
+ array[index] = args[start + index];
8062
+ }
8063
+ index = -1;
8064
+ var otherArgs = Array(start + 1);
8065
+ while (++index < start) {
8066
+ otherArgs[index] = args[index];
8067
+ }
8068
+ otherArgs[start] = transform(array);
8069
+ return apply(func, this, otherArgs);
8070
  };
8071
  }
8072
 
8073
  /**
8074
+ * Gets the parent value at `path` of `object`.
8075
+ *
8076
+ * @private
8077
+ * @param {Object} object The object to query.
8078
+ * @param {Array} path The path to get the parent value of.
8079
+ * @returns {*} Returns the parent value.
8080
  */
8081
+ function parent(object, path) {
8082
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
8083
+ }
8084
 
8085
+ /**
8086
+ * Reorder `array` according to the specified indexes where the element at
8087
+ * the first index is assigned as the first element, the element at
8088
+ * the second index is assigned as the second element, and so on.
8089
+ *
8090
+ * @private
8091
+ * @param {Array} array The array to reorder.
8092
+ * @param {Array} indexes The arranged array indexes.
8093
+ * @returns {Array} Returns `array`.
8094
+ */
8095
+ function reorder(array, indexes) {
8096
+ var arrLength = array.length,
8097
+ length = nativeMin(indexes.length, arrLength),
8098
+ oldArray = copyArray(array);
8099
 
8100
+ while (length--) {
8101
+ var index = indexes[length];
8102
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
 
8103
  }
8104
+ return array;
8105
+ }
8106
 
8107
+ /**
8108
+ * Sets metadata for `func`.
8109
+ *
8110
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
8111
+ * period of time, it will trip its breaker and transition to an identity
8112
+ * function to avoid garbage collection pauses in V8. See
8113
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
8114
+ * for more details.
8115
+ *
8116
+ * @private
8117
+ * @param {Function} func The function to associate metadata with.
8118
+ * @param {*} data The metadata.
8119
+ * @returns {Function} Returns `func`.
8120
+ */
8121
+ var setData = shortOut(baseSetData);
8122
 
8123
+ /**
8124
+ * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
8125
+ *
8126
+ * @private
8127
+ * @param {Function} func The function to delay.
8128
+ * @param {number} wait The number of milliseconds to delay invocation.
8129
+ * @returns {number|Object} Returns the timer id or timeout object.
8130
+ */
8131
+ var setTimeout = ctxSetTimeout || function(func, wait) {
8132
+ return root.setTimeout(func, wait);
8133
+ };
8134
 
8135
+ /**
8136
+ * Sets the `toString` method of `func` to return `string`.
8137
+ *
8138
+ * @private
8139
+ * @param {Function} func The function to modify.
8140
+ * @param {Function} string The `toString` result.
8141
+ * @returns {Function} Returns `func`.
8142
+ */
8143
+ var setToString = shortOut(baseSetToString);
8144
 
8145
+ /**
8146
+ * Sets the `toString` method of `wrapper` to mimic the source of `reference`
8147
+ * with wrapper details in a comment at the top of the source body.
8148
+ *
8149
+ * @private
8150
+ * @param {Function} wrapper The function to modify.
8151
+ * @param {Function} reference The reference function.
8152
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8153
+ * @returns {Function} Returns `wrapper`.
8154
+ */
8155
+ function setWrapToString(wrapper, reference, bitmask) {
8156
+ var source = (reference + '');
8157
+ return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
8158
+ }
8159
 
8160
+ /**
8161
+ * Creates a function that'll short out and invoke `identity` instead
8162
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
8163
+ * milliseconds.
8164
+ *
8165
+ * @private
8166
+ * @param {Function} func The function to restrict.
8167
+ * @returns {Function} Returns the new shortable function.
8168
+ */
8169
+ function shortOut(func) {
8170
+ var count = 0,
8171
+ lastCalled = 0;
8172
 
8173
+ return function() {
8174
+ var stamp = nativeNow(),
8175
+ remaining = HOT_SPAN - (stamp - lastCalled);
 
 
 
8176
 
8177
+ lastCalled = stamp;
8178
+ if (remaining > 0) {
8179
+ if (++count >= HOT_COUNT) {
8180
+ return arguments[0];
8181
+ }
8182
+ } else {
8183
+ count = 0;
8184
  }
8185
+ return func.apply(undefined, arguments);
8186
+ };
8187
+ }
8188
 
8189
+ /**
8190
+ * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
8191
+ *
8192
+ * @private
8193
+ * @param {Array} array The array to shuffle.
8194
+ * @param {number} [size=array.length] The size of `array`.
8195
+ * @returns {Array} Returns `array`.
8196
+ */
8197
+ function shuffleSelf(array, size) {
8198
+ var index = -1,
8199
+ length = array.length,
8200
+ lastIndex = length - 1;
8201
 
8202
+ size = size === undefined ? length : size;
8203
+ while (++index < size) {
8204
+ var rand = baseRandom(index, lastIndex),
8205
+ value = array[rand];
8206
+
8207
+ array[rand] = array[index];
8208
+ array[index] = value;
8209
  }
8210
+ array.length = size;
8211
+ return array;
8212
+ }
8213
 
8214
+ /**
8215
+ * Converts `string` to a property path array.
8216
+ *
8217
+ * @private
8218
+ * @param {string} string The string to convert.
8219
+ * @returns {Array} Returns the property path array.
8220
+ */
8221
+ var stringToPath = memoizeCapped(function(string) {
8222
+ var result = [];
8223
+ if (string.charCodeAt(0) === 46 /* . */) {
8224
+ result.push('');
8225
+ }
8226
+ string.replace(rePropName, function(match, number, quote, subString) {
8227
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8228
  });
8229
+ return result;
8230
+ });
8231
 
8232
  /**
8233
+ * Converts `value` to a string key if it's not a string or symbol.
8234
+ *
8235
+ * @private
8236
+ * @param {*} value The value to inspect.
8237
+ * @returns {string|symbol} Returns the key.
8238
  */
8239
+ function toKey(value) {
8240
+ if (typeof value == 'string' || isSymbol(value)) {
8241
+ return value;
8242
+ }
8243
+ var result = (value + '');
8244
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8245
+ }
8246
 
8247
+ /**
8248
+ * Converts `func` to its source code.
8249
+ *
8250
+ * @private
8251
+ * @param {Function} func The function to convert.
8252
+ * @returns {string} Returns the source code.
8253
+ */
8254
+ function toSource(func) {
8255
+ if (func != null) {
8256
+ try {
8257
+ return funcToString.call(func);
8258
+ } catch (e) {}
8259
+ try {
8260
+ return (func + '');
8261
+ } catch (e) {}
8262
+ }
8263
+ return '';
8264
+ }
8265
 
8266
+ /**
8267
+ * Updates wrapper `details` based on `bitmask` flags.
8268
+ *
8269
+ * @private
8270
+ * @returns {Array} details The details to modify.
8271
+ * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
8272
+ * @returns {Array} Returns `details`.
8273
+ */
8274
+ function updateWrapDetails(details, bitmask) {
8275
+ arrayEach(wrapFlags, function(pair) {
8276
+ var value = '_.' + pair[0];
8277
+ if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
8278
+ details.push(value);
8279
+ }
8280
+ });
8281
+ return details.sort();
8282
  }
8283
 
8284
  /**
8285
+ * Creates a clone of `wrapper`.
8286
+ *
8287
+ * @private
8288
+ * @param {Object} wrapper The wrapper to clone.
8289
+ * @returns {Object} Returns the cloned wrapper.
8290
  */
8291
+ function wrapperClone(wrapper) {
8292
+ if (wrapper instanceof LazyWrapper) {
8293
+ return wrapper.clone();
8294
+ }
8295
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
8296
+ result.__actions__ = copyArray(wrapper.__actions__);
8297
+ result.__index__ = wrapper.__index__;
8298
+ result.__values__ = wrapper.__values__;
8299
+ return result;
8300
+ }
8301
 
8302
+ /*------------------------------------------------------------------------*/
 
 
 
 
 
8303
 
8304
+ /**
8305
+ * Creates an array of elements split into groups the length of `size`.
8306
+ * If `array` can't be split evenly, the final chunk will be the remaining
8307
+ * elements.
8308
+ *
8309
+ * @static
8310
+ * @memberOf _
8311
+ * @since 3.0.0
8312
+ * @category Array
8313
+ * @param {Array} array The array to process.
8314
+ * @param {number} [size=1] The length of each chunk
8315
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8316
+ * @returns {Array} Returns the new array of chunks.
8317
+ * @example
8318
+ *
8319
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
8320
+ * // => [['a', 'b'], ['c', 'd']]
8321
+ *
8322
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
8323
+ * // => [['a', 'b', 'c'], ['d']]
8324
+ */
8325
+ function chunk(array, size, guard) {
8326
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
8327
+ size = 1;
8328
+ } else {
8329
+ size = nativeMax(toInteger(size), 0);
8330
+ }
8331
+ var length = array == null ? 0 : array.length;
8332
+ if (!length || size < 1) {
8333
+ return [];
8334
+ }
8335
+ var index = 0,
8336
+ resIndex = 0,
8337
+ result = Array(nativeCeil(length / size));
8338
 
8339
+ while (index < length) {
8340
+ result[resIndex++] = baseSlice(array, index, (index += size));
8341
+ }
8342
+ return result;
8343
  }
8344
 
8345
  /**
8346
+ * Creates an array with all falsey values removed. The values `false`, `null`,
8347
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
8348
+ *
8349
+ * @static
8350
+ * @memberOf _
8351
+ * @since 0.1.0
8352
+ * @category Array
8353
+ * @param {Array} array The array to compact.
8354
+ * @returns {Array} Returns the new array of filtered values.
8355
+ * @example
8356
+ *
8357
+ * _.compact([0, 1, false, 2, '', 3]);
8358
+ * // => [1, 2, 3]
8359
  */
8360
+ function compact(array) {
8361
+ var index = -1,
8362
+ length = array == null ? 0 : array.length,
8363
+ resIndex = 0,
8364
+ result = [];
8365
 
8366
+ while (++index < length) {
8367
+ var value = array[index];
8368
+ if (value) {
8369
+ result[resIndex++] = value;
8370
+ }
8371
+ }
8372
+ return result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8373
  }
8374
 
8375
  /**
8376
+ * Creates a new array concatenating `array` with any additional arrays
8377
+ * and/or values.
8378
+ *
8379
+ * @static
8380
+ * @memberOf _
8381
+ * @since 4.0.0
8382
+ * @category Array
8383
+ * @param {Array} array The array to concatenate.
8384
+ * @param {...*} [values] The values to concatenate.
8385
+ * @returns {Array} Returns the new concatenated array.
8386
+ * @example
8387
+ *
8388
+ * var array = [1];
8389
+ * var other = _.concat(array, 2, [3], [[4]]);
8390
+ *
8391
+ * console.log(other);
8392
+ * // => [1, 2, 3, [4]]
8393
+ *
8394
+ * console.log(array);
8395
+ * // => [1]
8396
  */
8397
+ function concat() {
8398
+ var length = arguments.length;
8399
+ if (!length) {
8400
+ return [];
 
 
 
 
 
 
 
 
 
 
 
 
 
8401
  }
8402
+ var args = Array(length - 1),
8403
+ array = arguments[0],
8404
+ index = length;
8405
 
8406
+ while (index--) {
8407
+ args[index - 1] = arguments[index];
 
 
8408
  }
8409
+ return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
8410
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8411
 
8412
+ /**
8413
+ * Creates an array of `array` values not included in the other given arrays
8414
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8415
+ * for equality comparisons. The order and references of result values are
8416
+ * determined by the first array.
8417
+ *
8418
+ * **Note:** Unlike `_.pullAll`, this method returns a new array.
8419
+ *
8420
+ * @static
8421
+ * @memberOf _
8422
+ * @since 0.1.0
8423
+ * @category Array
8424
+ * @param {Array} array The array to inspect.
8425
+ * @param {...Array} [values] The values to exclude.
8426
+ * @returns {Array} Returns the new array of filtered values.
8427
+ * @see _.without, _.xor
8428
+ * @example
8429
+ *
8430
+ * _.difference([2, 1], [2, 3]);
8431
+ * // => [1]
8432
+ */
8433
+ var difference = baseRest(function(array, values) {
8434
+ return isArrayLikeObject(array)
8435
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
8436
+ : [];
8437
+ });
8438
 
8439
+ /**
8440
+ * This method is like `_.difference` except that it accepts `iteratee` which
8441
+ * is invoked for each element of `array` and `values` to generate the criterion
8442
+ * by which they're compared. The order and references of result values are
8443
+ * determined by the first array. The iteratee is invoked with one argument:
8444
+ * (value).
8445
+ *
8446
+ * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
8447
+ *
8448
+ * @static
8449
+ * @memberOf _
8450
+ * @since 4.0.0
8451
+ * @category Array
8452
+ * @param {Array} array The array to inspect.
8453
+ * @param {...Array} [values] The values to exclude.
8454
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
8455
+ * @returns {Array} Returns the new array of filtered values.
8456
+ * @example
8457
+ *
8458
+ * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
8459
+ * // => [1.2]
8460
+ *
8461
+ * // The `_.property` iteratee shorthand.
8462
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
8463
+ * // => [{ 'x': 2 }]
8464
+ */
8465
+ var differenceBy = baseRest(function(array, values) {
8466
+ var iteratee = last(values);
8467
+ if (isArrayLikeObject(iteratee)) {
8468
+ iteratee = undefined;
8469
  }
8470
+ return isArrayLikeObject(array)
8471
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
8472
+ : [];
8473
+ });
8474
 
8475
+ /**
8476
+ * This method is like `_.difference` except that it accepts `comparator`
8477
+ * which is invoked to compare elements of `array` to `values`. The order and
8478
+ * references of result values are determined by the first array. The comparator
8479
+ * is invoked with two arguments: (arrVal, othVal).
8480
+ *
8481
+ * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
8482
+ *
8483
+ * @static
8484
+ * @memberOf _
8485
+ * @since 4.0.0
8486
+ * @category Array
8487
+ * @param {Array} array The array to inspect.
8488
+ * @param {...Array} [values] The values to exclude.
8489
+ * @param {Function} [comparator] The comparator invoked per element.
8490
+ * @returns {Array} Returns the new array of filtered values.
8491
+ * @example
8492
+ *
8493
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
8494
+ *
8495
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
8496
+ * // => [{ 'x': 2, 'y': 1 }]
8497
+ */
8498
+ var differenceWith = baseRest(function(array, values) {
8499
+ var comparator = last(values);
8500
+ if (isArrayLikeObject(comparator)) {
8501
+ comparator = undefined;
8502
  }
8503
+ return isArrayLikeObject(array)
8504
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
8505
+ : [];
8506
+ });
8507
 
8508
+ /**
8509
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
8510
+ *
8511
+ * @static
8512
+ * @memberOf _
8513
+ * @since 0.5.0
8514
+ * @category Array
8515
+ * @param {Array} array The array to query.
8516
+ * @param {number} [n=1] The number of elements to drop.
8517
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8518
+ * @returns {Array} Returns the slice of `array`.
8519
+ * @example
8520
+ *
8521
+ * _.drop([1, 2, 3]);
8522
+ * // => [2, 3]
8523
+ *
8524
+ * _.drop([1, 2, 3], 2);
8525
+ * // => [3]
8526
+ *
8527
+ * _.drop([1, 2, 3], 5);
8528
+ * // => []
8529
+ *
8530
+ * _.drop([1, 2, 3], 0);
8531
+ * // => [1, 2, 3]
8532
+ */
8533
+ function drop(array, n, guard) {
8534
+ var length = array == null ? 0 : array.length;
8535
+ if (!length) {
8536
+ return [];
8537
  }
8538
+ n = (guard || n === undefined) ? 1 : toInteger(n);
8539
+ return baseSlice(array, n < 0 ? 0 : n, length);
 
 
 
 
 
 
 
 
 
 
 
8540
  }
8541
 
8542
  /**
8543
+ * Creates a slice of `array` with `n` elements dropped from the end.
8544
+ *
8545
+ * @static
8546
+ * @memberOf _
8547
+ * @since 3.0.0
8548
+ * @category Array
8549
+ * @param {Array} array The array to query.
8550
+ * @param {number} [n=1] The number of elements to drop.
8551
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
8552
+ * @returns {Array} Returns the slice of `array`.
8553
+ * @example
8554
+ *
8555
+ * _.dropRight([1, 2, 3]);
8556
+ * // => [1, 2]
8557
+ *
8558
+ * _.dropRight([1, 2, 3], 2);
8559
+ * // => [1]
8560
+ *
8561
+ * _.dropRight([1, 2, 3], 5);
8562
+ * // => []
8563
+ *
8564
+ * _.dropRight([1, 2, 3], 0);
8565
+ * // => [1, 2, 3]
8566
  */
8567
+ function dropRight(array, n, guard) {
8568
+ var length = array == null ? 0 : array.length;
8569
+ if (!length) {
8570
+ return [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8571
  }
8572
+ n = (guard || n === undefined) ? 1 : toInteger(n);
8573
+ n = length - n;
8574
+ return baseSlice(array, 0, n < 0 ? 0 : n);
8575
+ }
8576
 
8577
+ /**
8578
+ * Creates a slice of `array` excluding elements dropped from the end.
8579
+ * Elements are dropped until `predicate` returns falsey. The predicate is
8580
+ * invoked with three arguments: (value, index, array).
8581
+ *
8582
+ * @static
8583
+ * @memberOf _
8584
+ * @since 3.0.0
8585
+ * @category Array
8586
+ * @param {Array} array The array to query.
8587
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
8588
+ * @returns {Array} Returns the slice of `array`.
8589
+ * @example
8590
+ *
8591
+ * var users = [
8592
+ * { 'user': 'barney', 'active': true },
8593
+ * { 'user': 'fred', 'active': false },
8594
+ * { 'user': 'pebbles', 'active': false }
8595
+ * ];
8596
+ *
8597
+ * _.dropRightWhile(users, function(o) { return !o.active; });
8598
+ * // => objects for ['barney']
8599
+ *
8600
+ * // The `_.matches` iteratee shorthand.
8601
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
8602
+ * // => objects for ['barney', 'fred']
8603
+ *
8604
+ * // The `_.matchesProperty` iteratee shorthand.
8605
+ * _.dropRightWhile(users, ['active', false]);
8606
+ * // => objects for ['barney']
8607
+ *
8608
+ * // The `_.property` iteratee shorthand.
8609
+ * _.dropRightWhile(users, 'active');
8610
+ * // => objects for ['barney', 'fred', 'pebbles']
8611
+ */
8612
+ function dropRightWhile(array, predicate) {
8613
+ return (array && array.length)
8614
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
8615
+ : [];
8616
+ }
8617
 
8618
+ /**
8619
+ * Creates a slice of `array` excluding elements dropped from the beginning.
8620
+ * Elements are dropped until `predicate` returns falsey. The predicate is
8621
+ * invoked with three arguments: (value, index, array).
8622
+ *
8623
+ * @static
8624
+ * @memberOf _
8625
+ * @since 3.0.0
8626
+ * @category Array
8627
+ * @param {Array} array The array to query.
8628
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
8629
+ * @returns {Array} Returns the slice of `array`.
8630
+ * @example
8631
+ *
8632
+ * var users = [
8633
+ * { 'user': 'barney', 'active': false },
8634
+ * { 'user': 'fred', 'active': false },
8635
+ * { 'user': 'pebbles', 'active': true }
8636
+ * ];
8637
+ *
8638
+ * _.dropWhile(users, function(o) { return !o.active; });
8639
+ * // => objects for ['pebbles']
8640
+ *
8641
+ * // The `_.matches` iteratee shorthand.
8642
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
8643
+ * // => objects for ['fred', 'pebbles']
8644
+ *
8645
+ * // The `_.matchesProperty` iteratee shorthand.
8646
+ * _.dropWhile(users, ['active', false]);
8647
+ * // => objects for ['pebbles']
8648
+ *
8649
+ * // The `_.property` iteratee shorthand.
8650
+ * _.dropWhile(users, 'active');
8651
+ * // => objects for ['barney', 'fred', 'pebbles']
8652
+ */
8653
+ function dropWhile(array, predicate) {
8654
+ return (array && array.length)
8655
+ ? baseWhile(array, getIteratee(predicate, 3), true)
8656
+ : [];
8657
+ }
8658
 
8659
+ /**
8660
+ * Fills elements of `array` with `value` from `start` up to, but not
8661
+ * including, `end`.
8662
+ *
8663
+ * **Note:** This method mutates `array`.
8664
+ *
8665
+ * @static
8666
+ * @memberOf _
8667
+ * @since 3.2.0
8668
+ * @category Array
8669
+ * @param {Array} array The array to fill.
8670
+ * @param {*} value The value to fill `array` with.
8671
+ * @param {number} [start=0] The start position.
8672
+ * @param {number} [end=array.length] The end position.
8673
+ * @returns {Array} Returns `array`.
8674
+ * @example
8675
+ *
8676
+ * var array = [1, 2, 3];
8677
+ *
8678
+ * _.fill(array, 'a');
8679
+ * console.log(array);
8680
+ * // => ['a', 'a', 'a']
8681
+ *
8682
+ * _.fill(Array(3), 2);
8683
+ * // => [2, 2, 2]
8684
+ *
8685
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
8686
+ * // => [4, '*', '*', 10]
8687
+ */
8688
+ function fill(array, value, start, end) {
8689
+ var length = array == null ? 0 : array.length;
8690
+ if (!length) {
8691
+ return [];
8692
  }
8693
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
8694
+ start = 0;
8695
+ end = length;
 
 
 
 
 
 
 
 
 
 
 
 
8696
  }
8697
+ return baseFill(array, value, start, end);
 
8698
  }
 
 
 
 
 
 
 
8699
 
8700
+ /**
8701
+ * This method is like `_.find` except that it returns the index of the first
8702
+ * element `predicate` returns truthy for instead of the element itself.
8703
+ *
8704
+ * @static
8705
+ * @memberOf _
8706
+ * @since 1.1.0
8707
+ * @category Array
8708
+ * @param {Array} array The array to inspect.
8709
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
8710
+ * @param {number} [fromIndex=0] The index to search from.
8711
+ * @returns {number} Returns the index of the found element, else `-1`.
8712
+ * @example
8713
+ *
8714
+ * var users = [
8715
+ * { 'user': 'barney', 'active': false },
8716
+ * { 'user': 'fred', 'active': false },
8717
+ * { 'user': 'pebbles', 'active': true }
8718
+ * ];
8719
+ *
8720
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
8721
+ * // => 0
8722
+ *
8723
+ * // The `_.matches` iteratee shorthand.
8724
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
8725
+ * // => 1
8726
+ *
8727
+ * // The `_.matchesProperty` iteratee shorthand.
8728
+ * _.findIndex(users, ['active', false]);
8729
+ * // => 0
8730
+ *
8731
+ * // The `_.property` iteratee shorthand.
8732
+ * _.findIndex(users, 'active');
8733
+ * // => 2
8734
+ */
8735
+ function findIndex(array, predicate, fromIndex) {
8736
+ var length = array == null ? 0 : array.length;
8737
+ if (!length) {
8738
+ return -1;
8739
  }
8740
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
8741
+ if (index < 0) {
8742
+ index = nativeMax(length + index, 0);
 
 
 
 
 
8743
  }
8744
+ return baseFindIndex(array, getIteratee(predicate, 3), index);
8745
  }
8746
 
8747
  /**
8748
+ * This method is like `_.findIndex` except that it iterates over elements
8749
+ * of `collection` from right to left.
8750
+ *
8751
+ * @static
8752
+ * @memberOf _
8753
+ * @since 2.0.0
8754
+ * @category Array
8755
+ * @param {Array} array The array to inspect.
8756
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
8757
+ * @param {number} [fromIndex=array.length-1] The index to search from.
8758
+ * @returns {number} Returns the index of the found element, else `-1`.
8759
+ * @example
8760
+ *
8761
+ * var users = [
8762
+ * { 'user': 'barney', 'active': true },
8763
+ * { 'user': 'fred', 'active': false },
8764
+ * { 'user': 'pebbles', 'active': false }
8765
+ * ];
8766
+ *
8767
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
8768
+ * // => 2
8769
+ *
8770
+ * // The `_.matches` iteratee shorthand.
8771
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
8772
+ * // => 0
8773
+ *
8774
+ * // The `_.matchesProperty` iteratee shorthand.
8775
+ * _.findLastIndex(users, ['active', false]);
8776
+ * // => 2
8777
+ *
8778
+ * // The `_.property` iteratee shorthand.
8779
+ * _.findLastIndex(users, 'active');
8780
+ * // => 0
8781
  */
8782
+ function findLastIndex(array, predicate, fromIndex) {
8783
+ var length = array == null ? 0 : array.length;
8784
+ if (!length) {
8785
+ return -1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8786
  }
8787
+ var index = length - 1;
8788
+ if (fromIndex !== undefined) {
8789
+ index = toInteger(fromIndex);
8790
+ index = fromIndex < 0
8791
+ ? nativeMax(length + index, 0)
8792
+ : nativeMin(index, length - 1);
8793
  }
8794
+ return baseFindIndex(array, getIteratee(predicate, 3), index, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8795
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8796
 
8797
+ /**
8798
+ * Flattens `array` a single level deep.
8799
+ *
8800
+ * @static
8801
+ * @memberOf _
8802
+ * @since 0.1.0
8803
+ * @category Array
8804
+ * @param {Array} array The array to flatten.
8805
+ * @returns {Array} Returns the new flattened array.
8806
+ * @example
8807
+ *
8808
+ * _.flatten([1, [2, [3, [4]], 5]]);
8809
+ * // => [1, 2, [3, [4]], 5]
8810
+ */
8811
+ function flatten(array) {
8812
+ var length = array == null ? 0 : array.length;
8813
+ return length ? baseFlatten(array, 1) : [];
8814
+ }
8815
 
8816
+ /**
8817
+ * Recursively flattens `array`.
8818
+ *
8819
+ * @static
8820
+ * @memberOf _
8821
+ * @since 3.0.0
8822
+ * @category Array
8823
+ * @param {Array} array The array to flatten.
8824
+ * @returns {Array} Returns the new flattened array.
8825
+ * @example
8826
+ *
8827
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
8828
+ * // => [1, 2, 3, 4, 5]
8829
+ */
8830
+ function flattenDeep(array) {
8831
+ var length = array == null ? 0 : array.length;
8832
+ return length ? baseFlatten(array, INFINITY) : [];
8833
+ }
8834
 
8835
+ /**
8836
+ * Recursively flatten `array` up to `depth` times.
8837
+ *
8838
+ * @static
8839
+ * @memberOf _
8840
+ * @since 4.4.0
8841
+ * @category Array
8842
+ * @param {Array} array The array to flatten.
8843
+ * @param {number} [depth=1] The maximum recursion depth.
8844
+ * @returns {Array} Returns the new flattened array.
8845
+ * @example
8846
+ *
8847
+ * var array = [1, [2, [3, [4]], 5]];
8848
+ *
8849
+ * _.flattenDepth(array, 1);
8850
+ * // => [1, 2, [3, [4]], 5]
8851
+ *
8852
+ * _.flattenDepth(array, 2);
8853
+ * // => [1, 2, 3, [4], 5]
8854
+ */
8855
+ function flattenDepth(array, depth) {
8856
+ var length = array == null ? 0 : array.length;
8857
+ if (!length) {
8858
+ return [];
8859
  }
8860
+ depth = depth === undefined ? 1 : toInteger(depth);
8861
+ return baseFlatten(array, depth);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8862
  }
8863
 
8864
+ /**
8865
+ * The inverse of `_.toPairs`; this method returns an object composed
8866
+ * from key-value `pairs`.
8867
+ *
8868
+ * @static
8869
+ * @memberOf _
8870
+ * @since 4.0.0
8871
+ * @category Array
8872
+ * @param {Array} pairs The key-value pairs.
8873
+ * @returns {Object} Returns the new object.
8874
+ * @example
8875
+ *
8876
+ * _.fromPairs([['a', 1], ['b', 2]]);
8877
+ * // => { 'a': 1, 'b': 2 }
8878
+ */
8879
+ function fromPairs(pairs) {
8880
+ var index = -1,
8881
+ length = pairs == null ? 0 : pairs.length,
8882
+ result = {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8883
 
8884
+ while (++index < length) {
8885
+ var pair = pairs[index];
8886
+ result[pair[0]] = pair[1];
8887
+ }
8888
+ return result;
8889
+ }
 
 
 
 
 
 
 
 
8890
 
8891
+ /**
8892
+ * Gets the first element of `array`.
8893
+ *
8894
+ * @static
8895
+ * @memberOf _
8896
+ * @since 0.1.0
8897
+ * @alias first
8898
+ * @category Array
8899
+ * @param {Array} array The array to query.
8900
+ * @returns {*} Returns the first element of `array`.
8901
+ * @example
8902
+ *
8903
+ * _.head([1, 2, 3]);
8904
+ * // => 1
8905
+ *
8906
+ * _.head([]);
8907
+ * // => undefined
8908
+ */
8909
+ function head(array) {
8910
+ return (array && array.length) ? array[0] : undefined;
8911
+ }
8912
+
8913
+ /**
8914
+ * Gets the index at which the first occurrence of `value` is found in `array`
8915
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8916
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
8917
+ * offset from the end of `array`.
8918
+ *
8919
+ * @static
8920
+ * @memberOf _
8921
+ * @since 0.1.0
8922
+ * @category Array
8923
+ * @param {Array} array The array to inspect.
8924
+ * @param {*} value The value to search for.
8925
+ * @param {number} [fromIndex=0] The index to search from.
8926
+ * @returns {number} Returns the index of the matched value, else `-1`.
8927
+ * @example
8928
+ *
8929
+ * _.indexOf([1, 2, 1, 2], 2);
8930
+ * // => 1
8931
+ *
8932
+ * // Search from the `fromIndex`.
8933
+ * _.indexOf([1, 2, 1, 2], 2, 2);
8934
+ * // => 3
8935
+ */
8936
+ function indexOf(array, value, fromIndex) {
8937
+ var length = array == null ? 0 : array.length;
8938
+ if (!length) {
8939
+ return -1;
8940
  }
8941
+ var index = fromIndex == null ? 0 : toInteger(fromIndex);
8942
+ if (index < 0) {
8943
+ index = nativeMax(length + index, 0);
8944
+ }
8945
+ return baseIndexOf(array, value, index);
8946
  }
8947
 
8948
  /**
8949
+ * Gets all but the last element of `array`.
8950
+ *
8951
+ * @static
8952
+ * @memberOf _
8953
+ * @since 0.1.0
8954
+ * @category Array
8955
+ * @param {Array} array The array to query.
8956
+ * @returns {Array} Returns the slice of `array`.
8957
+ * @example
8958
+ *
8959
+ * _.initial([1, 2, 3]);
8960
+ * // => [1, 2]
8961
+ */
8962
+ function initial(array) {
8963
+ var length = array == null ? 0 : array.length;
8964
+ return length ? baseSlice(array, 0, -1) : [];
8965
+ }
8966
+
8967
+ /**
8968
+ * Creates an array of unique values that are included in all given arrays
8969
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
8970
+ * for equality comparisons. The order and references of result values are
8971
+ * determined by the first array.
8972
+ *
8973
+ * @static
8974
+ * @memberOf _
8975
+ * @since 0.1.0
8976
+ * @category Array
8977
+ * @param {...Array} [arrays] The arrays to inspect.
8978
+ * @returns {Array} Returns the new array of intersecting values.
8979
+ * @example
8980
+ *
8981
+ * _.intersection([2, 1], [2, 3]);
8982
+ * // => [2]
8983
  */
8984
+ var intersection = baseRest(function(arrays) {
8985
+ var mapped = arrayMap(arrays, castArrayLikeObject);
8986
+ return (mapped.length && mapped[0] === arrays[0])
8987
+ ? baseIntersection(mapped)
8988
+ : [];
8989
+ });
8990
 
8991
+ /**
8992
+ * This method is like `_.intersection` except that it accepts `iteratee`
8993
+ * which is invoked for each element of each `arrays` to generate the criterion
8994
+ * by which they're compared. The order and references of result values are
8995
+ * determined by the first array. The iteratee is invoked with one argument:
8996
+ * (value).
8997
+ *
8998
+ * @static
8999
+ * @memberOf _
9000
+ * @since 4.0.0
9001
+ * @category Array
9002
+ * @param {...Array} [arrays] The arrays to inspect.
9003
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9004
+ * @returns {Array} Returns the new array of intersecting values.
9005
+ * @example
9006
+ *
9007
+ * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
9008
+ * // => [2.1]
9009
+ *
9010
+ * // The `_.property` iteratee shorthand.
9011
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9012
+ * // => [{ 'x': 1 }]
9013
+ */
9014
+ var intersectionBy = baseRest(function(arrays) {
9015
+ var iteratee = last(arrays),
9016
+ mapped = arrayMap(arrays, castArrayLikeObject);
9017
 
9018
+ if (iteratee === last(mapped)) {
9019
+ iteratee = undefined;
9020
+ } else {
9021
+ mapped.pop();
9022
+ }
9023
+ return (mapped.length && mapped[0] === arrays[0])
9024
+ ? baseIntersection(mapped, getIteratee(iteratee, 2))
9025
+ : [];
9026
+ });
9027
 
9028
+ /**
9029
+ * This method is like `_.intersection` except that it accepts `comparator`
9030
+ * which is invoked to compare elements of `arrays`. The order and references
9031
+ * of result values are determined by the first array. The comparator is
9032
+ * invoked with two arguments: (arrVal, othVal).
9033
+ *
9034
+ * @static
9035
+ * @memberOf _
9036
+ * @since 4.0.0
9037
+ * @category Array
9038
+ * @param {...Array} [arrays] The arrays to inspect.
9039
+ * @param {Function} [comparator] The comparator invoked per element.
9040
+ * @returns {Array} Returns the new array of intersecting values.
9041
+ * @example
9042
+ *
9043
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9044
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9045
+ *
9046
+ * _.intersectionWith(objects, others, _.isEqual);
9047
+ * // => [{ 'x': 1, 'y': 2 }]
9048
+ */
9049
+ var intersectionWith = baseRest(function(arrays) {
9050
+ var comparator = last(arrays),
9051
+ mapped = arrayMap(arrays, castArrayLikeObject);
9052
+
9053
+ comparator = typeof comparator == 'function' ? comparator : undefined;
9054
+ if (comparator) {
9055
+ mapped.pop();
9056
  }
9057
+ return (mapped.length && mapped[0] === arrays[0])
9058
+ ? baseIntersection(mapped, undefined, comparator)
9059
+ : [];
9060
+ });
9061
 
9062
+ /**
9063
+ * Converts all elements in `array` into a string separated by `separator`.
9064
+ *
9065
+ * @static
9066
+ * @memberOf _
9067
+ * @since 4.0.0
9068
+ * @category Array
9069
+ * @param {Array} array The array to convert.
9070
+ * @param {string} [separator=','] The element separator.
9071
+ * @returns {string} Returns the joined string.
9072
+ * @example
9073
+ *
9074
+ * _.join(['a', 'b', 'c'], '~');
9075
+ * // => 'a~b~c'
9076
+ */
9077
+ function join(array, separator) {
9078
+ return array == null ? '' : nativeJoin.call(array, separator);
9079
  }
9080
 
9081
  /**
9082
+ * Gets the last element of `array`.
9083
+ *
9084
+ * @static
9085
+ * @memberOf _
9086
+ * @since 0.1.0
9087
+ * @category Array
9088
+ * @param {Array} array The array to query.
9089
+ * @returns {*} Returns the last element of `array`.
9090
+ * @example
9091
+ *
9092
+ * _.last([1, 2, 3]);
9093
+ * // => 3
9094
  */
9095
+ function last(array) {
9096
+ var length = array == null ? 0 : array.length;
9097
+ return length ? array[length - 1] : undefined;
9098
+ }
9099
 
9100
+ /**
9101
+ * This method is like `_.indexOf` except that it iterates over elements of
9102
+ * `array` from right to left.
9103
+ *
9104
+ * @static
9105
+ * @memberOf _
9106
+ * @since 0.1.0
9107
+ * @category Array
9108
+ * @param {Array} array The array to inspect.
9109
+ * @param {*} value The value to search for.
9110
+ * @param {number} [fromIndex=array.length-1] The index to search from.
9111
+ * @returns {number} Returns the index of the matched value, else `-1`.
9112
+ * @example
9113
+ *
9114
+ * _.lastIndexOf([1, 2, 1, 2], 2);
9115
+ * // => 3
9116
+ *
9117
+ * // Search from the `fromIndex`.
9118
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
9119
+ * // => 1
9120
+ */
9121
+ function lastIndexOf(array, value, fromIndex) {
9122
+ var length = array == null ? 0 : array.length;
9123
+ if (!length) {
9124
+ return -1;
9125
+ }
9126
+ var index = length;
9127
+ if (fromIndex !== undefined) {
9128
+ index = toInteger(fromIndex);
9129
+ index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
9130
  }
9131
+ return value === value
9132
+ ? strictLastIndexOf(array, value, index)
9133
+ : baseFindIndex(array, baseIsNaN, index, true);
9134
  }
 
 
 
 
9135
 
9136
+ /**
9137
+ * Gets the element at index `n` of `array`. If `n` is negative, the nth
9138
+ * element from the end is returned.
9139
+ *
9140
+ * @static
9141
+ * @memberOf _
9142
+ * @since 4.11.0
9143
+ * @category Array
9144
+ * @param {Array} array The array to query.
9145
+ * @param {number} [n=0] The index of the element to return.
9146
+ * @returns {*} Returns the nth element of `array`.
9147
+ * @example
9148
+ *
9149
+ * var array = ['a', 'b', 'c', 'd'];
9150
+ *
9151
+ * _.nth(array, 1);
9152
+ * // => 'b'
9153
+ *
9154
+ * _.nth(array, -2);
9155
+ * // => 'c';
9156
+ */
9157
+ function nth(array, n) {
9158
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
9159
+ }
9160
 
9161
+ /**
9162
+ * Removes all given values from `array` using
9163
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9164
+ * for equality comparisons.
9165
+ *
9166
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
9167
+ * to remove elements from an array by predicate.
9168
+ *
9169
+ * @static
9170
+ * @memberOf _
9171
+ * @since 2.0.0
9172
+ * @category Array
9173
+ * @param {Array} array The array to modify.
9174
+ * @param {...*} [values] The values to remove.
9175
+ * @returns {Array} Returns `array`.
9176
+ * @example
9177
+ *
9178
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9179
+ *
9180
+ * _.pull(array, 'a', 'c');
9181
+ * console.log(array);
9182
+ * // => ['b', 'b']
9183
+ */
9184
+ var pull = baseRest(pullAll);
9185
 
9186
+ /**
9187
+ * This method is like `_.pull` except that it accepts an array of values to remove.
9188
+ *
9189
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
9190
+ *
9191
+ * @static
9192
+ * @memberOf _
9193
+ * @since 4.0.0
9194
+ * @category Array
9195
+ * @param {Array} array The array to modify.
9196
+ * @param {Array} values The values to remove.
9197
+ * @returns {Array} Returns `array`.
9198
+ * @example
9199
+ *
9200
+ * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
9201
+ *
9202
+ * _.pullAll(array, ['a', 'c']);
9203
+ * console.log(array);
9204
+ * // => ['b', 'b']
9205
+ */
9206
+ function pullAll(array, values) {
9207
+ return (array && array.length && values && values.length)
9208
+ ? basePullAll(array, values)
9209
+ : array;
9210
+ }
9211
 
9212
+ /**
9213
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
9214
+ * invoked for each element of `array` and `values` to generate the criterion
9215
+ * by which they're compared. The iteratee is invoked with one argument: (value).
9216
+ *
9217
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
9218
+ *
9219
+ * @static
9220
+ * @memberOf _
9221
+ * @since 4.0.0
9222
+ * @category Array
9223
+ * @param {Array} array The array to modify.
9224
+ * @param {Array} values The values to remove.
9225
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9226
+ * @returns {Array} Returns `array`.
9227
+ * @example
9228
+ *
9229
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
9230
+ *
9231
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
9232
+ * console.log(array);
9233
+ * // => [{ 'x': 2 }]
9234
+ */
9235
+ function pullAllBy(array, values, iteratee) {
9236
+ return (array && array.length && values && values.length)
9237
+ ? basePullAll(array, values, getIteratee(iteratee, 2))
9238
+ : array;
9239
  }
 
 
 
 
 
9240
 
9241
+ /**
9242
+ * This method is like `_.pullAll` except that it accepts `comparator` which
9243
+ * is invoked to compare elements of `array` to `values`. The comparator is
9244
+ * invoked with two arguments: (arrVal, othVal).
9245
+ *
9246
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
9247
+ *
9248
+ * @static
9249
+ * @memberOf _
9250
+ * @since 4.6.0
9251
+ * @category Array
9252
+ * @param {Array} array The array to modify.
9253
+ * @param {Array} values The values to remove.
9254
+ * @param {Function} [comparator] The comparator invoked per element.
9255
+ * @returns {Array} Returns `array`.
9256
+ * @example
9257
+ *
9258
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
9259
+ *
9260
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
9261
+ * console.log(array);
9262
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
9263
+ */
9264
+ function pullAllWith(array, values, comparator) {
9265
+ return (array && array.length && values && values.length)
9266
+ ? basePullAll(array, values, undefined, comparator)
9267
+ : array;
9268
  }
 
 
 
 
 
9269
 
9270
+ /**
9271
+ * Removes elements from `array` corresponding to `indexes` and returns an
9272
+ * array of removed elements.
9273
+ *
9274
+ * **Note:** Unlike `_.at`, this method mutates `array`.
9275
+ *
9276
+ * @static
9277
+ * @memberOf _
9278
+ * @since 3.0.0
9279
+ * @category Array
9280
+ * @param {Array} array The array to modify.
9281
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
9282
+ * @returns {Array} Returns the new array of removed elements.
9283
+ * @example
9284
+ *
9285
+ * var array = ['a', 'b', 'c', 'd'];
9286
+ * var pulled = _.pullAt(array, [1, 3]);
9287
+ *
9288
+ * console.log(array);
9289
+ * // => ['a', 'c']
9290
+ *
9291
+ * console.log(pulled);
9292
+ * // => ['b', 'd']
9293
+ */
9294
+ var pullAt = flatRest(function(array, indexes) {
9295
+ var length = array == null ? 0 : array.length,
9296
+ result = baseAt(array, indexes);
9297
+
9298
+ basePullAt(array, arrayMap(indexes, function(index) {
9299
+ return isIndex(index, length) ? +index : index;
9300
+ }).sort(compareAscending));
9301
+
9302
+ return result;
9303
+ });
9304
 
9305
+ /**
9306
+ * Removes all elements from `array` that `predicate` returns truthy for
9307
+ * and returns an array of the removed elements. The predicate is invoked
9308
+ * with three arguments: (value, index, array).
9309
+ *
9310
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
9311
+ * to pull elements from an array by value.
9312
+ *
9313
+ * @static
9314
+ * @memberOf _
9315
+ * @since 2.0.0
9316
+ * @category Array
9317
+ * @param {Array} array The array to modify.
9318
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
9319
+ * @returns {Array} Returns the new array of removed elements.
9320
+ * @example
9321
+ *
9322
+ * var array = [1, 2, 3, 4];
9323
+ * var evens = _.remove(array, function(n) {
9324
+ * return n % 2 == 0;
9325
+ * });
9326
+ *
9327
+ * console.log(array);
9328
+ * // => [1, 3]
9329
+ *
9330
+ * console.log(evens);
9331
+ * // => [2, 4]
9332
+ */
9333
+ function remove(array, predicate) {
9334
+ var result = [];
9335
+ if (!(array && array.length)) {
9336
+ return result;
9337
+ }
9338
+ var index = -1,
9339
+ indexes = [],
9340
+ length = array.length;
9341
 
9342
+ predicate = getIteratee(predicate, 3);
9343
+ while (++index < length) {
9344
+ var value = array[index];
9345
+ if (predicate(value, index, array)) {
9346
+ result.push(value);
9347
+ indexes.push(index);
9348
+ }
9349
  }
9350
+ basePullAt(array, indexes);
9351
+ return result;
9352
  }
 
 
 
9353
 
9354
  /**
9355
+ * Reverses `array` so that the first element becomes the last, the second
9356
+ * element becomes the second to last, and so on.
9357
+ *
9358
+ * **Note:** This method mutates `array` and is based on
9359
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
9360
+ *
9361
+ * @static
9362
+ * @memberOf _
9363
+ * @since 4.0.0
9364
+ * @category Array
9365
+ * @param {Array} array The array to modify.
9366
+ * @returns {Array} Returns `array`.
9367
+ * @example
9368
+ *
9369
+ * var array = [1, 2, 3];
9370
+ *
9371
+ * _.reverse(array);
9372
+ * // => [3, 2, 1]
9373
+ *
9374
+ * console.log(array);
9375
+ * // => [3, 2, 1]
9376
  */
9377
+ function reverse(array) {
9378
+ return array == null ? array : nativeReverse.call(array);
9379
+ }
 
 
 
 
 
 
 
 
 
9380
 
9381
+ /**
9382
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
9383
+ *
9384
+ * **Note:** This method is used instead of
9385
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
9386
+ * returned.
9387
+ *
9388
+ * @static
9389
+ * @memberOf _
9390
+ * @since 3.0.0
9391
+ * @category Array
9392
+ * @param {Array} array The array to slice.
9393
+ * @param {number} [start=0] The start position.
9394
+ * @param {number} [end=array.length] The end position.
9395
+ * @returns {Array} Returns the slice of `array`.
9396
+ */
9397
+ function slice(array, start, end) {
9398
+ var length = array == null ? 0 : array.length;
9399
+ if (!length) {
9400
+ return [];
9401
  }
9402
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
9403
+ start = 0;
9404
+ end = length;
9405
  }
9406
+ else {
9407
+ start = start == null ? 0 : toInteger(start);
9408
+ end = end === undefined ? length : toInteger(end);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9409
  }
9410
+ return baseSlice(array, start, end);
9411
  }
 
 
 
 
 
 
 
 
9412
 
9413
+ /**
9414
+ * Uses a binary search to determine the lowest index at which `value`
9415
+ * should be inserted into `array` in order to maintain its sort order.
9416
+ *
9417
+ * @static
9418
+ * @memberOf _
9419
+ * @since 0.1.0
9420
+ * @category Array
9421
+ * @param {Array} array The sorted array to inspect.
9422
+ * @param {*} value The value to evaluate.
9423
+ * @returns {number} Returns the index at which `value` should be inserted
9424
+ * into `array`.
9425
+ * @example
9426
+ *
9427
+ * _.sortedIndex([30, 50], 40);
9428
+ * // => 1
9429
+ */
9430
+ function sortedIndex(array, value) {
9431
+ return baseSortedIndex(array, value);
9432
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9433
 
9434
+ /**
9435
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
9436
+ * which is invoked for `value` and each element of `array` to compute their
9437
+ * sort ranking. The iteratee is invoked with one argument: (value).
9438
+ *
9439
+ * @static
9440
+ * @memberOf _
9441
+ * @since 4.0.0
9442
+ * @category Array
9443
+ * @param {Array} array The sorted array to inspect.
9444
+ * @param {*} value The value to evaluate.
9445
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9446
+ * @returns {number} Returns the index at which `value` should be inserted
9447
+ * into `array`.
9448
+ * @example
9449
+ *
9450
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
9451
+ *
9452
+ * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9453
+ * // => 0
9454
+ *
9455
+ * // The `_.property` iteratee shorthand.
9456
+ * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
9457
+ * // => 0
9458
+ */
9459
+ function sortedIndexBy(array, value, iteratee) {
9460
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
9461
  }
 
 
 
 
 
 
 
 
 
 
 
9462
 
9463
+ /**
9464
+ * This method is like `_.indexOf` except that it performs a binary
9465
+ * search on a sorted `array`.
9466
+ *
9467
+ * @static
9468
+ * @memberOf _
9469
+ * @since 4.0.0
9470
+ * @category Array
9471
+ * @param {Array} array The array to inspect.
9472
+ * @param {*} value The value to search for.
9473
+ * @returns {number} Returns the index of the matched value, else `-1`.
9474
+ * @example
9475
+ *
9476
+ * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
9477
+ * // => 1
9478
+ */
9479
+ function sortedIndexOf(array, value) {
9480
+ var length = array == null ? 0 : array.length;
9481
+ if (length) {
9482
+ var index = baseSortedIndex(array, value);
9483
+ if (index < length && eq(array[index], value)) {
9484
+ return index;
9485
  }
9486
  }
9487
+ return -1;
 
 
 
9488
  }
 
 
 
 
 
 
 
 
9489
 
9490
+ /**
9491
+ * This method is like `_.sortedIndex` except that it returns the highest
9492
+ * index at which `value` should be inserted into `array` in order to
9493
+ * maintain its sort order.
9494
+ *
9495
+ * @static
9496
+ * @memberOf _
9497
+ * @since 3.0.0
9498
+ * @category Array
9499
+ * @param {Array} array The sorted array to inspect.
9500
+ * @param {*} value The value to evaluate.
9501
+ * @returns {number} Returns the index at which `value` should be inserted
9502
+ * into `array`.
9503
+ * @example
9504
+ *
9505
+ * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
9506
+ * // => 4
9507
+ */
9508
+ function sortedLastIndex(array, value) {
9509
+ return baseSortedIndex(array, value, true);
9510
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9511
 
9512
+ /**
9513
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
9514
+ * which is invoked for `value` and each element of `array` to compute their
9515
+ * sort ranking. The iteratee is invoked with one argument: (value).
9516
+ *
9517
+ * @static
9518
+ * @memberOf _
9519
+ * @since 4.0.0
9520
+ * @category Array
9521
+ * @param {Array} array The sorted array to inspect.
9522
+ * @param {*} value The value to evaluate.
9523
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9524
+ * @returns {number} Returns the index at which `value` should be inserted
9525
+ * into `array`.
9526
+ * @example
9527
+ *
9528
+ * var objects = [{ 'x': 4 }, { 'x': 5 }];
9529
+ *
9530
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
9531
+ * // => 1
9532
+ *
9533
+ * // The `_.property` iteratee shorthand.
9534
+ * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
9535
+ * // => 1
9536
+ */
9537
+ function sortedLastIndexBy(array, value, iteratee) {
9538
+ return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
9539
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9540
 
9541
+ /**
9542
+ * This method is like `_.lastIndexOf` except that it performs a binary
9543
+ * search on a sorted `array`.
9544
+ *
9545
+ * @static
9546
+ * @memberOf _
9547
+ * @since 4.0.0
9548
+ * @category Array
9549
+ * @param {Array} array The array to inspect.
9550
+ * @param {*} value The value to search for.
9551
+ * @returns {number} Returns the index of the matched value, else `-1`.
9552
+ * @example
9553
+ *
9554
+ * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
9555
+ * // => 3
9556
+ */
9557
+ function sortedLastIndexOf(array, value) {
9558
+ var length = array == null ? 0 : array.length;
9559
+ if (length) {
9560
+ var index = baseSortedIndex(array, value, true) - 1;
9561
+ if (eq(array[index], value)) {
9562
+ return index;
9563
+ }
9564
+ }
9565
+ return -1;
9566
+ }
9567
 
9568
+ /**
9569
+ * This method is like `_.uniq` except that it's designed and optimized
9570
+ * for sorted arrays.
9571
+ *
9572
+ * @static
9573
+ * @memberOf _
9574
+ * @since 4.0.0
9575
+ * @category Array
9576
+ * @param {Array} array The array to inspect.
9577
+ * @returns {Array} Returns the new duplicate free array.
9578
+ * @example
9579
+ *
9580
+ * _.sortedUniq([1, 1, 2]);
9581
+ * // => [1, 2]
9582
+ */
9583
+ function sortedUniq(array) {
9584
+ return (array && array.length)
9585
+ ? baseSortedUniq(array)
9586
+ : [];
9587
+ }
9588
 
9589
+ /**
9590
+ * This method is like `_.uniqBy` except that it's designed and optimized
9591
+ * for sorted arrays.
9592
+ *
9593
+ * @static
9594
+ * @memberOf _
9595
+ * @since 4.0.0
9596
+ * @category Array
9597
+ * @param {Array} array The array to inspect.
9598
+ * @param {Function} [iteratee] The iteratee invoked per element.
9599
+ * @returns {Array} Returns the new duplicate free array.
9600
+ * @example
9601
+ *
9602
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
9603
+ * // => [1.1, 2.3]
9604
+ */
9605
+ function sortedUniqBy(array, iteratee) {
9606
+ return (array && array.length)
9607
+ ? baseSortedUniq(array, getIteratee(iteratee, 2))
9608
+ : [];
9609
+ }
9610
 
9611
+ /**
9612
+ * Gets all but the first element of `array`.
9613
+ *
9614
+ * @static
9615
+ * @memberOf _
9616
+ * @since 4.0.0
9617
+ * @category Array
9618
+ * @param {Array} array The array to query.
9619
+ * @returns {Array} Returns the slice of `array`.
9620
+ * @example
9621
+ *
9622
+ * _.tail([1, 2, 3]);
9623
+ * // => [2, 3]
9624
+ */
9625
+ function tail(array) {
9626
+ var length = array == null ? 0 : array.length;
9627
+ return length ? baseSlice(array, 1, length) : [];
9628
+ }
9629
 
9630
+ /**
9631
+ * Creates a slice of `array` with `n` elements taken from the beginning.
9632
+ *
9633
+ * @static
9634
+ * @memberOf _
9635
+ * @since 0.1.0
9636
+ * @category Array
9637
+ * @param {Array} array The array to query.
9638
+ * @param {number} [n=1] The number of elements to take.
9639
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9640
+ * @returns {Array} Returns the slice of `array`.
9641
+ * @example
9642
+ *
9643
+ * _.take([1, 2, 3]);
9644
+ * // => [1]
9645
+ *
9646
+ * _.take([1, 2, 3], 2);
9647
+ * // => [1, 2]
9648
+ *
9649
+ * _.take([1, 2, 3], 5);
9650
+ * // => [1, 2, 3]
9651
+ *
9652
+ * _.take([1, 2, 3], 0);
9653
+ * // => []
9654
+ */
9655
+ function take(array, n, guard) {
9656
+ if (!(array && array.length)) {
9657
+ return [];
9658
+ }
9659
+ n = (guard || n === undefined) ? 1 : toInteger(n);
9660
+ return baseSlice(array, 0, n < 0 ? 0 : n);
9661
+ }
9662
 
9663
+ /**
9664
+ * Creates a slice of `array` with `n` elements taken from the end.
9665
+ *
9666
+ * @static
9667
+ * @memberOf _
9668
+ * @since 3.0.0
9669
+ * @category Array
9670
+ * @param {Array} array The array to query.
9671
+ * @param {number} [n=1] The number of elements to take.
9672
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9673
+ * @returns {Array} Returns the slice of `array`.
9674
+ * @example
9675
+ *
9676
+ * _.takeRight([1, 2, 3]);
9677
+ * // => [3]
9678
+ *
9679
+ * _.takeRight([1, 2, 3], 2);
9680
+ * // => [2, 3]
9681
+ *
9682
+ * _.takeRight([1, 2, 3], 5);
9683
+ * // => [1, 2, 3]
9684
+ *
9685
+ * _.takeRight([1, 2, 3], 0);
9686
+ * // => []
9687
+ */
9688
+ function takeRight(array, n, guard) {
9689
+ var length = array == null ? 0 : array.length;
9690
+ if (!length) {
9691
+ return [];
9692
+ }
9693
+ n = (guard || n === undefined) ? 1 : toInteger(n);
9694
+ n = length - n;
9695
+ return baseSlice(array, n < 0 ? 0 : n, length);
9696
+ }
9697
 
9698
+ /**
9699
+ * Creates a slice of `array` with elements taken from the end. Elements are
9700
+ * taken until `predicate` returns falsey. The predicate is invoked with
9701
+ * three arguments: (value, index, array).
9702
+ *
9703
+ * @static
9704
+ * @memberOf _
9705
+ * @since 3.0.0
9706
+ * @category Array
9707
+ * @param {Array} array The array to query.
9708
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
9709
+ * @returns {Array} Returns the slice of `array`.
9710
+ * @example
9711
+ *
9712
+ * var users = [
9713
+ * { 'user': 'barney', 'active': true },
9714
+ * { 'user': 'fred', 'active': false },
9715
+ * { 'user': 'pebbles', 'active': false }
9716
+ * ];
9717
+ *
9718
+ * _.takeRightWhile(users, function(o) { return !o.active; });
9719
+ * // => objects for ['fred', 'pebbles']
9720
+ *
9721
+ * // The `_.matches` iteratee shorthand.
9722
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
9723
+ * // => objects for ['pebbles']
9724
+ *
9725
+ * // The `_.matchesProperty` iteratee shorthand.
9726
+ * _.takeRightWhile(users, ['active', false]);
9727
+ * // => objects for ['fred', 'pebbles']
9728
+ *
9729
+ * // The `_.property` iteratee shorthand.
9730
+ * _.takeRightWhile(users, 'active');
9731
+ * // => []
9732
+ */
9733
+ function takeRightWhile(array, predicate) {
9734
+ return (array && array.length)
9735
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
9736
+ : [];
9737
+ }
9738
 
9739
+ /**
9740
+ * Creates a slice of `array` with elements taken from the beginning. Elements
9741
+ * are taken until `predicate` returns falsey. The predicate is invoked with
9742
+ * three arguments: (value, index, array).
9743
+ *
9744
+ * @static
9745
+ * @memberOf _
9746
+ * @since 3.0.0
9747
+ * @category Array
9748
+ * @param {Array} array The array to query.
9749
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
9750
+ * @returns {Array} Returns the slice of `array`.
9751
+ * @example
9752
+ *
9753
+ * var users = [
9754
+ * { 'user': 'barney', 'active': false },
9755
+ * { 'user': 'fred', 'active': false },
9756
+ * { 'user': 'pebbles', 'active': true }
9757
+ * ];
9758
+ *
9759
+ * _.takeWhile(users, function(o) { return !o.active; });
9760
+ * // => objects for ['barney', 'fred']
9761
+ *
9762
+ * // The `_.matches` iteratee shorthand.
9763
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
9764
+ * // => objects for ['barney']
9765
+ *
9766
+ * // The `_.matchesProperty` iteratee shorthand.
9767
+ * _.takeWhile(users, ['active', false]);
9768
+ * // => objects for ['barney', 'fred']
9769
+ *
9770
+ * // The `_.property` iteratee shorthand.
9771
+ * _.takeWhile(users, 'active');
9772
+ * // => []
9773
+ */
9774
+ function takeWhile(array, predicate) {
9775
+ return (array && array.length)
9776
+ ? baseWhile(array, getIteratee(predicate, 3))
9777
+ : [];
9778
+ }
9779
 
9780
+ /**
9781
+ * Creates an array of unique values, in order, from all given arrays using
9782
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9783
+ * for equality comparisons.
9784
+ *
9785
+ * @static
9786
+ * @memberOf _
9787
+ * @since 0.1.0
9788
+ * @category Array
9789
+ * @param {...Array} [arrays] The arrays to inspect.
9790
+ * @returns {Array} Returns the new array of combined values.
9791
+ * @example
9792
+ *
9793
+ * _.union([2], [1, 2]);
9794
+ * // => [2, 1]
9795
+ */
9796
+ var union = baseRest(function(arrays) {
9797
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
9798
+ });
9799
 
9800
+ /**
9801
+ * This method is like `_.union` except that it accepts `iteratee` which is
9802
+ * invoked for each element of each `arrays` to generate the criterion by
9803
+ * which uniqueness is computed. Result values are chosen from the first
9804
+ * array in which the value occurs. The iteratee is invoked with one argument:
9805
+ * (value).
9806
+ *
9807
+ * @static
9808
+ * @memberOf _
9809
+ * @since 4.0.0
9810
+ * @category Array
9811
+ * @param {...Array} [arrays] The arrays to inspect.
9812
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9813
+ * @returns {Array} Returns the new array of combined values.
9814
+ * @example
9815
+ *
9816
+ * _.unionBy([2.1], [1.2, 2.3], Math.floor);
9817
+ * // => [2.1, 1.2]
9818
+ *
9819
+ * // The `_.property` iteratee shorthand.
9820
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
9821
+ * // => [{ 'x': 1 }, { 'x': 2 }]
9822
+ */
9823
+ var unionBy = baseRest(function(arrays) {
9824
+ var iteratee = last(arrays);
9825
+ if (isArrayLikeObject(iteratee)) {
9826
+ iteratee = undefined;
9827
+ }
9828
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
9829
+ });
9830
 
9831
+ /**
9832
+ * This method is like `_.union` except that it accepts `comparator` which
9833
+ * is invoked to compare elements of `arrays`. Result values are chosen from
9834
+ * the first array in which the value occurs. The comparator is invoked
9835
+ * with two arguments: (arrVal, othVal).
9836
+ *
9837
+ * @static
9838
+ * @memberOf _
9839
+ * @since 4.0.0
9840
+ * @category Array
9841
+ * @param {...Array} [arrays] The arrays to inspect.
9842
+ * @param {Function} [comparator] The comparator invoked per element.
9843
+ * @returns {Array} Returns the new array of combined values.
9844
+ * @example
9845
+ *
9846
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
9847
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
9848
+ *
9849
+ * _.unionWith(objects, others, _.isEqual);
9850
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
9851
+ */
9852
+ var unionWith = baseRest(function(arrays) {
9853
+ var comparator = last(arrays);
9854
+ comparator = typeof comparator == 'function' ? comparator : undefined;
9855
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
9856
+ });
9857
 
9858
+ /**
9859
+ * Creates a duplicate-free version of an array, using
9860
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
9861
+ * for equality comparisons, in which only the first occurrence of each element
9862
+ * is kept. The order of result values is determined by the order they occur
9863
+ * in the array.
9864
+ *
9865
+ * @static
9866
+ * @memberOf _
9867
+ * @since 0.1.0
9868
+ * @category Array
9869
+ * @param {Array} array The array to inspect.
9870
+ * @returns {Array} Returns the new duplicate free array.
9871
+ * @example
9872
+ *
9873
+ * _.uniq([2, 1, 2]);
9874
+ * // => [2, 1]
9875
+ */
9876
+ function uniq(array) {
9877
+ return (array && array.length) ? baseUniq(array) : [];
9878
+ }
9879
 
9880
+ /**
9881
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
9882
+ * invoked for each element in `array` to generate the criterion by which
9883
+ * uniqueness is computed. The order of result values is determined by the
9884
+ * order they occur in the array. The iteratee is invoked with one argument:
9885
+ * (value).
9886
+ *
9887
+ * @static
9888
+ * @memberOf _
9889
+ * @since 4.0.0
9890
+ * @category Array
9891
+ * @param {Array} array The array to inspect.
9892
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
9893
+ * @returns {Array} Returns the new duplicate free array.
9894
+ * @example
9895
+ *
9896
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
9897
+ * // => [2.1, 1.2]
9898
+ *
9899
+ * // The `_.property` iteratee shorthand.
9900
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
9901
+ * // => [{ 'x': 1 }, { 'x': 2 }]
9902
+ */
9903
+ function uniqBy(array, iteratee) {
9904
+ return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
9905
+ }
9906
 
9907
+ /**
9908
+ * This method is like `_.uniq` except that it accepts `comparator` which
9909
+ * is invoked to compare elements of `array`. The order of result values is
9910
+ * determined by the order they occur in the array.The comparator is invoked
9911
+ * with two arguments: (arrVal, othVal).
9912
+ *
9913
+ * @static
9914
+ * @memberOf _
9915
+ * @since 4.0.0
9916
+ * @category Array
9917
+ * @param {Array} array The array to inspect.
9918
+ * @param {Function} [comparator] The comparator invoked per element.
9919
+ * @returns {Array} Returns the new duplicate free array.
9920
+ * @example
9921
+ *
9922
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
9923
+ *
9924
+ * _.uniqWith(objects, _.isEqual);
9925
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
9926
+ */
9927
+ function uniqWith(array, comparator) {
9928
+ comparator = typeof comparator == 'function' ? comparator : undefined;
9929
+ return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
9930
+ }
9931
 
9932
+ /**
9933
+ * This method is like `_.zip` except that it accepts an array of grouped
9934
+ * elements and creates an array regrouping the elements to their pre-zip
9935
+ * configuration.
9936
+ *
9937
+ * @static
9938
+ * @memberOf _
9939
+ * @since 1.2.0
9940
+ * @category Array
9941
+ * @param {Array} array The array of grouped elements to process.
9942
+ * @returns {Array} Returns the new array of regrouped elements.
9943
+ * @example
9944
+ *
9945
+ * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
9946
+ * // => [['a', 1, true], ['b', 2, false]]
9947
+ *
9948
+ * _.unzip(zipped);
9949
+ * // => [['a', 'b'], [1, 2], [true, false]]
9950
+ */
9951
+ function unzip(array) {
9952
+ if (!(array && array.length)) {
9953
+ return [];
9954
+ }
9955
+ var length = 0;
9956
+ array = arrayFilter(array, function(group) {
9957
+ if (isArrayLikeObject(group)) {
9958
+ length = nativeMax(group.length, length);
9959
+ return true;
9960
+ }
9961
+ });
9962
+ return baseTimes(length, function(index) {
9963
+ return arrayMap(array, baseProperty(index));
9964
+ });
9965
+ }
9966
 
9967
+ /**
9968
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
9969
+ * how regrouped values should be combined. The iteratee is invoked with the
9970
+ * elements of each group: (...group).
9971
+ *
9972
+ * @static
9973
+ * @memberOf _
9974
+ * @since 3.8.0
9975
+ * @category Array
9976
+ * @param {Array} array The array of grouped elements to process.
9977
+ * @param {Function} [iteratee=_.identity] The function to combine
9978
+ * regrouped values.
9979
+ * @returns {Array} Returns the new array of regrouped elements.
9980
+ * @example
9981
+ *
9982
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
9983
+ * // => [[1, 10, 100], [2, 20, 200]]
9984
+ *
9985
+ * _.unzipWith(zipped, _.add);
9986
+ * // => [3, 30, 300]
9987
+ */
9988
+ function unzipWith(array, iteratee) {
9989
+ if (!(array && array.length)) {
9990
+ return [];
9991
+ }
9992
+ var result = unzip(array);
9993
+ if (iteratee == null) {
9994
+ return result;
9995
+ }
9996
+ return arrayMap(result, function(group) {
9997
+ return apply(iteratee, undefined, group);
9998
+ });
9999
+ }
10000
 
10001
+ /**
10002
+ * Creates an array excluding all given values using
10003
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10004
+ * for equality comparisons.
10005
+ *
10006
+ * **Note:** Unlike `_.pull`, this method returns a new array.
10007
+ *
10008
+ * @static
10009
+ * @memberOf _
10010
+ * @since 0.1.0
10011
+ * @category Array
10012
+ * @param {Array} array The array to inspect.
10013
+ * @param {...*} [values] The values to exclude.
10014
+ * @returns {Array} Returns the new array of filtered values.
10015
+ * @see _.difference, _.xor
10016
+ * @example
10017
+ *
10018
+ * _.without([2, 1, 2, 3], 1, 2);
10019
+ * // => [3]
10020
+ */
10021
+ var without = baseRest(function(array, values) {
10022
+ return isArrayLikeObject(array)
10023
+ ? baseDifference(array, values)
10024
+ : [];
10025
+ });
10026
 
10027
+ /**
10028
+ * Creates an array of unique values that is the
10029
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
10030
+ * of the given arrays. The order of result values is determined by the order
10031
+ * they occur in the arrays.
10032
+ *
10033
+ * @static
10034
+ * @memberOf _
10035
+ * @since 2.4.0
10036
+ * @category Array
10037
+ * @param {...Array} [arrays] The arrays to inspect.
10038
+ * @returns {Array} Returns the new array of filtered values.
10039
+ * @see _.difference, _.without
10040
+ * @example
10041
+ *
10042
+ * _.xor([2, 1], [2, 3]);
10043
+ * // => [1, 3]
10044
+ */
10045
+ var xor = baseRest(function(arrays) {
10046
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
10047
+ });
10048
 
10049
+ /**
10050
+ * This method is like `_.xor` except that it accepts `iteratee` which is
10051
+ * invoked for each element of each `arrays` to generate the criterion by
10052
+ * which by which they're compared. The order of result values is determined
10053
+ * by the order they occur in the arrays. The iteratee is invoked with one
10054
+ * argument: (value).
10055
+ *
10056
+ * @static
10057
+ * @memberOf _
10058
+ * @since 4.0.0
10059
+ * @category Array
10060
+ * @param {...Array} [arrays] The arrays to inspect.
10061
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
10062
+ * @returns {Array} Returns the new array of filtered values.
10063
+ * @example
10064
+ *
10065
+ * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
10066
+ * // => [1.2, 3.4]
10067
+ *
10068
+ * // The `_.property` iteratee shorthand.
10069
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
10070
+ * // => [{ 'x': 2 }]
10071
+ */
10072
+ var xorBy = baseRest(function(arrays) {
10073
+ var iteratee = last(arrays);
10074
+ if (isArrayLikeObject(iteratee)) {
10075
+ iteratee = undefined;
10076
+ }
10077
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
10078
+ });
10079
 
10080
+ /**
10081
+ * This method is like `_.xor` except that it accepts `comparator` which is
10082
+ * invoked to compare elements of `arrays`. The order of result values is
10083
+ * determined by the order they occur in the arrays. The comparator is invoked
10084
+ * with two arguments: (arrVal, othVal).
10085
+ *
10086
+ * @static
10087
+ * @memberOf _
10088
+ * @since 4.0.0
10089
+ * @category Array
10090
+ * @param {...Array} [arrays] The arrays to inspect.
10091
+ * @param {Function} [comparator] The comparator invoked per element.
10092
+ * @returns {Array} Returns the new array of filtered values.
10093
+ * @example
10094
+ *
10095
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
10096
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
10097
+ *
10098
+ * _.xorWith(objects, others, _.isEqual);
10099
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
10100
+ */
10101
+ var xorWith = baseRest(function(arrays) {
10102
+ var comparator = last(arrays);
10103
+ comparator = typeof comparator == 'function' ? comparator : undefined;
10104
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
10105
+ });
10106
 
10107
+ /**
10108
+ * Creates an array of grouped elements, the first of which contains the
10109
+ * first elements of the given arrays, the second of which contains the
10110
+ * second elements of the given arrays, and so on.
10111
+ *
10112
+ * @static
10113
+ * @memberOf _
10114
+ * @since 0.1.0
10115
+ * @category Array
10116
+ * @param {...Array} [arrays] The arrays to process.
10117
+ * @returns {Array} Returns the new array of grouped elements.
10118
+ * @example
10119
+ *
10120
+ * _.zip(['a', 'b'], [1, 2], [true, false]);
10121
+ * // => [['a', 1, true], ['b', 2, false]]
10122
+ */
10123
+ var zip = baseRest(unzip);
10124
 
10125
+ /**
10126
+ * This method is like `_.fromPairs` except that it accepts two arrays,
10127
+ * one of property identifiers and one of corresponding values.
10128
+ *
10129
+ * @static
10130
+ * @memberOf _
10131
+ * @since 0.4.0
10132
+ * @category Array
10133
+ * @param {Array} [props=[]] The property identifiers.
10134
+ * @param {Array} [values=[]] The property values.
10135
+ * @returns {Object} Returns the new object.
10136
+ * @example
10137
+ *
10138
+ * _.zipObject(['a', 'b'], [1, 2]);
10139
+ * // => { 'a': 1, 'b': 2 }
10140
+ */
10141
+ function zipObject(props, values) {
10142
+ return baseZipObject(props || [], values || [], assignValue);
10143
+ }
10144
 
10145
+ /**
10146
+ * This method is like `_.zipObject` except that it supports property paths.
10147
+ *
10148
+ * @static
10149
+ * @memberOf _
10150
+ * @since 4.1.0
10151
+ * @category Array
10152
+ * @param {Array} [props=[]] The property identifiers.
10153
+ * @param {Array} [values=[]] The property values.
10154
+ * @returns {Object} Returns the new object.
10155
+ * @example
10156
+ *
10157
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
10158
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
10159
+ */
10160
+ function zipObjectDeep(props, values) {
10161
+ return baseZipObject(props || [], values || [], baseSet);
10162
+ }
10163
 
10164
+ /**
10165
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
10166
+ * how grouped values should be combined. The iteratee is invoked with the
10167
+ * elements of each group: (...group).
10168
+ *
10169
+ * @static
10170
+ * @memberOf _
10171
+ * @since 3.8.0
10172
+ * @category Array
10173
+ * @param {...Array} [arrays] The arrays to process.
10174
+ * @param {Function} [iteratee=_.identity] The function to combine
10175
+ * grouped values.
10176
+ * @returns {Array} Returns the new array of grouped elements.
10177
+ * @example
10178
+ *
10179
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
10180
+ * return a + b + c;
10181
+ * });
10182
+ * // => [111, 222]
10183
+ */
10184
+ var zipWith = baseRest(function(arrays) {
10185
+ var length = arrays.length,
10186
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
10187
 
10188
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
10189
+ return unzipWith(arrays, iteratee);
10190
+ });
10191
 
10192
+ /*------------------------------------------------------------------------*/
 
 
 
10193
 
10194
+ /**
10195
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
10196
+ * chain sequences enabled. The result of such sequences must be unwrapped
10197
+ * with `_#value`.
10198
+ *
10199
+ * @static
10200
+ * @memberOf _
10201
+ * @since 1.3.0
10202
+ * @category Seq
10203
+ * @param {*} value The value to wrap.
10204
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10205
+ * @example
10206
+ *
10207
+ * var users = [
10208
+ * { 'user': 'barney', 'age': 36 },
10209
+ * { 'user': 'fred', 'age': 40 },
10210
+ * { 'user': 'pebbles', 'age': 1 }
10211
+ * ];
10212
+ *
10213
+ * var youngest = _
10214
+ * .chain(users)
10215
+ * .sortBy('age')
10216
+ * .map(function(o) {
10217
+ * return o.user + ' is ' + o.age;
10218
+ * })
10219
+ * .head()
10220
+ * .value();
10221
+ * // => 'pebbles is 1'
10222
+ */
10223
+ function chain(value) {
10224
+ var result = lodash(value);
10225
+ result.__chain__ = true;
10226
+ return result;
10227
+ }
10228
 
10229
+ /**
10230
+ * This method invokes `interceptor` and returns `value`. The interceptor
10231
+ * is invoked with one argument; (value). The purpose of this method is to
10232
+ * "tap into" a method chain sequence in order to modify intermediate results.
10233
+ *
10234
+ * @static
10235
+ * @memberOf _
10236
+ * @since 0.1.0
10237
+ * @category Seq
10238
+ * @param {*} value The value to provide to `interceptor`.
10239
+ * @param {Function} interceptor The function to invoke.
10240
+ * @returns {*} Returns `value`.
10241
+ * @example
10242
+ *
10243
+ * _([1, 2, 3])
10244
+ * .tap(function(array) {
10245
+ * // Mutate input array.
10246
+ * array.pop();
10247
+ * })
10248
+ * .reverse()
10249
+ * .value();
10250
+ * // => [2, 1]
10251
+ */
10252
+ function tap(value, interceptor) {
10253
+ interceptor(value);
10254
+ return value;
10255
+ }
10256
 
10257
+ /**
10258
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
10259
+ * The purpose of this method is to "pass thru" values replacing intermediate
10260
+ * results in a method chain sequence.
10261
+ *
10262
+ * @static
10263
+ * @memberOf _
10264
+ * @since 3.0.0
10265
+ * @category Seq
10266
+ * @param {*} value The value to provide to `interceptor`.
10267
+ * @param {Function} interceptor The function to invoke.
10268
+ * @returns {*} Returns the result of `interceptor`.
10269
+ * @example
10270
+ *
10271
+ * _(' abc ')
10272
+ * .chain()
10273
+ * .trim()
10274
+ * .thru(function(value) {
10275
+ * return [value];
10276
+ * })
10277
+ * .value();
10278
+ * // => ['abc']
10279
+ */
10280
+ function thru(value, interceptor) {
10281
+ return interceptor(value);
10282
+ }
10283
 
10284
+ /**
10285
+ * This method is the wrapper version of `_.at`.
10286
+ *
10287
+ * @name at
10288
+ * @memberOf _
10289
+ * @since 1.0.0
10290
+ * @category Seq
10291
+ * @param {...(string|string[])} [paths] The property paths to pick.
10292
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10293
+ * @example
10294
+ *
10295
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
10296
+ *
10297
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
10298
+ * // => [3, 4]
10299
+ */
10300
+ var wrapperAt = flatRest(function(paths) {
10301
+ var length = paths.length,
10302
+ start = length ? paths[0] : 0,
10303
+ value = this.__wrapped__,
10304
+ interceptor = function(object) { return baseAt(object, paths); };
10305
 
10306
+ if (length > 1 || this.__actions__.length ||
10307
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
10308
+ return this.thru(interceptor);
10309
+ }
10310
+ value = value.slice(start, +start + (length ? 1 : 0));
10311
+ value.__actions__.push({
10312
+ 'func': thru,
10313
+ 'args': [interceptor],
10314
+ 'thisArg': undefined
10315
+ });
10316
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
10317
+ if (length && !array.length) {
10318
+ array.push(undefined);
10319
+ }
10320
+ return array;
10321
+ });
10322
+ });
10323
 
10324
+ /**
10325
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
10326
+ *
10327
+ * @name chain
10328
+ * @memberOf _
10329
+ * @since 0.1.0
10330
+ * @category Seq
10331
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10332
+ * @example
10333
+ *
10334
+ * var users = [
10335
+ * { 'user': 'barney', 'age': 36 },
10336
+ * { 'user': 'fred', 'age': 40 }
10337
+ * ];
10338
+ *
10339
+ * // A sequence without explicit chaining.
10340
+ * _(users).head();
10341
+ * // => { 'user': 'barney', 'age': 36 }
10342
+ *
10343
+ * // A sequence with explicit chaining.
10344
+ * _(users)
10345
+ * .chain()
10346
+ * .head()
10347
+ * .pick('user')
10348
+ * .value();
10349
+ * // => { 'user': 'barney' }
10350
+ */
10351
+ function wrapperChain() {
10352
+ return chain(this);
10353
+ }
10354
 
10355
+ /**
10356
+ * Executes the chain sequence and returns the wrapped result.
10357
+ *
10358
+ * @name commit
10359
+ * @memberOf _
10360
+ * @since 3.2.0
10361
+ * @category Seq
10362
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10363
+ * @example
10364
+ *
10365
+ * var array = [1, 2];
10366
+ * var wrapped = _(array).push(3);
10367
+ *
10368
+ * console.log(array);
10369
+ * // => [1, 2]
10370
+ *
10371
+ * wrapped = wrapped.commit();
10372
+ * console.log(array);
10373
+ * // => [1, 2, 3]
10374
+ *
10375
+ * wrapped.last();
10376
+ * // => 3
10377
+ *
10378
+ * console.log(array);
10379
+ * // => [1, 2, 3]
10380
+ */
10381
+ function wrapperCommit() {
10382
+ return new LodashWrapper(this.value(), this.__chain__);
10383
+ }
10384
 
10385
+ /**
10386
+ * Gets the next value on a wrapped object following the
10387
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
10388
+ *
10389
+ * @name next
10390
+ * @memberOf _
10391
+ * @since 4.0.0
10392
+ * @category Seq
10393
+ * @returns {Object} Returns the next iterator value.
10394
+ * @example
10395
+ *
10396
+ * var wrapped = _([1, 2]);
10397
+ *
10398
+ * wrapped.next();
10399
+ * // => { 'done': false, 'value': 1 }
10400
+ *
10401
+ * wrapped.next();
10402
+ * // => { 'done': false, 'value': 2 }
10403
+ *
10404
+ * wrapped.next();
10405
+ * // => { 'done': true, 'value': undefined }
10406
+ */
10407
+ function wrapperNext() {
10408
+ if (this.__values__ === undefined) {
10409
+ this.__values__ = toArray(this.value());
10410
+ }
10411
+ var done = this.__index__ >= this.__values__.length,
10412
+ value = done ? undefined : this.__values__[this.__index__++];
10413
 
10414
+ return { 'done': done, 'value': value };
10415
+ }
 
10416
 
10417
+ /**
10418
+ * Enables the wrapper to be iterable.
10419
+ *
10420
+ * @name Symbol.iterator
10421
+ * @memberOf _
10422
+ * @since 4.0.0
10423
+ * @category Seq
10424
+ * @returns {Object} Returns the wrapper object.
10425
+ * @example
10426
+ *
10427
+ * var wrapped = _([1, 2]);
10428
+ *
10429
+ * wrapped[Symbol.iterator]() === wrapped;
10430
+ * // => true
10431
+ *
10432
+ * Array.from(wrapped);
10433
+ * // => [1, 2]
10434
+ */
10435
+ function wrapperToIterator() {
10436
+ return this;
10437
+ }
10438
 
10439
+ /**
10440
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
10441
+ *
10442
+ * @name plant
10443
+ * @memberOf _
10444
+ * @since 3.2.0
10445
+ * @category Seq
10446
+ * @param {*} value The value to plant.
10447
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10448
+ * @example
10449
+ *
10450
+ * function square(n) {
10451
+ * return n * n;
10452
+ * }
10453
+ *
10454
+ * var wrapped = _([1, 2]).map(square);
10455
+ * var other = wrapped.plant([3, 4]);
10456
+ *
10457
+ * other.value();
10458
+ * // => [9, 16]
10459
+ *
10460
+ * wrapped.value();
10461
+ * // => [1, 4]
10462
+ */
10463
+ function wrapperPlant(value) {
10464
+ var result,
10465
+ parent = this;
10466
 
10467
+ while (parent instanceof baseLodash) {
10468
+ var clone = wrapperClone(parent);
10469
+ clone.__index__ = 0;
10470
+ clone.__values__ = undefined;
10471
+ if (result) {
10472
+ previous.__wrapped__ = clone;
10473
+ } else {
10474
+ result = clone;
10475
+ }
10476
+ var previous = clone;
10477
+ parent = parent.__wrapped__;
10478
+ }
10479
+ previous.__wrapped__ = value;
10480
+ return result;
10481
+ }
10482
 
10483
+ /**
10484
+ * This method is the wrapper version of `_.reverse`.
10485
+ *
10486
+ * **Note:** This method mutates the wrapped array.
10487
+ *
10488
+ * @name reverse
10489
+ * @memberOf _
10490
+ * @since 0.1.0
10491
+ * @category Seq
10492
+ * @returns {Object} Returns the new `lodash` wrapper instance.
10493
+ * @example
10494
+ *
10495
+ * var array = [1, 2, 3];
10496
+ *
10497
+ * _(array).reverse().value()
10498
+ * // => [3, 2, 1]
10499
+ *
10500
+ * console.log(array);
10501
+ * // => [3, 2, 1]
10502
+ */
10503
+ function wrapperReverse() {
10504
+ var value = this.__wrapped__;
10505
+ if (value instanceof LazyWrapper) {
10506
+ var wrapped = value;
10507
+ if (this.__actions__.length) {
10508
+ wrapped = new LazyWrapper(this);
10509
+ }
10510
+ wrapped = wrapped.reverse();
10511
+ wrapped.__actions__.push({
10512
+ 'func': thru,
10513
+ 'args': [reverse],
10514
+ 'thisArg': undefined
10515
+ });
10516
+ return new LodashWrapper(wrapped, this.__chain__);
10517
+ }
10518
+ return this.thru(reverse);
10519
+ }
10520
 
10521
+ /**
10522
+ * Executes the chain sequence to resolve the unwrapped value.
10523
+ *
10524
+ * @name value
10525
+ * @memberOf _
10526
+ * @since 0.1.0
10527
+ * @alias toJSON, valueOf
10528
+ * @category Seq
10529
+ * @returns {*} Returns the resolved unwrapped value.
10530
+ * @example
10531
+ *
10532
+ * _([1, 2, 3]).value();
10533
+ * // => [1, 2, 3]
10534
+ */
10535
+ function wrapperValue() {
10536
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
10537
+ }
10538
 
10539
+ /*------------------------------------------------------------------------*/
10540
 
10541
+ /**
10542
+ * Creates an object composed of keys generated from the results of running
10543
+ * each element of `collection` thru `iteratee`. The corresponding value of
10544
+ * each key is the number of times the key was returned by `iteratee`. The
10545
+ * iteratee is invoked with one argument: (value).
10546
+ *
10547
+ * @static
10548
+ * @memberOf _
10549
+ * @since 0.5.0
10550
+ * @category Collection
10551
+ * @param {Array|Object} collection The collection to iterate over.
10552
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10553
+ * @returns {Object} Returns the composed aggregate object.
10554
+ * @example
10555
+ *
10556
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
10557
+ * // => { '4': 1, '6': 2 }
10558
+ *
10559
+ * // The `_.property` iteratee shorthand.
10560
+ * _.countBy(['one', 'two', 'three'], 'length');
10561
+ * // => { '3': 2, '5': 1 }
10562
+ */
10563
+ var countBy = createAggregator(function(result, value, key) {
10564
+ if (hasOwnProperty.call(result, key)) {
10565
+ ++result[key];
10566
+ } else {
10567
+ baseAssignValue(result, key, 1);
10568
+ }
10569
+ });
10570
 
10571
+ /**
10572
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
10573
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
10574
+ * invoked with three arguments: (value, index|key, collection).
10575
+ *
10576
+ * **Note:** This method returns `true` for
10577
+ * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
10578
+ * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
10579
+ * elements of empty collections.
10580
+ *
10581
+ * @static
10582
+ * @memberOf _
10583
+ * @since 0.1.0
10584
+ * @category Collection
10585
+ * @param {Array|Object} collection The collection to iterate over.
10586
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
10587
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
10588
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
10589
+ * else `false`.
10590
+ * @example
10591
+ *
10592
+ * _.every([true, 1, null, 'yes'], Boolean);
10593
+ * // => false
10594
+ *
10595
+ * var users = [
10596
+ * { 'user': 'barney', 'age': 36, 'active': false },
10597
+ * { 'user': 'fred', 'age': 40, 'active': false }
10598
+ * ];
10599
+ *
10600
+ * // The `_.matches` iteratee shorthand.
10601
+ * _.every(users, { 'user': 'barney', 'active': false });
10602
+ * // => false
10603
+ *
10604
+ * // The `_.matchesProperty` iteratee shorthand.
10605
+ * _.every(users, ['active', false]);
10606
+ * // => true
10607
+ *
10608
+ * // The `_.property` iteratee shorthand.
10609
+ * _.every(users, 'active');
10610
+ * // => false
10611
+ */
10612
+ function every(collection, predicate, guard) {
10613
+ var func = isArray(collection) ? arrayEvery : baseEvery;
10614
+ if (guard && isIterateeCall(collection, predicate, guard)) {
10615
+ predicate = undefined;
10616
+ }
10617
+ return func(collection, getIteratee(predicate, 3));
10618
+ }
10619
 
10620
+ /**
10621
+ * Iterates over elements of `collection`, returning an array of all elements
10622
+ * `predicate` returns truthy for. The predicate is invoked with three
10623
+ * arguments: (value, index|key, collection).
10624
+ *
10625
+ * **Note:** Unlike `_.remove`, this method returns a new array.
10626
+ *
10627
+ * @static
10628
+ * @memberOf _
10629
+ * @since 0.1.0
10630
+ * @category Collection
10631
+ * @param {Array|Object} collection The collection to iterate over.
10632
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
10633
+ * @returns {Array} Returns the new filtered array.
10634
+ * @see _.reject
10635
+ * @example
10636
+ *
10637
+ * var users = [
10638
+ * { 'user': 'barney', 'age': 36, 'active': true },
10639
+ * { 'user': 'fred', 'age': 40, 'active': false }
10640
+ * ];
10641
+ *
10642
+ * _.filter(users, function(o) { return !o.active; });
10643
+ * // => objects for ['fred']
10644
+ *
10645
+ * // The `_.matches` iteratee shorthand.
10646
+ * _.filter(users, { 'age': 36, 'active': true });
10647
+ * // => objects for ['barney']
10648
+ *
10649
+ * // The `_.matchesProperty` iteratee shorthand.
10650
+ * _.filter(users, ['active', false]);
10651
+ * // => objects for ['fred']
10652
+ *
10653
+ * // The `_.property` iteratee shorthand.
10654
+ * _.filter(users, 'active');
10655
+ * // => objects for ['barney']
10656
+ */
10657
+ function filter(collection, predicate) {
10658
+ var func = isArray(collection) ? arrayFilter : baseFilter;
10659
+ return func(collection, getIteratee(predicate, 3));
10660
+ }
10661
 
10662
+ /**
10663
+ * Iterates over elements of `collection`, returning the first element
10664
+ * `predicate` returns truthy for. The predicate is invoked with three
10665
+ * arguments: (value, index|key, collection).
10666
+ *
10667
+ * @static
10668
+ * @memberOf _
10669
+ * @since 0.1.0
10670
+ * @category Collection
10671
+ * @param {Array|Object} collection The collection to inspect.
10672
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
10673
+ * @param {number} [fromIndex=0] The index to search from.
10674
+ * @returns {*} Returns the matched element, else `undefined`.
10675
+ * @example
10676
+ *
10677
+ * var users = [
10678
+ * { 'user': 'barney', 'age': 36, 'active': true },
10679
+ * { 'user': 'fred', 'age': 40, 'active': false },
10680
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
10681
+ * ];
10682
+ *
10683
+ * _.find(users, function(o) { return o.age < 40; });
10684
+ * // => object for 'barney'
10685
+ *
10686
+ * // The `_.matches` iteratee shorthand.
10687
+ * _.find(users, { 'age': 1, 'active': true });
10688
+ * // => object for 'pebbles'
10689
+ *
10690
+ * // The `_.matchesProperty` iteratee shorthand.
10691
+ * _.find(users, ['active', false]);
10692
+ * // => object for 'fred'
10693
+ *
10694
+ * // The `_.property` iteratee shorthand.
10695
+ * _.find(users, 'active');
10696
+ * // => object for 'barney'
10697
+ */
10698
+ var find = createFind(findIndex);
10699
 
10700
+ /**
10701
+ * This method is like `_.find` except that it iterates over elements of
10702
+ * `collection` from right to left.
10703
+ *
10704
+ * @static
10705
+ * @memberOf _
10706
+ * @since 2.0.0
10707
+ * @category Collection
10708
+ * @param {Array|Object} collection The collection to inspect.
10709
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
10710
+ * @param {number} [fromIndex=collection.length-1] The index to search from.
10711
+ * @returns {*} Returns the matched element, else `undefined`.
10712
+ * @example
10713
+ *
10714
+ * _.findLast([1, 2, 3, 4], function(n) {
10715
+ * return n % 2 == 1;
10716
+ * });
10717
+ * // => 3
10718
+ */
10719
+ var findLast = createFind(findLastIndex);
 
 
 
 
 
10720
 
10721
+ /**
10722
+ * Creates a flattened array of values by running each element in `collection`
10723
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
10724
+ * with three arguments: (value, index|key, collection).
10725
+ *
10726
+ * @static
10727
+ * @memberOf _
10728
+ * @since 4.0.0
10729
+ * @category Collection
10730
+ * @param {Array|Object} collection The collection to iterate over.
10731
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10732
+ * @returns {Array} Returns the new flattened array.
10733
+ * @example
10734
+ *
10735
+ * function duplicate(n) {
10736
+ * return [n, n];
10737
+ * }
10738
+ *
10739
+ * _.flatMap([1, 2], duplicate);
10740
+ * // => [1, 1, 2, 2]
10741
+ */
10742
+ function flatMap(collection, iteratee) {
10743
+ return baseFlatten(map(collection, iteratee), 1);
10744
+ }
10745
 
10746
+ /**
10747
+ * This method is like `_.flatMap` except that it recursively flattens the
10748
+ * mapped results.
10749
+ *
10750
+ * @static
10751
+ * @memberOf _
10752
+ * @since 4.7.0
10753
+ * @category Collection
10754
+ * @param {Array|Object} collection The collection to iterate over.
10755
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10756
+ * @returns {Array} Returns the new flattened array.
10757
+ * @example
10758
+ *
10759
+ * function duplicate(n) {
10760
+ * return [[[n, n]]];
10761
+ * }
10762
+ *
10763
+ * _.flatMapDeep([1, 2], duplicate);
10764
+ * // => [1, 1, 2, 2]
10765
+ */
10766
+ function flatMapDeep(collection, iteratee) {
10767
+ return baseFlatten(map(collection, iteratee), INFINITY);
10768
+ }
10769
 
10770
+ /**
10771
+ * This method is like `_.flatMap` except that it recursively flattens the
10772
+ * mapped results up to `depth` times.
10773
+ *
10774
+ * @static
10775
+ * @memberOf _
10776
+ * @since 4.7.0
10777
+ * @category Collection
10778
+ * @param {Array|Object} collection The collection to iterate over.
10779
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10780
+ * @param {number} [depth=1] The maximum recursion depth.
10781
+ * @returns {Array} Returns the new flattened array.
10782
+ * @example
10783
+ *
10784
+ * function duplicate(n) {
10785
+ * return [[[n, n]]];
10786
+ * }
10787
+ *
10788
+ * _.flatMapDepth([1, 2], duplicate, 2);
10789
+ * // => [[1, 1], [2, 2]]
10790
+ */
10791
+ function flatMapDepth(collection, iteratee, depth) {
10792
+ depth = depth === undefined ? 1 : toInteger(depth);
10793
+ return baseFlatten(map(collection, iteratee), depth);
10794
+ }
10795
 
10796
+ /**
10797
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
10798
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
10799
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
10800
+ *
10801
+ * **Note:** As with other "Collections" methods, objects with a "length"
10802
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
10803
+ * or `_.forOwn` for object iteration.
10804
+ *
10805
+ * @static
10806
+ * @memberOf _
10807
+ * @since 0.1.0
10808
+ * @alias each
10809
+ * @category Collection
10810
+ * @param {Array|Object} collection The collection to iterate over.
10811
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10812
+ * @returns {Array|Object} Returns `collection`.
10813
+ * @see _.forEachRight
10814
+ * @example
10815
+ *
10816
+ * _.forEach([1, 2], function(value) {
10817
+ * console.log(value);
10818
+ * });
10819
+ * // => Logs `1` then `2`.
10820
+ *
10821
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
10822
+ * console.log(key);
10823
+ * });
10824
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
10825
+ */
10826
+ function forEach(collection, iteratee) {
10827
+ var func = isArray(collection) ? arrayEach : baseEach;
10828
+ return func(collection, getIteratee(iteratee, 3));
10829
+ }
10830
 
10831
+ /**
10832
+ * This method is like `_.forEach` except that it iterates over elements of
10833
+ * `collection` from right to left.
10834
+ *
10835
+ * @static
10836
+ * @memberOf _
10837
+ * @since 2.0.0
10838
+ * @alias eachRight
10839
+ * @category Collection
10840
+ * @param {Array|Object} collection The collection to iterate over.
10841
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
10842
+ * @returns {Array|Object} Returns `collection`.
10843
+ * @see _.forEach
10844
+ * @example
10845
+ *
10846
+ * _.forEachRight([1, 2], function(value) {
10847
+ * console.log(value);
10848
+ * });
10849
+ * // => Logs `2` then `1`.
10850
+ */
10851
+ function forEachRight(collection, iteratee) {
10852
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
10853
+ return func(collection, getIteratee(iteratee, 3));
10854
+ }
10855
 
10856
+ /**
10857
+ * Creates an object composed of keys generated from the results of running
10858
+ * each element of `collection` thru `iteratee`. The order of grouped values
10859
+ * is determined by the order they occur in `collection`. The corresponding
10860
+ * value of each key is an array of elements responsible for generating the
10861
+ * key. The iteratee is invoked with one argument: (value).
10862
+ *
10863
+ * @static
10864
+ * @memberOf _
10865
+ * @since 0.1.0
10866
+ * @category Collection
10867
+ * @param {Array|Object} collection The collection to iterate over.
10868
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10869
+ * @returns {Object} Returns the composed aggregate object.
10870
+ * @example
10871
+ *
10872
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
10873
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
10874
+ *
10875
+ * // The `_.property` iteratee shorthand.
10876
+ * _.groupBy(['one', 'two', 'three'], 'length');
10877
+ * // => { '3': ['one', 'two'], '5': ['three'] }
10878
+ */
10879
+ var groupBy = createAggregator(function(result, value, key) {
10880
+ if (hasOwnProperty.call(result, key)) {
10881
+ result[key].push(value);
10882
  } else {
10883
+ baseAssignValue(result, key, [value]);
10884
  }
10885
+ });
10886
 
10887
+ /**
10888
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
10889
+ * checked for a substring of `value`, otherwise
10890
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
10891
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
10892
+ * the offset from the end of `collection`.
10893
+ *
10894
+ * @static
10895
+ * @memberOf _
10896
+ * @since 0.1.0
10897
+ * @category Collection
10898
+ * @param {Array|Object|string} collection The collection to inspect.
10899
+ * @param {*} value The value to search for.
10900
+ * @param {number} [fromIndex=0] The index to search from.
10901
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
10902
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
10903
+ * @example
10904
+ *
10905
+ * _.includes([1, 2, 3], 1);
10906
+ * // => true
10907
+ *
10908
+ * _.includes([1, 2, 3], 1, 2);
10909
+ * // => false
10910
+ *
10911
+ * _.includes({ 'a': 1, 'b': 2 }, 1);
10912
+ * // => true
10913
+ *
10914
+ * _.includes('abcd', 'bc');
10915
+ * // => true
10916
+ */
10917
+ function includes(collection, value, fromIndex, guard) {
10918
+ collection = isArrayLike(collection) ? collection : values(collection);
10919
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
10920
 
10921
+ var length = collection.length;
10922
+ if (fromIndex < 0) {
10923
+ fromIndex = nativeMax(length + fromIndex, 0);
10924
  }
10925
+ return isString(collection)
10926
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
10927
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
10928
+ }
10929
+
10930
+ /**
10931
+ * Invokes the method at `path` of each element in `collection`, returning
10932
+ * an array of the results of each invoked method. Any additional arguments
10933
+ * are provided to each invoked method. If `path` is a function, it's invoked
10934
+ * for, and `this` bound to, each element in `collection`.
10935
+ *
10936
+ * @static
10937
+ * @memberOf _
10938
+ * @since 4.0.0
10939
+ * @category Collection
10940
+ * @param {Array|Object} collection The collection to iterate over.
10941
+ * @param {Array|Function|string} path The path of the method to invoke or
10942
+ * the function invoked per iteration.
10943
+ * @param {...*} [args] The arguments to invoke each method with.
10944
+ * @returns {Array} Returns the array of results.
10945
+ * @example
10946
+ *
10947
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
10948
+ * // => [[1, 5, 7], [1, 2, 3]]
10949
+ *
10950
+ * _.invokeMap([123, 456], String.prototype.split, '');
10951
+ * // => [['1', '2', '3'], ['4', '5', '6']]
10952
+ */
10953
+ var invokeMap = baseRest(function(collection, path, args) {
10954
+ var index = -1,
10955
+ isFunc = typeof path == 'function',
10956
+ result = isArrayLike(collection) ? Array(collection.length) : [];
10957
+
10958
+ baseEach(collection, function(value) {
10959
+ result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
10960
+ });
10961
+ return result;
10962
+ });
10963
+
10964
+ /**
10965
+ * Creates an object composed of keys generated from the results of running
10966
+ * each element of `collection` thru `iteratee`. The corresponding value of
10967
+ * each key is the last element responsible for generating the key. The
10968
+ * iteratee is invoked with one argument: (value).
10969
+ *
10970
+ * @static
10971
+ * @memberOf _
10972
+ * @since 4.0.0
10973
+ * @category Collection
10974
+ * @param {Array|Object} collection The collection to iterate over.
10975
+ * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
10976
+ * @returns {Object} Returns the composed aggregate object.
10977
+ * @example
10978
+ *
10979
+ * var array = [
10980
+ * { 'dir': 'left', 'code': 97 },
10981
+ * { 'dir': 'right', 'code': 100 }
10982
+ * ];
10983
+ *
10984
+ * _.keyBy(array, function(o) {
10985
+ * return String.fromCharCode(o.code);
10986
+ * });
10987
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
10988
+ *
10989
+ * _.keyBy(array, 'dir');
10990
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
10991
+ */
10992
+ var keyBy = createAggregator(function(result, value, key) {
10993
+ baseAssignValue(result, key, value);
10994
+ });
10995
 
10996
+ /**
10997
+ * Creates an array of values by running each element in `collection` thru
10998
+ * `iteratee`. The iteratee is invoked with three arguments:
10999
+ * (value, index|key, collection).
11000
+ *
11001
+ * Many lodash methods are guarded to work as iteratees for methods like
11002
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
11003
+ *
11004
+ * The guarded methods are:
11005
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
11006
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
11007
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
11008
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
11009
+ *
11010
+ * @static
11011
+ * @memberOf _
11012
+ * @since 0.1.0
11013
+ * @category Collection
11014
+ * @param {Array|Object} collection The collection to iterate over.
11015
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11016
+ * @returns {Array} Returns the new mapped array.
11017
+ * @example
11018
+ *
11019
+ * function square(n) {
11020
+ * return n * n;
11021
+ * }
11022
+ *
11023
+ * _.map([4, 8], square);
11024
+ * // => [16, 64]
11025
+ *
11026
+ * _.map({ 'a': 4, 'b': 8 }, square);
11027
+ * // => [16, 64] (iteration order is not guaranteed)
11028
+ *
11029
+ * var users = [
11030
+ * { 'user': 'barney' },
11031
+ * { 'user': 'fred' }
11032
+ * ];
11033
+ *
11034
+ * // The `_.property` iteratee shorthand.
11035
+ * _.map(users, 'user');
11036
+ * // => ['barney', 'fred']
11037
+ */
11038
+ function map(collection, iteratee) {
11039
+ var func = isArray(collection) ? arrayMap : baseMap;
11040
+ return func(collection, getIteratee(iteratee, 3));
11041
  }
 
11042
 
11043
+ /**
11044
+ * This method is like `_.sortBy` except that it allows specifying the sort
11045
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
11046
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
11047
+ * descending or "asc" for ascending sort order of corresponding values.
11048
+ *
11049
+ * @static
11050
+ * @memberOf _
11051
+ * @since 4.0.0
11052
+ * @category Collection
11053
+ * @param {Array|Object} collection The collection to iterate over.
11054
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
11055
+ * The iteratees to sort by.
11056
+ * @param {string[]} [orders] The sort orders of `iteratees`.
11057
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
11058
+ * @returns {Array} Returns the new sorted array.
11059
+ * @example
11060
+ *
11061
+ * var users = [
11062
+ * { 'user': 'fred', 'age': 48 },
11063
+ * { 'user': 'barney', 'age': 34 },
11064
+ * { 'user': 'fred', 'age': 40 },
11065
+ * { 'user': 'barney', 'age': 36 }
11066
+ * ];
11067
+ *
11068
+ * // Sort by `user` in ascending order and by `age` in descending order.
11069
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
11070
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11071
+ */
11072
+ function orderBy(collection, iteratees, orders, guard) {
11073
+ if (collection == null) {
11074
+ return [];
11075
  }
11076
+ if (!isArray(iteratees)) {
11077
+ iteratees = iteratees == null ? [] : [iteratees];
11078
+ }
11079
+ orders = guard ? undefined : orders;
11080
+ if (!isArray(orders)) {
11081
+ orders = orders == null ? [] : [orders];
11082
  }
11083
+ return baseOrderBy(collection, iteratees, orders);
11084
  }
 
 
 
11085
 
11086
+ /**
11087
+ * Creates an array of elements split into two groups, the first of which
11088
+ * contains elements `predicate` returns truthy for, the second of which
11089
+ * contains elements `predicate` returns falsey for. The predicate is
11090
+ * invoked with one argument: (value).
11091
+ *
11092
+ * @static
11093
+ * @memberOf _
11094
+ * @since 3.0.0
11095
+ * @category Collection
11096
+ * @param {Array|Object} collection The collection to iterate over.
11097
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11098
+ * @returns {Array} Returns the array of grouped elements.
11099
+ * @example
11100
+ *
11101
+ * var users = [
11102
+ * { 'user': 'barney', 'age': 36, 'active': false },
11103
+ * { 'user': 'fred', 'age': 40, 'active': true },
11104
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
11105
+ * ];
11106
+ *
11107
+ * _.partition(users, function(o) { return o.active; });
11108
+ * // => objects for [['fred'], ['barney', 'pebbles']]
11109
+ *
11110
+ * // The `_.matches` iteratee shorthand.
11111
+ * _.partition(users, { 'age': 1, 'active': false });
11112
+ * // => objects for [['pebbles'], ['barney', 'fred']]
11113
+ *
11114
+ * // The `_.matchesProperty` iteratee shorthand.
11115
+ * _.partition(users, ['active', false]);
11116
+ * // => objects for [['barney', 'pebbles'], ['fred']]
11117
+ *
11118
+ * // The `_.property` iteratee shorthand.
11119
+ * _.partition(users, 'active');
11120
+ * // => objects for [['fred'], ['barney', 'pebbles']]
11121
+ */
11122
+ var partition = createAggregator(function(result, value, key) {
11123
+ result[key ? 0 : 1].push(value);
11124
+ }, function() { return [[], []]; });
11125
 
11126
+ /**
11127
+ * Reduces `collection` to a value which is the accumulated result of running
11128
+ * each element in `collection` thru `iteratee`, where each successive
11129
+ * invocation is supplied the return value of the previous. If `accumulator`
11130
+ * is not given, the first element of `collection` is used as the initial
11131
+ * value. The iteratee is invoked with four arguments:
11132
+ * (accumulator, value, index|key, collection).
11133
+ *
11134
+ * Many lodash methods are guarded to work as iteratees for methods like
11135
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
11136
+ *
11137
+ * The guarded methods are:
11138
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
11139
+ * and `sortBy`
11140
+ *
11141
+ * @static
11142
+ * @memberOf _
11143
+ * @since 0.1.0
11144
+ * @category Collection
11145
+ * @param {Array|Object} collection The collection to iterate over.
11146
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11147
+ * @param {*} [accumulator] The initial value.
11148
+ * @returns {*} Returns the accumulated value.
11149
+ * @see _.reduceRight
11150
+ * @example
11151
+ *
11152
+ * _.reduce([1, 2], function(sum, n) {
11153
+ * return sum + n;
11154
+ * }, 0);
11155
+ * // => 3
11156
+ *
11157
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
11158
+ * (result[value] || (result[value] = [])).push(key);
11159
+ * return result;
11160
+ * }, {});
11161
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
11162
+ */
11163
+ function reduce(collection, iteratee, accumulator) {
11164
+ var func = isArray(collection) ? arrayReduce : baseReduce,
11165
+ initAccum = arguments.length < 3;
11166
 
11167
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
 
 
11168
  }
 
 
 
 
 
 
 
 
 
 
11169
 
11170
+ /**
11171
+ * This method is like `_.reduce` except that it iterates over elements of
11172
+ * `collection` from right to left.
11173
+ *
11174
+ * @static
11175
+ * @memberOf _
11176
+ * @since 0.1.0
11177
+ * @category Collection
11178
+ * @param {Array|Object} collection The collection to iterate over.
11179
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
11180
+ * @param {*} [accumulator] The initial value.
11181
+ * @returns {*} Returns the accumulated value.
11182
+ * @see _.reduce
11183
+ * @example
11184
+ *
11185
+ * var array = [[0, 1], [2, 3], [4, 5]];
11186
+ *
11187
+ * _.reduceRight(array, function(flattened, other) {
11188
+ * return flattened.concat(other);
11189
+ * }, []);
11190
+ * // => [4, 5, 2, 3, 0, 1]
11191
+ */
11192
+ function reduceRight(collection, iteratee, accumulator) {
11193
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
11194
+ initAccum = arguments.length < 3;
 
 
 
 
 
 
 
 
 
 
11195
 
11196
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
11197
+ }
11198
 
11199
+ /**
11200
+ * The opposite of `_.filter`; this method returns the elements of `collection`
11201
+ * that `predicate` does **not** return truthy for.
11202
+ *
11203
+ * @static
11204
+ * @memberOf _
11205
+ * @since 0.1.0
11206
+ * @category Collection
11207
+ * @param {Array|Object} collection The collection to iterate over.
11208
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11209
+ * @returns {Array} Returns the new filtered array.
11210
+ * @see _.filter
11211
+ * @example
11212
+ *
11213
+ * var users = [
11214
+ * { 'user': 'barney', 'age': 36, 'active': false },
11215
+ * { 'user': 'fred', 'age': 40, 'active': true }
11216
+ * ];
11217
+ *
11218
+ * _.reject(users, function(o) { return !o.active; });
11219
+ * // => objects for ['fred']
11220
+ *
11221
+ * // The `_.matches` iteratee shorthand.
11222
+ * _.reject(users, { 'age': 40, 'active': true });
11223
+ * // => objects for ['barney']
11224
+ *
11225
+ * // The `_.matchesProperty` iteratee shorthand.
11226
+ * _.reject(users, ['active', false]);
11227
+ * // => objects for ['fred']
11228
+ *
11229
+ * // The `_.property` iteratee shorthand.
11230
+ * _.reject(users, 'active');
11231
+ * // => objects for ['barney']
11232
+ */
11233
+ function reject(collection, predicate) {
11234
+ var func = isArray(collection) ? arrayFilter : baseFilter;
11235
+ return func(collection, negate(getIteratee(predicate, 3)));
11236
+ }
11237
 
11238
+ /**
11239
+ * Gets a random element from `collection`.
11240
+ *
11241
+ * @static
11242
+ * @memberOf _
11243
+ * @since 2.0.0
11244
+ * @category Collection
11245
+ * @param {Array|Object} collection The collection to sample.
11246
+ * @returns {*} Returns the random element.
11247
+ * @example
11248
+ *
11249
+ * _.sample([1, 2, 3, 4]);
11250
+ * // => 2
11251
+ */
11252
+ function sample(collection) {
11253
+ var func = isArray(collection) ? arraySample : baseSample;
11254
+ return func(collection);
11255
+ }
11256
 
11257
+ /**
11258
+ * Gets `n` random elements at unique keys from `collection` up to the
11259
+ * size of `collection`.
11260
+ *
11261
+ * @static
11262
+ * @memberOf _
11263
+ * @since 4.0.0
11264
+ * @category Collection
11265
+ * @param {Array|Object} collection The collection to sample.
11266
+ * @param {number} [n=1] The number of elements to sample.
11267
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11268
+ * @returns {Array} Returns the random elements.
11269
+ * @example
11270
+ *
11271
+ * _.sampleSize([1, 2, 3], 2);
11272
+ * // => [3, 1]
11273
+ *
11274
+ * _.sampleSize([1, 2, 3], 4);
11275
+ * // => [2, 3, 1]
11276
+ */
11277
+ function sampleSize(collection, n, guard) {
11278
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
11279
+ n = 1;
11280
+ } else {
11281
+ n = toInteger(n);
11282
+ }
11283
+ var func = isArray(collection) ? arraySampleSize : baseSampleSize;
11284
+ return func(collection, n);
11285
  }
11286
 
11287
+ /**
11288
+ * Creates an array of shuffled values, using a version of the
11289
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
11290
+ *
11291
+ * @static
11292
+ * @memberOf _
11293
+ * @since 0.1.0
11294
+ * @category Collection
11295
+ * @param {Array|Object} collection The collection to shuffle.
11296
+ * @returns {Array} Returns the new shuffled array.
11297
+ * @example
11298
+ *
11299
+ * _.shuffle([1, 2, 3, 4]);
11300
+ * // => [4, 1, 3, 2]
11301
+ */
11302
+ function shuffle(collection) {
11303
+ var func = isArray(collection) ? arrayShuffle : baseShuffle;
11304
+ return func(collection);
11305
+ }
11306
 
11307
+ /**
11308
+ * Gets the size of `collection` by returning its length for array-like
11309
+ * values or the number of own enumerable string keyed properties for objects.
11310
+ *
11311
+ * @static
11312
+ * @memberOf _
11313
+ * @since 0.1.0
11314
+ * @category Collection
11315
+ * @param {Array|Object|string} collection The collection to inspect.
11316
+ * @returns {number} Returns the collection size.
11317
+ * @example
11318
+ *
11319
+ * _.size([1, 2, 3]);
11320
+ * // => 3
11321
+ *
11322
+ * _.size({ 'a': 1, 'b': 2 });
11323
+ * // => 2
11324
+ *
11325
+ * _.size('pebbles');
11326
+ * // => 7
11327
+ */
11328
+ function size(collection) {
11329
+ if (collection == null) {
11330
+ return 0;
11331
+ }
11332
+ if (isArrayLike(collection)) {
11333
+ return isString(collection) ? stringSize(collection) : collection.length;
11334
+ }
11335
+ var tag = getTag(collection);
11336
+ if (tag == mapTag || tag == setTag) {
11337
+ return collection.size;
11338
+ }
11339
+ return baseKeys(collection).length;
11340
+ }
11341
 
11342
+ /**
11343
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
11344
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
11345
+ * invoked with three arguments: (value, index|key, collection).
11346
+ *
11347
+ * @static
11348
+ * @memberOf _
11349
+ * @since 0.1.0
11350
+ * @category Collection
11351
+ * @param {Array|Object} collection The collection to iterate over.
11352
+ * @param {Function} [predicate=_.identity] The function invoked per iteration.
11353
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11354
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
11355
+ * else `false`.
11356
+ * @example
11357
+ *
11358
+ * _.some([null, 0, 'yes', false], Boolean);
11359
+ * // => true
11360
+ *
11361
+ * var users = [
11362
+ * { 'user': 'barney', 'active': true },
11363
+ * { 'user': 'fred', 'active': false }
11364
+ * ];
11365
+ *
11366
+ * // The `_.matches` iteratee shorthand.
11367
+ * _.some(users, { 'user': 'barney', 'active': false });
11368
+ * // => false
11369
+ *
11370
+ * // The `_.matchesProperty` iteratee shorthand.
11371
+ * _.some(users, ['active', false]);
11372
+ * // => true
11373
+ *
11374
+ * // The `_.property` iteratee shorthand.
11375
+ * _.some(users, 'active');
11376
+ * // => true
11377
+ */
11378
+ function some(collection, predicate, guard) {
11379
+ var func = isArray(collection) ? arraySome : baseSome;
11380
+ if (guard && isIterateeCall(collection, predicate, guard)) {
11381
+ predicate = undefined;
11382
+ }
11383
+ return func(collection, getIteratee(predicate, 3));
11384
+ }
11385
 
11386
+ /**
11387
+ * Creates an array of elements, sorted in ascending order by the results of
11388
+ * running each element in a collection thru each iteratee. This method
11389
+ * performs a stable sort, that is, it preserves the original sort order of
11390
+ * equal elements. The iteratees are invoked with one argument: (value).
11391
+ *
11392
+ * @static
11393
+ * @memberOf _
11394
+ * @since 0.1.0
11395
+ * @category Collection
11396
+ * @param {Array|Object} collection The collection to iterate over.
11397
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
11398
+ * The iteratees to sort by.
11399
+ * @returns {Array} Returns the new sorted array.
11400
+ * @example
11401
+ *
11402
+ * var users = [
11403
+ * { 'user': 'fred', 'age': 48 },
11404
+ * { 'user': 'barney', 'age': 36 },
11405
+ * { 'user': 'fred', 'age': 40 },
11406
+ * { 'user': 'barney', 'age': 34 }
11407
+ * ];
11408
+ *
11409
+ * _.sortBy(users, [function(o) { return o.user; }]);
11410
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
11411
+ *
11412
+ * _.sortBy(users, ['user', 'age']);
11413
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
11414
+ */
11415
+ var sortBy = baseRest(function(collection, iteratees) {
11416
+ if (collection == null) {
11417
+ return [];
11418
+ }
11419
+ var length = iteratees.length;
11420
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
11421
+ iteratees = [];
11422
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
11423
+ iteratees = [iteratees[0]];
11424
+ }
11425
+ return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
11426
+ });
11427
 
11428
+ /*------------------------------------------------------------------------*/
 
 
 
 
11429
 
11430
+ /**
11431
+ * Gets the timestamp of the number of milliseconds that have elapsed since
11432
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
11433
+ *
11434
+ * @static
11435
+ * @memberOf _
11436
+ * @since 2.4.0
11437
+ * @category Date
11438
+ * @returns {number} Returns the timestamp.
11439
+ * @example
11440
+ *
11441
+ * _.defer(function(stamp) {
11442
+ * console.log(_.now() - stamp);
11443
+ * }, _.now());
11444
+ * // => Logs the number of milliseconds it took for the deferred invocation.
11445
+ */
11446
+ var now = ctxNow || function() {
11447
+ return root.Date.now();
11448
+ };
11449
 
11450
+ /*------------------------------------------------------------------------*/
 
 
 
 
11451
 
11452
+ /**
11453
+ * The opposite of `_.before`; this method creates a function that invokes
11454
+ * `func` once it's called `n` or more times.
11455
+ *
11456
+ * @static
11457
+ * @memberOf _
11458
+ * @since 0.1.0
11459
+ * @category Function
11460
+ * @param {number} n The number of calls before `func` is invoked.
11461
+ * @param {Function} func The function to restrict.
11462
+ * @returns {Function} Returns the new restricted function.
11463
+ * @example
11464
+ *
11465
+ * var saves = ['profile', 'settings'];
11466
+ *
11467
+ * var done = _.after(saves.length, function() {
11468
+ * console.log('done saving!');
11469
+ * });
11470
+ *
11471
+ * _.forEach(saves, function(type) {
11472
+ * asyncSave({ 'type': type, 'complete': done });
11473
+ * });
11474
+ * // => Logs 'done saving!' after the two async saves have completed.
11475
+ */
11476
+ function after(n, func) {
11477
+ if (typeof func != 'function') {
11478
+ throw new TypeError(FUNC_ERROR_TEXT);
11479
  }
11480
+ n = toInteger(n);
11481
+ return function() {
11482
+ if (--n < 1) {
11483
+ return func.apply(this, arguments);
11484
+ }
11485
+ };
11486
+ }
 
 
 
 
 
 
 
 
11487
 
11488
+ /**
11489
+ * Creates a function that invokes `func`, with up to `n` arguments,
11490
+ * ignoring any additional arguments.
11491
+ *
11492
+ * @static
11493
+ * @memberOf _
11494
+ * @since 3.0.0
11495
+ * @category Function
11496
+ * @param {Function} func The function to cap arguments for.
11497
+ * @param {number} [n=func.length] The arity cap.
11498
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11499
+ * @returns {Function} Returns the new capped function.
11500
+ * @example
11501
+ *
11502
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
11503
+ * // => [6, 8, 10]
11504
+ */
11505
+ function ary(func, n, guard) {
11506
+ n = guard ? undefined : n;
11507
+ n = (func && n == null) ? func.length : n;
11508
+ return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
11509
+ }
11510
 
11511
+ /**
11512
+ * Creates a function that invokes `func`, with the `this` binding and arguments
11513
+ * of the created function, while it's called less than `n` times. Subsequent
11514
+ * calls to the created function return the result of the last `func` invocation.
11515
+ *
11516
+ * @static
11517
+ * @memberOf _
11518
+ * @since 3.0.0
11519
+ * @category Function
11520
+ * @param {number} n The number of calls at which `func` is no longer invoked.
11521
+ * @param {Function} func The function to restrict.
11522
+ * @returns {Function} Returns the new restricted function.
11523
+ * @example
11524
+ *
11525
+ * jQuery(element).on('click', _.before(5, addContactToList));
11526
+ * // => Allows adding up to 4 contacts to the list.
11527
+ */
11528
+ function before(n, func) {
11529
+ var result;
11530
+ if (typeof func != 'function') {
11531
+ throw new TypeError(FUNC_ERROR_TEXT);
11532
  }
11533
+ n = toInteger(n);
11534
+ return function() {
11535
+ if (--n > 0) {
11536
+ result = func.apply(this, arguments);
11537
+ }
11538
+ if (n <= 1) {
11539
+ func = undefined;
11540
+ }
11541
+ return result;
11542
+ };
11543
  }
11544
+
11545
+ /**
11546
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
11547
+ * and `partials` prepended to the arguments it receives.
11548
+ *
11549
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
11550
+ * may be used as a placeholder for partially applied arguments.
11551
+ *
11552
+ * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
11553
+ * property of bound functions.
11554
+ *
11555
+ * @static
11556
+ * @memberOf _
11557
+ * @since 0.1.0
11558
+ * @category Function
11559
+ * @param {Function} func The function to bind.
11560
+ * @param {*} thisArg The `this` binding of `func`.
11561
+ * @param {...*} [partials] The arguments to be partially applied.
11562
+ * @returns {Function} Returns the new bound function.
11563
+ * @example
11564
+ *
11565
+ * function greet(greeting, punctuation) {
11566
+ * return greeting + ' ' + this.user + punctuation;
11567
+ * }
11568
+ *
11569
+ * var object = { 'user': 'fred' };
11570
+ *
11571
+ * var bound = _.bind(greet, object, 'hi');
11572
+ * bound('!');
11573
+ * // => 'hi fred!'
11574
+ *
11575
+ * // Bound with placeholders.
11576
+ * var bound = _.bind(greet, object, _, '!');
11577
+ * bound('hi');
11578
+ * // => 'hi fred!'
11579
+ */
11580
+ var bind = baseRest(function(func, thisArg, partials) {
11581
+ var bitmask = WRAP_BIND_FLAG;
11582
+ if (partials.length) {
11583
+ var holders = replaceHolders(partials, getHolder(bind));
11584
+ bitmask |= WRAP_PARTIAL_FLAG;
11585
+ }
11586
+ return createWrap(func, bitmask, thisArg, partials, holders);
11587
+ });
11588
+
11589
+ /**
11590
+ * Creates a function that invokes the method at `object[key]` with `partials`
11591
+ * prepended to the arguments it receives.
11592
+ *
11593
+ * This method differs from `_.bind` by allowing bound functions to reference
11594
+ * methods that may be redefined or don't yet exist. See
11595
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
11596
+ * for more details.
11597
+ *
11598
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
11599
+ * builds, may be used as a placeholder for partially applied arguments.
11600
+ *
11601
+ * @static
11602
+ * @memberOf _
11603
+ * @since 0.10.0
11604
+ * @category Function
11605
+ * @param {Object} object The object to invoke the method on.
11606
+ * @param {string} key The key of the method.
11607
+ * @param {...*} [partials] The arguments to be partially applied.
11608
+ * @returns {Function} Returns the new bound function.
11609
+ * @example
11610
+ *
11611
+ * var object = {
11612
+ * 'user': 'fred',
11613
+ * 'greet': function(greeting, punctuation) {
11614
+ * return greeting + ' ' + this.user + punctuation;
11615
+ * }
11616
+ * };
11617
+ *
11618
+ * var bound = _.bindKey(object, 'greet', 'hi');
11619
+ * bound('!');
11620
+ * // => 'hi fred!'
11621
+ *
11622
+ * object.greet = function(greeting, punctuation) {
11623
+ * return greeting + 'ya ' + this.user + punctuation;
11624
+ * };
11625
+ *
11626
+ * bound('!');
11627
+ * // => 'hiya fred!'
11628
+ *
11629
+ * // Bound with placeholders.
11630
+ * var bound = _.bindKey(object, 'greet', _, '!');
11631
+ * bound('hi');
11632
+ * // => 'hiya fred!'
11633
+ */
11634
+ var bindKey = baseRest(function(object, key, partials) {
11635
+ var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
11636
+ if (partials.length) {
11637
+ var holders = replaceHolders(partials, getHolder(bindKey));
11638
+ bitmask |= WRAP_PARTIAL_FLAG;
11639
  }
11640
+ return createWrap(key, bitmask, object, partials, holders);
11641
+ });
11642
+
11643
+ /**
11644
+ * Creates a function that accepts arguments of `func` and either invokes
11645
+ * `func` returning its result, if at least `arity` number of arguments have
11646
+ * been provided, or returns a function that accepts the remaining `func`
11647
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
11648
+ * is not sufficient.
11649
+ *
11650
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
11651
+ * may be used as a placeholder for provided arguments.
11652
+ *
11653
+ * **Note:** This method doesn't set the "length" property of curried functions.
11654
+ *
11655
+ * @static
11656
+ * @memberOf _
11657
+ * @since 2.0.0
11658
+ * @category Function
11659
+ * @param {Function} func The function to curry.
11660
+ * @param {number} [arity=func.length] The arity of `func`.
11661
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11662
+ * @returns {Function} Returns the new curried function.
11663
+ * @example
11664
+ *
11665
+ * var abc = function(a, b, c) {
11666
+ * return [a, b, c];
11667
+ * };
11668
+ *
11669
+ * var curried = _.curry(abc);
11670
+ *
11671
+ * curried(1)(2)(3);
11672
+ * // => [1, 2, 3]
11673
+ *
11674
+ * curried(1, 2)(3);
11675
+ * // => [1, 2, 3]
11676
+ *
11677
+ * curried(1, 2, 3);
11678
+ * // => [1, 2, 3]
11679
+ *
11680
+ * // Curried with placeholders.
11681
+ * curried(1)(_, 3)(2);
11682
+ * // => [1, 2, 3]
11683
+ */
11684
+ function curry(func, arity, guard) {
11685
+ arity = guard ? undefined : arity;
11686
+ var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11687
+ result.placeholder = curry.placeholder;
11688
+ return result;
11689
  }
 
 
 
 
 
 
 
 
 
 
 
 
11690
 
11691
+ /**
11692
+ * This method is like `_.curry` except that arguments are applied to `func`
11693
+ * in the manner of `_.partialRight` instead of `_.partial`.
11694
+ *
11695
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
11696
+ * builds, may be used as a placeholder for provided arguments.
11697
+ *
11698
+ * **Note:** This method doesn't set the "length" property of curried functions.
11699
+ *
11700
+ * @static
11701
+ * @memberOf _
11702
+ * @since 3.0.0
11703
+ * @category Function
11704
+ * @param {Function} func The function to curry.
11705
+ * @param {number} [arity=func.length] The arity of `func`.
11706
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
11707
+ * @returns {Function} Returns the new curried function.
11708
+ * @example
11709
+ *
11710
+ * var abc = function(a, b, c) {
11711
+ * return [a, b, c];
11712
+ * };
11713
+ *
11714
+ * var curried = _.curryRight(abc);
11715
+ *
11716
+ * curried(3)(2)(1);
11717
+ * // => [1, 2, 3]
11718
+ *
11719
+ * curried(2, 3)(1);
11720
+ * // => [1, 2, 3]
11721
+ *
11722
+ * curried(1, 2, 3);
11723
+ * // => [1, 2, 3]
11724
+ *
11725
+ * // Curried with placeholders.
11726
+ * curried(3)(1, _)(2);
11727
+ * // => [1, 2, 3]
11728
+ */
11729
+ function curryRight(func, arity, guard) {
11730
+ arity = guard ? undefined : arity;
11731
+ var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
11732
+ result.placeholder = curryRight.placeholder;
11733
+ return result;
11734
+ }
11735
 
11736
+ /**
11737
+ * Creates a debounced function that delays invoking `func` until after `wait`
11738
+ * milliseconds have elapsed since the last time the debounced function was
11739
+ * invoked. The debounced function comes with a `cancel` method to cancel
11740
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
11741
+ * Provide `options` to indicate whether `func` should be invoked on the
11742
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
11743
+ * with the last arguments provided to the debounced function. Subsequent
11744
+ * calls to the debounced function return the result of the last `func`
11745
+ * invocation.
11746
+ *
11747
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
11748
+ * invoked on the trailing edge of the timeout only if the debounced function
11749
+ * is invoked more than once during the `wait` timeout.
11750
+ *
11751
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
11752
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
11753
+ *
11754
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
11755
+ * for details over the differences between `_.debounce` and `_.throttle`.
11756
+ *
11757
+ * @static
11758
+ * @memberOf _
11759
+ * @since 0.1.0
11760
+ * @category Function
11761
+ * @param {Function} func The function to debounce.
11762
+ * @param {number} [wait=0] The number of milliseconds to delay.
11763
+ * @param {Object} [options={}] The options object.
11764
+ * @param {boolean} [options.leading=false]
11765
+ * Specify invoking on the leading edge of the timeout.
11766
+ * @param {number} [options.maxWait]
11767
+ * The maximum time `func` is allowed to be delayed before it's invoked.
11768
+ * @param {boolean} [options.trailing=true]
11769
+ * Specify invoking on the trailing edge of the timeout.
11770
+ * @returns {Function} Returns the new debounced function.
11771
+ * @example
11772
+ *
11773
+ * // Avoid costly calculations while the window size is in flux.
11774
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
11775
+ *
11776
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
11777
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
11778
+ * 'leading': true,
11779
+ * 'trailing': false
11780
+ * }));
11781
+ *
11782
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
11783
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
11784
+ * var source = new EventSource('/stream');
11785
+ * jQuery(source).on('message', debounced);
11786
+ *
11787
+ * // Cancel the trailing debounced invocation.
11788
+ * jQuery(window).on('popstate', debounced.cancel);
11789
+ */
11790
+ function debounce(func, wait, options) {
11791
+ var lastArgs,
11792
+ lastThis,
11793
+ maxWait,
11794
+ result,
11795
+ timerId,
11796
+ lastCallTime,
11797
+ lastInvokeTime = 0,
11798
+ leading = false,
11799
+ maxing = false,
11800
+ trailing = true;
11801
 
11802
+ if (typeof func != 'function') {
11803
+ throw new TypeError(FUNC_ERROR_TEXT);
11804
+ }
11805
+ wait = toNumber(wait) || 0;
11806
+ if (isObject(options)) {
11807
+ leading = !!options.leading;
11808
+ maxing = 'maxWait' in options;
11809
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
11810
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
11811
  }
11812
 
11813
+ function invokeFunc(time) {
11814
+ var args = lastArgs,
11815
+ thisArg = lastThis;
11816
+
11817
+ lastArgs = lastThis = undefined;
11818
+ lastInvokeTime = time;
11819
+ result = func.apply(thisArg, args);
11820
+ return result;
11821
  }
11822
 
11823
+ function leadingEdge(time) {
11824
+ // Reset any `maxWait` timer.
11825
+ lastInvokeTime = time;
11826
+ // Start the timer for the trailing edge.
11827
+ timerId = setTimeout(timerExpired, wait);
11828
+ // Invoke the leading edge.
11829
+ return leading ? invokeFunc(time) : result;
 
 
 
11830
  }
 
11831
 
11832
+ function remainingWait(time) {
11833
+ var timeSinceLastCall = time - lastCallTime,
11834
+ timeSinceLastInvoke = time - lastInvokeTime,
11835
+ timeWaiting = wait - timeSinceLastCall;
 
 
 
 
 
 
11836
 
11837
+ return maxing
11838
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
11839
+ : timeWaiting;
11840
+ }
11841
 
11842
+ function shouldInvoke(time) {
11843
+ var timeSinceLastCall = time - lastCallTime,
11844
+ timeSinceLastInvoke = time - lastInvokeTime;
 
 
 
 
 
 
11845
 
11846
+ // Either this is the first call, activity has stopped and we're at the
11847
+ // trailing edge, the system time has gone backwards and we're treating
11848
+ // it as the trailing edge, or we've hit the `maxWait` limit.
11849
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
11850
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
11851
+ }
11852
 
11853
+ function timerExpired() {
11854
+ var time = now();
11855
+ if (shouldInvoke(time)) {
11856
+ return trailingEdge(time);
11857
+ }
11858
+ // Restart the timer.
11859
+ timerId = setTimeout(timerExpired, remainingWait(time));
11860
+ }
11861
 
11862
+ function trailingEdge(time) {
11863
+ timerId = undefined;
11864
 
11865
+ // Only invoke if we have `lastArgs` which means `func` has been
11866
+ // debounced at least once.
11867
+ if (trailing && lastArgs) {
11868
+ return invokeFunc(time);
11869
+ }
11870
+ lastArgs = lastThis = undefined;
11871
+ return result;
11872
+ }
11873
 
11874
+ function cancel() {
11875
+ if (timerId !== undefined) {
11876
+ clearTimeout(timerId);
11877
+ }
11878
+ lastInvokeTime = 0;
11879
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
11880
+ }
11881
 
11882
+ function flush() {
11883
+ return timerId === undefined ? result : trailingEdge(now());
11884
+ }
11885
 
11886
+ function debounced() {
11887
+ var time = now(),
11888
+ isInvoking = shouldInvoke(time);
11889
 
11890
+ lastArgs = arguments;
11891
+ lastThis = this;
11892
+ lastCallTime = time;
11893
 
11894
+ if (isInvoking) {
11895
+ if (timerId === undefined) {
11896
+ return leadingEdge(lastCallTime);
11897
+ }
11898
+ if (maxing) {
11899
+ // Handle invocations in a tight loop.
11900
+ timerId = setTimeout(timerExpired, wait);
11901
+ return invokeFunc(lastCallTime);
11902
+ }
11903
+ }
11904
+ if (timerId === undefined) {
11905
+ timerId = setTimeout(timerExpired, wait);
11906
+ }
11907
+ return result;
11908
+ }
11909
+ debounced.cancel = cancel;
11910
+ debounced.flush = flush;
11911
+ return debounced;
11912
+ }
11913
 
11914
+ /**
11915
+ * Defers invoking the `func` until the current call stack has cleared. Any
11916
+ * additional arguments are provided to `func` when it's invoked.
11917
+ *
11918
+ * @static
11919
+ * @memberOf _
11920
+ * @since 0.1.0
11921
+ * @category Function
11922
+ * @param {Function} func The function to defer.
11923
+ * @param {...*} [args] The arguments to invoke `func` with.
11924
+ * @returns {number} Returns the timer id.
11925
+ * @example
11926
+ *
11927
+ * _.defer(function(text) {
11928
+ * console.log(text);
11929
+ * }, 'deferred');
11930
+ * // => Logs 'deferred' after one millisecond.
11931
+ */
11932
+ var defer = baseRest(function(func, args) {
11933
+ return baseDelay(func, 1, args);
11934
+ });
11935
 
11936
+ /**
11937
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
11938
+ * provided to `func` when it's invoked.
11939
+ *
11940
+ * @static
11941
+ * @memberOf _
11942
+ * @since 0.1.0
11943
+ * @category Function
11944
+ * @param {Function} func The function to delay.
11945
+ * @param {number} wait The number of milliseconds to delay invocation.
11946
+ * @param {...*} [args] The arguments to invoke `func` with.
11947
+ * @returns {number} Returns the timer id.
11948
+ * @example
11949
+ *
11950
+ * _.delay(function(text) {
11951
+ * console.log(text);
11952
+ * }, 1000, 'later');
11953
+ * // => Logs 'later' after one second.
11954
+ */
11955
+ var delay = baseRest(function(func, wait, args) {
11956
+ return baseDelay(func, toNumber(wait) || 0, args);
11957
+ });
11958
 
11959
+ /**
11960
+ * Creates a function that invokes `func` with arguments reversed.
11961
+ *
11962
+ * @static
11963
+ * @memberOf _
11964
+ * @since 4.0.0
11965
+ * @category Function
11966
+ * @param {Function} func The function to flip arguments for.
11967
+ * @returns {Function} Returns the new flipped function.
11968
+ * @example
11969
+ *
11970
+ * var flipped = _.flip(function() {
11971
+ * return _.toArray(arguments);
11972
+ * });
11973
+ *
11974
+ * flipped('a', 'b', 'c', 'd');
11975
+ * // => ['d', 'c', 'b', 'a']
11976
+ */
11977
+ function flip(func) {
11978
+ return createWrap(func, WRAP_FLIP_FLAG);
11979
+ }
11980
 
11981
+ /**
11982
+ * Creates a function that memoizes the result of `func`. If `resolver` is
11983
+ * provided, it determines the cache key for storing the result based on the
11984
+ * arguments provided to the memoized function. By default, the first argument
11985
+ * provided to the memoized function is used as the map cache key. The `func`
11986
+ * is invoked with the `this` binding of the memoized function.
11987
+ *
11988
+ * **Note:** The cache is exposed as the `cache` property on the memoized
11989
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
11990
+ * constructor with one whose instances implement the
11991
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
11992
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
11993
+ *
11994
+ * @static
11995
+ * @memberOf _
11996
+ * @since 0.1.0
11997
+ * @category Function
11998
+ * @param {Function} func The function to have its output memoized.
11999
+ * @param {Function} [resolver] The function to resolve the cache key.
12000
+ * @returns {Function} Returns the new memoized function.
12001
+ * @example
12002
+ *
12003
+ * var object = { 'a': 1, 'b': 2 };
12004
+ * var other = { 'c': 3, 'd': 4 };
12005
+ *
12006
+ * var values = _.memoize(_.values);
12007
+ * values(object);
12008
+ * // => [1, 2]
12009
+ *
12010
+ * values(other);
12011
+ * // => [3, 4]
12012
+ *
12013
+ * object.a = 2;
12014
+ * values(object);
12015
+ * // => [1, 2]
12016
+ *
12017
+ * // Modify the result cache.
12018
+ * values.cache.set(object, ['a', 'b']);
12019
+ * values(object);
12020
+ * // => ['a', 'b']
12021
+ *
12022
+ * // Replace `_.memoize.Cache`.
12023
+ * _.memoize.Cache = WeakMap;
12024
+ */
12025
+ function memoize(func, resolver) {
12026
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
12027
+ throw new TypeError(FUNC_ERROR_TEXT);
12028
+ }
12029
+ var memoized = function() {
12030
+ var args = arguments,
12031
+ key = resolver ? resolver.apply(this, args) : args[0],
12032
+ cache = memoized.cache;
12033
 
12034
+ if (cache.has(key)) {
12035
+ return cache.get(key);
12036
+ }
12037
+ var result = func.apply(this, args);
12038
+ memoized.cache = cache.set(key, result) || cache;
12039
+ return result;
12040
+ };
12041
+ memoized.cache = new (memoize.Cache || MapCache);
12042
+ return memoized;
12043
+ }
12044
 
12045
+ // Expose `MapCache`.
12046
+ memoize.Cache = MapCache;
12047
 
12048
+ /**
12049
+ * Creates a function that negates the result of the predicate `func`. The
12050
+ * `func` predicate is invoked with the `this` binding and arguments of the
12051
+ * created function.
12052
+ *
12053
+ * @static
12054
+ * @memberOf _
12055
+ * @since 3.0.0
12056
+ * @category Function
12057
+ * @param {Function} predicate The predicate to negate.
12058
+ * @returns {Function} Returns the new negated function.
12059
+ * @example
12060
+ *
12061
+ * function isEven(n) {
12062
+ * return n % 2 == 0;
12063
+ * }
12064
+ *
12065
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
12066
+ * // => [1, 3, 5]
12067
+ */
12068
+ function negate(predicate) {
12069
+ if (typeof predicate != 'function') {
12070
+ throw new TypeError(FUNC_ERROR_TEXT);
12071
+ }
12072
+ return function() {
12073
+ var args = arguments;
12074
+ switch (args.length) {
12075
+ case 0: return !predicate.call(this);
12076
+ case 1: return !predicate.call(this, args[0]);
12077
+ case 2: return !predicate.call(this, args[0], args[1]);
12078
+ case 3: return !predicate.call(this, args[0], args[1], args[2]);
12079
+ }
12080
+ return !predicate.apply(this, args);
12081
+ };
12082
+ }
12083
 
12084
+ /**
12085
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
12086
+ * to the function return the value of the first invocation. The `func` is
12087
+ * invoked with the `this` binding and arguments of the created function.
12088
+ *
12089
+ * @static
12090
+ * @memberOf _
12091
+ * @since 0.1.0
12092
+ * @category Function
12093
+ * @param {Function} func The function to restrict.
12094
+ * @returns {Function} Returns the new restricted function.
12095
+ * @example
12096
+ *
12097
+ * var initialize = _.once(createApplication);
12098
+ * initialize();
12099
+ * initialize();
12100
+ * // => `createApplication` is invoked once
12101
+ */
12102
+ function once(func) {
12103
+ return before(2, func);
12104
+ }
12105
 
12106
+ /**
12107
+ * Creates a function that invokes `func` with its arguments transformed.
12108
+ *
12109
+ * @static
12110
+ * @since 4.0.0
12111
+ * @memberOf _
12112
+ * @category Function
12113
+ * @param {Function} func The function to wrap.
12114
+ * @param {...(Function|Function[])} [transforms=[_.identity]]
12115
+ * The argument transforms.
12116
+ * @returns {Function} Returns the new function.
12117
+ * @example
12118
+ *
12119
+ * function doubled(n) {
12120
+ * return n * 2;
12121
+ * }
12122
+ *
12123
+ * function square(n) {
12124
+ * return n * n;
12125
+ * }
12126
+ *
12127
+ * var func = _.overArgs(function(x, y) {
12128
+ * return [x, y];
12129
+ * }, [square, doubled]);
12130
+ *
12131
+ * func(9, 3);
12132
+ * // => [81, 6]
12133
+ *
12134
+ * func(10, 5);
12135
+ * // => [100, 10]
12136
+ */
12137
+ var overArgs = castRest(function(func, transforms) {
12138
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
12139
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
12140
+ : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
12141
 
12142
+ var funcsLength = transforms.length;
12143
+ return baseRest(function(args) {
12144
+ var index = -1,
12145
+ length = nativeMin(args.length, funcsLength);
 
 
 
 
 
 
12146
 
12147
+ while (++index < length) {
12148
+ args[index] = transforms[index].call(this, args[index]);
12149
+ }
12150
+ return apply(func, this, args);
12151
+ });
12152
+ });
12153
 
12154
+ /**
12155
+ * Creates a function that invokes `func` with `partials` prepended to the
12156
+ * arguments it receives. This method is like `_.bind` except it does **not**
12157
+ * alter the `this` binding.
12158
+ *
12159
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
12160
+ * builds, may be used as a placeholder for partially applied arguments.
12161
+ *
12162
+ * **Note:** This method doesn't set the "length" property of partially
12163
+ * applied functions.
12164
+ *
12165
+ * @static
12166
+ * @memberOf _
12167
+ * @since 0.2.0
12168
+ * @category Function
12169
+ * @param {Function} func The function to partially apply arguments to.
12170
+ * @param {...*} [partials] The arguments to be partially applied.
12171
+ * @returns {Function} Returns the new partially applied function.
12172
+ * @example
12173
+ *
12174
+ * function greet(greeting, name) {
12175
+ * return greeting + ' ' + name;
12176
+ * }
12177
+ *
12178
+ * var sayHelloTo = _.partial(greet, 'hello');
12179
+ * sayHelloTo('fred');
12180
+ * // => 'hello fred'
12181
+ *
12182
+ * // Partially applied with placeholders.
12183
+ * var greetFred = _.partial(greet, _, 'fred');
12184
+ * greetFred('hi');
12185
+ * // => 'hi fred'
12186
+ */
12187
+ var partial = baseRest(function(func, partials) {
12188
+ var holders = replaceHolders(partials, getHolder(partial));
12189
+ return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
12190
+ });
12191
 
12192
+ /**
12193
+ * This method is like `_.partial` except that partially applied arguments
12194
+ * are appended to the arguments it receives.
12195
+ *
12196
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
12197
+ * builds, may be used as a placeholder for partially applied arguments.
12198
+ *
12199
+ * **Note:** This method doesn't set the "length" property of partially
12200
+ * applied functions.
12201
+ *
12202
+ * @static
12203
+ * @memberOf _
12204
+ * @since 1.0.0
12205
+ * @category Function
12206
+ * @param {Function} func The function to partially apply arguments to.
12207
+ * @param {...*} [partials] The arguments to be partially applied.
12208
+ * @returns {Function} Returns the new partially applied function.
12209
+ * @example
12210
+ *
12211
+ * function greet(greeting, name) {
12212
+ * return greeting + ' ' + name;
12213
+ * }
12214
+ *
12215
+ * var greetFred = _.partialRight(greet, 'fred');
12216
+ * greetFred('hi');
12217
+ * // => 'hi fred'
12218
+ *
12219
+ * // Partially applied with placeholders.
12220
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
12221
+ * sayHelloTo('fred');
12222
+ * // => 'hello fred'
12223
+ */
12224
+ var partialRight = baseRest(function(func, partials) {
12225
+ var holders = replaceHolders(partials, getHolder(partialRight));
12226
+ return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
12227
+ });
12228
 
12229
+ /**
12230
+ * Creates a function that invokes `func` with arguments arranged according
12231
+ * to the specified `indexes` where the argument value at the first index is
12232
+ * provided as the first argument, the argument value at the second index is
12233
+ * provided as the second argument, and so on.
12234
+ *
12235
+ * @static
12236
+ * @memberOf _
12237
+ * @since 3.0.0
12238
+ * @category Function
12239
+ * @param {Function} func The function to rearrange arguments for.
12240
+ * @param {...(number|number[])} indexes The arranged argument indexes.
12241
+ * @returns {Function} Returns the new function.
12242
+ * @example
12243
+ *
12244
+ * var rearged = _.rearg(function(a, b, c) {
12245
+ * return [a, b, c];
12246
+ * }, [2, 0, 1]);
12247
+ *
12248
+ * rearged('b', 'c', 'a')
12249
+ * // => ['a', 'b', 'c']
12250
+ */
12251
+ var rearg = flatRest(function(func, indexes) {
12252
+ return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
12253
+ });
12254
 
12255
+ /**
12256
+ * Creates a function that invokes `func` with the `this` binding of the
12257
+ * created function and arguments from `start` and beyond provided as
12258
+ * an array.
12259
+ *
12260
+ * **Note:** This method is based on the
12261
+ * [rest parameter](https://mdn.io/rest_parameters).
12262
+ *
12263
+ * @static
12264
+ * @memberOf _
12265
+ * @since 4.0.0
12266
+ * @category Function
12267
+ * @param {Function} func The function to apply a rest parameter to.
12268
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
12269
+ * @returns {Function} Returns the new function.
12270
+ * @example
12271
+ *
12272
+ * var say = _.rest(function(what, names) {
12273
+ * return what + ' ' + _.initial(names).join(', ') +
12274
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
12275
+ * });
12276
+ *
12277
+ * say('hello', 'fred', 'barney', 'pebbles');
12278
+ * // => 'hello fred, barney, & pebbles'
12279
+ */
12280
+ function rest(func, start) {
12281
+ if (typeof func != 'function') {
12282
+ throw new TypeError(FUNC_ERROR_TEXT);
12283
+ }
12284
+ start = start === undefined ? start : toInteger(start);
12285
+ return baseRest(func, start);
12286
+ }
12287
 
12288
+ /**
12289
+ * Creates a function that invokes `func` with the `this` binding of the
12290
+ * create function and an array of arguments much like
12291
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
12292
+ *
12293
+ * **Note:** This method is based on the
12294
+ * [spread operator](https://mdn.io/spread_operator).
12295
+ *
12296
+ * @static
12297
+ * @memberOf _
12298
+ * @since 3.2.0
12299
+ * @category Function
12300
+ * @param {Function} func The function to spread arguments over.
12301
+ * @param {number} [start=0] The start position of the spread.
12302
+ * @returns {Function} Returns the new function.
12303
+ * @example
12304
+ *
12305
+ * var say = _.spread(function(who, what) {
12306
+ * return who + ' says ' + what;
12307
+ * });
12308
+ *
12309
+ * say(['fred', 'hello']);
12310
+ * // => 'fred says hello'
12311
+ *
12312
+ * var numbers = Promise.all([
12313
+ * Promise.resolve(40),
12314
+ * Promise.resolve(36)
12315
+ * ]);
12316
+ *
12317
+ * numbers.then(_.spread(function(x, y) {
12318
+ * return x + y;
12319
+ * }));
12320
+ * // => a Promise of 76
12321
+ */
12322
+ function spread(func, start) {
12323
+ if (typeof func != 'function') {
12324
+ throw new TypeError(FUNC_ERROR_TEXT);
12325
  }
12326
+ start = start == null ? 0 : nativeMax(toInteger(start), 0);
12327
+ return baseRest(function(args) {
12328
+ var array = args[start],
12329
+ otherArgs = castSlice(args, 0, start);
12330
 
12331
+ if (array) {
12332
+ arrayPush(otherArgs, array);
 
 
 
 
 
 
 
 
 
 
12333
  }
12334
+ return apply(func, this, otherArgs);
12335
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12336
  }
12337
 
12338
+ /**
12339
+ * Creates a throttled function that only invokes `func` at most once per
12340
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
12341
+ * method to cancel delayed `func` invocations and a `flush` method to
12342
+ * immediately invoke them. Provide `options` to indicate whether `func`
12343
+ * should be invoked on the leading and/or trailing edge of the `wait`
12344
+ * timeout. The `func` is invoked with the last arguments provided to the
12345
+ * throttled function. Subsequent calls to the throttled function return the
12346
+ * result of the last `func` invocation.
12347
+ *
12348
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
12349
+ * invoked on the trailing edge of the timeout only if the throttled function
12350
+ * is invoked more than once during the `wait` timeout.
12351
+ *
12352
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
12353
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
12354
+ *
12355
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
12356
+ * for details over the differences between `_.throttle` and `_.debounce`.
12357
+ *
12358
+ * @static
12359
+ * @memberOf _
12360
+ * @since 0.1.0
12361
+ * @category Function
12362
+ * @param {Function} func The function to throttle.
12363
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
12364
+ * @param {Object} [options={}] The options object.
12365
+ * @param {boolean} [options.leading=true]
12366
+ * Specify invoking on the leading edge of the timeout.
12367
+ * @param {boolean} [options.trailing=true]
12368
+ * Specify invoking on the trailing edge of the timeout.
12369
+ * @returns {Function} Returns the new throttled function.
12370
+ * @example
12371
+ *
12372
+ * // Avoid excessively updating the position while scrolling.
12373
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
12374
+ *
12375
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
12376
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
12377
+ * jQuery(element).on('click', throttled);
12378
+ *
12379
+ * // Cancel the trailing throttled invocation.
12380
+ * jQuery(window).on('popstate', throttled.cancel);
12381
+ */
12382
+ function throttle(func, wait, options) {
12383
+ var leading = true,
12384
+ trailing = true;
12385
 
12386
+ if (typeof func != 'function') {
12387
+ throw new TypeError(FUNC_ERROR_TEXT);
12388
  }
12389
+ if (isObject(options)) {
12390
+ leading = 'leading' in options ? !!options.leading : leading;
12391
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
 
 
12392
  }
12393
+ return debounce(func, wait, {
12394
+ 'leading': leading,
12395
+ 'maxWait': wait,
12396
+ 'trailing': trailing
12397
+ });
12398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12399
 
12400
+ /**
12401
+ * Creates a function that accepts up to one argument, ignoring any
12402
+ * additional arguments.
12403
+ *
12404
+ * @static
12405
+ * @memberOf _
12406
+ * @since 4.0.0
12407
+ * @category Function
12408
+ * @param {Function} func The function to cap arguments for.
12409
+ * @returns {Function} Returns the new capped function.
12410
+ * @example
12411
+ *
12412
+ * _.map(['6', '8', '10'], _.unary(parseInt));
12413
+ * // => [6, 8, 10]
12414
+ */
12415
+ function unary(func) {
12416
+ return ary(func, 1);
12417
  }
 
12418
 
12419
+ /**
12420
+ * Creates a function that provides `value` to `wrapper` as its first
12421
+ * argument. Any additional arguments provided to the function are appended
12422
+ * to those provided to the `wrapper`. The wrapper is invoked with the `this`
12423
+ * binding of the created function.
12424
+ *
12425
+ * @static
12426
+ * @memberOf _
12427
+ * @since 0.1.0
12428
+ * @category Function
12429
+ * @param {*} value The value to wrap.
12430
+ * @param {Function} [wrapper=identity] The wrapper function.
12431
+ * @returns {Function} Returns the new function.
12432
+ * @example
12433
+ *
12434
+ * var p = _.wrap(_.escape, function(func, text) {
12435
+ * return '<p>' + func(text) + '</p>';
12436
+ * });
12437
+ *
12438
+ * p('fred, barney, & pebbles');
12439
+ * // => '<p>fred, barney, &amp; pebbles</p>'
12440
+ */
12441
+ function wrap(value, wrapper) {
12442
+ return partial(castFunction(wrapper), value);
12443
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12444
 
12445
+ /*------------------------------------------------------------------------*/
 
 
 
 
 
 
12446
 
12447
+ /**
12448
+ * Casts `value` as an array if it's not one.
12449
+ *
12450
+ * @static
12451
+ * @memberOf _
12452
+ * @since 4.4.0
12453
+ * @category Lang
12454
+ * @param {*} value The value to inspect.
12455
+ * @returns {Array} Returns the cast array.
12456
+ * @example
12457
+ *
12458
+ * _.castArray(1);
12459
+ * // => [1]
12460
+ *
12461
+ * _.castArray({ 'a': 1 });
12462
+ * // => [{ 'a': 1 }]
12463
+ *
12464
+ * _.castArray('abc');
12465
+ * // => ['abc']
12466
+ *
12467
+ * _.castArray(null);
12468
+ * // => [null]
12469
+ *
12470
+ * _.castArray(undefined);
12471
+ * // => [undefined]
12472
+ *
12473
+ * _.castArray();
12474
+ * // => []
12475
+ *
12476
+ * var array = [1, 2, 3];
12477
+ * console.log(_.castArray(array) === array);
12478
+ * // => true
12479
+ */
12480
+ function castArray() {
12481
+ if (!arguments.length) {
12482
+ return [];
12483
+ }
12484
+ var value = arguments[0];
12485
+ return isArray(value) ? value : [value];
12486
+ }
12487
 
12488
+ /**
12489
+ * Creates a shallow clone of `value`.
12490
+ *
12491
+ * **Note:** This method is loosely based on the
12492
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
12493
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
12494
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
12495
+ * arrays. The own enumerable properties of `arguments` objects are cloned
12496
+ * as plain objects. An empty object is returned for uncloneable values such
12497
+ * as error objects, functions, DOM nodes, and WeakMaps.
12498
+ *
12499
+ * @static
12500
+ * @memberOf _
12501
+ * @since 0.1.0
12502
+ * @category Lang
12503
+ * @param {*} value The value to clone.
12504
+ * @returns {*} Returns the cloned value.
12505
+ * @see _.cloneDeep
12506
+ * @example
12507
+ *
12508
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
12509
+ *
12510
+ * var shallow = _.clone(objects);
12511
+ * console.log(shallow[0] === objects[0]);
12512
+ * // => true
12513
+ */
12514
+ function clone(value) {
12515
+ return baseClone(value, CLONE_SYMBOLS_FLAG);
12516
+ }
12517
 
12518
+ /**
12519
+ * This method is like `_.clone` except that it accepts `customizer` which
12520
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
12521
+ * cloning is handled by the method instead. The `customizer` is invoked with
12522
+ * up to four arguments; (value [, index|key, object, stack]).
12523
+ *
12524
+ * @static
12525
+ * @memberOf _
12526
+ * @since 4.0.0
12527
+ * @category Lang
12528
+ * @param {*} value The value to clone.
12529
+ * @param {Function} [customizer] The function to customize cloning.
12530
+ * @returns {*} Returns the cloned value.
12531
+ * @see _.cloneDeepWith
12532
+ * @example
12533
+ *
12534
+ * function customizer(value) {
12535
+ * if (_.isElement(value)) {
12536
+ * return value.cloneNode(false);
12537
+ * }
12538
+ * }
12539
+ *
12540
+ * var el = _.cloneWith(document.body, customizer);
12541
+ *
12542
+ * console.log(el === document.body);
12543
+ * // => false
12544
+ * console.log(el.nodeName);
12545
+ * // => 'BODY'
12546
+ * console.log(el.childNodes.length);
12547
+ * // => 0
12548
+ */
12549
+ function cloneWith(value, customizer) {
12550
+ customizer = typeof customizer == 'function' ? customizer : undefined;
12551
+ return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
12552
+ }
12553
 
12554
+ /**
12555
+ * This method is like `_.clone` except that it recursively clones `value`.
12556
+ *
12557
+ * @static
12558
+ * @memberOf _
12559
+ * @since 1.0.0
12560
+ * @category Lang
12561
+ * @param {*} value The value to recursively clone.
12562
+ * @returns {*} Returns the deep cloned value.
12563
+ * @see _.clone
12564
+ * @example
12565
+ *
12566
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
12567
+ *
12568
+ * var deep = _.cloneDeep(objects);
12569
+ * console.log(deep[0] === objects[0]);
12570
+ * // => false
12571
+ */
12572
+ function cloneDeep(value) {
12573
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
12574
+ }
12575
 
12576
+ /**
12577
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
12578
+ *
12579
+ * @static
12580
+ * @memberOf _
12581
+ * @since 4.0.0
12582
+ * @category Lang
12583
+ * @param {*} value The value to recursively clone.
12584
+ * @param {Function} [customizer] The function to customize cloning.
12585
+ * @returns {*} Returns the deep cloned value.
12586
+ * @see _.cloneWith
12587
+ * @example
12588
+ *
12589
+ * function customizer(value) {
12590
+ * if (_.isElement(value)) {
12591
+ * return value.cloneNode(true);
12592
+ * }
12593
+ * }
12594
+ *
12595
+ * var el = _.cloneDeepWith(document.body, customizer);
12596
+ *
12597
+ * console.log(el === document.body);
12598
+ * // => false
12599
+ * console.log(el.nodeName);
12600
+ * // => 'BODY'
12601
+ * console.log(el.childNodes.length);
12602
+ * // => 20
12603
+ */
12604
+ function cloneDeepWith(value, customizer) {
12605
+ customizer = typeof customizer == 'function' ? customizer : undefined;
12606
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
12607
+ }
12608
 
12609
+ /**
12610
+ * Checks if `object` conforms to `source` by invoking the predicate
12611
+ * properties of `source` with the corresponding property values of `object`.
12612
+ *
12613
+ * **Note:** This method is equivalent to `_.conforms` when `source` is
12614
+ * partially applied.
12615
+ *
12616
+ * @static
12617
+ * @memberOf _
12618
+ * @since 4.14.0
12619
+ * @category Lang
12620
+ * @param {Object} object The object to inspect.
12621
+ * @param {Object} source The object of property predicates to conform to.
12622
+ * @returns {boolean} Returns `true` if `object` conforms, else `false`.
12623
+ * @example
12624
+ *
12625
+ * var object = { 'a': 1, 'b': 2 };
12626
+ *
12627
+ * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
12628
+ * // => true
12629
+ *
12630
+ * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
12631
+ * // => false
12632
+ */
12633
+ function conformsTo(object, source) {
12634
+ return source == null || baseConformsTo(object, source, keys(source));
12635
+ }
12636
 
12637
+ /**
12638
+ * Performs a
12639
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
12640
+ * comparison between two values to determine if they are equivalent.
12641
+ *
12642
+ * @static
12643
+ * @memberOf _
12644
+ * @since 4.0.0
12645
+ * @category Lang
12646
+ * @param {*} value The value to compare.
12647
+ * @param {*} other The other value to compare.
12648
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
12649
+ * @example
12650
+ *
12651
+ * var object = { 'a': 1 };
12652
+ * var other = { 'a': 1 };
12653
+ *
12654
+ * _.eq(object, object);
12655
+ * // => true
12656
+ *
12657
+ * _.eq(object, other);
12658
+ * // => false
12659
+ *
12660
+ * _.eq('a', 'a');
12661
+ * // => true
12662
+ *
12663
+ * _.eq('a', Object('a'));
12664
+ * // => false
12665
+ *
12666
+ * _.eq(NaN, NaN);
12667
+ * // => true
12668
+ */
12669
+ function eq(value, other) {
12670
+ return value === other || (value !== value && other !== other);
12671
+ }
12672
 
12673
+ /**
12674
+ * Checks if `value` is greater than `other`.
12675
+ *
12676
+ * @static
12677
+ * @memberOf _
12678
+ * @since 3.9.0
12679
+ * @category Lang
12680
+ * @param {*} value The value to compare.
12681
+ * @param {*} other The other value to compare.
12682
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
12683
+ * else `false`.
12684
+ * @see _.lt
12685
+ * @example
12686
+ *
12687
+ * _.gt(3, 1);
12688
+ * // => true
12689
+ *
12690
+ * _.gt(3, 3);
12691
+ * // => false
12692
+ *
12693
+ * _.gt(1, 3);
12694
+ * // => false
12695
+ */
12696
+ var gt = createRelationalOperation(baseGt);
12697
 
12698
+ /**
12699
+ * Checks if `value` is greater than or equal to `other`.
12700
+ *
12701
+ * @static
12702
+ * @memberOf _
12703
+ * @since 3.9.0
12704
+ * @category Lang
12705
+ * @param {*} value The value to compare.
12706
+ * @param {*} other The other value to compare.
12707
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
12708
+ * `other`, else `false`.
12709
+ * @see _.lte
12710
+ * @example
12711
+ *
12712
+ * _.gte(3, 1);
12713
+ * // => true
12714
+ *
12715
+ * _.gte(3, 3);
12716
+ * // => true
12717
+ *
12718
+ * _.gte(1, 3);
12719
+ * // => false
12720
+ */
12721
+ var gte = createRelationalOperation(function(value, other) {
12722
+ return value >= other;
12723
+ });
12724
 
12725
+ /**
12726
+ * Checks if `value` is likely an `arguments` object.
12727
+ *
12728
+ * @static
12729
+ * @memberOf _
12730
+ * @since 0.1.0
12731
+ * @category Lang
12732
+ * @param {*} value The value to check.
12733
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
12734
+ * else `false`.
12735
+ * @example
12736
+ *
12737
+ * _.isArguments(function() { return arguments; }());
12738
+ * // => true
12739
+ *
12740
+ * _.isArguments([1, 2, 3]);
12741
+ * // => false
12742
+ */
12743
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
12744
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
12745
+ !propertyIsEnumerable.call(value, 'callee');
12746
  };
12747
 
12748
+ /**
12749
+ * Checks if `value` is classified as an `Array` object.
12750
+ *
12751
+ * @static
12752
+ * @memberOf _
12753
+ * @since 0.1.0
12754
+ * @category Lang
12755
+ * @param {*} value The value to check.
12756
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
12757
+ * @example
12758
+ *
12759
+ * _.isArray([1, 2, 3]);
12760
+ * // => true
12761
+ *
12762
+ * _.isArray(document.body.children);
12763
+ * // => false
12764
+ *
12765
+ * _.isArray('abc');
12766
+ * // => false
12767
+ *
12768
+ * _.isArray(_.noop);
12769
+ * // => false
12770
+ */
12771
+ var isArray = Array.isArray;
12772
 
12773
+ /**
12774
+ * Checks if `value` is classified as an `ArrayBuffer` object.
12775
+ *
12776
+ * @static
12777
+ * @memberOf _
12778
+ * @since 4.3.0
12779
+ * @category Lang
12780
+ * @param {*} value The value to check.
12781
+ * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
12782
+ * @example
12783
+ *
12784
+ * _.isArrayBuffer(new ArrayBuffer(2));
12785
+ * // => true
12786
+ *
12787
+ * _.isArrayBuffer(new Array(2));
12788
+ * // => false
12789
+ */
12790
+ var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
12791
 
12792
+ /**
12793
+ * Checks if `value` is array-like. A value is considered array-like if it's
12794
+ * not a function and has a `value.length` that's an integer greater than or
12795
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
12796
+ *
12797
+ * @static
12798
+ * @memberOf _
12799
+ * @since 4.0.0
12800
+ * @category Lang
12801
+ * @param {*} value The value to check.
12802
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
12803
+ * @example
12804
+ *
12805
+ * _.isArrayLike([1, 2, 3]);
12806
+ * // => true
12807
+ *
12808
+ * _.isArrayLike(document.body.children);
12809
+ * // => true
12810
+ *
12811
+ * _.isArrayLike('abc');
12812
+ * // => true
12813
+ *
12814
+ * _.isArrayLike(_.noop);
12815
+ * // => false
12816
+ */
12817
+ function isArrayLike(value) {
12818
+ return value != null && isLength(value.length) && !isFunction(value);
12819
+ }
12820
 
12821
+ /**
12822
+ * This method is like `_.isArrayLike` except that it also checks if `value`
12823
+ * is an object.
12824
+ *
12825
+ * @static
12826
+ * @memberOf _
12827
+ * @since 4.0.0
12828
+ * @category Lang
12829
+ * @param {*} value The value to check.
12830
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
12831
+ * else `false`.
12832
+ * @example
12833
+ *
12834
+ * _.isArrayLikeObject([1, 2, 3]);
12835
+ * // => true
12836
+ *
12837
+ * _.isArrayLikeObject(document.body.children);
12838
+ * // => true
12839
+ *
12840
+ * _.isArrayLikeObject('abc');
12841
+ * // => false
12842
+ *
12843
+ * _.isArrayLikeObject(_.noop);
12844
+ * // => false
12845
+ */
12846
+ function isArrayLikeObject(value) {
12847
+ return isObjectLike(value) && isArrayLike(value);
12848
+ }
12849
 
12850
+ /**
12851
+ * Checks if `value` is classified as a boolean primitive or object.
12852
+ *
12853
+ * @static
12854
+ * @memberOf _
12855
+ * @since 0.1.0
12856
+ * @category Lang
12857
+ * @param {*} value The value to check.
12858
+ * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
12859
+ * @example
12860
+ *
12861
+ * _.isBoolean(false);
12862
+ * // => true
12863
+ *
12864
+ * _.isBoolean(null);
12865
+ * // => false
12866
+ */
12867
+ function isBoolean(value) {
12868
+ return value === true || value === false ||
12869
+ (isObjectLike(value) && baseGetTag(value) == boolTag);
12870
+ }
12871
 
12872
+ /**
12873
+ * Checks if `value` is a buffer.
12874
+ *
12875
+ * @static
12876
+ * @memberOf _
12877
+ * @since 4.3.0
12878
+ * @category Lang
12879
+ * @param {*} value The value to check.
12880
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
12881
+ * @example
12882
+ *
12883
+ * _.isBuffer(new Buffer(2));
12884
+ * // => true
12885
+ *
12886
+ * _.isBuffer(new Uint8Array(2));
12887
+ * // => false
12888
+ */
12889
+ var isBuffer = nativeIsBuffer || stubFalse;
12890
 
12891
+ /**
12892
+ * Checks if `value` is classified as a `Date` object.
12893
+ *
12894
+ * @static
12895
+ * @memberOf _
12896
+ * @since 0.1.0
12897
+ * @category Lang
12898
+ * @param {*} value The value to check.
12899
+ * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
12900
+ * @example
12901
+ *
12902
+ * _.isDate(new Date);
12903
+ * // => true
12904
+ *
12905
+ * _.isDate('Mon April 23 2012');
12906
+ * // => false
12907
+ */
12908
+ var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
12909
 
12910
+ /**
12911
+ * Checks if `value` is likely a DOM element.
12912
+ *
12913
+ * @static
12914
+ * @memberOf _
12915
+ * @since 0.1.0
12916
+ * @category Lang
12917
+ * @param {*} value The value to check.
12918
+ * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
12919
+ * @example
12920
+ *
12921
+ * _.isElement(document.body);
12922
+ * // => true
12923
+ *
12924
+ * _.isElement('<body>');
12925
+ * // => false
12926
+ */
12927
+ function isElement(value) {
12928
+ return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
12929
+ }
12930
 
12931
+ /**
12932
+ * Checks if `value` is an empty object, collection, map, or set.
12933
+ *
12934
+ * Objects are considered empty if they have no own enumerable string keyed
12935
+ * properties.
12936
+ *
12937
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
12938
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
12939
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
12940
+ *
12941
+ * @static
12942
+ * @memberOf _
12943
+ * @since 0.1.0
12944
+ * @category Lang
12945
+ * @param {*} value The value to check.
12946
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
12947
+ * @example
12948
+ *
12949
+ * _.isEmpty(null);
12950
+ * // => true
12951
+ *
12952
+ * _.isEmpty(true);
12953
+ * // => true
12954
+ *
12955
+ * _.isEmpty(1);
12956
+ * // => true
12957
+ *
12958
+ * _.isEmpty([1, 2, 3]);
12959
+ * // => false
12960
+ *
12961
+ * _.isEmpty({ 'a': 1 });
12962
+ * // => false
12963
+ */
12964
+ function isEmpty(value) {
12965
+ if (value == null) {
12966
+ return true;
12967
  }
12968
+ if (isArrayLike(value) &&
12969
+ (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
12970
+ isBuffer(value) || isTypedArray(value) || isArguments(value))) {
12971
+ return !value.length;
12972
+ }
12973
+ var tag = getTag(value);
12974
+ if (tag == mapTag || tag == setTag) {
12975
+ return !value.size;
12976
+ }
12977
+ if (isPrototype(value)) {
12978
+ return !baseKeys(value).length;
12979
+ }
12980
+ for (var key in value) {
12981
+ if (hasOwnProperty.call(value, key)) {
12982
+ return false;
12983
+ }
12984
  }
12985
+ return true;
12986
  }
 
 
 
 
 
 
12987
 
12988
+ /**
12989
+ * Performs a deep comparison between two values to determine if they are
12990
+ * equivalent.
12991
+ *
12992
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
12993
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
12994
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
12995
+ * by their own, not inherited, enumerable properties. Functions and DOM
12996
+ * nodes are compared by strict equality, i.e. `===`.
12997
+ *
12998
+ * @static
12999
+ * @memberOf _
13000
+ * @since 0.1.0
13001
+ * @category Lang
13002
+ * @param {*} value The value to compare.
13003
+ * @param {*} other The other value to compare.
13004
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13005
+ * @example
13006
+ *
13007
+ * var object = { 'a': 1 };
13008
+ * var other = { 'a': 1 };
13009
+ *
13010
+ * _.isEqual(object, other);
13011
+ * // => true
13012
+ *
13013
+ * object === other;
13014
+ * // => false
13015
+ */
13016
+ function isEqual(value, other) {
13017
+ return baseIsEqual(value, other);
13018
+ }
13019
 
13020
+ /**
13021
+ * This method is like `_.isEqual` except that it accepts `customizer` which
13022
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13023
+ * are handled by the method instead. The `customizer` is invoked with up to
13024
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
13025
+ *
13026
+ * @static
13027
+ * @memberOf _
13028
+ * @since 4.0.0
13029
+ * @category Lang
13030
+ * @param {*} value The value to compare.
13031
+ * @param {*} other The other value to compare.
13032
+ * @param {Function} [customizer] The function to customize comparisons.
13033
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
13034
+ * @example
13035
+ *
13036
+ * function isGreeting(value) {
13037
+ * return /^h(?:i|ello)$/.test(value);
13038
+ * }
13039
+ *
13040
+ * function customizer(objValue, othValue) {
13041
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
13042
+ * return true;
13043
+ * }
13044
+ * }
13045
+ *
13046
+ * var array = ['hello', 'goodbye'];
13047
+ * var other = ['hi', 'goodbye'];
13048
+ *
13049
+ * _.isEqualWith(array, other, customizer);
13050
+ * // => true
13051
+ */
13052
+ function isEqualWith(value, other, customizer) {
13053
+ customizer = typeof customizer == 'function' ? customizer : undefined;
13054
+ var result = customizer ? customizer(value, other) : undefined;
13055
+ return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
13056
+ }
13057
 
13058
+ /**
13059
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
13060
+ * `SyntaxError`, `TypeError`, or `URIError` object.
13061
+ *
13062
+ * @static
13063
+ * @memberOf _
13064
+ * @since 3.0.0
13065
+ * @category Lang
13066
+ * @param {*} value The value to check.
13067
+ * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
13068
+ * @example
13069
+ *
13070
+ * _.isError(new Error);
13071
+ * // => true
13072
+ *
13073
+ * _.isError(Error);
13074
+ * // => false
13075
+ */
13076
+ function isError(value) {
13077
+ if (!isObjectLike(value)) {
13078
+ return false;
13079
+ }
13080
+ var tag = baseGetTag(value);
13081
+ return tag == errorTag || tag == domExcTag ||
13082
+ (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
13083
  }
13084
+
13085
+ /**
13086
+ * Checks if `value` is a finite primitive number.
13087
+ *
13088
+ * **Note:** This method is based on
13089
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
13090
+ *
13091
+ * @static
13092
+ * @memberOf _
13093
+ * @since 0.1.0
13094
+ * @category Lang
13095
+ * @param {*} value The value to check.
13096
+ * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
13097
+ * @example
13098
+ *
13099
+ * _.isFinite(3);
13100
+ * // => true
13101
+ *
13102
+ * _.isFinite(Number.MIN_VALUE);
13103
+ * // => true
13104
+ *
13105
+ * _.isFinite(Infinity);
13106
+ * // => false
13107
+ *
13108
+ * _.isFinite('3');
13109
+ * // => false
13110
+ */
13111
+ function isFinite(value) {
13112
+ return typeof value == 'number' && nativeIsFinite(value);
13113
  }
13114
+
13115
+ /**
13116
+ * Checks if `value` is classified as a `Function` object.
13117
+ *
13118
+ * @static
13119
+ * @memberOf _
13120
+ * @since 0.1.0
13121
+ * @category Lang
13122
+ * @param {*} value The value to check.
13123
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
13124
+ * @example
13125
+ *
13126
+ * _.isFunction(_);
13127
+ * // => true
13128
+ *
13129
+ * _.isFunction(/abc/);
13130
+ * // => false
13131
+ */
13132
+ function isFunction(value) {
13133
+ if (!isObject(value)) {
13134
+ return false;
13135
+ }
13136
+ // The use of `Object#toString` avoids issues with the `typeof` operator
13137
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
13138
+ var tag = baseGetTag(value);
13139
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
13140
  }
13141
+
13142
+ /**
13143
+ * Checks if `value` is an integer.
13144
+ *
13145
+ * **Note:** This method is based on
13146
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
13147
+ *
13148
+ * @static
13149
+ * @memberOf _
13150
+ * @since 4.0.0
13151
+ * @category Lang
13152
+ * @param {*} value The value to check.
13153
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
13154
+ * @example
13155
+ *
13156
+ * _.isInteger(3);
13157
+ * // => true
13158
+ *
13159
+ * _.isInteger(Number.MIN_VALUE);
13160
+ * // => false
13161
+ *
13162
+ * _.isInteger(Infinity);
13163
+ * // => false
13164
+ *
13165
+ * _.isInteger('3');
13166
+ * // => false
13167
+ */
13168
+ function isInteger(value) {
13169
+ return typeof value == 'number' && value == toInteger(value);
13170
  }
 
 
 
 
 
 
 
 
 
13171
 
13172
+ /**
13173
+ * Checks if `value` is a valid array-like length.
13174
+ *
13175
+ * **Note:** This method is loosely based on
13176
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
13177
+ *
13178
+ * @static
13179
+ * @memberOf _
13180
+ * @since 4.0.0
13181
+ * @category Lang
13182
+ * @param {*} value The value to check.
13183
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
13184
+ * @example
13185
+ *
13186
+ * _.isLength(3);
13187
+ * // => true
13188
+ *
13189
+ * _.isLength(Number.MIN_VALUE);
13190
+ * // => false
13191
+ *
13192
+ * _.isLength(Infinity);
13193
+ * // => false
13194
+ *
13195
+ * _.isLength('3');
13196
+ * // => false
13197
+ */
13198
+ function isLength(value) {
13199
+ return typeof value == 'number' &&
13200
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
13201
  }
 
 
 
 
 
 
 
 
 
13202
 
13203
+ /**
13204
+ * Checks if `value` is the
13205
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
13206
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
13207
+ *
13208
+ * @static
13209
+ * @memberOf _
13210
+ * @since 0.1.0
13211
+ * @category Lang
13212
+ * @param {*} value The value to check.
13213
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
13214
+ * @example
13215
+ *
13216
+ * _.isObject({});
13217
+ * // => true
13218
+ *
13219
+ * _.isObject([1, 2, 3]);
13220
+ * // => true
13221
+ *
13222
+ * _.isObject(_.noop);
13223
+ * // => true
13224
+ *
13225
+ * _.isObject(null);
13226
+ * // => false
13227
+ */
13228
+ function isObject(value) {
13229
+ var type = typeof value;
13230
+ return value != null && (type == 'object' || type == 'function');
13231
  }
 
 
 
 
13232
 
13233
+ /**
13234
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
13235
+ * and has a `typeof` result of "object".
13236
+ *
13237
+ * @static
13238
+ * @memberOf _
13239
+ * @since 4.0.0
13240
+ * @category Lang
13241
+ * @param {*} value The value to check.
13242
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
13243
+ * @example
13244
+ *
13245
+ * _.isObjectLike({});
13246
+ * // => true
13247
+ *
13248
+ * _.isObjectLike([1, 2, 3]);
13249
+ * // => true
13250
+ *
13251
+ * _.isObjectLike(_.noop);
13252
+ * // => false
13253
+ *
13254
+ * _.isObjectLike(null);
13255
+ * // => false
13256
+ */
13257
+ function isObjectLike(value) {
13258
+ return value != null && typeof value == 'object';
13259
  }
 
 
 
 
 
 
 
 
 
 
 
13260
 
13261
+ /**
13262
+ * Checks if `value` is classified as a `Map` object.
13263
+ *
13264
+ * @static
13265
+ * @memberOf _
13266
+ * @since 4.3.0
13267
+ * @category Lang
13268
+ * @param {*} value The value to check.
13269
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
13270
+ * @example
13271
+ *
13272
+ * _.isMap(new Map);
13273
+ * // => true
13274
+ *
13275
+ * _.isMap(new WeakMap);
13276
+ * // => false
13277
+ */
13278
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
13279
 
13280
+ /**
13281
+ * Performs a partial deep comparison between `object` and `source` to
13282
+ * determine if `object` contains equivalent property values.
13283
+ *
13284
+ * **Note:** This method is equivalent to `_.matches` when `source` is
13285
+ * partially applied.
13286
+ *
13287
+ * Partial comparisons will match empty array and empty object `source`
13288
+ * values against any array or object value, respectively. See `_.isEqual`
13289
+ * for a list of supported value comparisons.
13290
+ *
13291
+ * @static
13292
+ * @memberOf _
13293
+ * @since 3.0.0
13294
+ * @category Lang
13295
+ * @param {Object} object The object to inspect.
13296
+ * @param {Object} source The object of property values to match.
13297
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13298
+ * @example
13299
+ *
13300
+ * var object = { 'a': 1, 'b': 2 };
13301
+ *
13302
+ * _.isMatch(object, { 'b': 2 });
13303
+ * // => true
13304
+ *
13305
+ * _.isMatch(object, { 'b': 1 });
13306
+ * // => false
13307
+ */
13308
+ function isMatch(object, source) {
13309
+ return object === source || baseIsMatch(object, source, getMatchData(source));
 
 
 
 
 
13310
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13311
 
13312
+ /**
13313
+ * This method is like `_.isMatch` except that it accepts `customizer` which
13314
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
13315
+ * are handled by the method instead. The `customizer` is invoked with five
13316
+ * arguments: (objValue, srcValue, index|key, object, source).
13317
+ *
13318
+ * @static
13319
+ * @memberOf _
13320
+ * @since 4.0.0
13321
+ * @category Lang
13322
+ * @param {Object} object The object to inspect.
13323
+ * @param {Object} source The object of property values to match.
13324
+ * @param {Function} [customizer] The function to customize comparisons.
13325
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
13326
+ * @example
13327
+ *
13328
+ * function isGreeting(value) {
13329
+ * return /^h(?:i|ello)$/.test(value);
13330
+ * }
13331
+ *
13332
+ * function customizer(objValue, srcValue) {
13333
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
13334
+ * return true;
13335
+ * }
13336
+ * }
13337
+ *
13338
+ * var object = { 'greeting': 'hello' };
13339
+ * var source = { 'greeting': 'hi' };
13340
+ *
13341
+ * _.isMatchWith(object, source, customizer);
13342
+ * // => true
13343
+ */
13344
+ function isMatchWith(object, source, customizer) {
13345
+ customizer = typeof customizer == 'function' ? customizer : undefined;
13346
+ return baseIsMatch(object, source, getMatchData(source), customizer);
13347
  }
13348
 
13349
+ /**
13350
+ * Checks if `value` is `NaN`.
13351
+ *
13352
+ * **Note:** This method is based on
13353
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
13354
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
13355
+ * `undefined` and other non-number values.
13356
+ *
13357
+ * @static
13358
+ * @memberOf _
13359
+ * @since 0.1.0
13360
+ * @category Lang
13361
+ * @param {*} value The value to check.
13362
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
13363
+ * @example
13364
+ *
13365
+ * _.isNaN(NaN);
13366
+ * // => true
13367
+ *
13368
+ * _.isNaN(new Number(NaN));
13369
+ * // => true
13370
+ *
13371
+ * isNaN(undefined);
13372
+ * // => true
13373
+ *
13374
+ * _.isNaN(undefined);
13375
+ * // => false
13376
+ */
13377
+ function isNaN(value) {
13378
+ // An `NaN` primitive is the only value that is not equal to itself.
13379
+ // Perform the `toStringTag` check first to avoid errors with some
13380
+ // ActiveX objects in IE.
13381
+ return isNumber(value) && value != +value;
13382
+ }
13383
 
13384
+ /**
13385
+ * Checks if `value` is a pristine native function.
13386
+ *
13387
+ * **Note:** This method can't reliably detect native functions in the presence
13388
+ * of the core-js package because core-js circumvents this kind of detection.
13389
+ * Despite multiple requests, the core-js maintainer has made it clear: any
13390
+ * attempt to fix the detection will be obstructed. As a result, we're left
13391
+ * with little choice but to throw an error. Unfortunately, this also affects
13392
+ * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
13393
+ * which rely on core-js.
13394
+ *
13395
+ * @static
13396
+ * @memberOf _
13397
+ * @since 3.0.0
13398
+ * @category Lang
13399
+ * @param {*} value The value to check.
13400
+ * @returns {boolean} Returns `true` if `value` is a native function,
13401
+ * else `false`.
13402
+ * @example
13403
+ *
13404
+ * _.isNative(Array.prototype.push);
13405
+ * // => true
13406
+ *
13407
+ * _.isNative(_);
13408
+ * // => false
13409
+ */
13410
+ function isNative(value) {
13411
+ if (isMaskable(value)) {
13412
+ throw new Error(CORE_ERROR_TEXT);
13413
  }
13414
+ return baseIsNative(value);
13415
+ }
13416
 
13417
+ /**
13418
+ * Checks if `value` is `null`.
13419
+ *
13420
+ * @static
13421
+ * @memberOf _
13422
+ * @since 0.1.0
13423
+ * @category Lang
13424
+ * @param {*} value The value to check.
13425
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
13426
+ * @example
13427
+ *
13428
+ * _.isNull(null);
13429
+ * // => true
13430
+ *
13431
+ * _.isNull(void 0);
13432
+ * // => false
13433
+ */
13434
+ function isNull(value) {
13435
+ return value === null;
13436
+ }
 
 
 
 
 
13437
 
13438
+ /**
13439
+ * Checks if `value` is `null` or `undefined`.
13440
+ *
13441
+ * @static
13442
+ * @memberOf _
13443
+ * @since 4.0.0
13444
+ * @category Lang
13445
+ * @param {*} value The value to check.
13446
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
13447
+ * @example
13448
+ *
13449
+ * _.isNil(null);
13450
+ * // => true
13451
+ *
13452
+ * _.isNil(void 0);
13453
+ * // => true
13454
+ *
13455
+ * _.isNil(NaN);
13456
+ * // => false
13457
+ */
13458
+ function isNil(value) {
13459
+ return value == null;
13460
+ }
13461
 
13462
+ /**
13463
+ * Checks if `value` is classified as a `Number` primitive or object.
13464
+ *
13465
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
13466
+ * classified as numbers, use the `_.isFinite` method.
13467
+ *
13468
+ * @static
13469
+ * @memberOf _
13470
+ * @since 0.1.0
13471
+ * @category Lang
13472
+ * @param {*} value The value to check.
13473
+ * @returns {boolean} Returns `true` if `value` is a number, else `false`.
13474
+ * @example
13475
+ *
13476
+ * _.isNumber(3);
13477
+ * // => true
13478
+ *
13479
+ * _.isNumber(Number.MIN_VALUE);
13480
+ * // => true
13481
+ *
13482
+ * _.isNumber(Infinity);
13483
+ * // => true
13484
+ *
13485
+ * _.isNumber('3');
13486
+ * // => false
13487
+ */
13488
+ function isNumber(value) {
13489
+ return typeof value == 'number' ||
13490
+ (isObjectLike(value) && baseGetTag(value) == numberTag);
13491
  }
13492
 
13493
+ /**
13494
+ * Checks if `value` is a plain object, that is, an object created by the
13495
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
13496
+ *
13497
+ * @static
13498
+ * @memberOf _
13499
+ * @since 0.8.0
13500
+ * @category Lang
13501
+ * @param {*} value The value to check.
13502
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
13503
+ * @example
13504
+ *
13505
+ * function Foo() {
13506
+ * this.a = 1;
13507
+ * }
13508
+ *
13509
+ * _.isPlainObject(new Foo);
13510
+ * // => false
13511
+ *
13512
+ * _.isPlainObject([1, 2, 3]);
13513
+ * // => false
13514
+ *
13515
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
13516
+ * // => true
13517
+ *
13518
+ * _.isPlainObject(Object.create(null));
13519
+ * // => true
13520
+ */
13521
+ function isPlainObject(value) {
13522
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
13523
+ return false;
13524
  }
13525
+ var proto = getPrototype(value);
13526
+ if (proto === null) {
13527
+ return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
13528
  }
13529
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
13530
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
13531
+ funcToString.call(Ctor) == objectCtorString;
13532
  }
13533
 
13534
+ /**
13535
+ * Checks if `value` is classified as a `RegExp` object.
13536
+ *
13537
+ * @static
13538
+ * @memberOf _
13539
+ * @since 0.1.0
13540
+ * @category Lang
13541
+ * @param {*} value The value to check.
13542
+ * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
13543
+ * @example
13544
+ *
13545
+ * _.isRegExp(/abc/);
13546
+ * // => true
13547
+ *
13548
+ * _.isRegExp('/abc/');
13549
+ * // => false
13550
+ */
13551
+ var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
13552
 
13553
+ /**
13554
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
13555
+ * double precision number which isn't the result of a rounded unsafe integer.
13556
+ *
13557
+ * **Note:** This method is based on
13558
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
13559
+ *
13560
+ * @static
13561
+ * @memberOf _
13562
+ * @since 4.0.0
13563
+ * @category Lang
13564
+ * @param {*} value The value to check.
13565
+ * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
13566
+ * @example
13567
+ *
13568
+ * _.isSafeInteger(3);
13569
+ * // => true
13570
+ *
13571
+ * _.isSafeInteger(Number.MIN_VALUE);
13572
+ * // => false
13573
+ *
13574
+ * _.isSafeInteger(Infinity);
13575
+ * // => false
13576
+ *
13577
+ * _.isSafeInteger('3');
13578
+ * // => false
13579
+ */
13580
+ function isSafeInteger(value) {
13581
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
13582
  }
13583
 
13584
+ /**
13585
+ * Checks if `value` is classified as a `Set` object.
13586
+ *
13587
+ * @static
13588
+ * @memberOf _
13589
+ * @since 4.3.0
13590
+ * @category Lang
13591
+ * @param {*} value The value to check.
13592
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
13593
+ * @example
13594
+ *
13595
+ * _.isSet(new Set);
13596
+ * // => true
13597
+ *
13598
+ * _.isSet(new WeakSet);
13599
+ * // => false
13600
+ */
13601
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
13602
 
13603
+ /**
13604
+ * Checks if `value` is classified as a `String` primitive or object.
13605
+ *
13606
+ * @static
13607
+ * @since 0.1.0
13608
+ * @memberOf _
13609
+ * @category Lang
13610
+ * @param {*} value The value to check.
13611
+ * @returns {boolean} Returns `true` if `value` is a string, else `false`.
13612
+ * @example
13613
+ *
13614
+ * _.isString('abc');
13615
+ * // => true
13616
+ *
13617
+ * _.isString(1);
13618
+ * // => false
13619
+ */
13620
+ function isString(value) {
13621
+ return typeof value == 'string' ||
13622
+ (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
13623
  }
13624
 
13625
+ /**
13626
+ * Checks if `value` is classified as a `Symbol` primitive or object.
13627
+ *
13628
+ * @static
13629
+ * @memberOf _
13630
+ * @since 4.0.0
13631
+ * @category Lang
13632
+ * @param {*} value The value to check.
13633
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
13634
+ * @example
13635
+ *
13636
+ * _.isSymbol(Symbol.iterator);
13637
+ * // => true
13638
+ *
13639
+ * _.isSymbol('abc');
13640
+ * // => false
13641
+ */
13642
+ function isSymbol(value) {
13643
+ return typeof value == 'symbol' ||
13644
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
13645
  }
13646
 
13647
+ /**
13648
+ * Checks if `value` is classified as a typed array.
13649
+ *
13650
+ * @static
13651
+ * @memberOf _
13652
+ * @since 3.0.0
13653
+ * @category Lang
13654
+ * @param {*} value The value to check.
13655
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
13656
+ * @example
13657
+ *
13658
+ * _.isTypedArray(new Uint8Array);
13659
+ * // => true
13660
+ *
13661
+ * _.isTypedArray([]);
13662
+ * // => false
13663
+ */
13664
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
13665
 
13666
+ /**
13667
+ * Checks if `value` is `undefined`.
13668
+ *
13669
+ * @static
13670
+ * @since 0.1.0
13671
+ * @memberOf _
13672
+ * @category Lang
13673
+ * @param {*} value The value to check.
13674
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
13675
+ * @example
13676
+ *
13677
+ * _.isUndefined(void 0);
13678
+ * // => true
13679
+ *
13680
+ * _.isUndefined(null);
13681
+ * // => false
13682
+ */
13683
+ function isUndefined(value) {
13684
+ return value === undefined;
13685
  }
13686
 
13687
+ /**
13688
+ * Checks if `value` is classified as a `WeakMap` object.
13689
+ *
13690
+ * @static
13691
+ * @memberOf _
13692
+ * @since 4.3.0
13693
+ * @category Lang
13694
+ * @param {*} value The value to check.
13695
+ * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
13696
+ * @example
13697
+ *
13698
+ * _.isWeakMap(new WeakMap);
13699
+ * // => true
13700
+ *
13701
+ * _.isWeakMap(new Map);
13702
+ * // => false
13703
+ */
13704
+ function isWeakMap(value) {
13705
+ return isObjectLike(value) && getTag(value) == weakMapTag;
13706
  }
 
 
 
 
 
 
 
 
13707
 
13708
+ /**
13709
+ * Checks if `value` is classified as a `WeakSet` object.
13710
+ *
13711
+ * @static
13712
+ * @memberOf _
13713
+ * @since 4.3.0
13714
+ * @category Lang
13715
+ * @param {*} value The value to check.
13716
+ * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
13717
+ * @example
13718
+ *
13719
+ * _.isWeakSet(new WeakSet);
13720
+ * // => true
13721
+ *
13722
+ * _.isWeakSet(new Set);
13723
+ * // => false
13724
+ */
13725
+ function isWeakSet(value) {
13726
+ return isObjectLike(value) && baseGetTag(value) == weakSetTag;
13727
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13728
 
13729
+ /**
13730
+ * Checks if `value` is less than `other`.
13731
+ *
13732
+ * @static
13733
+ * @memberOf _
13734
+ * @since 3.9.0
13735
+ * @category Lang
13736
+ * @param {*} value The value to compare.
13737
+ * @param {*} other The other value to compare.
13738
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
13739
+ * else `false`.
13740
+ * @see _.gt
13741
+ * @example
13742
+ *
13743
+ * _.lt(1, 3);
13744
+ * // => true
13745
+ *
13746
+ * _.lt(3, 3);
13747
+ * // => false
13748
+ *
13749
+ * _.lt(3, 1);
13750
+ * // => false
13751
+ */
13752
+ var lt = createRelationalOperation(baseLt);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13753
 
13754
+ /**
13755
+ * Checks if `value` is less than or equal to `other`.
13756
+ *
13757
+ * @static
13758
+ * @memberOf _
13759
+ * @since 3.9.0
13760
+ * @category Lang
13761
+ * @param {*} value The value to compare.
13762
+ * @param {*} other The other value to compare.
13763
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
13764
+ * `other`, else `false`.
13765
+ * @see _.gte
13766
+ * @example
13767
+ *
13768
+ * _.lte(1, 3);
13769
+ * // => true
13770
+ *
13771
+ * _.lte(3, 3);
13772
+ * // => true
13773
+ *
13774
+ * _.lte(3, 1);
13775
+ * // => false