@antv/g 5.2.3 → 5.4.0

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.
package/dist/index.umd.js CHANGED
@@ -9219,6 +9219,36 @@
9219
9219
  return [attributeName, attributeValue];
9220
9220
  }
9221
9221
 
9222
+ /**
9223
+ * @see https://github.com/lodash/lodash/blob/master/memoize.js
9224
+ */
9225
+ function memoize(func, resolver) {
9226
+ if (typeof func !== 'function' || resolver != null && typeof resolver !== 'function') {
9227
+ throw new TypeError('Expected a function');
9228
+ }
9229
+
9230
+ var memoized = function memoized() {
9231
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9232
+ args[_key] = arguments[_key];
9233
+ }
9234
+
9235
+ var key = resolver ? resolver.apply(this, args) : args[0];
9236
+ var cache = memoized.cache;
9237
+
9238
+ if (cache.has(key)) {
9239
+ return cache.get(key);
9240
+ }
9241
+
9242
+ var result = func.apply(this, args);
9243
+ memoized.cache = cache.set(key, result) || cache;
9244
+ return result;
9245
+ };
9246
+
9247
+ memoized.cache = new (memoize.Cache || Map)();
9248
+ return memoized;
9249
+ }
9250
+ memoize.Cache = Map;
9251
+
9222
9252
  (function (Shape) {
9223
9253
  Shape["GROUP"] = "g";
9224
9254
  Shape["CIRCLE"] = "circle";
@@ -14382,780 +14412,6 @@
14382
14412
  : m1) * 255;
14383
14413
  }
14384
14414
 
