@gx-design-vue/pro-utils 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2609 @@
1
+ /** Detect free variable `global` from Node.js. */
2
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
3
+
4
+ var freeGlobal$1 = freeGlobal;
5
+
6
+ /** Detect free variable `self`. */
7
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
8
+
9
+ /** Used as a reference to the global object. */
10
+ var root = freeGlobal$1 || freeSelf || Function('return this')();
11
+
12
+ var root$1 = root;
13
+
14
+ /** Built-in value references. */
15
+ var Symbol = root$1.Symbol;
16
+
17
+ var Symbol$1 = Symbol;
18
+
19
+ /** Used for built-in method references. */
20
+ var objectProto$c = Object.prototype;
21
+
22
+ /** Used to check objects for own properties. */
23
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
24
+
25
+ /**
26
+ * Used to resolve the
27
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
28
+ * of values.
29
+ */
30
+ var nativeObjectToString$1 = objectProto$c.toString;
31
+
32
+ /** Built-in value references. */
33
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
34
+
35
+ /**
36
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
37
+ *
38
+ * @private
39
+ * @param {*} value The value to query.
40
+ * @returns {string} Returns the raw `toStringTag`.
41
+ */
42
+ function getRawTag(value) {
43
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
44
+ tag = value[symToStringTag$1];
45
+
46
+ try {
47
+ value[symToStringTag$1] = undefined;
48
+ var unmasked = true;
49
+ } catch (e) {}
50
+
51
+ var result = nativeObjectToString$1.call(value);
52
+ if (unmasked) {
53
+ if (isOwn) {
54
+ value[symToStringTag$1] = tag;
55
+ } else {
56
+ delete value[symToStringTag$1];
57
+ }
58
+ }
59
+ return result;
60
+ }
61
+
62
+ /** Used for built-in method references. */
63
+ var objectProto$b = Object.prototype;
64
+
65
+ /**
66
+ * Used to resolve the
67
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
68
+ * of values.
69
+ */
70
+ var nativeObjectToString = objectProto$b.toString;
71
+
72
+ /**
73
+ * Converts `value` to a string using `Object.prototype.toString`.
74
+ *
75
+ * @private
76
+ * @param {*} value The value to convert.
77
+ * @returns {string} Returns the converted string.
78
+ */
79
+ function objectToString(value) {
80
+ return nativeObjectToString.call(value);
81
+ }
82
+
83
+ /** `Object#toString` result references. */
84
+ var nullTag = '[object Null]',
85
+ undefinedTag = '[object Undefined]';
86
+
87
+ /** Built-in value references. */
88
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
89
+
90
+ /**
91
+ * The base implementation of `getTag` without fallbacks for buggy environments.
92
+ *
93
+ * @private
94
+ * @param {*} value The value to query.
95
+ * @returns {string} Returns the `toStringTag`.
96
+ */
97
+ function baseGetTag(value) {
98
+ if (value == null) {
99
+ return value === undefined ? undefinedTag : nullTag;
100
+ }
101
+ return (symToStringTag && symToStringTag in Object(value))
102
+ ? getRawTag(value)
103
+ : objectToString(value);
104
+ }
105
+
106
+ /**
107
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
108
+ * and has a `typeof` result of "object".
109
+ *
110
+ * @static
111
+ * @memberOf _
112
+ * @since 4.0.0
113
+ * @category Lang
114
+ * @param {*} value The value to check.
115
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
116
+ * @example
117
+ *
118
+ * _.isObjectLike({});
119
+ * // => true
120
+ *
121
+ * _.isObjectLike([1, 2, 3]);
122
+ * // => true
123
+ *
124
+ * _.isObjectLike(_.noop);
125
+ * // => false
126
+ *
127
+ * _.isObjectLike(null);
128
+ * // => false
129
+ */
130
+ function isObjectLike(value) {
131
+ return value != null && typeof value == 'object';
132
+ }
133
+
134
+ /**
135
+ * Checks if `value` is classified as an `Array` object.
136
+ *
137
+ * @static
138
+ * @memberOf _
139
+ * @since 0.1.0
140
+ * @category Lang
141
+ * @param {*} value The value to check.
142
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
143
+ * @example
144
+ *
145
+ * _.isArray([1, 2, 3]);
146
+ * // => true
147
+ *
148
+ * _.isArray(document.body.children);
149
+ * // => false
150
+ *
151
+ * _.isArray('abc');
152
+ * // => false
153
+ *
154
+ * _.isArray(_.noop);
155
+ * // => false
156
+ */
157
+ var isArray$1 = Array.isArray;
158
+
159
+ var isArray$2 = isArray$1;
160
+
161
+ /**
162
+ * Checks if `value` is the
163
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
164
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
165
+ *
166
+ * @static
167
+ * @memberOf _
168
+ * @since 0.1.0
169
+ * @category Lang
170
+ * @param {*} value The value to check.
171
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
172
+ * @example
173
+ *
174
+ * _.isObject({});
175
+ * // => true
176
+ *
177
+ * _.isObject([1, 2, 3]);
178
+ * // => true
179
+ *
180
+ * _.isObject(_.noop);
181
+ * // => true
182
+ *
183
+ * _.isObject(null);
184
+ * // => false
185
+ */
186
+ function isObject$1(value) {
187
+ var type = typeof value;
188
+ return value != null && (type == 'object' || type == 'function');
189
+ }
190
+
191
+ /** `Object#toString` result references. */
192
+ var asyncTag = '[object AsyncFunction]',
193
+ funcTag$2 = '[object Function]',
194
+ genTag$1 = '[object GeneratorFunction]',
195
+ proxyTag = '[object Proxy]';
196
+
197
+ /**
198
+ * Checks if `value` is classified as a `Function` object.
199
+ *
200
+ * @static
201
+ * @memberOf _
202
+ * @since 0.1.0
203
+ * @category Lang
204
+ * @param {*} value The value to check.
205
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
206
+ * @example
207
+ *
208
+ * _.isFunction(_);
209
+ * // => true
210
+ *
211
+ * _.isFunction(/abc/);
212
+ * // => false
213
+ */
214
+ function isFunction$1(value) {
215
+ if (!isObject$1(value)) {
216
+ return false;
217
+ }
218
+ // The use of `Object#toString` avoids issues with the `typeof` operator
219
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
220
+ var tag = baseGetTag(value);
221
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
222
+ }
223
+
224
+ /** Used to detect overreaching core-js shims. */
225
+ var coreJsData = root$1['__core-js_shared__'];
226
+
227
+ var coreJsData$1 = coreJsData;
228
+
229
+ /** Used to detect methods masquerading as native. */
230
+ var maskSrcKey = (function() {
231
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
232
+ return uid ? ('Symbol(src)_1.' + uid) : '';
233
+ }());
234
+
235
+ /**
236
+ * Checks if `func` has its source masked.
237
+ *
238
+ * @private
239
+ * @param {Function} func The function to check.
240
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
241
+ */
242
+ function isMasked(func) {
243
+ return !!maskSrcKey && (maskSrcKey in func);
244
+ }
245
+
246
+ /** Used for built-in method references. */
247
+ var funcProto$1 = Function.prototype;
248
+
249
+ /** Used to resolve the decompiled source of functions. */
250
+ var funcToString$1 = funcProto$1.toString;
251
+
252
+ /**
253
+ * Converts `func` to its source code.
254
+ *
255
+ * @private
256
+ * @param {Function} func The function to convert.
257
+ * @returns {string} Returns the source code.
258
+ */
259
+ function toSource(func) {
260
+ if (func != null) {
261
+ try {
262
+ return funcToString$1.call(func);
263
+ } catch (e) {}
264
+ try {
265
+ return (func + '');
266
+ } catch (e) {}
267
+ }
268
+ return '';
269
+ }
270
+
271
+ /**
272
+ * Used to match `RegExp`
273
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
274
+ */
275
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
276
+
277
+ /** Used to detect host constructors (Safari). */
278
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
279
+
280
+ /** Used for built-in method references. */
281
+ var funcProto = Function.prototype,
282
+ objectProto$a = Object.prototype;
283
+
284
+ /** Used to resolve the decompiled source of functions. */
285
+ var funcToString = funcProto.toString;
286
+
287
+ /** Used to check objects for own properties. */
288
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
289
+
290
+ /** Used to detect if a method is native. */
291
+ var reIsNative = RegExp('^' +
292
+ funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
293
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
294
+ );
295
+
296
+ /**
297
+ * The base implementation of `_.isNative` without bad shim checks.
298
+ *
299
+ * @private
300
+ * @param {*} value The value to check.
301
+ * @returns {boolean} Returns `true` if `value` is a native function,
302
+ * else `false`.
303
+ */
304
+ function baseIsNative(value) {
305
+ if (!isObject$1(value) || isMasked(value)) {
306
+ return false;
307
+ }
308
+ var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
309
+ return pattern.test(toSource(value));
310
+ }
311
+
312
+ /**
313
+ * Gets the value at `key` of `object`.
314
+ *
315
+ * @private
316
+ * @param {Object} [object] The object to query.
317
+ * @param {string} key The key of the property to get.
318
+ * @returns {*} Returns the property value.
319
+ */
320
+ function getValue(object, key) {
321
+ return object == null ? undefined : object[key];
322
+ }
323
+
324
+ /**
325
+ * Gets the native function at `key` of `object`.
326
+ *
327
+ * @private
328
+ * @param {Object} object The object to query.
329
+ * @param {string} key The key of the method to get.
330
+ * @returns {*} Returns the function if it's native, else `undefined`.
331
+ */
332
+ function getNative(object, key) {
333
+ var value = getValue(object, key);
334
+ return baseIsNative(value) ? value : undefined;
335
+ }
336
+
337
+ /* Built-in method references that are verified to be native. */
338
+ var WeakMap = getNative(root$1, 'WeakMap');
339
+
340
+ var WeakMap$1 = WeakMap;
341
+
342
+ /** Built-in value references. */
343
+ var objectCreate = Object.create;
344
+
345
+ /**
346
+ * The base implementation of `_.create` without support for assigning
347
+ * properties to the created object.
348
+ *
349
+ * @private
350
+ * @param {Object} proto The object to inherit from.
351
+ * @returns {Object} Returns the new object.
352
+ */
353
+ var baseCreate = (function() {
354
+ function object() {}
355
+ return function(proto) {
356
+ if (!isObject$1(proto)) {
357
+ return {};
358
+ }
359
+ if (objectCreate) {
360
+ return objectCreate(proto);
361
+ }
362
+ object.prototype = proto;
363
+ var result = new object;
364
+ object.prototype = undefined;
365
+ return result;
366
+ };
367
+ }());
368
+
369
+ var baseCreate$1 = baseCreate;
370
+
371
+ /**
372
+ * Copies the values of `source` to `array`.
373
+ *
374
+ * @private
375
+ * @param {Array} source The array to copy values from.
376
+ * @param {Array} [array=[]] The array to copy values to.
377
+ * @returns {Array} Returns `array`.
378
+ */
379
+ function copyArray(source, array) {
380
+ var index = -1,
381
+ length = source.length;
382
+
383
+ array || (array = Array(length));
384
+ while (++index < length) {
385
+ array[index] = source[index];
386
+ }
387
+ return array;
388
+ }
389
+
390
+ var defineProperty = (function() {
391
+ try {
392
+ var func = getNative(Object, 'defineProperty');
393
+ func({}, '', {});
394
+ return func;
395
+ } catch (e) {}
396
+ }());
397
+
398
+ var defineProperty$1 = defineProperty;
399
+
400
+ /**
401
+ * A specialized version of `_.forEach` for arrays without support for
402
+ * iteratee shorthands.
403
+ *
404
+ * @private
405
+ * @param {Array} [array] The array to iterate over.
406
+ * @param {Function} iteratee The function invoked per iteration.
407
+ * @returns {Array} Returns `array`.
408
+ */
409
+ function arrayEach(array, iteratee) {
410
+ var index = -1,
411
+ length = array == null ? 0 : array.length;
412
+
413
+ while (++index < length) {
414
+ if (iteratee(array[index], index, array) === false) {
415
+ break;
416
+ }
417
+ }
418
+ return array;
419
+ }
420
+
421
+ /** Used as references for various `Number` constants. */
422
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
423
+
424
+ /** Used to detect unsigned integer values. */
425
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
426
+
427
+ /**
428
+ * Checks if `value` is a valid array-like index.
429
+ *
430
+ * @private
431
+ * @param {*} value The value to check.
432
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
433
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
434
+ */
435
+ function isIndex(value, length) {
436
+ var type = typeof value;
437
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
438
+
439
+ return !!length &&
440
+ (type == 'number' ||
441
+ (type != 'symbol' && reIsUint.test(value))) &&
442
+ (value > -1 && value % 1 == 0 && value < length);
443
+ }
444
+
445
+ /**
446
+ * The base implementation of `assignValue` and `assignMergeValue` without
447
+ * value checks.
448
+ *
449
+ * @private
450
+ * @param {Object} object The object to modify.
451
+ * @param {string} key The key of the property to assign.
452
+ * @param {*} value The value to assign.
453
+ */
454
+ function baseAssignValue(object, key, value) {
455
+ if (key == '__proto__' && defineProperty$1) {
456
+ defineProperty$1(object, key, {
457
+ 'configurable': true,
458
+ 'enumerable': true,
459
+ 'value': value,
460
+ 'writable': true
461
+ });
462
+ } else {
463
+ object[key] = value;
464
+ }
465
+ }
466
+
467
+ /**
468
+ * Performs a
469
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
470
+ * comparison between two values to determine if they are equivalent.
471
+ *
472
+ * @static
473
+ * @memberOf _
474
+ * @since 4.0.0
475
+ * @category Lang
476
+ * @param {*} value The value to compare.
477
+ * @param {*} other The other value to compare.
478
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
479
+ * @example
480
+ *
481
+ * var object = { 'a': 1 };
482
+ * var other = { 'a': 1 };
483
+ *
484
+ * _.eq(object, object);
485
+ * // => true
486
+ *
487
+ * _.eq(object, other);
488
+ * // => false
489
+ *
490
+ * _.eq('a', 'a');
491
+ * // => true
492
+ *
493
+ * _.eq('a', Object('a'));
494
+ * // => false
495
+ *
496
+ * _.eq(NaN, NaN);
497
+ * // => true
498
+ */
499
+ function eq(value, other) {
500
+ return value === other || (value !== value && other !== other);
501
+ }
502
+
503
+ /** Used for built-in method references. */
504
+ var objectProto$9 = Object.prototype;
505
+
506
+ /** Used to check objects for own properties. */
507
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
508
+
509
+ /**
510
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
511
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
512
+ * for equality comparisons.
513
+ *
514
+ * @private
515
+ * @param {Object} object The object to modify.
516
+ * @param {string} key The key of the property to assign.
517
+ * @param {*} value The value to assign.
518
+ */
519
+ function assignValue(object, key, value) {
520
+ var objValue = object[key];
521
+ if (!(hasOwnProperty$7.call(object, key) && eq(objValue, value)) ||
522
+ (value === undefined && !(key in object))) {
523
+ baseAssignValue(object, key, value);
524
+ }
525
+ }
526
+
527
+ /**
528
+ * Copies properties of `source` to `object`.
529
+ *
530
+ * @private
531
+ * @param {Object} source The object to copy properties from.
532
+ * @param {Array} props The property identifiers to copy.
533
+ * @param {Object} [object={}] The object to copy properties to.
534
+ * @param {Function} [customizer] The function to customize copied values.
535
+ * @returns {Object} Returns `object`.
536
+ */
537
+ function copyObject(source, props, object, customizer) {
538
+ var isNew = !object;
539
+ object || (object = {});
540
+
541
+ var index = -1,
542
+ length = props.length;
543
+
544
+ while (++index < length) {
545
+ var key = props[index];
546
+
547
+ var newValue = customizer
548
+ ? customizer(object[key], source[key], key, object, source)
549
+ : undefined;
550
+
551
+ if (newValue === undefined) {
552
+ newValue = source[key];
553
+ }
554
+ if (isNew) {
555
+ baseAssignValue(object, key, newValue);
556
+ } else {
557
+ assignValue(object, key, newValue);
558
+ }
559
+ }
560
+ return object;
561
+ }
562
+
563
+ /** Used as references for various `Number` constants. */
564
+ var MAX_SAFE_INTEGER = 9007199254740991;
565
+
566
+ /**
567
+ * Checks if `value` is a valid array-like length.
568
+ *
569
+ * **Note:** This method is loosely based on
570
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
571
+ *
572
+ * @static
573
+ * @memberOf _
574
+ * @since 4.0.0
575
+ * @category Lang
576
+ * @param {*} value The value to check.
577
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
578
+ * @example
579
+ *
580
+ * _.isLength(3);
581
+ * // => true
582
+ *
583
+ * _.isLength(Number.MIN_VALUE);
584
+ * // => false
585
+ *
586
+ * _.isLength(Infinity);
587
+ * // => false
588
+ *
589
+ * _.isLength('3');
590
+ * // => false
591
+ */
592
+ function isLength(value) {
593
+ return typeof value == 'number' &&
594
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
595
+ }
596
+
597
+ /**
598
+ * Checks if `value` is array-like. A value is considered array-like if it's
599
+ * not a function and has a `value.length` that's an integer greater than or
600
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
601
+ *
602
+ * @static
603
+ * @memberOf _
604
+ * @since 4.0.0
605
+ * @category Lang
606
+ * @param {*} value The value to check.
607
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
608
+ * @example
609
+ *
610
+ * _.isArrayLike([1, 2, 3]);
611
+ * // => true
612
+ *
613
+ * _.isArrayLike(document.body.children);
614
+ * // => true
615
+ *
616
+ * _.isArrayLike('abc');
617
+ * // => true
618
+ *
619
+ * _.isArrayLike(_.noop);
620
+ * // => false
621
+ */
622
+ function isArrayLike(value) {
623
+ return value != null && isLength(value.length) && !isFunction$1(value);
624
+ }
625
+
626
+ /** Used for built-in method references. */
627
+ var objectProto$8 = Object.prototype;
628
+
629
+ /**
630
+ * Checks if `value` is likely a prototype object.
631
+ *
632
+ * @private
633
+ * @param {*} value The value to check.
634
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
635
+ */
636
+ function isPrototype(value) {
637
+ var Ctor = value && value.constructor,
638
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
639
+
640
+ return value === proto;
641
+ }
642
+
643
+ /**
644
+ * The base implementation of `_.times` without support for iteratee shorthands
645
+ * or max array length checks.
646
+ *
647
+ * @private
648
+ * @param {number} n The number of times to invoke `iteratee`.
649
+ * @param {Function} iteratee The function invoked per iteration.
650
+ * @returns {Array} Returns the array of results.
651
+ */
652
+ function baseTimes(n, iteratee) {
653
+ var index = -1,
654
+ result = Array(n);
655
+
656
+ while (++index < n) {
657
+ result[index] = iteratee(index);
658
+ }
659
+ return result;
660
+ }
661
+
662
+ /** `Object#toString` result references. */
663
+ var argsTag$2 = '[object Arguments]';
664
+
665
+ /**
666
+ * The base implementation of `_.isArguments`.
667
+ *
668
+ * @private
669
+ * @param {*} value The value to check.
670
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
671
+ */
672
+ function baseIsArguments(value) {
673
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
674
+ }
675
+
676
+ /** Used for built-in method references. */
677
+ var objectProto$7 = Object.prototype;
678
+
679
+ /** Used to check objects for own properties. */
680
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
681
+
682
+ /** Built-in value references. */
683
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
684
+
685
+ /**
686
+ * Checks if `value` is likely an `arguments` object.
687
+ *
688
+ * @static
689
+ * @memberOf _
690
+ * @since 0.1.0
691
+ * @category Lang
692
+ * @param {*} value The value to check.
693
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
694
+ * else `false`.
695
+ * @example
696
+ *
697
+ * _.isArguments(function() { return arguments; }());
698
+ * // => true
699
+ *
700
+ * _.isArguments([1, 2, 3]);
701
+ * // => false
702
+ */
703
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
704
+ return isObjectLike(value) && hasOwnProperty$6.call(value, 'callee') &&
705
+ !propertyIsEnumerable$1.call(value, 'callee');
706
+ };
707
+
708
+ var isArguments$1 = isArguments;
709
+
710
+ /**
711
+ * This method returns `false`.
712
+ *
713
+ * @static
714
+ * @memberOf _
715
+ * @since 4.13.0
716
+ * @category Util
717
+ * @returns {boolean} Returns `false`.
718
+ * @example
719
+ *
720
+ * _.times(2, _.stubFalse);
721
+ * // => [false, false]
722
+ */
723
+ function stubFalse() {
724
+ return false;
725
+ }
726
+
727
+ /** Detect free variable `exports`. */
728
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
729
+
730
+ /** Detect free variable `module`. */
731
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
732
+
733
+ /** Detect the popular CommonJS extension `module.exports`. */
734
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
735
+
736
+ /** Built-in value references. */
737
+ var Buffer$1 = moduleExports$2 ? root$1.Buffer : undefined;
738
+
739
+ /* Built-in method references for those with the same name as other `lodash` methods. */
740
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
741
+
742
+ /**
743
+ * Checks if `value` is a buffer.
744
+ *
745
+ * @static
746
+ * @memberOf _
747
+ * @since 4.3.0
748
+ * @category Lang
749
+ * @param {*} value The value to check.
750
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
751
+ * @example
752
+ *
753
+ * _.isBuffer(new Buffer(2));
754
+ * // => true
755
+ *
756
+ * _.isBuffer(new Uint8Array(2));
757
+ * // => false
758
+ */
759
+ var isBuffer = nativeIsBuffer || stubFalse;
760
+
761
+ var isBuffer$1 = isBuffer;
762
+
763
+ /** `Object#toString` result references. */
764
+ var argsTag$1 = '[object Arguments]',
765
+ arrayTag$1 = '[object Array]',
766
+ boolTag$2 = '[object Boolean]',
767
+ dateTag$2 = '[object Date]',
768
+ errorTag$1 = '[object Error]',
769
+ funcTag$1 = '[object Function]',
770
+ mapTag$4 = '[object Map]',
771
+ numberTag$2 = '[object Number]',
772
+ objectTag$2 = '[object Object]',
773
+ regexpTag$2 = '[object RegExp]',
774
+ setTag$4 = '[object Set]',
775
+ stringTag$2 = '[object String]',
776
+ weakMapTag$2 = '[object WeakMap]';
777
+
778
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
779
+ dataViewTag$3 = '[object DataView]',
780
+ float32Tag$2 = '[object Float32Array]',
781
+ float64Tag$2 = '[object Float64Array]',
782
+ int8Tag$2 = '[object Int8Array]',
783
+ int16Tag$2 = '[object Int16Array]',
784
+ int32Tag$2 = '[object Int32Array]',
785
+ uint8Tag$2 = '[object Uint8Array]',
786
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
787
+ uint16Tag$2 = '[object Uint16Array]',
788
+ uint32Tag$2 = '[object Uint32Array]';
789
+
790
+ /** Used to identify `toStringTag` values of typed arrays. */
791
+ var typedArrayTags = {};
792
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
793
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
794
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
795
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
796
+ typedArrayTags[uint32Tag$2] = true;
797
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
798
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
799
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
800
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
801
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
802
+ typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] =
803
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
804
+ typedArrayTags[weakMapTag$2] = false;
805
+
806
+ /**
807
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
808
+ *
809
+ * @private
810
+ * @param {*} value The value to check.
811
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
812
+ */
813
+ function baseIsTypedArray(value) {
814
+ return isObjectLike(value) &&
815
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
816
+ }
817
+
818
+ /**
819
+ * The base implementation of `_.unary` without support for storing metadata.
820
+ *
821
+ * @private
822
+ * @param {Function} func The function to cap arguments for.
823
+ * @returns {Function} Returns the new capped function.
824
+ */
825
+ function baseUnary(func) {
826
+ return function(value) {
827
+ return func(value);
828
+ };
829
+ }
830
+
831
+ /** Detect free variable `exports`. */
832
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
833
+
834
+ /** Detect free variable `module`. */
835
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
836
+
837
+ /** Detect the popular CommonJS extension `module.exports`. */
838
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
839
+
840
+ /** Detect free variable `process` from Node.js. */
841
+ var freeProcess = moduleExports$1 && freeGlobal$1.process;
842
+
843
+ /** Used to access faster Node.js helpers. */
844
+ var nodeUtil = (function() {
845
+ try {
846
+ // Use `util.types` for Node.js 10+.
847
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
848
+
849
+ if (types) {
850
+ return types;
851
+ }
852
+
853
+ // Legacy `process.binding('util')` for Node.js < 10.
854
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
855
+ } catch (e) {}
856
+ }());
857
+
858
+ var nodeUtil$1 = nodeUtil;
859
+
860
+ /* Node.js helper references. */
861
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
862
+
863
+ /**
864
+ * Checks if `value` is classified as a typed array.
865
+ *
866
+ * @static
867
+ * @memberOf _
868
+ * @since 3.0.0
869
+ * @category Lang
870
+ * @param {*} value The value to check.
871
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
872
+ * @example
873
+ *
874
+ * _.isTypedArray(new Uint8Array);
875
+ * // => true
876
+ *
877
+ * _.isTypedArray([]);
878
+ * // => false
879
+ */
880
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
881
+
882
+ var isTypedArray$1 = isTypedArray;
883
+
884
+ /** Used for built-in method references. */
885
+ var objectProto$6 = Object.prototype;
886
+
887
+ /** Used to check objects for own properties. */
888
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
889
+
890
+ /**
891
+ * Creates an array of the enumerable property names of the array-like `value`.
892
+ *
893
+ * @private
894
+ * @param {*} value The value to query.
895
+ * @param {boolean} inherited Specify returning inherited property names.
896
+ * @returns {Array} Returns the array of property names.
897
+ */
898
+ function arrayLikeKeys(value, inherited) {
899
+ var isArr = isArray$2(value),
900
+ isArg = !isArr && isArguments$1(value),
901
+ isBuff = !isArr && !isArg && isBuffer$1(value),
902
+ isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
903
+ skipIndexes = isArr || isArg || isBuff || isType,
904
+ result = skipIndexes ? baseTimes(value.length, String) : [],
905
+ length = result.length;
906
+
907
+ for (var key in value) {
908
+ if ((inherited || hasOwnProperty$5.call(value, key)) &&
909
+ !(skipIndexes && (
910
+ // Safari 9 has enumerable `arguments.length` in strict mode.
911
+ key == 'length' ||
912
+ // Node.js 0.10 has enumerable non-index properties on buffers.
913
+ (isBuff && (key == 'offset' || key == 'parent')) ||
914
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
915
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
916
+ // Skip index properties.
917
+ isIndex(key, length)
918
+ ))) {
919
+ result.push(key);
920
+ }
921
+ }
922
+ return result;
923
+ }
924
+
925
+ /**
926
+ * Creates a unary function that invokes `func` with its argument transformed.
927
+ *
928
+ * @private
929
+ * @param {Function} func The function to wrap.
930
+ * @param {Function} transform The argument transform.
931
+ * @returns {Function} Returns the new function.
932
+ */
933
+ function overArg(func, transform) {
934
+ return function(arg) {
935
+ return func(transform(arg));
936
+ };
937
+ }
938
+
939
+ /* Built-in method references for those with the same name as other `lodash` methods. */
940
+ var nativeKeys = overArg(Object.keys, Object);
941
+
942
+ var nativeKeys$1 = nativeKeys;
943
+
944
+ /** Used for built-in method references. */
945
+ var objectProto$5 = Object.prototype;
946
+
947
+ /** Used to check objects for own properties. */
948
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
949
+
950
+ /**
951
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
952
+ *
953
+ * @private
954
+ * @param {Object} object The object to query.
955
+ * @returns {Array} Returns the array of property names.
956
+ */
957
+ function baseKeys(object) {
958
+ if (!isPrototype(object)) {
959
+ return nativeKeys$1(object);
960
+ }
961
+ var result = [];
962
+ for (var key in Object(object)) {
963
+ if (hasOwnProperty$4.call(object, key) && key != 'constructor') {
964
+ result.push(key);
965
+ }
966
+ }
967
+ return result;
968
+ }
969
+
970
+ /**
971
+ * Creates an array of the own enumerable property names of `object`.
972
+ *
973
+ * **Note:** Non-object values are coerced to objects. See the
974
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
975
+ * for more details.
976
+ *
977
+ * @static
978
+ * @since 0.1.0
979
+ * @memberOf _
980
+ * @category Object
981
+ * @param {Object} object The object to query.
982
+ * @returns {Array} Returns the array of property names.
983
+ * @example
984
+ *
985
+ * function Foo() {
986
+ * this.a = 1;
987
+ * this.b = 2;
988
+ * }
989
+ *
990
+ * Foo.prototype.c = 3;
991
+ *
992
+ * _.keys(new Foo);
993
+ * // => ['a', 'b'] (iteration order is not guaranteed)
994
+ *
995
+ * _.keys('hi');
996
+ * // => ['0', '1']
997
+ */
998
+ function keys(object) {
999
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
1000
+ }
1001
+
1002
+ /**
1003
+ * This function is like
1004
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1005
+ * except that it includes inherited enumerable properties.
1006
+ *
1007
+ * @private
1008
+ * @param {Object} object The object to query.
1009
+ * @returns {Array} Returns the array of property names.
1010
+ */
1011
+ function nativeKeysIn(object) {
1012
+ var result = [];
1013
+ if (object != null) {
1014
+ for (var key in Object(object)) {
1015
+ result.push(key);
1016
+ }
1017
+ }
1018
+ return result;
1019
+ }
1020
+
1021
+ /** Used for built-in method references. */
1022
+ var objectProto$4 = Object.prototype;
1023
+
1024
+ /** Used to check objects for own properties. */
1025
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1026
+
1027
+ /**
1028
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1029
+ *
1030
+ * @private
1031
+ * @param {Object} object The object to query.
1032
+ * @returns {Array} Returns the array of property names.
1033
+ */
1034
+ function baseKeysIn(object) {
1035
+ if (!isObject$1(object)) {
1036
+ return nativeKeysIn(object);
1037
+ }
1038
+ var isProto = isPrototype(object),
1039
+ result = [];
1040
+
1041
+ for (var key in object) {
1042
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$3.call(object, key)))) {
1043
+ result.push(key);
1044
+ }
1045
+ }
1046
+ return result;
1047
+ }
1048
+
1049
+ /**
1050
+ * Creates an array of the own and inherited enumerable property names of `object`.
1051
+ *
1052
+ * **Note:** Non-object values are coerced to objects.
1053
+ *
1054
+ * @static
1055
+ * @memberOf _
1056
+ * @since 3.0.0
1057
+ * @category Object
1058
+ * @param {Object} object The object to query.
1059
+ * @returns {Array} Returns the array of property names.
1060
+ * @example
1061
+ *
1062
+ * function Foo() {
1063
+ * this.a = 1;
1064
+ * this.b = 2;
1065
+ * }
1066
+ *
1067
+ * Foo.prototype.c = 3;
1068
+ *
1069
+ * _.keysIn(new Foo);
1070
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1071
+ */
1072
+ function keysIn(object) {
1073
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1074
+ }
1075
+
1076
+ /* Built-in method references that are verified to be native. */
1077
+ var nativeCreate = getNative(Object, 'create');
1078
+
1079
+ var nativeCreate$1 = nativeCreate;
1080
+
1081
+ /**
1082
+ * Removes all key-value entries from the hash.
1083
+ *
1084
+ * @private
1085
+ * @name clear
1086
+ * @memberOf Hash
1087
+ */
1088
+ function hashClear() {
1089
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
1090
+ this.size = 0;
1091
+ }
1092
+
1093
+ /**
1094
+ * Removes `key` and its value from the hash.
1095
+ *
1096
+ * @private
1097
+ * @name delete
1098
+ * @memberOf Hash
1099
+ * @param {Object} hash The hash to modify.
1100
+ * @param {string} key The key of the value to remove.
1101
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1102
+ */
1103
+ function hashDelete(key) {
1104
+ var result = this.has(key) && delete this.__data__[key];
1105
+ this.size -= result ? 1 : 0;
1106
+ return result;
1107
+ }
1108
+
1109
+ /** Used to stand-in for `undefined` hash values. */
1110
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1111
+
1112
+ /** Used for built-in method references. */
1113
+ var objectProto$3 = Object.prototype;
1114
+
1115
+ /** Used to check objects for own properties. */
1116
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1117
+
1118
+ /**
1119
+ * Gets the hash value for `key`.
1120
+ *
1121
+ * @private
1122
+ * @name get
1123
+ * @memberOf Hash
1124
+ * @param {string} key The key of the value to get.
1125
+ * @returns {*} Returns the entry value.
1126
+ */
1127
+ function hashGet(key) {
1128
+ var data = this.__data__;
1129
+ if (nativeCreate$1) {
1130
+ var result = data[key];
1131
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1132
+ }
1133
+ return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
1134
+ }
1135
+
1136
+ /** Used for built-in method references. */
1137
+ var objectProto$2 = Object.prototype;
1138
+
1139
+ /** Used to check objects for own properties. */
1140
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
1141
+
1142
+ /**
1143
+ * Checks if a hash value for `key` exists.
1144
+ *
1145
+ * @private
1146
+ * @name has
1147
+ * @memberOf Hash
1148
+ * @param {string} key The key of the entry to check.
1149
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1150
+ */
1151
+ function hashHas(key) {
1152
+ var data = this.__data__;
1153
+ return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
1154
+ }
1155
+
1156
+ /** Used to stand-in for `undefined` hash values. */
1157
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1158
+
1159
+ /**
1160
+ * Sets the hash `key` to `value`.
1161
+ *
1162
+ * @private
1163
+ * @name set
1164
+ * @memberOf Hash
1165
+ * @param {string} key The key of the value to set.
1166
+ * @param {*} value The value to set.
1167
+ * @returns {Object} Returns the hash instance.
1168
+ */
1169
+ function hashSet(key, value) {
1170
+ var data = this.__data__;
1171
+ this.size += this.has(key) ? 0 : 1;
1172
+ data[key] = (nativeCreate$1 && value === undefined) ? HASH_UNDEFINED : value;
1173
+ return this;
1174
+ }
1175
+
1176
+ /**
1177
+ * Creates a hash object.
1178
+ *
1179
+ * @private
1180
+ * @constructor
1181
+ * @param {Array} [entries] The key-value pairs to cache.
1182
+ */
1183
+ function Hash(entries) {
1184
+ var index = -1,
1185
+ length = entries == null ? 0 : entries.length;
1186
+
1187
+ this.clear();
1188
+ while (++index < length) {
1189
+ var entry = entries[index];
1190
+ this.set(entry[0], entry[1]);
1191
+ }
1192
+ }
1193
+
1194
+ // Add methods to `Hash`.
1195
+ Hash.prototype.clear = hashClear;
1196
+ Hash.prototype['delete'] = hashDelete;
1197
+ Hash.prototype.get = hashGet;
1198
+ Hash.prototype.has = hashHas;
1199
+ Hash.prototype.set = hashSet;
1200
+
1201
+ /**
1202
+ * Removes all key-value entries from the list cache.
1203
+ *
1204
+ * @private
1205
+ * @name clear
1206
+ * @memberOf ListCache
1207
+ */
1208
+ function listCacheClear() {
1209
+ this.__data__ = [];
1210
+ this.size = 0;
1211
+ }
1212
+
1213
+ /**
1214
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1215
+ *
1216
+ * @private
1217
+ * @param {Array} array The array to inspect.
1218
+ * @param {*} key The key to search for.
1219
+ * @returns {number} Returns the index of the matched value, else `-1`.
1220
+ */
1221
+ function assocIndexOf(array, key) {
1222
+ var length = array.length;
1223
+ while (length--) {
1224
+ if (eq(array[length][0], key)) {
1225
+ return length;
1226
+ }
1227
+ }
1228
+ return -1;
1229
+ }
1230
+
1231
+ /** Used for built-in method references. */
1232
+ var arrayProto = Array.prototype;
1233
+
1234
+ /** Built-in value references. */
1235
+ var splice = arrayProto.splice;
1236
+
1237
+ /**
1238
+ * Removes `key` and its value from the list cache.
1239
+ *
1240
+ * @private
1241
+ * @name delete
1242
+ * @memberOf ListCache
1243
+ * @param {string} key The key of the value to remove.
1244
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1245
+ */
1246
+ function listCacheDelete(key) {
1247
+ var data = this.__data__,
1248
+ index = assocIndexOf(data, key);
1249
+
1250
+ if (index < 0) {
1251
+ return false;
1252
+ }
1253
+ var lastIndex = data.length - 1;
1254
+ if (index == lastIndex) {
1255
+ data.pop();
1256
+ } else {
1257
+ splice.call(data, index, 1);
1258
+ }
1259
+ --this.size;
1260
+ return true;
1261
+ }
1262
+
1263
+ /**
1264
+ * Gets the list cache value for `key`.
1265
+ *
1266
+ * @private
1267
+ * @name get
1268
+ * @memberOf ListCache
1269
+ * @param {string} key The key of the value to get.
1270
+ * @returns {*} Returns the entry value.
1271
+ */
1272
+ function listCacheGet(key) {
1273
+ var data = this.__data__,
1274
+ index = assocIndexOf(data, key);
1275
+
1276
+ return index < 0 ? undefined : data[index][1];
1277
+ }
1278
+
1279
+ /**
1280
+ * Checks if a list cache value for `key` exists.
1281
+ *
1282
+ * @private
1283
+ * @name has
1284
+ * @memberOf ListCache
1285
+ * @param {string} key The key of the entry to check.
1286
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1287
+ */
1288
+ function listCacheHas(key) {
1289
+ return assocIndexOf(this.__data__, key) > -1;
1290
+ }
1291
+
1292
+ /**
1293
+ * Sets the list cache `key` to `value`.
1294
+ *
1295
+ * @private
1296
+ * @name set
1297
+ * @memberOf ListCache
1298
+ * @param {string} key The key of the value to set.
1299
+ * @param {*} value The value to set.
1300
+ * @returns {Object} Returns the list cache instance.
1301
+ */
1302
+ function listCacheSet(key, value) {
1303
+ var data = this.__data__,
1304
+ index = assocIndexOf(data, key);
1305
+
1306
+ if (index < 0) {
1307
+ ++this.size;
1308
+ data.push([key, value]);
1309
+ } else {
1310
+ data[index][1] = value;
1311
+ }
1312
+ return this;
1313
+ }
1314
+
1315
+ /**
1316
+ * Creates an list cache object.
1317
+ *
1318
+ * @private
1319
+ * @constructor
1320
+ * @param {Array} [entries] The key-value pairs to cache.
1321
+ */
1322
+ function ListCache(entries) {
1323
+ var index = -1,
1324
+ length = entries == null ? 0 : entries.length;
1325
+
1326
+ this.clear();
1327
+ while (++index < length) {
1328
+ var entry = entries[index];
1329
+ this.set(entry[0], entry[1]);
1330
+ }
1331
+ }
1332
+
1333
+ // Add methods to `ListCache`.
1334
+ ListCache.prototype.clear = listCacheClear;
1335
+ ListCache.prototype['delete'] = listCacheDelete;
1336
+ ListCache.prototype.get = listCacheGet;
1337
+ ListCache.prototype.has = listCacheHas;
1338
+ ListCache.prototype.set = listCacheSet;
1339
+
1340
+ /* Built-in method references that are verified to be native. */
1341
+ var Map = getNative(root$1, 'Map');
1342
+
1343
+ var Map$1 = Map;
1344
+
1345
+ /**
1346
+ * Removes all key-value entries from the map.
1347
+ *
1348
+ * @private
1349
+ * @name clear
1350
+ * @memberOf MapCache
1351
+ */
1352
+ function mapCacheClear() {
1353
+ this.size = 0;
1354
+ this.__data__ = {
1355
+ 'hash': new Hash,
1356
+ 'map': new (Map$1 || ListCache),
1357
+ 'string': new Hash
1358
+ };
1359
+ }
1360
+
1361
+ /**
1362
+ * Checks if `value` is suitable for use as unique object key.
1363
+ *
1364
+ * @private
1365
+ * @param {*} value The value to check.
1366
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1367
+ */
1368
+ function isKeyable(value) {
1369
+ var type = typeof value;
1370
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1371
+ ? (value !== '__proto__')
1372
+ : (value === null);
1373
+ }
1374
+
1375
+ /**
1376
+ * Gets the data for `map`.
1377
+ *
1378
+ * @private
1379
+ * @param {Object} map The map to query.
1380
+ * @param {string} key The reference key.
1381
+ * @returns {*} Returns the map data.
1382
+ */
1383
+ function getMapData(map, key) {
1384
+ var data = map.__data__;
1385
+ return isKeyable(key)
1386
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1387
+ : data.map;
1388
+ }
1389
+
1390
+ /**
1391
+ * Removes `key` and its value from the map.
1392
+ *
1393
+ * @private
1394
+ * @name delete
1395
+ * @memberOf MapCache
1396
+ * @param {string} key The key of the value to remove.
1397
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1398
+ */
1399
+ function mapCacheDelete(key) {
1400
+ var result = getMapData(this, key)['delete'](key);
1401
+ this.size -= result ? 1 : 0;
1402
+ return result;
1403
+ }
1404
+
1405
+ /**
1406
+ * Gets the map value for `key`.
1407
+ *
1408
+ * @private
1409
+ * @name get
1410
+ * @memberOf MapCache
1411
+ * @param {string} key The key of the value to get.
1412
+ * @returns {*} Returns the entry value.
1413
+ */
1414
+ function mapCacheGet(key) {
1415
+ return getMapData(this, key).get(key);
1416
+ }
1417
+
1418
+ /**
1419
+ * Checks if a map value for `key` exists.
1420
+ *
1421
+ * @private
1422
+ * @name has
1423
+ * @memberOf MapCache
1424
+ * @param {string} key The key of the entry to check.
1425
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1426
+ */
1427
+ function mapCacheHas(key) {
1428
+ return getMapData(this, key).has(key);
1429
+ }
1430
+
1431
+ /**
1432
+ * Sets the map `key` to `value`.
1433
+ *
1434
+ * @private
1435
+ * @name set
1436
+ * @memberOf MapCache
1437
+ * @param {string} key The key of the value to set.
1438
+ * @param {*} value The value to set.
1439
+ * @returns {Object} Returns the map cache instance.
1440
+ */
1441
+ function mapCacheSet(key, value) {
1442
+ var data = getMapData(this, key),
1443
+ size = data.size;
1444
+
1445
+ data.set(key, value);
1446
+ this.size += data.size == size ? 0 : 1;
1447
+ return this;
1448
+ }
1449
+
1450
+ /**
1451
+ * Creates a map cache object to store key-value pairs.
1452
+ *
1453
+ * @private
1454
+ * @constructor
1455
+ * @param {Array} [entries] The key-value pairs to cache.
1456
+ */
1457
+ function MapCache(entries) {
1458
+ var index = -1,
1459
+ length = entries == null ? 0 : entries.length;
1460
+
1461
+ this.clear();
1462
+ while (++index < length) {
1463
+ var entry = entries[index];
1464
+ this.set(entry[0], entry[1]);
1465
+ }
1466
+ }
1467
+
1468
+ // Add methods to `MapCache`.
1469
+ MapCache.prototype.clear = mapCacheClear;
1470
+ MapCache.prototype['delete'] = mapCacheDelete;
1471
+ MapCache.prototype.get = mapCacheGet;
1472
+ MapCache.prototype.has = mapCacheHas;
1473
+ MapCache.prototype.set = mapCacheSet;
1474
+
1475
+ /**
1476
+ * Appends the elements of `values` to `array`.
1477
+ *
1478
+ * @private
1479
+ * @param {Array} array The array to modify.
1480
+ * @param {Array} values The values to append.
1481
+ * @returns {Array} Returns `array`.
1482
+ */
1483
+ function arrayPush(array, values) {
1484
+ var index = -1,
1485
+ length = values.length,
1486
+ offset = array.length;
1487
+
1488
+ while (++index < length) {
1489
+ array[offset + index] = values[index];
1490
+ }
1491
+ return array;
1492
+ }
1493
+
1494
+ /** Built-in value references. */
1495
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1496
+
1497
+ var getPrototype$1 = getPrototype;
1498
+
1499
+ /**
1500
+ * Removes all key-value entries from the stack.
1501
+ *
1502
+ * @private
1503
+ * @name clear
1504
+ * @memberOf Stack
1505
+ */
1506
+ function stackClear() {
1507
+ this.__data__ = new ListCache;
1508
+ this.size = 0;
1509
+ }
1510
+
1511
+ /**
1512
+ * Removes `key` and its value from the stack.
1513
+ *
1514
+ * @private
1515
+ * @name delete
1516
+ * @memberOf Stack
1517
+ * @param {string} key The key of the value to remove.
1518
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1519
+ */
1520
+ function stackDelete(key) {
1521
+ var data = this.__data__,
1522
+ result = data['delete'](key);
1523
+
1524
+ this.size = data.size;
1525
+ return result;
1526
+ }
1527
+
1528
+ /**
1529
+ * Gets the stack value for `key`.
1530
+ *
1531
+ * @private
1532
+ * @name get
1533
+ * @memberOf Stack
1534
+ * @param {string} key The key of the value to get.
1535
+ * @returns {*} Returns the entry value.
1536
+ */
1537
+ function stackGet(key) {
1538
+ return this.__data__.get(key);
1539
+ }
1540
+
1541
+ /**
1542
+ * Checks if a stack value for `key` exists.
1543
+ *
1544
+ * @private
1545
+ * @name has
1546
+ * @memberOf Stack
1547
+ * @param {string} key The key of the entry to check.
1548
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1549
+ */
1550
+ function stackHas(key) {
1551
+ return this.__data__.has(key);
1552
+ }
1553
+
1554
+ /** Used as the size to enable large array optimizations. */
1555
+ var LARGE_ARRAY_SIZE = 200;
1556
+
1557
+ /**
1558
+ * Sets the stack `key` to `value`.
1559
+ *
1560
+ * @private
1561
+ * @name set
1562
+ * @memberOf Stack
1563
+ * @param {string} key The key of the value to set.
1564
+ * @param {*} value The value to set.
1565
+ * @returns {Object} Returns the stack cache instance.
1566
+ */
1567
+ function stackSet(key, value) {
1568
+ var data = this.__data__;
1569
+ if (data instanceof ListCache) {
1570
+ var pairs = data.__data__;
1571
+ if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1572
+ pairs.push([key, value]);
1573
+ this.size = ++data.size;
1574
+ return this;
1575
+ }
1576
+ data = this.__data__ = new MapCache(pairs);
1577
+ }
1578
+ data.set(key, value);
1579
+ this.size = data.size;
1580
+ return this;
1581
+ }
1582
+
1583
+ /**
1584
+ * Creates a stack cache object to store key-value pairs.
1585
+ *
1586
+ * @private
1587
+ * @constructor
1588
+ * @param {Array} [entries] The key-value pairs to cache.
1589
+ */
1590
+ function Stack(entries) {
1591
+ var data = this.__data__ = new ListCache(entries);
1592
+ this.size = data.size;
1593
+ }
1594
+
1595
+ // Add methods to `Stack`.
1596
+ Stack.prototype.clear = stackClear;
1597
+ Stack.prototype['delete'] = stackDelete;
1598
+ Stack.prototype.get = stackGet;
1599
+ Stack.prototype.has = stackHas;
1600
+ Stack.prototype.set = stackSet;
1601
+
1602
+ /**
1603
+ * The base implementation of `_.assign` without support for multiple sources
1604
+ * or `customizer` functions.
1605
+ *
1606
+ * @private
1607
+ * @param {Object} object The destination object.
1608
+ * @param {Object} source The source object.
1609
+ * @returns {Object} Returns `object`.
1610
+ */
1611
+ function baseAssign(object, source) {
1612
+ return object && copyObject(source, keys(source), object);
1613
+ }
1614
+
1615
+ /**
1616
+ * The base implementation of `_.assignIn` without support for multiple sources
1617
+ * or `customizer` functions.
1618
+ *
1619
+ * @private
1620
+ * @param {Object} object The destination object.
1621
+ * @param {Object} source The source object.
1622
+ * @returns {Object} Returns `object`.
1623
+ */
1624
+ function baseAssignIn(object, source) {
1625
+ return object && copyObject(source, keysIn(source), object);
1626
+ }
1627
+
1628
+ /** Detect free variable `exports`. */
1629
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1630
+
1631
+ /** Detect free variable `module`. */
1632
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1633
+
1634
+ /** Detect the popular CommonJS extension `module.exports`. */
1635
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1636
+
1637
+ /** Built-in value references. */
1638
+ var Buffer = moduleExports ? root$1.Buffer : undefined,
1639
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
1640
+
1641
+ /**
1642
+ * Creates a clone of `buffer`.
1643
+ *
1644
+ * @private
1645
+ * @param {Buffer} buffer The buffer to clone.
1646
+ * @param {boolean} [isDeep] Specify a deep clone.
1647
+ * @returns {Buffer} Returns the cloned buffer.
1648
+ */
1649
+ function cloneBuffer(buffer, isDeep) {
1650
+ if (isDeep) {
1651
+ return buffer.slice();
1652
+ }
1653
+ var length = buffer.length,
1654
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1655
+
1656
+ buffer.copy(result);
1657
+ return result;
1658
+ }
1659
+
1660
+ /**
1661
+ * A specialized version of `_.filter` for arrays without support for
1662
+ * iteratee shorthands.
1663
+ *
1664
+ * @private
1665
+ * @param {Array} [array] The array to iterate over.
1666
+ * @param {Function} predicate The function invoked per iteration.
1667
+ * @returns {Array} Returns the new filtered array.
1668
+ */
1669
+ function arrayFilter(array, predicate) {
1670
+ var index = -1,
1671
+ length = array == null ? 0 : array.length,
1672
+ resIndex = 0,
1673
+ result = [];
1674
+
1675
+ while (++index < length) {
1676
+ var value = array[index];
1677
+ if (predicate(value, index, array)) {
1678
+ result[resIndex++] = value;
1679
+ }
1680
+ }
1681
+ return result;
1682
+ }
1683
+
1684
+ /**
1685
+ * This method returns a new empty array.
1686
+ *
1687
+ * @static
1688
+ * @memberOf _
1689
+ * @since 4.13.0
1690
+ * @category Util
1691
+ * @returns {Array} Returns the new empty array.
1692
+ * @example
1693
+ *
1694
+ * var arrays = _.times(2, _.stubArray);
1695
+ *
1696
+ * console.log(arrays);
1697
+ * // => [[], []]
1698
+ *
1699
+ * console.log(arrays[0] === arrays[1]);
1700
+ * // => false
1701
+ */
1702
+ function stubArray() {
1703
+ return [];
1704
+ }
1705
+
1706
+ /** Used for built-in method references. */
1707
+ var objectProto$1 = Object.prototype;
1708
+
1709
+ /** Built-in value references. */
1710
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
1711
+
1712
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1713
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
1714
+
1715
+ /**
1716
+ * Creates an array of the own enumerable symbols of `object`.
1717
+ *
1718
+ * @private
1719
+ * @param {Object} object The object to query.
1720
+ * @returns {Array} Returns the array of symbols.
1721
+ */
1722
+ var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
1723
+ if (object == null) {
1724
+ return [];
1725
+ }
1726
+ object = Object(object);
1727
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
1728
+ return propertyIsEnumerable.call(object, symbol);
1729
+ });
1730
+ };
1731
+
1732
+ var getSymbols$1 = getSymbols;
1733
+
1734
+ /**
1735
+ * Copies own symbols of `source` to `object`.
1736
+ *
1737
+ * @private
1738
+ * @param {Object} source The object to copy symbols from.
1739
+ * @param {Object} [object={}] The object to copy symbols to.
1740
+ * @returns {Object} Returns `object`.
1741
+ */
1742
+ function copySymbols(source, object) {
1743
+ return copyObject(source, getSymbols$1(source), object);
1744
+ }
1745
+
1746
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1747
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
1748
+
1749
+ /**
1750
+ * Creates an array of the own and inherited enumerable symbols of `object`.
1751
+ *
1752
+ * @private
1753
+ * @param {Object} object The object to query.
1754
+ * @returns {Array} Returns the array of symbols.
1755
+ */
1756
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
1757
+ var result = [];
1758
+ while (object) {
1759
+ arrayPush(result, getSymbols$1(object));
1760
+ object = getPrototype$1(object);
1761
+ }
1762
+ return result;
1763
+ };
1764
+
1765
+ var getSymbolsIn$1 = getSymbolsIn;
1766
+
1767
+ /**
1768
+ * Copies own and inherited symbols of `source` to `object`.
1769
+ *
1770
+ * @private
1771
+ * @param {Object} source The object to copy symbols from.
1772
+ * @param {Object} [object={}] The object to copy symbols to.
1773
+ * @returns {Object} Returns `object`.
1774
+ */
1775
+ function copySymbolsIn(source, object) {
1776
+ return copyObject(source, getSymbolsIn$1(source), object);
1777
+ }
1778
+
1779
+ /**
1780
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1781
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1782
+ * symbols of `object`.
1783
+ *
1784
+ * @private
1785
+ * @param {Object} object The object to query.
1786
+ * @param {Function} keysFunc The function to get the keys of `object`.
1787
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1788
+ * @returns {Array} Returns the array of property names and symbols.
1789
+ */
1790
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1791
+ var result = keysFunc(object);
1792
+ return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object));
1793
+ }
1794
+
1795
+ /**
1796
+ * Creates an array of own enumerable property names and symbols of `object`.
1797
+ *
1798
+ * @private
1799
+ * @param {Object} object The object to query.
1800
+ * @returns {Array} Returns the array of property names and symbols.
1801
+ */
1802
+ function getAllKeys(object) {
1803
+ return baseGetAllKeys(object, keys, getSymbols$1);
1804
+ }
1805
+
1806
+ /**
1807
+ * Creates an array of own and inherited enumerable property names and
1808
+ * symbols of `object`.
1809
+ *
1810
+ * @private
1811
+ * @param {Object} object The object to query.
1812
+ * @returns {Array} Returns the array of property names and symbols.
1813
+ */
1814
+ function getAllKeysIn(object) {
1815
+ return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
1816
+ }
1817
+
1818
+ /* Built-in method references that are verified to be native. */
1819
+ var DataView = getNative(root$1, 'DataView');
1820
+
1821
+ var DataView$1 = DataView;
1822
+
1823
+ /* Built-in method references that are verified to be native. */
1824
+ var Promise$1 = getNative(root$1, 'Promise');
1825
+
1826
+ var Promise$2 = Promise$1;
1827
+
1828
+ /* Built-in method references that are verified to be native. */
1829
+ var Set$1 = getNative(root$1, 'Set');
1830
+
1831
+ var Set$2 = Set$1;
1832
+
1833
+ /** `Object#toString` result references. */
1834
+ var mapTag$3 = '[object Map]',
1835
+ objectTag$1 = '[object Object]',
1836
+ promiseTag = '[object Promise]',
1837
+ setTag$3 = '[object Set]',
1838
+ weakMapTag$1 = '[object WeakMap]';
1839
+
1840
+ var dataViewTag$2 = '[object DataView]';
1841
+
1842
+ /** Used to detect maps, sets, and weakmaps. */
1843
+ var dataViewCtorString = toSource(DataView$1),
1844
+ mapCtorString = toSource(Map$1),
1845
+ promiseCtorString = toSource(Promise$2),
1846
+ setCtorString = toSource(Set$2),
1847
+ weakMapCtorString = toSource(WeakMap$1);
1848
+
1849
+ /**
1850
+ * Gets the `toStringTag` of `value`.
1851
+ *
1852
+ * @private
1853
+ * @param {*} value The value to query.
1854
+ * @returns {string} Returns the `toStringTag`.
1855
+ */
1856
+ var getTag = baseGetTag;
1857
+
1858
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
1859
+ if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$2) ||
1860
+ (Map$1 && getTag(new Map$1) != mapTag$3) ||
1861
+ (Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
1862
+ (Set$2 && getTag(new Set$2) != setTag$3) ||
1863
+ (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
1864
+ getTag = function(value) {
1865
+ var result = baseGetTag(value),
1866
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
1867
+ ctorString = Ctor ? toSource(Ctor) : '';
1868
+
1869
+ if (ctorString) {
1870
+ switch (ctorString) {
1871
+ case dataViewCtorString: return dataViewTag$2;
1872
+ case mapCtorString: return mapTag$3;
1873
+ case promiseCtorString: return promiseTag;
1874
+ case setCtorString: return setTag$3;
1875
+ case weakMapCtorString: return weakMapTag$1;
1876
+ }
1877
+ }
1878
+ return result;
1879
+ };
1880
+ }
1881
+
1882
+ var getTag$1 = getTag;
1883
+
1884
+ /** Used for built-in method references. */
1885
+ var objectProto = Object.prototype;
1886
+
1887
+ /** Used to check objects for own properties. */
1888
+ var hasOwnProperty = objectProto.hasOwnProperty;
1889
+
1890
+ /**
1891
+ * Initializes an array clone.
1892
+ *
1893
+ * @private
1894
+ * @param {Array} array The array to clone.
1895
+ * @returns {Array} Returns the initialized clone.
1896
+ */
1897
+ function initCloneArray(array) {
1898
+ var length = array.length,
1899
+ result = new array.constructor(length);
1900
+
1901
+ // Add properties assigned by `RegExp#exec`.
1902
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
1903
+ result.index = array.index;
1904
+ result.input = array.input;
1905
+ }
1906
+ return result;
1907
+ }
1908
+
1909
+ /** Built-in value references. */
1910
+ var Uint8Array = root$1.Uint8Array;
1911
+
1912
+ var Uint8Array$1 = Uint8Array;
1913
+
1914
+ /**
1915
+ * Creates a clone of `arrayBuffer`.
1916
+ *
1917
+ * @private
1918
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
1919
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
1920
+ */
1921
+ function cloneArrayBuffer(arrayBuffer) {
1922
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1923
+ new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
1924
+ return result;
1925
+ }
1926
+
1927
+ /**
1928
+ * Creates a clone of `dataView`.
1929
+ *
1930
+ * @private
1931
+ * @param {Object} dataView The data view to clone.
1932
+ * @param {boolean} [isDeep] Specify a deep clone.
1933
+ * @returns {Object} Returns the cloned data view.
1934
+ */
1935
+ function cloneDataView(dataView, isDeep) {
1936
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
1937
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1938
+ }
1939
+
1940
+ /** Used to match `RegExp` flags from their coerced string values. */
1941
+ var reFlags = /\w*$/;
1942
+
1943
+ /**
1944
+ * Creates a clone of `regexp`.
1945
+ *
1946
+ * @private
1947
+ * @param {Object} regexp The regexp to clone.
1948
+ * @returns {Object} Returns the cloned regexp.
1949
+ */
1950
+ function cloneRegExp(regexp) {
1951
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
1952
+ result.lastIndex = regexp.lastIndex;
1953
+ return result;
1954
+ }
1955
+
1956
+ /** Used to convert symbols to primitives and strings. */
1957
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
1958
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1959
+
1960
+ /**
1961
+ * Creates a clone of the `symbol` object.
1962
+ *
1963
+ * @private
1964
+ * @param {Object} symbol The symbol object to clone.
1965
+ * @returns {Object} Returns the cloned symbol object.
1966
+ */
1967
+ function cloneSymbol(symbol) {
1968
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
1969
+ }
1970
+
1971
+ /**
1972
+ * Creates a clone of `typedArray`.
1973
+ *
1974
+ * @private
1975
+ * @param {Object} typedArray The typed array to clone.
1976
+ * @param {boolean} [isDeep] Specify a deep clone.
1977
+ * @returns {Object} Returns the cloned typed array.
1978
+ */
1979
+ function cloneTypedArray(typedArray, isDeep) {
1980
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
1981
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1982
+ }
1983
+
1984
+ /** `Object#toString` result references. */
1985
+ var boolTag$1 = '[object Boolean]',
1986
+ dateTag$1 = '[object Date]',
1987
+ mapTag$2 = '[object Map]',
1988
+ numberTag$1 = '[object Number]',
1989
+ regexpTag$1 = '[object RegExp]',
1990
+ setTag$2 = '[object Set]',
1991
+ stringTag$1 = '[object String]',
1992
+ symbolTag$1 = '[object Symbol]';
1993
+
1994
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
1995
+ dataViewTag$1 = '[object DataView]',
1996
+ float32Tag$1 = '[object Float32Array]',
1997
+ float64Tag$1 = '[object Float64Array]',
1998
+ int8Tag$1 = '[object Int8Array]',
1999
+ int16Tag$1 = '[object Int16Array]',
2000
+ int32Tag$1 = '[object Int32Array]',
2001
+ uint8Tag$1 = '[object Uint8Array]',
2002
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2003
+ uint16Tag$1 = '[object Uint16Array]',
2004
+ uint32Tag$1 = '[object Uint32Array]';
2005
+
2006
+ /**
2007
+ * Initializes an object clone based on its `toStringTag`.
2008
+ *
2009
+ * **Note:** This function only supports cloning values with tags of
2010
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2011
+ *
2012
+ * @private
2013
+ * @param {Object} object The object to clone.
2014
+ * @param {string} tag The `toStringTag` of the object to clone.
2015
+ * @param {boolean} [isDeep] Specify a deep clone.
2016
+ * @returns {Object} Returns the initialized clone.
2017
+ */
2018
+ function initCloneByTag(object, tag, isDeep) {
2019
+ var Ctor = object.constructor;
2020
+ switch (tag) {
2021
+ case arrayBufferTag$1:
2022
+ return cloneArrayBuffer(object);
2023
+
2024
+ case boolTag$1:
2025
+ case dateTag$1:
2026
+ return new Ctor(+object);
2027
+
2028
+ case dataViewTag$1:
2029
+ return cloneDataView(object, isDeep);
2030
+
2031
+ case float32Tag$1: case float64Tag$1:
2032
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
2033
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2034
+ return cloneTypedArray(object, isDeep);
2035
+
2036
+ case mapTag$2:
2037
+ return new Ctor;
2038
+
2039
+ case numberTag$1:
2040
+ case stringTag$1:
2041
+ return new Ctor(object);
2042
+
2043
+ case regexpTag$1:
2044
+ return cloneRegExp(object);
2045
+
2046
+ case setTag$2:
2047
+ return new Ctor;
2048
+
2049
+ case symbolTag$1:
2050
+ return cloneSymbol(object);
2051
+ }
2052
+ }
2053
+
2054
+ /**
2055
+ * Initializes an object clone.
2056
+ *
2057
+ * @private
2058
+ * @param {Object} object The object to clone.
2059
+ * @returns {Object} Returns the initialized clone.
2060
+ */
2061
+ function initCloneObject(object) {
2062
+ return (typeof object.constructor == 'function' && !isPrototype(object))
2063
+ ? baseCreate$1(getPrototype$1(object))
2064
+ : {};
2065
+ }
2066
+
2067
+ /** `Object#toString` result references. */
2068
+ var mapTag$1 = '[object Map]';
2069
+
2070
+ /**
2071
+ * The base implementation of `_.isMap` without Node.js optimizations.
2072
+ *
2073
+ * @private
2074
+ * @param {*} value The value to check.
2075
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2076
+ */
2077
+ function baseIsMap(value) {
2078
+ return isObjectLike(value) && getTag$1(value) == mapTag$1;
2079
+ }
2080
+
2081
+ /* Node.js helper references. */
2082
+ var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2083
+
2084
+ /**
2085
+ * Checks if `value` is classified as a `Map` object.
2086
+ *
2087
+ * @static
2088
+ * @memberOf _
2089
+ * @since 4.3.0
2090
+ * @category Lang
2091
+ * @param {*} value The value to check.
2092
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2093
+ * @example
2094
+ *
2095
+ * _.isMap(new Map);
2096
+ * // => true
2097
+ *
2098
+ * _.isMap(new WeakMap);
2099
+ * // => false
2100
+ */
2101
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
2102
+
2103
+ var isMap$1 = isMap;
2104
+
2105
+ /** `Object#toString` result references. */
2106
+ var setTag$1 = '[object Set]';
2107
+
2108
+ /**
2109
+ * The base implementation of `_.isSet` without Node.js optimizations.
2110
+ *
2111
+ * @private
2112
+ * @param {*} value The value to check.
2113
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2114
+ */
2115
+ function baseIsSet(value) {
2116
+ return isObjectLike(value) && getTag$1(value) == setTag$1;
2117
+ }
2118
+
2119
+ /* Node.js helper references. */
2120
+ var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
2121
+
2122
+ /**
2123
+ * Checks if `value` is classified as a `Set` object.
2124
+ *
2125
+ * @static
2126
+ * @memberOf _
2127
+ * @since 4.3.0
2128
+ * @category Lang
2129
+ * @param {*} value The value to check.
2130
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2131
+ * @example
2132
+ *
2133
+ * _.isSet(new Set);
2134
+ * // => true
2135
+ *
2136
+ * _.isSet(new WeakSet);
2137
+ * // => false
2138
+ */
2139
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2140
+
2141
+ var isSet$1 = isSet;
2142
+
2143
+ /** Used to compose bitmasks for cloning. */
2144
+ var CLONE_DEEP_FLAG$1 = 1,
2145
+ CLONE_FLAT_FLAG = 2,
2146
+ CLONE_SYMBOLS_FLAG$1 = 4;
2147
+
2148
+ /** `Object#toString` result references. */
2149
+ var argsTag = '[object Arguments]',
2150
+ arrayTag = '[object Array]',
2151
+ boolTag = '[object Boolean]',
2152
+ dateTag = '[object Date]',
2153
+ errorTag = '[object Error]',
2154
+ funcTag = '[object Function]',
2155
+ genTag = '[object GeneratorFunction]',
2156
+ mapTag = '[object Map]',
2157
+ numberTag = '[object Number]',
2158
+ objectTag = '[object Object]',
2159
+ regexpTag = '[object RegExp]',
2160
+ setTag = '[object Set]',
2161
+ stringTag = '[object String]',
2162
+ symbolTag = '[object Symbol]',
2163
+ weakMapTag = '[object WeakMap]';
2164
+
2165
+ var arrayBufferTag = '[object ArrayBuffer]',
2166
+ dataViewTag = '[object DataView]',
2167
+ float32Tag = '[object Float32Array]',
2168
+ float64Tag = '[object Float64Array]',
2169
+ int8Tag = '[object Int8Array]',
2170
+ int16Tag = '[object Int16Array]',
2171
+ int32Tag = '[object Int32Array]',
2172
+ uint8Tag = '[object Uint8Array]',
2173
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2174
+ uint16Tag = '[object Uint16Array]',
2175
+ uint32Tag = '[object Uint32Array]';
2176
+
2177
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2178
+ var cloneableTags = {};
2179
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
2180
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2181
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
2182
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2183
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2184
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
2185
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
2186
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
2187
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
2188
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2189
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2190
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
2191
+ cloneableTags[weakMapTag] = false;
2192
+
2193
+ /**
2194
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2195
+ * traversed objects.
2196
+ *
2197
+ * @private
2198
+ * @param {*} value The value to clone.
2199
+ * @param {boolean} bitmask The bitmask flags.
2200
+ * 1 - Deep clone
2201
+ * 2 - Flatten inherited properties
2202
+ * 4 - Clone symbols
2203
+ * @param {Function} [customizer] The function to customize cloning.
2204
+ * @param {string} [key] The key of `value`.
2205
+ * @param {Object} [object] The parent object of `value`.
2206
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2207
+ * @returns {*} Returns the cloned value.
2208
+ */
2209
+ function baseClone(value, bitmask, customizer, key, object, stack) {
2210
+ var result,
2211
+ isDeep = bitmask & CLONE_DEEP_FLAG$1,
2212
+ isFlat = bitmask & CLONE_FLAT_FLAG,
2213
+ isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
2214
+
2215
+ if (customizer) {
2216
+ result = object ? customizer(value, key, object, stack) : customizer(value);
2217
+ }
2218
+ if (result !== undefined) {
2219
+ return result;
2220
+ }
2221
+ if (!isObject$1(value)) {
2222
+ return value;
2223
+ }
2224
+ var isArr = isArray$2(value);
2225
+ if (isArr) {
2226
+ result = initCloneArray(value);
2227
+ if (!isDeep) {
2228
+ return copyArray(value, result);
2229
+ }
2230
+ } else {
2231
+ var tag = getTag$1(value),
2232
+ isFunc = tag == funcTag || tag == genTag;
2233
+
2234
+ if (isBuffer$1(value)) {
2235
+ return cloneBuffer(value, isDeep);
2236
+ }
2237
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2238
+ result = (isFlat || isFunc) ? {} : initCloneObject(value);
2239
+ if (!isDeep) {
2240
+ return isFlat
2241
+ ? copySymbolsIn(value, baseAssignIn(result, value))
2242
+ : copySymbols(value, baseAssign(result, value));
2243
+ }
2244
+ } else {
2245
+ if (!cloneableTags[tag]) {
2246
+ return object ? value : {};
2247
+ }
2248
+ result = initCloneByTag(value, tag, isDeep);
2249
+ }
2250
+ }
2251
+ // Check for circular references and return its corresponding clone.
2252
+ stack || (stack = new Stack);
2253
+ var stacked = stack.get(value);
2254
+ if (stacked) {
2255
+ return stacked;
2256
+ }
2257
+ stack.set(value, result);
2258
+
2259
+ if (isSet$1(value)) {
2260
+ value.forEach(function(subValue) {
2261
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2262
+ });
2263
+ } else if (isMap$1(value)) {
2264
+ value.forEach(function(subValue, key) {
2265
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2266
+ });
2267
+ }
2268
+
2269
+ var keysFunc = isFull
2270
+ ? (isFlat ? getAllKeysIn : getAllKeys)
2271
+ : (isFlat ? keysIn : keys);
2272
+
2273
+ var props = isArr ? undefined : keysFunc(value);
2274
+ arrayEach(props || value, function(subValue, key) {
2275
+ if (props) {
2276
+ key = subValue;
2277
+ subValue = value[key];
2278
+ }
2279
+ // Recursively populate clone (susceptible to call stack limits).
2280
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2281
+ });
2282
+ return result;
2283
+ }
2284
+
2285
+ /** Used to compose bitmasks for cloning. */
2286
+ var CLONE_DEEP_FLAG = 1,
2287
+ CLONE_SYMBOLS_FLAG = 4;
2288
+
2289
+ /**
2290
+ * This method is like `_.clone` except that it recursively clones `value`.
2291
+ *
2292
+ * @static
2293
+ * @memberOf _
2294
+ * @since 1.0.0
2295
+ * @category Lang
2296
+ * @param {*} value The value to recursively clone.
2297
+ * @returns {*} Returns the deep cloned value.
2298
+ * @see _.clone
2299
+ * @example
2300
+ *
2301
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
2302
+ *
2303
+ * var deep = _.cloneDeep(objects);
2304
+ * console.log(deep[0] === objects[0]);
2305
+ * // => false
2306
+ */
2307
+ function cloneDeep(value) {
2308
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
2309
+ }
2310
+
2311
+ /**
2312
+ * 根据 key 和 dataIndex 生成唯一 id
2313
+ *
2314
+ * @param key 用户设置的 key
2315
+ * @param dataIndex 在对象中的数据
2316
+ * @param index 序列号,理论上唯一
2317
+ */
2318
+ const genColumnKey = (key, index) => {
2319
+ if (key) {
2320
+ return Array.isArray(key) ? key.join('-') : key.toString();
2321
+ }
2322
+ return `${index}`;
2323
+ };
2324
+ function handleShowIndex(columns, { align, showIndex }) {
2325
+ const columnsList = cloneDeep(columns);
2326
+ if (showIndex && columns.length && columns.every((column) => column.dataIndex !== 'sortIndex')) {
2327
+ const firstColumsItem = columns[0];
2328
+ columnsList.unshift({
2329
+ title: '序号',
2330
+ align,
2331
+ fixed: firstColumsItem.fixed,
2332
+ width: 60,
2333
+ uuid: getRandomNumber().uuid(15),
2334
+ dataIndex: 'sortIndex',
2335
+ key: 'sortIndex'
2336
+ });
2337
+ }
2338
+ else {
2339
+ columnsList.filter((item) => item.dataIndex !== 'sortIndex');
2340
+ }
2341
+ return columnsList;
2342
+ }
2343
+ function handleFormDefaultValue(data) {
2344
+ const defaultParams = {};
2345
+ data.map(item => {
2346
+ let initialValue = item.initialValue;
2347
+ const valueUndefined = ['select'];
2348
+ const valueNull = ['date', 'time', 'dateRange'];
2349
+ if (!initialValue && valueUndefined.includes(item.valueType)) {
2350
+ initialValue = undefined;
2351
+ }
2352
+ else if (!initialValue && valueNull.includes(item.valueType)) {
2353
+ initialValue = null;
2354
+ }
2355
+ else if (!initialValue) {
2356
+ initialValue = '';
2357
+ }
2358
+ if (item.name === 'dateRange') {
2359
+ defaultParams[item.rangeStartName || 'start'] = initialValue ? initialValue[0] : null;
2360
+ defaultParams[item.rangeEndName || 'end'] = initialValue ? initialValue[1] : null;
2361
+ }
2362
+ else if (item.name) {
2363
+ defaultParams[item.name] = initialValue;
2364
+ }
2365
+ return item;
2366
+ });
2367
+ return defaultParams;
2368
+ }
2369
+ /**
2370
+ * @Author gx12358
2371
+ * @DateTime 2021/11/3
2372
+ * @lastTime 2021/11/3
2373
+ * @description 如果是个方法执行一下它
2374
+ */
2375
+ function runFunction(valueEnum, ...rest) {
2376
+ if (typeof valueEnum === 'function') {
2377
+ return valueEnum(...rest);
2378
+ }
2379
+ return valueEnum;
2380
+ }
2381
+ /**
2382
+ * @Author gx12358
2383
+ * @DateTime 2022/10/11
2384
+ * @lastTime 2022/10/11
2385
+ * @description 简单深拷贝下
2386
+ */
2387
+ function deepCopy(data) {
2388
+ return JSON.parse(JSON.stringify(data));
2389
+ }
2390
+ /**
2391
+ * @Author gx12358
2392
+ * @DateTime 2021/1/28
2393
+ * @lastTime 2021/1/28
2394
+ * @description 判断删除是否到当前页最后一条
2395
+ */
2396
+ function handleCurrentPage(pageConfig = {}, number) {
2397
+ const { pageSize = 10, total = 0 } = pageConfig;
2398
+ let { current = 1 } = pageConfig;
2399
+ if (total - number <= pageSize * (current - 1)) {
2400
+ current = current - 1;
2401
+ }
2402
+ return current === 0 ? 1 : current;
2403
+ }
2404
+ /**
2405
+ * @Author gaoxiang
2406
+ * @DateTime 2020/7/24
2407
+ * @lastTime 2020/7/24
2408
+ * @description 数组(树形)添加序号
2409
+ */
2410
+ function getSortIndex(data = [], pageConfig = {}, childrenKey = 'children') {
2411
+ function getChildSortIndex(parentSort, data) {
2412
+ return data.map((item, index) => {
2413
+ const sortIndex = `${parentSort}-${index + 1}`;
2414
+ if (item[childrenKey])
2415
+ item[childrenKey] = getChildSortIndex(sortIndex, item[childrenKey]);
2416
+ item.sortIndex = sortIndex;
2417
+ return item;
2418
+ });
2419
+ }
2420
+ return deepCopy(data).map((item, key) => {
2421
+ let sortIndex = key;
2422
+ if (pageConfig) {
2423
+ const current = pageConfig ? pageConfig.current || 1 : 1;
2424
+ const pageSize = pageConfig ? pageConfig.pageSize || 10 : 10;
2425
+ sortIndex = current ? (current - 1) * pageSize + (key + 1) : key + 1;
2426
+ }
2427
+ if (item[childrenKey])
2428
+ item[childrenKey] = getChildSortIndex(`${sortIndex}`, item[childrenKey]);
2429
+ item.sortIndex = sortIndex;
2430
+ return item;
2431
+ });
2432
+ }
2433
+ /**
2434
+ * @Author gaoxiang
2435
+ * @DateTime 2019/11/29
2436
+ * @lastTime 2019/11/29
2437
+ * @description 排序(从小到大)
2438
+ */
2439
+ function compareToMax(obj1, obj2, key) {
2440
+ const val1 = obj1[key];
2441
+ const val2 = obj2[key];
2442
+ let result = 0;
2443
+ if (val1 < val2) {
2444
+ result = -1;
2445
+ }
2446
+ else if (val1 > val2) {
2447
+ result = 0;
2448
+ }
2449
+ return result;
2450
+ }
2451
+ /**
2452
+ * @Author gaoxiang
2453
+ * @DateTime 2019/12/11
2454
+ * @lastTime 2019/12/11
2455
+ * @description 数组去重
2456
+ */
2457
+ function arrayRepeat(data) {
2458
+ let array = deepCopy(data);
2459
+ const set = new Set(array);
2460
+ array = Array.from(set);
2461
+ return array;
2462
+ }
2463
+ /**
2464
+ * @Author gaoxiang
2465
+ * @DateTime 2020/8/26
2466
+ * @lastTime 2020/8/26
2467
+ * @description 处理表格字段为空
2468
+ */
2469
+ function hanndleField(str, customize) {
2470
+ const stringNull = ['null', 'undefined'];
2471
+ let success = true;
2472
+ if (str === 0) {
2473
+ success = true;
2474
+ }
2475
+ else if (stringNull.includes(str)) {
2476
+ success = false;
2477
+ }
2478
+ else if (!str) {
2479
+ success = false;
2480
+ }
2481
+ if (success) {
2482
+ return {
2483
+ value: str,
2484
+ success
2485
+ };
2486
+ }
2487
+ return {
2488
+ value: customize === '' ? customize : customize || '-',
2489
+ success
2490
+ };
2491
+ }
2492
+ /**
2493
+ * @Author gaoxiang
2494
+ * @DateTime 2019/11/29
2495
+ * @lastTime 2019/11/29
2496
+ * @description 随机uuid
2497
+ */
2498
+ function getRandomNumber() {
2499
+ const CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
2500
+ return {
2501
+ uuid(len, rad) {
2502
+ const chars = CHARS;
2503
+ const uuid = [];
2504
+ const radix = rad || chars.length;
2505
+ let i;
2506
+ let r;
2507
+ if (len) {
2508
+ for (i = 0; i < len; i += 1) {
2509
+ uuid[i] = chars[parseInt(String(Math.random() * radix))];
2510
+ }
2511
+ }
2512
+ else {
2513
+ uuid[8] = '-';
2514
+ uuid[13] = '-';
2515
+ uuid[18] = '-';
2516
+ uuid[23] = '-';
2517
+ uuid[14] = '4';
2518
+ for (i = 0; i < 36; i += 1) {
2519
+ if (!uuid[i]) {
2520
+ r = Math.random() * 16;
2521
+ uuid[i] = chars[i === 19 ? (r && 0x3) || 0x8 : r];
2522
+ }
2523
+ }
2524
+ }
2525
+ return uuid.join('');
2526
+ },
2527
+ uuidFast() {
2528
+ const chars = CHARS;
2529
+ const uuid = new Array(36);
2530
+ let rnd = 0;
2531
+ let r;
2532
+ let i;
2533
+ for (i = 0; i < 36; i += 1) {
2534
+ if (i === 8 || i === 13 || i === 18 || i === 23) {
2535
+ uuid[i] = '-';
2536
+ }
2537
+ else if (i === 14) {
2538
+ uuid[i] = '4';
2539
+ }
2540
+ else {
2541
+ if (rnd <= 0x02) {
2542
+ rnd = 0x2000000 + Math.random() * 0x1000000 || 0;
2543
+ }
2544
+ r = rnd && 0xf;
2545
+ rnd = rnd > 4;
2546
+ uuid[i] = chars[i === 19 ? (r && 0x3) || 0x8 : r];
2547
+ }
2548
+ }
2549
+ return uuid.join('');
2550
+ },
2551
+ uuidString() {
2552
+ const str = this.uuidFast().replace(new RegExp('-', 'g'), '');
2553
+ return str;
2554
+ },
2555
+ uuidCompact() {
2556
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
2557
+ const r = Math.random() * 16 || 0;
2558
+ const v = c === 'x' ? r : (r && 0x3) || 0x8;
2559
+ return v.toString(16);
2560
+ });
2561
+ }
2562
+ };
2563
+ }
2564
+
2565
+ const toString = Object.prototype.toString;
2566
+ function is(val, type) {
2567
+ return toString.call(val) === `[object ${type}]`;
2568
+ }
2569
+ function isBoolean(val) {
2570
+ return is(val, 'Boolean');
2571
+ }
2572
+ function isNumber(val) {
2573
+ return typeof val === 'number';
2574
+ }
2575
+ /**
2576
+ * @author gx12358 2539306317@qq.com
2577
+ * @description 判断是否是数组
2578
+ * @param arg
2579
+ * @returns {arg is any[]|boolean}
2580
+ */
2581
+ function isArray(arg) {
2582
+ if (typeof Array.isArray === 'undefined') {
2583
+ return Object.prototype.toString.call(arg) === '[object Array]';
2584
+ }
2585
+ return Array.isArray(arg);
2586
+ }
2587
+ /**
2588
+ * @Author gaoxiang
2589
+ * @DateTime 2019/11/29
2590
+ * @lastTime 2019/11/29
2591
+ * @description 是否是对象
2592
+ */
2593
+ function isObject(val) {
2594
+ return val !== null && is(val, 'Object');
2595
+ }
2596
+ /**
2597
+ * @author gx12358 2539306317@qq.com
2598
+ * @description 判断是否是字符串
2599
+ * @param value
2600
+ * @returns {boolean}
2601
+ */
2602
+ function isString(value) {
2603
+ return typeof value === 'string' || value instanceof String;
2604
+ }
2605
+ function isFunction(func) {
2606
+ return (typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]');
2607
+ }
2608
+
2609
+ export { arrayRepeat, compareToMax, deepCopy, genColumnKey, getRandomNumber, getSortIndex, handleCurrentPage, handleFormDefaultValue, handleShowIndex, hanndleField, is, isArray, isBoolean, isFunction, isNumber, isObject, isString, runFunction };