14385
- /** Detect free variable `global` from Node.js. */
14386
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
14387
-
14388
- /** Detect free variable `self`. */
14389
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
14390
-
14391
- /** Used as a reference to the global object. */
14392
- var root = freeGlobal || freeSelf || Function('return this')();
14393
-
14394
- /** Built-in value references. */
14395
- var Symbol$1 = root.Symbol;
14396
-
14397
- /** Used for built-in method references. */
14398
- var objectProto = Object.prototype;
14399
-
14400
- /** Used to check objects for own properties. */
14401
- var hasOwnProperty = objectProto.hasOwnProperty;
14402
-
14403
- /**
14404
- * Used to resolve the
14405
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
14406
- * of values.
14407
- */
14408
- var nativeObjectToString = objectProto.toString;
14409
-
14410
- /** Built-in value references. */
14411
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
14412
-
14413
- /**
14414
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
14415
- *
14416
- * @private
14417
- * @param {*} value The value to query.
14418
- * @returns {string} Returns the raw `toStringTag`.
14419
- */
14420
- function getRawTag(value) {
14421
- var isOwn = hasOwnProperty.call(value, symToStringTag),
14422
- tag = value[symToStringTag];
14423
-
14424
- try {
14425
- value[symToStringTag] = undefined;
14426
- var unmasked = true;
14427
- } catch (e) {}
14428
-
14429
- var result = nativeObjectToString.call(value);
14430
- if (unmasked) {
14431
- if (isOwn) {
14432
- value[symToStringTag] = tag;
14433
- } else {
14434
- delete value[symToStringTag];
14435
- }
14436
- }
14437
- return result;
14438
- }
14439
-
14440
- /** Used for built-in method references. */
14441
- var objectProto$1 = Object.prototype;
14442
-
14443
- /**
14444
- * Used to resolve the
14445
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
14446
- * of values.
14447
- */
14448
- var nativeObjectToString$1 = objectProto$1.toString;
14449
-
14450
- /**
14451
- * Converts `value` to a string using `Object.prototype.toString`.
14452
- *
14453
- * @private
14454
- * @param {*} value The value to convert.
14455
- * @returns {string} Returns the converted string.
14456
- */
14457
- function objectToString(value) {
14458
- return nativeObjectToString$1.call(value);
14459
- }
14460
-
14461
- /** `Object#toString` result references. */
14462
- var nullTag = '[object Null]',
14463
- undefinedTag = '[object Undefined]';
14464
-
14465
- /** Built-in value references. */
14466
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
14467
-
14468
- /**
14469
- * The base implementation of `getTag` without fallbacks for buggy environments.
14470
- *
14471
- * @private
14472
- * @param {*} value The value to query.
14473
- * @returns {string} Returns the `toStringTag`.
14474
- */
14475
- function baseGetTag(value) {
14476
- if (value == null) {
14477
- return value === undefined ? undefinedTag : nullTag;
14478
- }
14479
- return (symToStringTag$1 && symToStringTag$1 in Object(value))
14480
- ? getRawTag(value)
14481
- : objectToString(value);
14482
- }
14483
-
14484
- /**
14485
- * Checks if `value` is the
14486
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
14487
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
14488
- *
14489
- * @static
14490
- * @memberOf _
14491
- * @since 0.1.0
14492
- * @category Lang
14493
- * @param {*} value The value to check.
14494
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
14495
- * @example
14496
- *
14497
- * _.isObject({});
14498
- * // => true
14499
- *
14500
- * _.isObject([1, 2, 3]);
14501
- * // => true
14502
- *
14503
- * _.isObject(_.noop);
14504
- * // => true
14505
- *
14506
- * _.isObject(null);
14507
- * // => false
14508
- */
14509
- function isObject$1(value) {
14510
- var type = typeof value;
14511
- return value != null && (type == 'object' || type == 'function');
14512
- }
14513
-
14514
- /** `Object#toString` result references. */
14515
- var asyncTag = '[object AsyncFunction]',
14516
- funcTag = '[object Function]',
14517
- genTag = '[object GeneratorFunction]',
14518
- proxyTag = '[object Proxy]';
14519
-
14520
- /**
14521
- * Checks if `value` is classified as a `Function` object.
14522
- *
14523
- * @static
14524
- * @memberOf _
14525
- * @since 0.1.0
14526
- * @category Lang
14527
- * @param {*} value The value to check.
14528
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
14529
- * @example
14530
- *
14531
- * _.isFunction(_);
14532
- * // => true
14533
- *
14534
- * _.isFunction(/abc/);
14535
- * // => false
14536
- */
14537
- function isFunction$1(value) {
14538
- if (!isObject$1(value)) {
14539
- return false;
14540
- }
14541
- // The use of `Object#toString` avoids issues with the `typeof` operator
14542
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
14543
- var tag = baseGetTag(value);
14544
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
14545
- }
14546
-
14547
- /** Used to detect overreaching core-js shims. */
14548
- var coreJsData = root['__core-js_shared__'];
14549
-
14550
- /** Used to detect methods masquerading as native. */
14551
- var maskSrcKey = (function() {
14552
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
14553
- return uid ? ('Symbol(src)_1.' + uid) : '';
14554
- }());
14555
-
14556
- /**
14557
- * Checks if `func` has its source masked.
14558
- *
14559
- * @private
14560
- * @param {Function} func The function to check.
14561
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
14562
- */
14563
- function isMasked(func) {
14564
- return !!maskSrcKey && (maskSrcKey in func);
14565
- }
14566
-
14567
- /** Used for built-in method references. */
14568
- var funcProto = Function.prototype;
14569
-
14570
- /** Used to resolve the decompiled source of functions. */
14571
- var funcToString = funcProto.toString;
14572
-
14573
- /**
14574
- * Converts `func` to its source code.
14575
- *
14576
- * @private
14577
- * @param {Function} func The function to convert.
14578
- * @returns {string} Returns the source code.
14579
- */
14580
- function toSource(func) {
14581
- if (func != null) {
14582
- try {
14583
- return funcToString.call(func);
14584
- } catch (e) {}
14585
- try {
14586
- return (func + '');
14587
- } catch (e) {}
14588
- }
14589
- return '';
14590
- }
14591
-
14592
- /**
14593
- * Used to match `RegExp`
14594
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
14595
- */
14596
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
14597
-
14598
- /** Used to detect host constructors (Safari). */
14599
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
14600
-
14601
- /** Used for built-in method references. */
14602
- var funcProto$1 = Function.prototype,
14603
- objectProto$2 = Object.prototype;
14604
-
14605
- /** Used to resolve the decompiled source of functions. */
14606
- var funcToString$1 = funcProto$1.toString;
14607
-
14608
- /** Used to check objects for own properties. */
14609
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
14610
-
14611
- /** Used to detect if a method is native. */
14612
- var reIsNative = RegExp('^' +
14613
- funcToString$1.call(hasOwnProperty$1).replace(reRegExpChar, '\\$&')
14614
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
14615
- );
14616
-
14617
- /**
14618
- * The base implementation of `_.isNative` without bad shim checks.
14619
- *
14620
- * @private
14621
- * @param {*} value The value to check.
14622
- * @returns {boolean} Returns `true` if `value` is a native function,
14623
- * else `false`.
14624
- */
14625
- function baseIsNative(value) {
14626
- if (!isObject$1(value) || isMasked(value)) {
14627
- return false;
14628
- }
14629
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
14630
- return pattern.test(toSource(value));
14631
- }
14632
-
14633
- /**
14634
- * Gets the value at `key` of `object`.
14635
- *
14636
- * @private
14637
- * @param {Object} [object] The object to query.
14638
- * @param {string} key The key of the property to get.
14639
- * @returns {*} Returns the property value.
14640
- */
14641
- function getValue(object, key) {
14642
- return object == null ? undefined : object[key];
14643
- }
14644
-
14645
- /**
14646
- * Gets the native function at `key` of `object`.
14647
- *
14648
- * @private
14649
- * @param {Object} object The object to query.
14650
- * @param {string} key The key of the method to get.
14651
- * @returns {*} Returns the function if it's native, else `undefined`.
14652
- */
14653
- function getNative(object, key) {
14654
- var value = getValue(object, key);
14655
- return baseIsNative(value) ? value : undefined;
14656
- }
14657
-
14658
- /**
14659
- * Performs a
14660
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
14661
- * comparison between two values to determine if they are equivalent.
14662
- *
14663
- * @static
14664
- * @memberOf _
14665
- * @since 4.0.0
14666
- * @category Lang
14667
- * @param {*} value The value to compare.
14668
- * @param {*} other The other value to compare.
14669
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
14670
- * @example
14671
- *
14672
- * var object = { 'a': 1 };
14673
- * var other = { 'a': 1 };
14674
- *
14675
- * _.eq(object, object);
14676
- * // => true
14677
- *
14678
- * _.eq(object, other);
14679
- * // => false
14680
- *
14681
- * _.eq('a', 'a');
14682
- * // => true
14683
- *
14684
- * _.eq('a', Object('a'));
14685
- * // => false
14686
- *
14687
- * _.eq(NaN, NaN);
14688
- * // => true
14689
- */
14690
- function eq(value, other) {
14691
- return value === other || (value !== value && other !== other);
14692
- }
14693
-
14694
- /* Built-in method references that are verified to be native. */
14695
- var nativeCreate = getNative(Object, 'create');
14696
-
14697
- /**
14698
- * Removes all key-value entries from the hash.
14699
- *
14700
- * @private
14701
- * @name clear
14702
- * @memberOf Hash
14703
- */
14704
- function hashClear() {
14705
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
14706
- this.size = 0;
14707
- }
14708
-
14709
- /**
14710
- * Removes `key` and its value from the hash.
14711
- *
14712
- * @private
14713
- * @name delete
14714
- * @memberOf Hash
14715
- * @param {Object} hash The hash to modify.
14716
- * @param {string} key The key of the value to remove.
14717
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14718
- */
14719
- function hashDelete(key) {
14720
- var result = this.has(key) && delete this.__data__[key];
14721
- this.size -= result ? 1 : 0;
14722
- return result;
14723
- }
14724
-
14725
- /** Used to stand-in for `undefined` hash values. */
14726
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
14727
-
14728
- /** Used for built-in method references. */
14729
- var objectProto$3 = Object.prototype;
14730
-
14731
- /** Used to check objects for own properties. */
14732
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
14733
-
14734
- /**
14735
- * Gets the hash value for `key`.
14736
- *
14737
- * @private
14738
- * @name get
14739
- * @memberOf Hash
14740
- * @param {string} key The key of the value to get.
14741
- * @returns {*} Returns the entry value.
14742
- */
14743
- function hashGet(key) {
14744
- var data = this.__data__;
14745
- if (nativeCreate) {
14746
- var result = data[key];
14747
- return result === HASH_UNDEFINED ? undefined : result;
14748
- }
14749
- return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
14750
- }
14751
-
14752
- /** Used for built-in method references. */
14753
- var objectProto$4 = Object.prototype;
14754
-
14755
- /** Used to check objects for own properties. */
14756
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
14757
-
14758
- /**
14759
- * Checks if a hash value for `key` exists.
14760
- *
14761
- * @private
14762
- * @name has
14763
- * @memberOf Hash
14764
- * @param {string} key The key of the entry to check.
14765
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14766
- */
14767
- function hashHas(key) {
14768
- var data = this.__data__;
14769
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
14770
- }
14771
-
14772
- /** Used to stand-in for `undefined` hash values. */
14773
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
14774
-
14775
- /**
14776
- * Sets the hash `key` to `value`.
14777
- *
14778
- * @private
14779
- * @name set
14780
- * @memberOf Hash
14781
- * @param {string} key The key of the value to set.
14782
- * @param {*} value The value to set.
14783
- * @returns {Object} Returns the hash instance.
14784
- */
14785
- function hashSet(key, value) {
14786
- var data = this.__data__;
14787
- this.size += this.has(key) ? 0 : 1;
14788
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
14789
- return this;
14790
- }
14791
-
14792
- /**
14793
- * Creates a hash object.
14794
- *
14795
- * @private
14796
- * @constructor
14797
- * @param {Array} [entries] The key-value pairs to cache.
14798
- */
14799
- function Hash(entries) {
14800
- var index = -1,
14801
- length = entries == null ? 0 : entries.length;
14802
-
14803
- this.clear();
14804
- while (++index < length) {
14805
- var entry = entries[index];
14806
- this.set(entry[0], entry[1]);
14807
- }
14808
- }
14809
-
14810
- // Add methods to `Hash`.
14811
- Hash.prototype.clear = hashClear;
14812
- Hash.prototype['delete'] = hashDelete;
14813
- Hash.prototype.get = hashGet;
14814
- Hash.prototype.has = hashHas;
14815
- Hash.prototype.set = hashSet;
14816
-
14817
- /**
14818
- * Removes all key-value entries from the list cache.
14819
- *
14820
- * @private
14821
- * @name clear
14822
- * @memberOf ListCache
14823
- */
14824
- function listCacheClear() {
14825
- this.__data__ = [];
14826
- this.size = 0;
14827
- }
14828
-
14829
- /**
14830
- * Gets the index at which the `key` is found in `array` of key-value pairs.
14831
- *
14832
- * @private
14833
- * @param {Array} array The array to inspect.
14834
- * @param {*} key The key to search for.
14835
- * @returns {number} Returns the index of the matched value, else `-1`.
14836
- */
14837
- function assocIndexOf(array, key) {
14838
- var length = array.length;
14839
- while (length--) {
14840
- if (eq(array[length][0], key)) {
14841
- return length;
14842
- }
14843
- }
14844
- return -1;
14845
- }
14846
-
14847
- /** Used for built-in method references. */
14848
- var arrayProto = Array.prototype;
14849
-
14850
- /** Built-in value references. */
14851
- var splice = arrayProto.splice;
14852
-
14853
- /**
14854
- * Removes `key` and its value from the list cache.
14855
- *
14856
- * @private
14857
- * @name delete
14858
- * @memberOf ListCache
14859
- * @param {string} key The key of the value to remove.
14860
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
14861
- */
14862
- function listCacheDelete(key) {
14863
- var data = this.__data__,
14864
- index = assocIndexOf(data, key);
14865
-
14866
- if (index < 0) {
14867
- return false;
14868
- }
14869
- var lastIndex = data.length - 1;
14870
- if (index == lastIndex) {
14871
- data.pop();
14872
- } else {
14873
- splice.call(data, index, 1);
14874
- }
14875
- --this.size;
14876
- return true;
14877
- }
14878
-
14879
- /**
14880
- * Gets the list cache value for `key`.
14881
- *
14882
- * @private
14883
- * @name get
14884
- * @memberOf ListCache
14885
- * @param {string} key The key of the value to get.
14886
- * @returns {*} Returns the entry value.
14887
- */
14888
- function listCacheGet(key) {
14889
- var data = this.__data__,
14890
- index = assocIndexOf(data, key);
14891
-
14892
- return index < 0 ? undefined : data[index][1];
14893
- }
14894
-
14895
- /**
14896
- * Checks if a list cache value for `key` exists.
14897
- *
14898
- * @private
14899
- * @name has
14900
- * @memberOf ListCache
14901
- * @param {string} key The key of the entry to check.
14902
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
14903
- */
14904
- function listCacheHas(key) {
14905
- return assocIndexOf(this.__data__, key) > -1;
14906
- }
14907
-
14908
- /**
14909
- * Sets the list cache `key` to `value`.
14910
- *
14911
- * @private
14912
- * @name set
14913
- * @memberOf ListCache
14914
- * @param {string} key The key of the value to set.
14915
- * @param {*} value The value to set.
14916
- * @returns {Object} Returns the list cache instance.
14917
- */
14918
- function listCacheSet(key, value) {
14919
- var data = this.__data__,
14920
- index = assocIndexOf(data, key);
14921
-
14922
- if (index < 0) {
14923
- ++this.size;
14924
- data.push([key, value]);
14925
- } else {
14926
- data[index][1] = value;
14927
- }
14928
- return this;
14929
- }
14930
-
14931
- /**
14932
- * Creates an list cache object.
14933
- *
14934
- * @private
14935
- * @constructor
14936
- * @param {Array} [entries] The key-value pairs to cache.
14937
- */
14938
- function ListCache(entries) {
14939
- var index = -1,
14940
- length = entries == null ? 0 : entries.length;
14941
-
14942
- this.clear();
14943
- while (++index < length) {
14944
- var entry = entries[index];
14945
- this.set(entry[0], entry[1]);
14946
- }
14947
- }
14948
-
14949
- // Add methods to `ListCache`.
14950
- ListCache.prototype.clear = listCacheClear;
14951
- ListCache.prototype['delete'] = listCacheDelete;
14952
- ListCache.prototype.get = listCacheGet;
14953
- ListCache.prototype.has = listCacheHas;
14954
- ListCache.prototype.set = listCacheSet;
14955
-
14956
- /* Built-in method references that are verified to be native. */
14957
- var Map$1 = getNative(root, 'Map');
14958
-
14959
- /**
14960
- * Removes all key-value entries from the map.
14961
- *
14962
- * @private
14963
- * @name clear
14964
- * @memberOf MapCache
14965
- */
14966
- function mapCacheClear() {
14967
- this.size = 0;
14968
- this.__data__ = {
14969
- 'hash': new Hash,
14970
- 'map': new (Map$1 || ListCache),
14971
- 'string': new Hash
14972
- };
14973
- }
14974
-
14975
- /**
14976
- * Checks if `value` is suitable for use as unique object key.
14977
- *
14978
- * @private
14979
- * @param {*} value The value to check.
14980
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
14981
- */
14982
- function isKeyable(value) {
14983
- var type = typeof value;
14984
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
14985
- ? (value !== '__proto__')
14986
- : (value === null);
14987
- }
14988
-
14989
- /**
14990
- * Gets the data for `map`.
14991
- *
14992
- * @private
14993
- * @param {Object} map The map to query.
14994
- * @param {string} key The reference key.
14995
- * @returns {*} Returns the map data.
14996
- */
14997
- function getMapData(map, key) {
14998
- var data = map.__data__;
14999
- return isKeyable(key)
15000
- ? data[typeof key == 'string' ? 'string' : 'hash']
15001
- : data.map;
15002
- }
15003
-
15004
- /**
15005
- * Removes `key` and its value from the map.
15006
- *
15007
- * @private
15008
- * @name delete
15009
- * @memberOf MapCache
15010
- * @param {string} key The key of the value to remove.
15011
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
15012
- */
15013
- function mapCacheDelete(key) {
15014
- var result = getMapData(this, key)['delete'](key);
15015
- this.size -= result ? 1 : 0;
15016
- return result;
15017
- }
15018
-
15019
- /**
15020
- * Gets the map value for `key`.
15021
- *
15022
- * @private
15023
- * @name get
15024
- * @memberOf MapCache
15025
- * @param {string} key The key of the value to get.
15026
- * @returns {*} Returns the entry value.
15027
- */
15028
- function mapCacheGet(key) {
15029
- return getMapData(this, key).get(key);
15030
- }
15031
-
15032
- /**
15033
- * Checks if a map value for `key` exists.
15034
- *
15035
- * @private
15036
- * @name has
15037
- * @memberOf MapCache
15038
- * @param {string} key The key of the entry to check.
15039
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
15040
- */
15041
- function mapCacheHas(key) {
15042
- return getMapData(this, key).has(key);
15043
- }
15044
-
15045
- /**
15046
- * Sets the map `key` to `value`.
15047
- *
15048
- * @private
15049
- * @name set
15050
- * @memberOf MapCache
15051
- * @param {string} key The key of the value to set.
15052
- * @param {*} value The value to set.
15053
- * @returns {Object} Returns the map cache instance.
15054
- */
15055
- function mapCacheSet(key, value) {
15056
- var data = getMapData(this, key),
15057
- size = data.size;
15058
-
15059
- data.set(key, value);
15060
- this.size += data.size == size ? 0 : 1;
15061
- return this;
15062
- }
15063
-
15064
- /**
15065
- * Creates a map cache object to store key-value pairs.
15066
- *
15067
- * @private
15068
- * @constructor
15069
- * @param {Array} [entries] The key-value pairs to cache.
15070
- */
15071
- function MapCache(entries) {
15072
- var index = -1,
15073
- length = entries == null ? 0 : entries.length;
15074
-
15075
- this.clear();
15076
- while (++index < length) {
15077
- var entry = entries[index];
15078
- this.set(entry[0], entry[1]);
15079
- }
15080
- }
15081
-
15082
- // Add methods to `MapCache`.
15083
- MapCache.prototype.clear = mapCacheClear;
15084
- MapCache.prototype['delete'] = mapCacheDelete;
15085
- MapCache.prototype.get = mapCacheGet;
15086
- MapCache.prototype.has = mapCacheHas;
15087
- MapCache.prototype.set = mapCacheSet;
15088
-
15089
- /** Error message constants. */
15090
- var FUNC_ERROR_TEXT = 'Expected a function';
15091
-
15092
- /**
15093
- * Creates a function that memoizes the result of `func`. If `resolver` is
15094
- * provided, it determines the cache key for storing the result based on the
15095
- * arguments provided to the memoized function. By default, the first argument
15096
- * provided to the memoized function is used as the map cache key. The `func`
15097
- * is invoked with the `this` binding of the memoized function.
15098
- *
15099
- * **Note:** The cache is exposed as the `cache` property on the memoized
15100
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
15101
- * constructor with one whose instances implement the
15102
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
15103
- * method interface of `clear`, `delete`, `get`, `has`, and `set`.
15104
- *
15105
- * @static
15106
- * @memberOf _
15107
- * @since 0.1.0
15108
- * @category Function
15109
- * @param {Function} func The function to have its output memoized.
15110
- * @param {Function} [resolver] The function to resolve the cache key.
15111
- * @returns {Function} Returns the new memoized function.
15112
- * @example
15113
- *
15114
- * var object = { 'a': 1, 'b': 2 };
15115
- * var other = { 'c': 3, 'd': 4 };
15116
- *
15117
- * var values = _.memoize(_.values);
15118
- * values(object);
15119
- * // => [1, 2]
15120
- *
15121
- * values(other);
15122
- * // => [3, 4]
15123
- *
15124
- * object.a = 2;
15125
- * values(object);
15126
- * // => [1, 2]
15127
- *
15128
- * // Modify the result cache.
15129
- * values.cache.set(object, ['a', 'b']);
15130
- * values(object);
15131
- * // => ['a', 'b']
15132
- *
15133
- * // Replace `_.memoize.Cache`.
15134
- * _.memoize.Cache = WeakMap;
15135
- */
15136
- function memoize(func, resolver) {
15137
- if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
15138
- throw new TypeError(FUNC_ERROR_TEXT);
15139
- }
15140
- var memoized = function() {
15141
- var args = arguments,
15142
- key = resolver ? resolver.apply(this, args) : args[0],
15143
- cache = memoized.cache;
15144
-
15145
- if (cache.has(key)) {
15146
- return cache.get(key);
15147
- }
15148
- var result = func.apply(this, args);
15149
- memoized.cache = cache.set(key, result) || cache;
15150
- return result;
15151
- };
15152
- memoized.cache = new (memoize.Cache || MapCache);
15153
- return memoized;
15154
- }
15155
-
15156
- // Expose `MapCache`.
15157
- memoize.Cache = MapCache;
15158
-
15159
14415
  var regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i;
15160
14416
  var regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i;
15161
14417
  var regexPR = /^p\s*\(\s*([axyn])\s*\)\s*(.*)/i;
@@ -30115,7 +29371,7 @@
30115
29371
  return AbstractRenderer;
30116
29372
  }();
30117
29373
 
30118
- let uId=1;const root$1="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},nowOffset=Date.now();let reservedCBs={},lastTime=Date.now();const polyfillRaf=e=>{if("function"!=typeof e)throw new TypeError(e+" is not a function");const o=Date.now(),t=o-lastTime,n=t>16?0:16-t,r=uId++;return reservedCBs[r]=e,Object.keys(reservedCBs).length>1||setTimeout((()=>{lastTime=o;const e=reservedCBs;reservedCBs={},Object.keys(e).forEach((o=>e[o](root$1.performance&&"function"==typeof root$1.performance.now?root$1.performance.now():Date.now()-nowOffset)));}),n),r},polyfillCaf=e=>{delete reservedCBs[e];},vendorPrefixes=["","webkit","moz","ms","o"],getRequestAnimationFrame=e=>"string"!=typeof e?polyfillRaf:""===e?root$1.requestAnimationFrame:root$1[e+"RequestAnimationFrame"],getCancelAnimationFrame=e=>"string"!=typeof e?polyfillCaf:""===e?root$1.cancelAnimationFrame:root$1[e+"CancelAnimationFrame"]||root$1[e+"CancelRequestAnimationFrame"],find=(e,o)=>{let t=0;for(;void 0!==e[t];){if(o(e[t]))return e[t];t+=1;}},vp=find(vendorPrefixes,(e=>!!getRequestAnimationFrame(e))),raf=getRequestAnimationFrame(vp),caf=getCancelAnimationFrame(vp);root$1.requestAnimationFrame=raf,root$1.cancelAnimationFrame=caf,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:raf,cancelAnimationFrame:caf});
29374
+ let uId=1;const root="object"==typeof self&&self.self==self?self:"object"==typeof global&&global.global==global?global:{},nowOffset=Date.now();let reservedCBs={},lastTime=Date.now();const polyfillRaf=e=>{if("function"!=typeof e)throw new TypeError(e+" is not a function");const o=Date.now(),t=o-lastTime,n=t>16?0:16-t,r=uId++;return reservedCBs[r]=e,Object.keys(reservedCBs).length>1||setTimeout((()=>{lastTime=o;const e=reservedCBs;reservedCBs={},Object.keys(e).forEach((o=>e[o](root.performance&&"function"==typeof root.performance.now?root.performance.now():Date.now()-nowOffset)));}),n),r},polyfillCaf=e=>{delete reservedCBs[e];},vendorPrefixes=["","webkit","moz","ms","o"],getRequestAnimationFrame=e=>"string"!=typeof e?polyfillRaf:""===e?root.requestAnimationFrame:root[e+"RequestAnimationFrame"],getCancelAnimationFrame=e=>"string"!=typeof e?polyfillCaf:""===e?root.cancelAnimationFrame:root[e+"CancelAnimationFrame"]||root[e+"CancelRequestAnimationFrame"],find=(e,o)=>{let t=0;for(;void 0!==e[t];){if(o(e[t]))return e[t];t+=1;}},vp=find(vendorPrefixes,(e=>!!getRequestAnimationFrame(e))),raf=getRequestAnimationFrame(vp),caf=getCancelAnimationFrame(vp);root.requestAnimationFrame=raf,root.cancelAnimationFrame=caf,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:raf,cancelAnimationFrame:caf});
30119
29375
 
30120
29376
  var _class$1;
30121
29377
 
@@ -31665,6 +30921,7 @@
31665
30921
  exports.makePerspective = makePerspective;
31666
30922
  exports.makeQuerablePromise = makeQuerablePromise;
31667
30923
  exports.makeTiming = makeTiming;
30924
+ exports.memoize = memoize;
31668
30925
  exports.mergeColors = mergeColors;
31669
30926
  exports.mergeDimensionList = mergeDimensionList;
31670
30927
  exports.mergeDimensions = mergeDimensions;