@audius/sdk 1.0.33 → 1.0.35
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.cjs.js +3373 -187
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3373 -187
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +3373 -187
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +3373 -187
- package/dist/native-libs.js.map +1 -1
- package/dist/services/creatorNode/CreatorNode.d.ts +1 -1
- package/package.json +4 -4
- package/src/sanityChecks/rolloverNodes.ts +26 -10
- package/src/services/creatorNode/CreatorNode.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -599,6 +599,8 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
603
|
+
|
|
602
604
|
var Web3;
|
|
603
605
|
|
|
604
606
|
if (typeof window !== 'undefined' && window && window.Web3) {
|
|
@@ -37172,9 +37174,9 @@ exports.ChatPermission = void 0;
|
|
|
37172
37174
|
})(exports.ChatPermission || (exports.ChatPermission = {}));
|
|
37173
37175
|
|
|
37174
37176
|
var name = "@audius/sdk";
|
|
37175
|
-
var version = "1.0.
|
|
37177
|
+
var version = "1.0.35";
|
|
37176
37178
|
var audius = {
|
|
37177
|
-
releaseSHA: "
|
|
37179
|
+
releaseSHA: "e40315da81c1fcf7d1d43d1b7a4bcefc5d1243d1"
|
|
37178
37180
|
};
|
|
37179
37181
|
var description = "";
|
|
37180
37182
|
var main = "dist/index.cjs.js";
|
|
@@ -37217,7 +37219,7 @@ var scripts = {
|
|
|
37217
37219
|
"gen:prod": "npm run gen:prod:default ; npm run gen:prod:full",
|
|
37218
37220
|
"gen:prod:default": "node ./src/sdk/api/generator/gen.js",
|
|
37219
37221
|
"gen:prod:full": "node ./src/sdk/api/generator/gen.js --api-flavor full",
|
|
37220
|
-
|
|
37222
|
+
prepare: "patch-package"
|
|
37221
37223
|
};
|
|
37222
37224
|
var dependencies = {
|
|
37223
37225
|
"@audius/anchor-audius-data": "0.0.2",
|
|
@@ -37258,7 +37260,6 @@ var dependencies = {
|
|
|
37258
37260
|
lodash: "4.17.21",
|
|
37259
37261
|
"micro-aes-gcm": "0.3.3",
|
|
37260
37262
|
"node-localstorage": "^1.3.1",
|
|
37261
|
-
"patch-package": "6.5.0",
|
|
37262
37263
|
"proper-url-join": "1.2.0",
|
|
37263
37264
|
"rollup-plugin-shim": "^1.0.0",
|
|
37264
37265
|
"safe-buffer": "5.2.1",
|
|
@@ -37306,6 +37307,7 @@ var devDependencies = {
|
|
|
37306
37307
|
mocha: "9.2.2",
|
|
37307
37308
|
nock: "13.1.2",
|
|
37308
37309
|
nyc: "15.1.0",
|
|
37310
|
+
"patch-package": "6.5.0",
|
|
37309
37311
|
prettier: "^2.6.1",
|
|
37310
37312
|
"prettier-config-standard": "^5.0.0",
|
|
37311
37313
|
rollup: "2.70.1",
|
|
@@ -62884,247 +62886,3431 @@ var syncNodes = /*#__PURE__*/function () {
|
|
|
62884
62886
|
};
|
|
62885
62887
|
}();
|
|
62886
62888
|
|
|
62887
|
-
var
|
|
62888
|
-
var
|
|
62889
|
-
/** Check if the user's primary creator node is healthy */
|
|
62889
|
+
var freeGlobal$1 = _typeof(commonjsGlobal) == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
62890
|
+
var _freeGlobal = freeGlobal$1;
|
|
62890
62891
|
|
|
62891
|
-
var
|
|
62892
|
-
|
|
62893
|
-
var healthy;
|
|
62894
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
62895
|
-
while (1) {
|
|
62896
|
-
switch (_context.prev = _context.next) {
|
|
62897
|
-
case 0:
|
|
62898
|
-
_context.next = 2;
|
|
62899
|
-
return Utils.isHealthy(primary);
|
|
62892
|
+
var freeGlobal = _freeGlobal;
|
|
62893
|
+
/** Detect free variable `self`. */
|
|
62900
62894
|
|
|
62901
|
-
|
|
62902
|
-
|
|
62895
|
+
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
|
|
62896
|
+
/** Used as a reference to the global object. */
|
|
62903
62897
|
|
|
62904
|
-
|
|
62905
|
-
|
|
62906
|
-
break;
|
|
62907
|
-
}
|
|
62898
|
+
var root$8 = freeGlobal || freeSelf || Function('return this')();
|
|
62899
|
+
var _root = root$8;
|
|
62908
62900
|
|
|
62909
|
-
|
|
62901
|
+
var root$7 = _root;
|
|
62902
|
+
/** Built-in value references. */
|
|
62910
62903
|
|
|
62911
|
-
|
|
62912
|
-
|
|
62913
|
-
_context.next = 9;
|
|
62914
|
-
break;
|
|
62915
|
-
}
|
|
62904
|
+
var _Symbol2 = root$7.Symbol;
|
|
62905
|
+
var _Symbol$4 = _Symbol2;
|
|
62916
62906
|
|
|
62917
|
-
|
|
62907
|
+
var _Symbol$3 = _Symbol$4;
|
|
62908
|
+
/** Used for built-in method references. */
|
|
62918
62909
|
|
|
62919
|
-
|
|
62920
|
-
|
|
62921
|
-
return Utils.wait(THREE_SECONDS);
|
|
62910
|
+
var objectProto$b = Object.prototype;
|
|
62911
|
+
/** Used to check objects for own properties. */
|
|
62922
62912
|
|
|
62923
|
-
|
|
62924
|
-
|
|
62925
|
-
|
|
62913
|
+
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
62914
|
+
/**
|
|
62915
|
+
* Used to resolve the
|
|
62916
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
62917
|
+
* of values.
|
|
62918
|
+
*/
|
|
62926
62919
|
|
|
62927
|
-
|
|
62928
|
-
|
|
62920
|
+
var nativeObjectToString$1 = objectProto$b.toString;
|
|
62921
|
+
/** Built-in value references. */
|
|
62929
62922
|
|
|
62930
|
-
|
|
62931
|
-
|
|
62932
|
-
|
|
62933
|
-
|
|
62934
|
-
|
|
62935
|
-
|
|
62936
|
-
|
|
62923
|
+
var symToStringTag$1 = _Symbol$3 ? _Symbol$3.toStringTag : undefined;
|
|
62924
|
+
/**
|
|
62925
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
62926
|
+
*
|
|
62927
|
+
* @private
|
|
62928
|
+
* @param {*} value The value to query.
|
|
62929
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
62930
|
+
*/
|
|
62937
62931
|
|
|
62938
|
-
|
|
62939
|
-
|
|
62940
|
-
|
|
62932
|
+
function getRawTag$1(value) {
|
|
62933
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
62934
|
+
tag = value[symToStringTag$1];
|
|
62935
|
+
|
|
62936
|
+
try {
|
|
62937
|
+
value[symToStringTag$1] = undefined;
|
|
62938
|
+
var unmasked = true;
|
|
62939
|
+
} catch (e) {}
|
|
62940
|
+
|
|
62941
|
+
var result = nativeObjectToString$1.call(value);
|
|
62942
|
+
|
|
62943
|
+
if (unmasked) {
|
|
62944
|
+
if (isOwn) {
|
|
62945
|
+
value[symToStringTag$1] = tag;
|
|
62946
|
+
} else {
|
|
62947
|
+
delete value[symToStringTag$1];
|
|
62948
|
+
}
|
|
62949
|
+
}
|
|
62950
|
+
|
|
62951
|
+
return result;
|
|
62952
|
+
}
|
|
62953
|
+
|
|
62954
|
+
var _getRawTag = getRawTag$1;
|
|
62955
|
+
|
|
62956
|
+
/** Used for built-in method references. */
|
|
62957
|
+
var objectProto$a = Object.prototype;
|
|
62958
|
+
/**
|
|
62959
|
+
* Used to resolve the
|
|
62960
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
62961
|
+
* of values.
|
|
62962
|
+
*/
|
|
62963
|
+
|
|
62964
|
+
var nativeObjectToString = objectProto$a.toString;
|
|
62965
|
+
/**
|
|
62966
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
62967
|
+
*
|
|
62968
|
+
* @private
|
|
62969
|
+
* @param {*} value The value to convert.
|
|
62970
|
+
* @returns {string} Returns the converted string.
|
|
62971
|
+
*/
|
|
62972
|
+
|
|
62973
|
+
function objectToString$1(value) {
|
|
62974
|
+
return nativeObjectToString.call(value);
|
|
62975
|
+
}
|
|
62976
|
+
|
|
62977
|
+
var _objectToString = objectToString$1;
|
|
62978
|
+
|
|
62979
|
+
var _Symbol$2 = _Symbol$4,
|
|
62980
|
+
getRawTag = _getRawTag,
|
|
62981
|
+
objectToString = _objectToString;
|
|
62982
|
+
/** `Object#toString` result references. */
|
|
62983
|
+
|
|
62984
|
+
var nullTag = '[object Null]',
|
|
62985
|
+
undefinedTag = '[object Undefined]';
|
|
62986
|
+
/** Built-in value references. */
|
|
62987
|
+
|
|
62988
|
+
var symToStringTag = _Symbol$2 ? _Symbol$2.toStringTag : undefined;
|
|
62989
|
+
/**
|
|
62990
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
62991
|
+
*
|
|
62992
|
+
* @private
|
|
62993
|
+
* @param {*} value The value to query.
|
|
62994
|
+
* @returns {string} Returns the `toStringTag`.
|
|
62995
|
+
*/
|
|
62996
|
+
|
|
62997
|
+
function baseGetTag$5(value) {
|
|
62998
|
+
if (value == null) {
|
|
62999
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
63000
|
+
}
|
|
63001
|
+
|
|
63002
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
63003
|
+
}
|
|
63004
|
+
|
|
63005
|
+
var _baseGetTag = baseGetTag$5;
|
|
63006
|
+
|
|
63007
|
+
function isObjectLike$5(value) {
|
|
63008
|
+
return value != null && _typeof(value) == 'object';
|
|
63009
|
+
}
|
|
63010
|
+
|
|
63011
|
+
var isObjectLike_1 = isObjectLike$5;
|
|
63012
|
+
|
|
63013
|
+
var baseGetTag$4 = _baseGetTag,
|
|
63014
|
+
isObjectLike$4 = isObjectLike_1;
|
|
63015
|
+
/** `Object#toString` result references. */
|
|
63016
|
+
|
|
63017
|
+
var symbolTag$1 = '[object Symbol]';
|
|
63018
|
+
/**
|
|
63019
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
63020
|
+
*
|
|
63021
|
+
* @static
|
|
63022
|
+
* @memberOf _
|
|
63023
|
+
* @since 4.0.0
|
|
63024
|
+
* @category Lang
|
|
63025
|
+
* @param {*} value The value to check.
|
|
63026
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
63027
|
+
* @example
|
|
63028
|
+
*
|
|
63029
|
+
* _.isSymbol(Symbol.iterator);
|
|
63030
|
+
* // => true
|
|
63031
|
+
*
|
|
63032
|
+
* _.isSymbol('abc');
|
|
63033
|
+
* // => false
|
|
63034
|
+
*/
|
|
63035
|
+
|
|
63036
|
+
function isSymbol$4(value) {
|
|
63037
|
+
return _typeof(value) == 'symbol' || isObjectLike$4(value) && baseGetTag$4(value) == symbolTag$1;
|
|
63038
|
+
}
|
|
63039
|
+
|
|
63040
|
+
var isSymbol_1 = isSymbol$4;
|
|
63041
|
+
|
|
63042
|
+
var isSymbol$3 = isSymbol_1;
|
|
63043
|
+
/**
|
|
63044
|
+
* The base implementation of methods like `_.max` and `_.min` which accepts a
|
|
63045
|
+
* `comparator` to determine the extremum value.
|
|
63046
|
+
*
|
|
63047
|
+
* @private
|
|
63048
|
+
* @param {Array} array The array to iterate over.
|
|
63049
|
+
* @param {Function} iteratee The iteratee invoked per iteration.
|
|
63050
|
+
* @param {Function} comparator The comparator used to compare values.
|
|
63051
|
+
* @returns {*} Returns the extremum value.
|
|
63052
|
+
*/
|
|
63053
|
+
|
|
63054
|
+
function baseExtremum$1(array, iteratee, comparator) {
|
|
63055
|
+
var index = -1,
|
|
63056
|
+
length = array.length;
|
|
63057
|
+
|
|
63058
|
+
while (++index < length) {
|
|
63059
|
+
var value = array[index],
|
|
63060
|
+
current = iteratee(value);
|
|
63061
|
+
|
|
63062
|
+
if (current != null && (computed === undefined ? current === current && !isSymbol$3(current) : comparator(current, computed))) {
|
|
63063
|
+
var computed = current,
|
|
63064
|
+
result = value;
|
|
63065
|
+
}
|
|
63066
|
+
}
|
|
63067
|
+
|
|
63068
|
+
return result;
|
|
63069
|
+
}
|
|
63070
|
+
|
|
63071
|
+
var _baseExtremum = baseExtremum$1;
|
|
63072
|
+
|
|
63073
|
+
/**
|
|
63074
|
+
* The base implementation of `_.gt` which doesn't coerce arguments.
|
|
63075
|
+
*
|
|
63076
|
+
* @private
|
|
63077
|
+
* @param {*} value The value to compare.
|
|
63078
|
+
* @param {*} other The other value to compare.
|
|
63079
|
+
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
|
63080
|
+
* else `false`.
|
|
63081
|
+
*/
|
|
63082
|
+
|
|
63083
|
+
function baseGt$1(value, other) {
|
|
63084
|
+
return value > other;
|
|
63085
|
+
}
|
|
63086
|
+
|
|
63087
|
+
var _baseGt = baseGt$1;
|
|
63088
|
+
|
|
63089
|
+
/**
|
|
63090
|
+
* Removes all key-value entries from the list cache.
|
|
63091
|
+
*
|
|
63092
|
+
* @private
|
|
63093
|
+
* @name clear
|
|
63094
|
+
* @memberOf ListCache
|
|
63095
|
+
*/
|
|
63096
|
+
|
|
63097
|
+
function listCacheClear$1() {
|
|
63098
|
+
this.__data__ = [];
|
|
63099
|
+
this.size = 0;
|
|
63100
|
+
}
|
|
63101
|
+
|
|
63102
|
+
var _listCacheClear = listCacheClear$1;
|
|
63103
|
+
|
|
63104
|
+
/**
|
|
63105
|
+
* Performs a
|
|
63106
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
63107
|
+
* comparison between two values to determine if they are equivalent.
|
|
63108
|
+
*
|
|
63109
|
+
* @static
|
|
63110
|
+
* @memberOf _
|
|
63111
|
+
* @since 4.0.0
|
|
63112
|
+
* @category Lang
|
|
63113
|
+
* @param {*} value The value to compare.
|
|
63114
|
+
* @param {*} other The other value to compare.
|
|
63115
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
63116
|
+
* @example
|
|
63117
|
+
*
|
|
63118
|
+
* var object = { 'a': 1 };
|
|
63119
|
+
* var other = { 'a': 1 };
|
|
63120
|
+
*
|
|
63121
|
+
* _.eq(object, object);
|
|
63122
|
+
* // => true
|
|
63123
|
+
*
|
|
63124
|
+
* _.eq(object, other);
|
|
63125
|
+
* // => false
|
|
63126
|
+
*
|
|
63127
|
+
* _.eq('a', 'a');
|
|
63128
|
+
* // => true
|
|
63129
|
+
*
|
|
63130
|
+
* _.eq('a', Object('a'));
|
|
63131
|
+
* // => false
|
|
63132
|
+
*
|
|
63133
|
+
* _.eq(NaN, NaN);
|
|
63134
|
+
* // => true
|
|
63135
|
+
*/
|
|
63136
|
+
|
|
63137
|
+
function eq$2(value, other) {
|
|
63138
|
+
return value === other || value !== value && other !== other;
|
|
63139
|
+
}
|
|
63140
|
+
|
|
63141
|
+
var eq_1 = eq$2;
|
|
63142
|
+
|
|
63143
|
+
var eq$1 = eq_1;
|
|
63144
|
+
/**
|
|
63145
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
63146
|
+
*
|
|
63147
|
+
* @private
|
|
63148
|
+
* @param {Array} array The array to inspect.
|
|
63149
|
+
* @param {*} key The key to search for.
|
|
63150
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
63151
|
+
*/
|
|
63152
|
+
|
|
63153
|
+
function assocIndexOf$4(array, key) {
|
|
63154
|
+
var length = array.length;
|
|
63155
|
+
|
|
63156
|
+
while (length--) {
|
|
63157
|
+
if (eq$1(array[length][0], key)) {
|
|
63158
|
+
return length;
|
|
63159
|
+
}
|
|
63160
|
+
}
|
|
63161
|
+
|
|
63162
|
+
return -1;
|
|
63163
|
+
}
|
|
63164
|
+
|
|
63165
|
+
var _assocIndexOf = assocIndexOf$4;
|
|
63166
|
+
|
|
63167
|
+
var assocIndexOf$3 = _assocIndexOf;
|
|
63168
|
+
/** Used for built-in method references. */
|
|
63169
|
+
|
|
63170
|
+
var arrayProto = Array.prototype;
|
|
63171
|
+
/** Built-in value references. */
|
|
63172
|
+
|
|
63173
|
+
var splice = arrayProto.splice;
|
|
63174
|
+
/**
|
|
63175
|
+
* Removes `key` and its value from the list cache.
|
|
63176
|
+
*
|
|
63177
|
+
* @private
|
|
63178
|
+
* @name delete
|
|
63179
|
+
* @memberOf ListCache
|
|
63180
|
+
* @param {string} key The key of the value to remove.
|
|
63181
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
63182
|
+
*/
|
|
63183
|
+
|
|
63184
|
+
function listCacheDelete$1(key) {
|
|
63185
|
+
var data = this.__data__,
|
|
63186
|
+
index = assocIndexOf$3(data, key);
|
|
63187
|
+
|
|
63188
|
+
if (index < 0) {
|
|
63189
|
+
return false;
|
|
63190
|
+
}
|
|
63191
|
+
|
|
63192
|
+
var lastIndex = data.length - 1;
|
|
63193
|
+
|
|
63194
|
+
if (index == lastIndex) {
|
|
63195
|
+
data.pop();
|
|
63196
|
+
} else {
|
|
63197
|
+
splice.call(data, index, 1);
|
|
63198
|
+
}
|
|
63199
|
+
|
|
63200
|
+
--this.size;
|
|
63201
|
+
return true;
|
|
63202
|
+
}
|
|
63203
|
+
|
|
63204
|
+
var _listCacheDelete = listCacheDelete$1;
|
|
63205
|
+
|
|
63206
|
+
var assocIndexOf$2 = _assocIndexOf;
|
|
63207
|
+
/**
|
|
63208
|
+
* Gets the list cache value for `key`.
|
|
63209
|
+
*
|
|
63210
|
+
* @private
|
|
63211
|
+
* @name get
|
|
63212
|
+
* @memberOf ListCache
|
|
63213
|
+
* @param {string} key The key of the value to get.
|
|
63214
|
+
* @returns {*} Returns the entry value.
|
|
63215
|
+
*/
|
|
63216
|
+
|
|
63217
|
+
function listCacheGet$1(key) {
|
|
63218
|
+
var data = this.__data__,
|
|
63219
|
+
index = assocIndexOf$2(data, key);
|
|
63220
|
+
return index < 0 ? undefined : data[index][1];
|
|
63221
|
+
}
|
|
63222
|
+
|
|
63223
|
+
var _listCacheGet = listCacheGet$1;
|
|
63224
|
+
|
|
63225
|
+
var assocIndexOf$1 = _assocIndexOf;
|
|
63226
|
+
/**
|
|
63227
|
+
* Checks if a list cache value for `key` exists.
|
|
63228
|
+
*
|
|
63229
|
+
* @private
|
|
63230
|
+
* @name has
|
|
63231
|
+
* @memberOf ListCache
|
|
63232
|
+
* @param {string} key The key of the entry to check.
|
|
63233
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
63234
|
+
*/
|
|
63235
|
+
|
|
63236
|
+
function listCacheHas$1(key) {
|
|
63237
|
+
return assocIndexOf$1(this.__data__, key) > -1;
|
|
63238
|
+
}
|
|
63239
|
+
|
|
63240
|
+
var _listCacheHas = listCacheHas$1;
|
|
63241
|
+
|
|
63242
|
+
var assocIndexOf = _assocIndexOf;
|
|
63243
|
+
/**
|
|
63244
|
+
* Sets the list cache `key` to `value`.
|
|
63245
|
+
*
|
|
63246
|
+
* @private
|
|
63247
|
+
* @name set
|
|
63248
|
+
* @memberOf ListCache
|
|
63249
|
+
* @param {string} key The key of the value to set.
|
|
63250
|
+
* @param {*} value The value to set.
|
|
63251
|
+
* @returns {Object} Returns the list cache instance.
|
|
63252
|
+
*/
|
|
63253
|
+
|
|
63254
|
+
function listCacheSet$1(key, value) {
|
|
63255
|
+
var data = this.__data__,
|
|
63256
|
+
index = assocIndexOf(data, key);
|
|
63257
|
+
|
|
63258
|
+
if (index < 0) {
|
|
63259
|
+
++this.size;
|
|
63260
|
+
data.push([key, value]);
|
|
63261
|
+
} else {
|
|
63262
|
+
data[index][1] = value;
|
|
63263
|
+
}
|
|
63264
|
+
|
|
63265
|
+
return this;
|
|
63266
|
+
}
|
|
63267
|
+
|
|
63268
|
+
var _listCacheSet = listCacheSet$1;
|
|
63269
|
+
|
|
63270
|
+
var listCacheClear = _listCacheClear,
|
|
63271
|
+
listCacheDelete = _listCacheDelete,
|
|
63272
|
+
listCacheGet = _listCacheGet,
|
|
63273
|
+
listCacheHas = _listCacheHas,
|
|
63274
|
+
listCacheSet = _listCacheSet;
|
|
63275
|
+
/**
|
|
63276
|
+
* Creates an list cache object.
|
|
63277
|
+
*
|
|
63278
|
+
* @private
|
|
63279
|
+
* @constructor
|
|
63280
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
63281
|
+
*/
|
|
63282
|
+
|
|
63283
|
+
function ListCache$4(entries) {
|
|
63284
|
+
var index = -1,
|
|
63285
|
+
length = entries == null ? 0 : entries.length;
|
|
63286
|
+
this.clear();
|
|
63287
|
+
|
|
63288
|
+
while (++index < length) {
|
|
63289
|
+
var entry = entries[index];
|
|
63290
|
+
this.set(entry[0], entry[1]);
|
|
63291
|
+
}
|
|
63292
|
+
} // Add methods to `ListCache`.
|
|
63293
|
+
|
|
63294
|
+
|
|
63295
|
+
ListCache$4.prototype.clear = listCacheClear;
|
|
63296
|
+
ListCache$4.prototype['delete'] = listCacheDelete;
|
|
63297
|
+
ListCache$4.prototype.get = listCacheGet;
|
|
63298
|
+
ListCache$4.prototype.has = listCacheHas;
|
|
63299
|
+
ListCache$4.prototype.set = listCacheSet;
|
|
63300
|
+
var _ListCache = ListCache$4;
|
|
63301
|
+
|
|
63302
|
+
var ListCache$3 = _ListCache;
|
|
63303
|
+
/**
|
|
63304
|
+
* Removes all key-value entries from the stack.
|
|
63305
|
+
*
|
|
63306
|
+
* @private
|
|
63307
|
+
* @name clear
|
|
63308
|
+
* @memberOf Stack
|
|
63309
|
+
*/
|
|
63310
|
+
|
|
63311
|
+
function stackClear$1() {
|
|
63312
|
+
this.__data__ = new ListCache$3();
|
|
63313
|
+
this.size = 0;
|
|
63314
|
+
}
|
|
63315
|
+
|
|
63316
|
+
var _stackClear = stackClear$1;
|
|
63317
|
+
|
|
63318
|
+
/**
|
|
63319
|
+
* Removes `key` and its value from the stack.
|
|
63320
|
+
*
|
|
63321
|
+
* @private
|
|
63322
|
+
* @name delete
|
|
63323
|
+
* @memberOf Stack
|
|
63324
|
+
* @param {string} key The key of the value to remove.
|
|
63325
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
63326
|
+
*/
|
|
63327
|
+
|
|
63328
|
+
function stackDelete$1(key) {
|
|
63329
|
+
var data = this.__data__,
|
|
63330
|
+
result = data['delete'](key);
|
|
63331
|
+
this.size = data.size;
|
|
63332
|
+
return result;
|
|
63333
|
+
}
|
|
63334
|
+
|
|
63335
|
+
var _stackDelete = stackDelete$1;
|
|
63336
|
+
|
|
63337
|
+
/**
|
|
63338
|
+
* Gets the stack value for `key`.
|
|
63339
|
+
*
|
|
63340
|
+
* @private
|
|
63341
|
+
* @name get
|
|
63342
|
+
* @memberOf Stack
|
|
63343
|
+
* @param {string} key The key of the value to get.
|
|
63344
|
+
* @returns {*} Returns the entry value.
|
|
63345
|
+
*/
|
|
63346
|
+
|
|
63347
|
+
function stackGet$1(key) {
|
|
63348
|
+
return this.__data__.get(key);
|
|
63349
|
+
}
|
|
63350
|
+
|
|
63351
|
+
var _stackGet = stackGet$1;
|
|
63352
|
+
|
|
63353
|
+
/**
|
|
63354
|
+
* Checks if a stack value for `key` exists.
|
|
63355
|
+
*
|
|
63356
|
+
* @private
|
|
63357
|
+
* @name has
|
|
63358
|
+
* @memberOf Stack
|
|
63359
|
+
* @param {string} key The key of the entry to check.
|
|
63360
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
63361
|
+
*/
|
|
63362
|
+
|
|
63363
|
+
function stackHas$1(key) {
|
|
63364
|
+
return this.__data__.has(key);
|
|
63365
|
+
}
|
|
63366
|
+
|
|
63367
|
+
var _stackHas = stackHas$1;
|
|
63368
|
+
|
|
63369
|
+
function isObject$3(value) {
|
|
63370
|
+
var type = _typeof(value);
|
|
63371
|
+
|
|
63372
|
+
return value != null && (type == 'object' || type == 'function');
|
|
63373
|
+
}
|
|
63374
|
+
|
|
63375
|
+
var isObject_1 = isObject$3;
|
|
63376
|
+
|
|
63377
|
+
var baseGetTag$3 = _baseGetTag,
|
|
63378
|
+
isObject$2 = isObject_1;
|
|
63379
|
+
/** `Object#toString` result references. */
|
|
63380
|
+
|
|
63381
|
+
var asyncTag = '[object AsyncFunction]',
|
|
63382
|
+
funcTag$1 = '[object Function]',
|
|
63383
|
+
genTag = '[object GeneratorFunction]',
|
|
63384
|
+
proxyTag = '[object Proxy]';
|
|
63385
|
+
/**
|
|
63386
|
+
* Checks if `value` is classified as a `Function` object.
|
|
63387
|
+
*
|
|
63388
|
+
* @static
|
|
63389
|
+
* @memberOf _
|
|
63390
|
+
* @since 0.1.0
|
|
63391
|
+
* @category Lang
|
|
63392
|
+
* @param {*} value The value to check.
|
|
63393
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
63394
|
+
* @example
|
|
63395
|
+
*
|
|
63396
|
+
* _.isFunction(_);
|
|
63397
|
+
* // => true
|
|
63398
|
+
*
|
|
63399
|
+
* _.isFunction(/abc/);
|
|
63400
|
+
* // => false
|
|
63401
|
+
*/
|
|
63402
|
+
|
|
63403
|
+
function isFunction$2(value) {
|
|
63404
|
+
if (!isObject$2(value)) {
|
|
63405
|
+
return false;
|
|
63406
|
+
} // The use of `Object#toString` avoids issues with the `typeof` operator
|
|
63407
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
63408
|
+
|
|
63409
|
+
|
|
63410
|
+
var tag = baseGetTag$3(value);
|
|
63411
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
63412
|
+
}
|
|
63413
|
+
|
|
63414
|
+
var isFunction_1 = isFunction$2;
|
|
63415
|
+
|
|
63416
|
+
var root$6 = _root;
|
|
63417
|
+
/** Used to detect overreaching core-js shims. */
|
|
63418
|
+
|
|
63419
|
+
var coreJsData$1 = root$6['__core-js_shared__'];
|
|
63420
|
+
var _coreJsData = coreJsData$1;
|
|
63421
|
+
|
|
63422
|
+
var coreJsData = _coreJsData;
|
|
63423
|
+
/** Used to detect methods masquerading as native. */
|
|
63424
|
+
|
|
63425
|
+
var maskSrcKey = function () {
|
|
63426
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
63427
|
+
return uid ? 'Symbol(src)_1.' + uid : '';
|
|
62941
63428
|
}();
|
|
62942
|
-
/**
|
|
63429
|
+
/**
|
|
63430
|
+
* Checks if `func` has its source masked.
|
|
63431
|
+
*
|
|
63432
|
+
* @private
|
|
63433
|
+
* @param {Function} func The function to check.
|
|
63434
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
63435
|
+
*/
|
|
62943
63436
|
|
|
62944
63437
|
|
|
62945
|
-
|
|
62946
|
-
|
|
62947
|
-
|
|
63438
|
+
function isMasked$1(func) {
|
|
63439
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
63440
|
+
}
|
|
62948
63441
|
|
|
62949
|
-
|
|
62950
|
-
while (1) {
|
|
62951
|
-
switch (_context2.prev = _context2.next) {
|
|
62952
|
-
case 0:
|
|
62953
|
-
_iterator = _createForOfIteratorHelper(secondaries);
|
|
62954
|
-
_context2.prev = 1;
|
|
63442
|
+
var _isMasked = isMasked$1;
|
|
62955
63443
|
|
|
62956
|
-
|
|
63444
|
+
/** Used for built-in method references. */
|
|
63445
|
+
var funcProto$1 = Function.prototype;
|
|
63446
|
+
/** Used to resolve the decompiled source of functions. */
|
|
62957
63447
|
|
|
62958
|
-
|
|
62959
|
-
|
|
62960
|
-
|
|
62961
|
-
|
|
62962
|
-
|
|
63448
|
+
var funcToString$1 = funcProto$1.toString;
|
|
63449
|
+
/**
|
|
63450
|
+
* Converts `func` to its source code.
|
|
63451
|
+
*
|
|
63452
|
+
* @private
|
|
63453
|
+
* @param {Function} func The function to convert.
|
|
63454
|
+
* @returns {string} Returns the source code.
|
|
63455
|
+
*/
|
|
62963
63456
|
|
|
62964
|
-
|
|
62965
|
-
|
|
62966
|
-
|
|
63457
|
+
function toSource$2(func) {
|
|
63458
|
+
if (func != null) {
|
|
63459
|
+
try {
|
|
63460
|
+
return funcToString$1.call(func);
|
|
63461
|
+
} catch (e) {}
|
|
62967
63462
|
|
|
62968
|
-
|
|
62969
|
-
|
|
63463
|
+
try {
|
|
63464
|
+
return func + '';
|
|
63465
|
+
} catch (e) {}
|
|
63466
|
+
}
|
|
62970
63467
|
|
|
62971
|
-
|
|
62972
|
-
|
|
62973
|
-
break;
|
|
62974
|
-
}
|
|
63468
|
+
return '';
|
|
63469
|
+
}
|
|
62975
63470
|
|
|
62976
|
-
|
|
63471
|
+
var _toSource = toSource$2;
|
|
62977
63472
|
|
|
62978
|
-
|
|
62979
|
-
|
|
62980
|
-
|
|
62981
|
-
|
|
62982
|
-
|
|
63473
|
+
var isFunction$1 = isFunction_1,
|
|
63474
|
+
isMasked = _isMasked,
|
|
63475
|
+
isObject$1 = isObject_1,
|
|
63476
|
+
toSource$1 = _toSource;
|
|
63477
|
+
/**
|
|
63478
|
+
* Used to match `RegExp`
|
|
63479
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
63480
|
+
*/
|
|
62983
63481
|
|
|
62984
|
-
|
|
63482
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
63483
|
+
/** Used to detect host constructors (Safari). */
|
|
62985
63484
|
|
|
62986
|
-
|
|
62987
|
-
|
|
62988
|
-
break;
|
|
63485
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
63486
|
+
/** Used for built-in method references. */
|
|
62989
63487
|
|
|
62990
|
-
|
|
62991
|
-
|
|
62992
|
-
|
|
63488
|
+
var funcProto = Function.prototype,
|
|
63489
|
+
objectProto$9 = Object.prototype;
|
|
63490
|
+
/** Used to resolve the decompiled source of functions. */
|
|
62993
63491
|
|
|
62994
|
-
|
|
62995
|
-
|
|
62996
|
-
|
|
63492
|
+
var funcToString = funcProto.toString;
|
|
63493
|
+
/** Used to check objects for own properties. */
|
|
63494
|
+
|
|
63495
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
63496
|
+
/** Used to detect if a method is native. */
|
|
62997
63497
|
|
|
62998
|
-
|
|
63498
|
+
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
63499
|
+
/**
|
|
63500
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
63501
|
+
*
|
|
63502
|
+
* @private
|
|
63503
|
+
* @param {*} value The value to check.
|
|
63504
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
63505
|
+
* else `false`.
|
|
63506
|
+
*/
|
|
62999
63507
|
|
|
63000
|
-
|
|
63001
|
-
|
|
63508
|
+
function baseIsNative$1(value) {
|
|
63509
|
+
if (!isObject$1(value) || isMasked(value)) {
|
|
63510
|
+
return false;
|
|
63511
|
+
}
|
|
63002
63512
|
|
|
63003
|
-
|
|
63513
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
63514
|
+
return pattern.test(toSource$1(value));
|
|
63515
|
+
}
|
|
63004
63516
|
|
|
63005
|
-
|
|
63517
|
+
var _baseIsNative = baseIsNative$1;
|
|
63006
63518
|
|
|
63007
|
-
|
|
63008
|
-
|
|
63519
|
+
/**
|
|
63520
|
+
* Gets the value at `key` of `object`.
|
|
63521
|
+
*
|
|
63522
|
+
* @private
|
|
63523
|
+
* @param {Object} [object] The object to query.
|
|
63524
|
+
* @param {string} key The key of the property to get.
|
|
63525
|
+
* @returns {*} Returns the property value.
|
|
63526
|
+
*/
|
|
63009
63527
|
|
|
63010
|
-
|
|
63011
|
-
|
|
63012
|
-
|
|
63013
|
-
}
|
|
63014
|
-
}
|
|
63015
|
-
}, _callee2, null, [[1, 16, 19, 22]]);
|
|
63016
|
-
}));
|
|
63528
|
+
function getValue$1(object, key) {
|
|
63529
|
+
return object == null ? undefined : object[key];
|
|
63530
|
+
}
|
|
63017
63531
|
|
|
63018
|
-
|
|
63019
|
-
|
|
63532
|
+
var _getValue = getValue$1;
|
|
63533
|
+
|
|
63534
|
+
var baseIsNative = _baseIsNative,
|
|
63535
|
+
getValue = _getValue;
|
|
63536
|
+
/**
|
|
63537
|
+
* Gets the native function at `key` of `object`.
|
|
63538
|
+
*
|
|
63539
|
+
* @private
|
|
63540
|
+
* @param {Object} object The object to query.
|
|
63541
|
+
* @param {string} key The key of the method to get.
|
|
63542
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
63543
|
+
*/
|
|
63544
|
+
|
|
63545
|
+
function getNative$6(object, key) {
|
|
63546
|
+
var value = getValue(object, key);
|
|
63547
|
+
return baseIsNative(value) ? value : undefined;
|
|
63548
|
+
}
|
|
63549
|
+
|
|
63550
|
+
var _getNative = getNative$6;
|
|
63551
|
+
|
|
63552
|
+
var getNative$5 = _getNative,
|
|
63553
|
+
root$5 = _root;
|
|
63554
|
+
/* Built-in method references that are verified to be native. */
|
|
63555
|
+
|
|
63556
|
+
var Map$4 = getNative$5(root$5, 'Map');
|
|
63557
|
+
var _Map = Map$4;
|
|
63558
|
+
|
|
63559
|
+
var getNative$4 = _getNative;
|
|
63560
|
+
/* Built-in method references that are verified to be native. */
|
|
63561
|
+
|
|
63562
|
+
var nativeCreate$4 = getNative$4(Object, 'create');
|
|
63563
|
+
var _nativeCreate = nativeCreate$4;
|
|
63564
|
+
|
|
63565
|
+
var nativeCreate$3 = _nativeCreate;
|
|
63566
|
+
/**
|
|
63567
|
+
* Removes all key-value entries from the hash.
|
|
63568
|
+
*
|
|
63569
|
+
* @private
|
|
63570
|
+
* @name clear
|
|
63571
|
+
* @memberOf Hash
|
|
63572
|
+
*/
|
|
63573
|
+
|
|
63574
|
+
function hashClear$1() {
|
|
63575
|
+
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
63576
|
+
this.size = 0;
|
|
63577
|
+
}
|
|
63578
|
+
|
|
63579
|
+
var _hashClear = hashClear$1;
|
|
63580
|
+
|
|
63581
|
+
/**
|
|
63582
|
+
* Removes `key` and its value from the hash.
|
|
63583
|
+
*
|
|
63584
|
+
* @private
|
|
63585
|
+
* @name delete
|
|
63586
|
+
* @memberOf Hash
|
|
63587
|
+
* @param {Object} hash The hash to modify.
|
|
63588
|
+
* @param {string} key The key of the value to remove.
|
|
63589
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
63590
|
+
*/
|
|
63591
|
+
|
|
63592
|
+
function hashDelete$1(key) {
|
|
63593
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
63594
|
+
this.size -= result ? 1 : 0;
|
|
63595
|
+
return result;
|
|
63596
|
+
}
|
|
63597
|
+
|
|
63598
|
+
var _hashDelete = hashDelete$1;
|
|
63599
|
+
|
|
63600
|
+
var nativeCreate$2 = _nativeCreate;
|
|
63601
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
63602
|
+
|
|
63603
|
+
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
63604
|
+
/** Used for built-in method references. */
|
|
63605
|
+
|
|
63606
|
+
var objectProto$8 = Object.prototype;
|
|
63607
|
+
/** Used to check objects for own properties. */
|
|
63608
|
+
|
|
63609
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
63610
|
+
/**
|
|
63611
|
+
* Gets the hash value for `key`.
|
|
63612
|
+
*
|
|
63613
|
+
* @private
|
|
63614
|
+
* @name get
|
|
63615
|
+
* @memberOf Hash
|
|
63616
|
+
* @param {string} key The key of the value to get.
|
|
63617
|
+
* @returns {*} Returns the entry value.
|
|
63618
|
+
*/
|
|
63619
|
+
|
|
63620
|
+
function hashGet$1(key) {
|
|
63621
|
+
var data = this.__data__;
|
|
63622
|
+
|
|
63623
|
+
if (nativeCreate$2) {
|
|
63624
|
+
var result = data[key];
|
|
63625
|
+
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
63626
|
+
}
|
|
63627
|
+
|
|
63628
|
+
return hasOwnProperty$6.call(data, key) ? data[key] : undefined;
|
|
63629
|
+
}
|
|
63630
|
+
|
|
63631
|
+
var _hashGet = hashGet$1;
|
|
63632
|
+
|
|
63633
|
+
var nativeCreate$1 = _nativeCreate;
|
|
63634
|
+
/** Used for built-in method references. */
|
|
63635
|
+
|
|
63636
|
+
var objectProto$7 = Object.prototype;
|
|
63637
|
+
/** Used to check objects for own properties. */
|
|
63638
|
+
|
|
63639
|
+
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
63640
|
+
/**
|
|
63641
|
+
* Checks if a hash value for `key` exists.
|
|
63642
|
+
*
|
|
63643
|
+
* @private
|
|
63644
|
+
* @name has
|
|
63645
|
+
* @memberOf Hash
|
|
63646
|
+
* @param {string} key The key of the entry to check.
|
|
63647
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
63648
|
+
*/
|
|
63649
|
+
|
|
63650
|
+
function hashHas$1(key) {
|
|
63651
|
+
var data = this.__data__;
|
|
63652
|
+
return nativeCreate$1 ? data[key] !== undefined : hasOwnProperty$5.call(data, key);
|
|
63653
|
+
}
|
|
63654
|
+
|
|
63655
|
+
var _hashHas = hashHas$1;
|
|
63656
|
+
|
|
63657
|
+
var nativeCreate = _nativeCreate;
|
|
63658
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
63659
|
+
|
|
63660
|
+
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
63661
|
+
/**
|
|
63662
|
+
* Sets the hash `key` to `value`.
|
|
63663
|
+
*
|
|
63664
|
+
* @private
|
|
63665
|
+
* @name set
|
|
63666
|
+
* @memberOf Hash
|
|
63667
|
+
* @param {string} key The key of the value to set.
|
|
63668
|
+
* @param {*} value The value to set.
|
|
63669
|
+
* @returns {Object} Returns the hash instance.
|
|
63670
|
+
*/
|
|
63671
|
+
|
|
63672
|
+
function hashSet$1(key, value) {
|
|
63673
|
+
var data = this.__data__;
|
|
63674
|
+
this.size += this.has(key) ? 0 : 1;
|
|
63675
|
+
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED$1 : value;
|
|
63676
|
+
return this;
|
|
63677
|
+
}
|
|
63678
|
+
|
|
63679
|
+
var _hashSet = hashSet$1;
|
|
63680
|
+
|
|
63681
|
+
var hashClear = _hashClear,
|
|
63682
|
+
hashDelete = _hashDelete,
|
|
63683
|
+
hashGet = _hashGet,
|
|
63684
|
+
hashHas = _hashHas,
|
|
63685
|
+
hashSet = _hashSet;
|
|
63686
|
+
/**
|
|
63687
|
+
* Creates a hash object.
|
|
63688
|
+
*
|
|
63689
|
+
* @private
|
|
63690
|
+
* @constructor
|
|
63691
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
63692
|
+
*/
|
|
63693
|
+
|
|
63694
|
+
function Hash$1(entries) {
|
|
63695
|
+
var index = -1,
|
|
63696
|
+
length = entries == null ? 0 : entries.length;
|
|
63697
|
+
this.clear();
|
|
63698
|
+
|
|
63699
|
+
while (++index < length) {
|
|
63700
|
+
var entry = entries[index];
|
|
63701
|
+
this.set(entry[0], entry[1]);
|
|
63702
|
+
}
|
|
63703
|
+
} // Add methods to `Hash`.
|
|
63704
|
+
|
|
63705
|
+
|
|
63706
|
+
Hash$1.prototype.clear = hashClear;
|
|
63707
|
+
Hash$1.prototype['delete'] = hashDelete;
|
|
63708
|
+
Hash$1.prototype.get = hashGet;
|
|
63709
|
+
Hash$1.prototype.has = hashHas;
|
|
63710
|
+
Hash$1.prototype.set = hashSet;
|
|
63711
|
+
var _Hash = Hash$1;
|
|
63712
|
+
|
|
63713
|
+
var Hash = _Hash,
|
|
63714
|
+
ListCache$2 = _ListCache,
|
|
63715
|
+
Map$3 = _Map;
|
|
63716
|
+
/**
|
|
63717
|
+
* Removes all key-value entries from the map.
|
|
63718
|
+
*
|
|
63719
|
+
* @private
|
|
63720
|
+
* @name clear
|
|
63721
|
+
* @memberOf MapCache
|
|
63722
|
+
*/
|
|
63723
|
+
|
|
63724
|
+
function mapCacheClear$1() {
|
|
63725
|
+
this.size = 0;
|
|
63726
|
+
this.__data__ = {
|
|
63727
|
+
'hash': new Hash(),
|
|
63728
|
+
'map': new (Map$3 || ListCache$2)(),
|
|
63729
|
+
'string': new Hash()
|
|
63020
63730
|
};
|
|
63021
|
-
}
|
|
63731
|
+
}
|
|
63022
63732
|
|
|
63023
|
-
var
|
|
63024
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(libs, creatorNodeWhitelist, creatorNodeBlacklist) {
|
|
63025
|
-
var _libs$userStateManage;
|
|
63733
|
+
var _mapCacheClear = mapCacheClear$1;
|
|
63026
63734
|
|
|
63027
|
-
|
|
63735
|
+
function isKeyable$1(value) {
|
|
63736
|
+
var type = _typeof(value);
|
|
63028
63737
|
|
|
63029
|
-
|
|
63030
|
-
|
|
63031
|
-
switch (_context3.prev = _context3.next) {
|
|
63032
|
-
case 0:
|
|
63033
|
-
console.debug('Sanity Check - rolloverNodes');
|
|
63034
|
-
user = (_libs$userStateManage = libs.userStateManager) === null || _libs$userStateManage === void 0 ? void 0 : _libs$userStateManage.getCurrentUser();
|
|
63738
|
+
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
|
63739
|
+
}
|
|
63035
63740
|
|
|
63036
|
-
|
|
63037
|
-
_context3.next = 4;
|
|
63038
|
-
break;
|
|
63039
|
-
}
|
|
63741
|
+
var _isKeyable = isKeyable$1;
|
|
63040
63742
|
|
|
63041
|
-
|
|
63743
|
+
var isKeyable = _isKeyable;
|
|
63744
|
+
/**
|
|
63745
|
+
* Gets the data for `map`.
|
|
63746
|
+
*
|
|
63747
|
+
* @private
|
|
63748
|
+
* @param {Object} map The map to query.
|
|
63749
|
+
* @param {string} key The reference key.
|
|
63750
|
+
* @returns {*} Returns the map data.
|
|
63751
|
+
*/
|
|
63042
63752
|
|
|
63043
|
-
|
|
63044
|
-
|
|
63753
|
+
function getMapData$4(map, key) {
|
|
63754
|
+
var data = map.__data__;
|
|
63755
|
+
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
|
63756
|
+
}
|
|
63045
63757
|
|
|
63046
|
-
|
|
63047
|
-
_context3.next = 7;
|
|
63048
|
-
break;
|
|
63049
|
-
}
|
|
63758
|
+
var _getMapData = getMapData$4;
|
|
63050
63759
|
|
|
63051
|
-
|
|
63760
|
+
var getMapData$3 = _getMapData;
|
|
63761
|
+
/**
|
|
63762
|
+
* Removes `key` and its value from the map.
|
|
63763
|
+
*
|
|
63764
|
+
* @private
|
|
63765
|
+
* @name delete
|
|
63766
|
+
* @memberOf MapCache
|
|
63767
|
+
* @param {string} key The key of the value to remove.
|
|
63768
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
63769
|
+
*/
|
|
63052
63770
|
|
|
63053
|
-
|
|
63054
|
-
|
|
63055
|
-
|
|
63771
|
+
function mapCacheDelete$1(key) {
|
|
63772
|
+
var result = getMapData$3(this, key)['delete'](key);
|
|
63773
|
+
this.size -= result ? 1 : 0;
|
|
63774
|
+
return result;
|
|
63775
|
+
}
|
|
63056
63776
|
|
|
63057
|
-
|
|
63058
|
-
healthy = _context3.sent;
|
|
63777
|
+
var _mapCacheDelete = mapCacheDelete$1;
|
|
63059
63778
|
|
|
63060
|
-
|
|
63061
|
-
|
|
63062
|
-
|
|
63063
|
-
|
|
63779
|
+
var getMapData$2 = _getMapData;
|
|
63780
|
+
/**
|
|
63781
|
+
* Gets the map value for `key`.
|
|
63782
|
+
*
|
|
63783
|
+
* @private
|
|
63784
|
+
* @name get
|
|
63785
|
+
* @memberOf MapCache
|
|
63786
|
+
* @param {string} key The key of the value to get.
|
|
63787
|
+
* @returns {*} Returns the entry value.
|
|
63788
|
+
*/
|
|
63064
63789
|
|
|
63065
|
-
|
|
63790
|
+
function mapCacheGet$1(key) {
|
|
63791
|
+
return getMapData$2(this, key).get(key);
|
|
63792
|
+
}
|
|
63066
63793
|
|
|
63067
|
-
|
|
63068
|
-
secondaries = CreatorNode.getSecondaries(user.creator_node_endpoint);
|
|
63069
|
-
_context3.prev = 13;
|
|
63070
|
-
_context3.next = 16;
|
|
63071
|
-
return getNewPrimary(libs, secondaries);
|
|
63794
|
+
var _mapCacheGet = mapCacheGet$1;
|
|
63072
63795
|
|
|
63073
|
-
|
|
63074
|
-
|
|
63075
|
-
|
|
63796
|
+
var getMapData$1 = _getMapData;
|
|
63797
|
+
/**
|
|
63798
|
+
* Checks if a map value for `key` exists.
|
|
63799
|
+
*
|
|
63800
|
+
* @private
|
|
63801
|
+
* @name has
|
|
63802
|
+
* @memberOf MapCache
|
|
63803
|
+
* @param {string} key The key of the entry to check.
|
|
63804
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
63805
|
+
*/
|
|
63076
63806
|
|
|
63077
|
-
|
|
63078
|
-
|
|
63079
|
-
|
|
63080
|
-
return (_libs$ServiceProvider = libs.ServiceProvider) === null || _libs$ServiceProvider === void 0 ? void 0 : _libs$ServiceProvider.autoSelectCreatorNodes({
|
|
63081
|
-
numberOfNodes: 2 - newSecondaries.length,
|
|
63082
|
-
whitelist: creatorNodeWhitelist,
|
|
63083
|
-
// Exclude ones we currently have
|
|
63084
|
-
blacklist: new Set([newPrimary].concat(_toConsumableArray(newSecondaries))),
|
|
63085
|
-
preferHigherPatchForPrimary: (_libs$User = libs.User) === null || _libs$User === void 0 ? void 0 : _libs$User.preferHigherPatchForPrimary,
|
|
63086
|
-
preferHigherPatchForSecondaries: (_libs$User2 = libs.User) === null || _libs$User2 === void 0 ? void 0 : _libs$User2.preferHigherPatchForSecondaries
|
|
63087
|
-
});
|
|
63807
|
+
function mapCacheHas$1(key) {
|
|
63808
|
+
return getMapData$1(this, key).has(key);
|
|
63809
|
+
}
|
|
63088
63810
|
|
|
63089
|
-
|
|
63090
|
-
autoselect = _context3.sent;
|
|
63811
|
+
var _mapCacheHas = mapCacheHas$1;
|
|
63091
63812
|
|
|
63092
|
-
|
|
63093
|
-
|
|
63094
|
-
|
|
63813
|
+
var getMapData = _getMapData;
|
|
63814
|
+
/**
|
|
63815
|
+
* Sets the map `key` to `value`.
|
|
63816
|
+
*
|
|
63817
|
+
* @private
|
|
63818
|
+
* @name set
|
|
63819
|
+
* @memberOf MapCache
|
|
63820
|
+
* @param {string} key The key of the value to set.
|
|
63821
|
+
* @param {*} value The value to set.
|
|
63822
|
+
* @returns {Object} Returns the map cache instance.
|
|
63823
|
+
*/
|
|
63095
63824
|
|
|
63825
|
+
function mapCacheSet$1(key, value) {
|
|
63826
|
+
var data = getMapData(this, key),
|
|
63827
|
+
size = data.size;
|
|
63828
|
+
data.set(key, value);
|
|
63829
|
+
this.size += data.size == size ? 0 : 1;
|
|
63830
|
+
return this;
|
|
63831
|
+
}
|
|
63096
63832
|
|
|
63097
|
-
|
|
63098
|
-
_context3.next = 27;
|
|
63099
|
-
return (_libs$creatorNode2 = libs.creatorNode) === null || _libs$creatorNode2 === void 0 ? void 0 : _libs$creatorNode2.setEndpoint(newEndpoints[0]);
|
|
63833
|
+
var _mapCacheSet = mapCacheSet$1;
|
|
63100
63834
|
|
|
63101
|
-
|
|
63102
|
-
|
|
63103
|
-
|
|
63104
|
-
|
|
63105
|
-
|
|
63106
|
-
|
|
63107
|
-
|
|
63835
|
+
var mapCacheClear = _mapCacheClear,
|
|
63836
|
+
mapCacheDelete = _mapCacheDelete,
|
|
63837
|
+
mapCacheGet = _mapCacheGet,
|
|
63838
|
+
mapCacheHas = _mapCacheHas,
|
|
63839
|
+
mapCacheSet = _mapCacheSet;
|
|
63840
|
+
/**
|
|
63841
|
+
* Creates a map cache object to store key-value pairs.
|
|
63842
|
+
*
|
|
63843
|
+
* @private
|
|
63844
|
+
* @constructor
|
|
63845
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
63846
|
+
*/
|
|
63108
63847
|
|
|
63109
|
-
|
|
63110
|
-
|
|
63111
|
-
|
|
63848
|
+
function MapCache$3(entries) {
|
|
63849
|
+
var index = -1,
|
|
63850
|
+
length = entries == null ? 0 : entries.length;
|
|
63851
|
+
this.clear();
|
|
63112
63852
|
|
|
63113
|
-
|
|
63114
|
-
|
|
63115
|
-
|
|
63116
|
-
|
|
63853
|
+
while (++index < length) {
|
|
63854
|
+
var entry = entries[index];
|
|
63855
|
+
this.set(entry[0], entry[1]);
|
|
63856
|
+
}
|
|
63857
|
+
} // Add methods to `MapCache`.
|
|
63117
63858
|
|
|
63118
|
-
case 37:
|
|
63119
|
-
case "end":
|
|
63120
|
-
return _context3.stop();
|
|
63121
|
-
}
|
|
63122
|
-
}
|
|
63123
|
-
}, _callee3, null, [[13, 34]]);
|
|
63124
|
-
}));
|
|
63125
63859
|
|
|
63126
|
-
|
|
63127
|
-
|
|
63860
|
+
MapCache$3.prototype.clear = mapCacheClear;
|
|
63861
|
+
MapCache$3.prototype['delete'] = mapCacheDelete;
|
|
63862
|
+
MapCache$3.prototype.get = mapCacheGet;
|
|
63863
|
+
MapCache$3.prototype.has = mapCacheHas;
|
|
63864
|
+
MapCache$3.prototype.set = mapCacheSet;
|
|
63865
|
+
var _MapCache = MapCache$3;
|
|
63866
|
+
|
|
63867
|
+
var ListCache$1 = _ListCache,
|
|
63868
|
+
Map$2 = _Map,
|
|
63869
|
+
MapCache$2 = _MapCache;
|
|
63870
|
+
/** Used as the size to enable large array optimizations. */
|
|
63871
|
+
|
|
63872
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
63873
|
+
/**
|
|
63874
|
+
* Sets the stack `key` to `value`.
|
|
63875
|
+
*
|
|
63876
|
+
* @private
|
|
63877
|
+
* @name set
|
|
63878
|
+
* @memberOf Stack
|
|
63879
|
+
* @param {string} key The key of the value to set.
|
|
63880
|
+
* @param {*} value The value to set.
|
|
63881
|
+
* @returns {Object} Returns the stack cache instance.
|
|
63882
|
+
*/
|
|
63883
|
+
|
|
63884
|
+
function stackSet$1(key, value) {
|
|
63885
|
+
var data = this.__data__;
|
|
63886
|
+
|
|
63887
|
+
if (data instanceof ListCache$1) {
|
|
63888
|
+
var pairs = data.__data__;
|
|
63889
|
+
|
|
63890
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
63891
|
+
pairs.push([key, value]);
|
|
63892
|
+
this.size = ++data.size;
|
|
63893
|
+
return this;
|
|
63894
|
+
}
|
|
63895
|
+
|
|
63896
|
+
data = this.__data__ = new MapCache$2(pairs);
|
|
63897
|
+
}
|
|
63898
|
+
|
|
63899
|
+
data.set(key, value);
|
|
63900
|
+
this.size = data.size;
|
|
63901
|
+
return this;
|
|
63902
|
+
}
|
|
63903
|
+
|
|
63904
|
+
var _stackSet = stackSet$1;
|
|
63905
|
+
|
|
63906
|
+
var ListCache = _ListCache,
|
|
63907
|
+
stackClear = _stackClear,
|
|
63908
|
+
stackDelete = _stackDelete,
|
|
63909
|
+
stackGet = _stackGet,
|
|
63910
|
+
stackHas = _stackHas,
|
|
63911
|
+
stackSet = _stackSet;
|
|
63912
|
+
/**
|
|
63913
|
+
* Creates a stack cache object to store key-value pairs.
|
|
63914
|
+
*
|
|
63915
|
+
* @private
|
|
63916
|
+
* @constructor
|
|
63917
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
63918
|
+
*/
|
|
63919
|
+
|
|
63920
|
+
function Stack$2(entries) {
|
|
63921
|
+
var data = this.__data__ = new ListCache(entries);
|
|
63922
|
+
this.size = data.size;
|
|
63923
|
+
} // Add methods to `Stack`.
|
|
63924
|
+
|
|
63925
|
+
|
|
63926
|
+
Stack$2.prototype.clear = stackClear;
|
|
63927
|
+
Stack$2.prototype['delete'] = stackDelete;
|
|
63928
|
+
Stack$2.prototype.get = stackGet;
|
|
63929
|
+
Stack$2.prototype.has = stackHas;
|
|
63930
|
+
Stack$2.prototype.set = stackSet;
|
|
63931
|
+
var _Stack = Stack$2;
|
|
63932
|
+
|
|
63933
|
+
/** Used to stand-in for `undefined` hash values. */
|
|
63934
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
63935
|
+
/**
|
|
63936
|
+
* Adds `value` to the array cache.
|
|
63937
|
+
*
|
|
63938
|
+
* @private
|
|
63939
|
+
* @name add
|
|
63940
|
+
* @memberOf SetCache
|
|
63941
|
+
* @alias push
|
|
63942
|
+
* @param {*} value The value to cache.
|
|
63943
|
+
* @returns {Object} Returns the cache instance.
|
|
63944
|
+
*/
|
|
63945
|
+
|
|
63946
|
+
function setCacheAdd$1(value) {
|
|
63947
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
63948
|
+
|
|
63949
|
+
return this;
|
|
63950
|
+
}
|
|
63951
|
+
|
|
63952
|
+
var _setCacheAdd = setCacheAdd$1;
|
|
63953
|
+
|
|
63954
|
+
/**
|
|
63955
|
+
* Checks if `value` is in the array cache.
|
|
63956
|
+
*
|
|
63957
|
+
* @private
|
|
63958
|
+
* @name has
|
|
63959
|
+
* @memberOf SetCache
|
|
63960
|
+
* @param {*} value The value to search for.
|
|
63961
|
+
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
63962
|
+
*/
|
|
63963
|
+
|
|
63964
|
+
function setCacheHas$1(value) {
|
|
63965
|
+
return this.__data__.has(value);
|
|
63966
|
+
}
|
|
63967
|
+
|
|
63968
|
+
var _setCacheHas = setCacheHas$1;
|
|
63969
|
+
|
|
63970
|
+
var MapCache$1 = _MapCache,
|
|
63971
|
+
setCacheAdd = _setCacheAdd,
|
|
63972
|
+
setCacheHas = _setCacheHas;
|
|
63973
|
+
/**
|
|
63974
|
+
*
|
|
63975
|
+
* Creates an array cache object to store unique values.
|
|
63976
|
+
*
|
|
63977
|
+
* @private
|
|
63978
|
+
* @constructor
|
|
63979
|
+
* @param {Array} [values] The values to cache.
|
|
63980
|
+
*/
|
|
63981
|
+
|
|
63982
|
+
function SetCache$1(values) {
|
|
63983
|
+
var index = -1,
|
|
63984
|
+
length = values == null ? 0 : values.length;
|
|
63985
|
+
this.__data__ = new MapCache$1();
|
|
63986
|
+
|
|
63987
|
+
while (++index < length) {
|
|
63988
|
+
this.add(values[index]);
|
|
63989
|
+
}
|
|
63990
|
+
} // Add methods to `SetCache`.
|
|
63991
|
+
|
|
63992
|
+
|
|
63993
|
+
SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
|
|
63994
|
+
SetCache$1.prototype.has = setCacheHas;
|
|
63995
|
+
var _SetCache = SetCache$1;
|
|
63996
|
+
|
|
63997
|
+
/**
|
|
63998
|
+
* A specialized version of `_.some` for arrays without support for iteratee
|
|
63999
|
+
* shorthands.
|
|
64000
|
+
*
|
|
64001
|
+
* @private
|
|
64002
|
+
* @param {Array} [array] The array to iterate over.
|
|
64003
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
64004
|
+
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
64005
|
+
* else `false`.
|
|
64006
|
+
*/
|
|
64007
|
+
|
|
64008
|
+
function arraySome$1(array, predicate) {
|
|
64009
|
+
var index = -1,
|
|
64010
|
+
length = array == null ? 0 : array.length;
|
|
64011
|
+
|
|
64012
|
+
while (++index < length) {
|
|
64013
|
+
if (predicate(array[index], index, array)) {
|
|
64014
|
+
return true;
|
|
64015
|
+
}
|
|
64016
|
+
}
|
|
64017
|
+
|
|
64018
|
+
return false;
|
|
64019
|
+
}
|
|
64020
|
+
|
|
64021
|
+
var _arraySome = arraySome$1;
|
|
64022
|
+
|
|
64023
|
+
/**
|
|
64024
|
+
* Checks if a `cache` value for `key` exists.
|
|
64025
|
+
*
|
|
64026
|
+
* @private
|
|
64027
|
+
* @param {Object} cache The cache to query.
|
|
64028
|
+
* @param {string} key The key of the entry to check.
|
|
64029
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
64030
|
+
*/
|
|
64031
|
+
|
|
64032
|
+
function cacheHas$1(cache, key) {
|
|
64033
|
+
return cache.has(key);
|
|
64034
|
+
}
|
|
64035
|
+
|
|
64036
|
+
var _cacheHas = cacheHas$1;
|
|
64037
|
+
|
|
64038
|
+
var SetCache = _SetCache,
|
|
64039
|
+
arraySome = _arraySome,
|
|
64040
|
+
cacheHas = _cacheHas;
|
|
64041
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
64042
|
+
|
|
64043
|
+
var COMPARE_PARTIAL_FLAG$5 = 1,
|
|
64044
|
+
COMPARE_UNORDERED_FLAG$3 = 2;
|
|
64045
|
+
/**
|
|
64046
|
+
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
64047
|
+
* partial deep comparisons.
|
|
64048
|
+
*
|
|
64049
|
+
* @private
|
|
64050
|
+
* @param {Array} array The array to compare.
|
|
64051
|
+
* @param {Array} other The other array to compare.
|
|
64052
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
64053
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
64054
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
64055
|
+
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
64056
|
+
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
64057
|
+
*/
|
|
64058
|
+
|
|
64059
|
+
function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
|
|
64060
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
|
|
64061
|
+
arrLength = array.length,
|
|
64062
|
+
othLength = other.length;
|
|
64063
|
+
|
|
64064
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
64065
|
+
return false;
|
|
64066
|
+
} // Check that cyclic values are equal.
|
|
64067
|
+
|
|
64068
|
+
|
|
64069
|
+
var arrStacked = stack.get(array);
|
|
64070
|
+
var othStacked = stack.get(other);
|
|
64071
|
+
|
|
64072
|
+
if (arrStacked && othStacked) {
|
|
64073
|
+
return arrStacked == other && othStacked == array;
|
|
64074
|
+
}
|
|
64075
|
+
|
|
64076
|
+
var index = -1,
|
|
64077
|
+
result = true,
|
|
64078
|
+
seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : undefined;
|
|
64079
|
+
stack.set(array, other);
|
|
64080
|
+
stack.set(other, array); // Ignore non-index properties.
|
|
64081
|
+
|
|
64082
|
+
while (++index < arrLength) {
|
|
64083
|
+
var arrValue = array[index],
|
|
64084
|
+
othValue = other[index];
|
|
64085
|
+
|
|
64086
|
+
if (customizer) {
|
|
64087
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
64088
|
+
}
|
|
64089
|
+
|
|
64090
|
+
if (compared !== undefined) {
|
|
64091
|
+
if (compared) {
|
|
64092
|
+
continue;
|
|
64093
|
+
}
|
|
64094
|
+
|
|
64095
|
+
result = false;
|
|
64096
|
+
break;
|
|
64097
|
+
} // Recursively compare arrays (susceptible to call stack limits).
|
|
64098
|
+
|
|
64099
|
+
|
|
64100
|
+
if (seen) {
|
|
64101
|
+
if (!arraySome(other, function (othValue, othIndex) {
|
|
64102
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
64103
|
+
return seen.push(othIndex);
|
|
64104
|
+
}
|
|
64105
|
+
})) {
|
|
64106
|
+
result = false;
|
|
64107
|
+
break;
|
|
64108
|
+
}
|
|
64109
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
64110
|
+
result = false;
|
|
64111
|
+
break;
|
|
64112
|
+
}
|
|
64113
|
+
}
|
|
64114
|
+
|
|
64115
|
+
stack['delete'](array);
|
|
64116
|
+
stack['delete'](other);
|
|
64117
|
+
return result;
|
|
64118
|
+
}
|
|
64119
|
+
|
|
64120
|
+
var _equalArrays = equalArrays$2;
|
|
64121
|
+
|
|
64122
|
+
var root$4 = _root;
|
|
64123
|
+
/** Built-in value references. */
|
|
64124
|
+
|
|
64125
|
+
var Uint8Array$2 = root$4.Uint8Array;
|
|
64126
|
+
var _Uint8Array = Uint8Array$2;
|
|
64127
|
+
|
|
64128
|
+
/**
|
|
64129
|
+
* Converts `map` to its key-value pairs.
|
|
64130
|
+
*
|
|
64131
|
+
* @private
|
|
64132
|
+
* @param {Object} map The map to convert.
|
|
64133
|
+
* @returns {Array} Returns the key-value pairs.
|
|
64134
|
+
*/
|
|
64135
|
+
|
|
64136
|
+
function mapToArray$1(map) {
|
|
64137
|
+
var index = -1,
|
|
64138
|
+
result = Array(map.size);
|
|
64139
|
+
map.forEach(function (value, key) {
|
|
64140
|
+
result[++index] = [key, value];
|
|
64141
|
+
});
|
|
64142
|
+
return result;
|
|
64143
|
+
}
|
|
64144
|
+
|
|
64145
|
+
var _mapToArray = mapToArray$1;
|
|
64146
|
+
|
|
64147
|
+
/**
|
|
64148
|
+
* Converts `set` to an array of its values.
|
|
64149
|
+
*
|
|
64150
|
+
* @private
|
|
64151
|
+
* @param {Object} set The set to convert.
|
|
64152
|
+
* @returns {Array} Returns the values.
|
|
64153
|
+
*/
|
|
64154
|
+
|
|
64155
|
+
function setToArray$1(set) {
|
|
64156
|
+
var index = -1,
|
|
64157
|
+
result = Array(set.size);
|
|
64158
|
+
set.forEach(function (value) {
|
|
64159
|
+
result[++index] = value;
|
|
64160
|
+
});
|
|
64161
|
+
return result;
|
|
64162
|
+
}
|
|
64163
|
+
|
|
64164
|
+
var _setToArray = setToArray$1;
|
|
64165
|
+
|
|
64166
|
+
var _Symbol$1 = _Symbol$4,
|
|
64167
|
+
Uint8Array$1 = _Uint8Array,
|
|
64168
|
+
eq = eq_1,
|
|
64169
|
+
equalArrays$1 = _equalArrays,
|
|
64170
|
+
mapToArray = _mapToArray,
|
|
64171
|
+
setToArray = _setToArray;
|
|
64172
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
64173
|
+
|
|
64174
|
+
var COMPARE_PARTIAL_FLAG$4 = 1,
|
|
64175
|
+
COMPARE_UNORDERED_FLAG$2 = 2;
|
|
64176
|
+
/** `Object#toString` result references. */
|
|
64177
|
+
|
|
64178
|
+
var boolTag$1 = '[object Boolean]',
|
|
64179
|
+
dateTag$1 = '[object Date]',
|
|
64180
|
+
errorTag$1 = '[object Error]',
|
|
64181
|
+
mapTag$2 = '[object Map]',
|
|
64182
|
+
numberTag$1 = '[object Number]',
|
|
64183
|
+
regexpTag$1 = '[object RegExp]',
|
|
64184
|
+
setTag$2 = '[object Set]',
|
|
64185
|
+
stringTag$1 = '[object String]',
|
|
64186
|
+
symbolTag = '[object Symbol]';
|
|
64187
|
+
var arrayBufferTag$1 = '[object ArrayBuffer]',
|
|
64188
|
+
dataViewTag$2 = '[object DataView]';
|
|
64189
|
+
/** Used to convert symbols to primitives and strings. */
|
|
64190
|
+
|
|
64191
|
+
var symbolProto$1 = _Symbol$1 ? _Symbol$1.prototype : undefined,
|
|
64192
|
+
symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
|
|
64193
|
+
/**
|
|
64194
|
+
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
64195
|
+
* the same `toStringTag`.
|
|
64196
|
+
*
|
|
64197
|
+
* **Note:** This function only supports comparing values with tags of
|
|
64198
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
64199
|
+
*
|
|
64200
|
+
* @private
|
|
64201
|
+
* @param {Object} object The object to compare.
|
|
64202
|
+
* @param {Object} other The other object to compare.
|
|
64203
|
+
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
64204
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
64205
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
64206
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
64207
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
64208
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
64209
|
+
*/
|
|
64210
|
+
|
|
64211
|
+
function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
64212
|
+
switch (tag) {
|
|
64213
|
+
case dataViewTag$2:
|
|
64214
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
64215
|
+
return false;
|
|
64216
|
+
}
|
|
64217
|
+
|
|
64218
|
+
object = object.buffer;
|
|
64219
|
+
other = other.buffer;
|
|
64220
|
+
|
|
64221
|
+
case arrayBufferTag$1:
|
|
64222
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
|
|
64223
|
+
return false;
|
|
64224
|
+
}
|
|
64225
|
+
|
|
64226
|
+
return true;
|
|
64227
|
+
|
|
64228
|
+
case boolTag$1:
|
|
64229
|
+
case dateTag$1:
|
|
64230
|
+
case numberTag$1:
|
|
64231
|
+
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
64232
|
+
// Invalid dates are coerced to `NaN`.
|
|
64233
|
+
return eq(+object, +other);
|
|
64234
|
+
|
|
64235
|
+
case errorTag$1:
|
|
64236
|
+
return object.name == other.name && object.message == other.message;
|
|
64237
|
+
|
|
64238
|
+
case regexpTag$1:
|
|
64239
|
+
case stringTag$1:
|
|
64240
|
+
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
64241
|
+
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
64242
|
+
// for more details.
|
|
64243
|
+
return object == other + '';
|
|
64244
|
+
|
|
64245
|
+
case mapTag$2:
|
|
64246
|
+
var convert = mapToArray;
|
|
64247
|
+
|
|
64248
|
+
case setTag$2:
|
|
64249
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
|
|
64250
|
+
convert || (convert = setToArray);
|
|
64251
|
+
|
|
64252
|
+
if (object.size != other.size && !isPartial) {
|
|
64253
|
+
return false;
|
|
64254
|
+
} // Assume cyclic values are equal.
|
|
64255
|
+
|
|
64256
|
+
|
|
64257
|
+
var stacked = stack.get(object);
|
|
64258
|
+
|
|
64259
|
+
if (stacked) {
|
|
64260
|
+
return stacked == other;
|
|
64261
|
+
}
|
|
64262
|
+
|
|
64263
|
+
bitmask |= COMPARE_UNORDERED_FLAG$2; // Recursively compare objects (susceptible to call stack limits).
|
|
64264
|
+
|
|
64265
|
+
stack.set(object, other);
|
|
64266
|
+
var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
64267
|
+
stack['delete'](object);
|
|
64268
|
+
return result;
|
|
64269
|
+
|
|
64270
|
+
case symbolTag:
|
|
64271
|
+
if (symbolValueOf) {
|
|
64272
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
64273
|
+
}
|
|
64274
|
+
|
|
64275
|
+
}
|
|
64276
|
+
|
|
64277
|
+
return false;
|
|
64278
|
+
}
|
|
64279
|
+
|
|
64280
|
+
var _equalByTag = equalByTag$1;
|
|
64281
|
+
|
|
64282
|
+
/**
|
|
64283
|
+
* Appends the elements of `values` to `array`.
|
|
64284
|
+
*
|
|
64285
|
+
* @private
|
|
64286
|
+
* @param {Array} array The array to modify.
|
|
64287
|
+
* @param {Array} values The values to append.
|
|
64288
|
+
* @returns {Array} Returns `array`.
|
|
64289
|
+
*/
|
|
64290
|
+
|
|
64291
|
+
function arrayPush$1(array, values) {
|
|
64292
|
+
var index = -1,
|
|
64293
|
+
length = values.length,
|
|
64294
|
+
offset = array.length;
|
|
64295
|
+
|
|
64296
|
+
while (++index < length) {
|
|
64297
|
+
array[offset + index] = values[index];
|
|
64298
|
+
}
|
|
64299
|
+
|
|
64300
|
+
return array;
|
|
64301
|
+
}
|
|
64302
|
+
|
|
64303
|
+
var _arrayPush = arrayPush$1;
|
|
64304
|
+
|
|
64305
|
+
/**
|
|
64306
|
+
* Checks if `value` is classified as an `Array` object.
|
|
64307
|
+
*
|
|
64308
|
+
* @static
|
|
64309
|
+
* @memberOf _
|
|
64310
|
+
* @since 0.1.0
|
|
64311
|
+
* @category Lang
|
|
64312
|
+
* @param {*} value The value to check.
|
|
64313
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
64314
|
+
* @example
|
|
64315
|
+
*
|
|
64316
|
+
* _.isArray([1, 2, 3]);
|
|
64317
|
+
* // => true
|
|
64318
|
+
*
|
|
64319
|
+
* _.isArray(document.body.children);
|
|
64320
|
+
* // => false
|
|
64321
|
+
*
|
|
64322
|
+
* _.isArray('abc');
|
|
64323
|
+
* // => false
|
|
64324
|
+
*
|
|
64325
|
+
* _.isArray(_.noop);
|
|
64326
|
+
* // => false
|
|
64327
|
+
*/
|
|
64328
|
+
var isArray$8 = Array.isArray;
|
|
64329
|
+
var isArray_1 = isArray$8;
|
|
64330
|
+
|
|
64331
|
+
var arrayPush = _arrayPush,
|
|
64332
|
+
isArray$7 = isArray_1;
|
|
64333
|
+
/**
|
|
64334
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
64335
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
64336
|
+
* symbols of `object`.
|
|
64337
|
+
*
|
|
64338
|
+
* @private
|
|
64339
|
+
* @param {Object} object The object to query.
|
|
64340
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
64341
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
64342
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
64343
|
+
*/
|
|
64344
|
+
|
|
64345
|
+
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
64346
|
+
var result = keysFunc(object);
|
|
64347
|
+
return isArray$7(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
64348
|
+
}
|
|
64349
|
+
|
|
64350
|
+
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
64351
|
+
|
|
64352
|
+
/**
|
|
64353
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
64354
|
+
* iteratee shorthands.
|
|
64355
|
+
*
|
|
64356
|
+
* @private
|
|
64357
|
+
* @param {Array} [array] The array to iterate over.
|
|
64358
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
64359
|
+
* @returns {Array} Returns the new filtered array.
|
|
64360
|
+
*/
|
|
64361
|
+
|
|
64362
|
+
function arrayFilter$1(array, predicate) {
|
|
64363
|
+
var index = -1,
|
|
64364
|
+
length = array == null ? 0 : array.length,
|
|
64365
|
+
resIndex = 0,
|
|
64366
|
+
result = [];
|
|
64367
|
+
|
|
64368
|
+
while (++index < length) {
|
|
64369
|
+
var value = array[index];
|
|
64370
|
+
|
|
64371
|
+
if (predicate(value, index, array)) {
|
|
64372
|
+
result[resIndex++] = value;
|
|
64373
|
+
}
|
|
64374
|
+
}
|
|
64375
|
+
|
|
64376
|
+
return result;
|
|
64377
|
+
}
|
|
64378
|
+
|
|
64379
|
+
var _arrayFilter = arrayFilter$1;
|
|
64380
|
+
|
|
64381
|
+
/**
|
|
64382
|
+
* This method returns a new empty array.
|
|
64383
|
+
*
|
|
64384
|
+
* @static
|
|
64385
|
+
* @memberOf _
|
|
64386
|
+
* @since 4.13.0
|
|
64387
|
+
* @category Util
|
|
64388
|
+
* @returns {Array} Returns the new empty array.
|
|
64389
|
+
* @example
|
|
64390
|
+
*
|
|
64391
|
+
* var arrays = _.times(2, _.stubArray);
|
|
64392
|
+
*
|
|
64393
|
+
* console.log(arrays);
|
|
64394
|
+
* // => [[], []]
|
|
64395
|
+
*
|
|
64396
|
+
* console.log(arrays[0] === arrays[1]);
|
|
64397
|
+
* // => false
|
|
64398
|
+
*/
|
|
64399
|
+
|
|
64400
|
+
function stubArray$1() {
|
|
64401
|
+
return [];
|
|
64402
|
+
}
|
|
64403
|
+
|
|
64404
|
+
var stubArray_1 = stubArray$1;
|
|
64405
|
+
|
|
64406
|
+
var arrayFilter = _arrayFilter,
|
|
64407
|
+
stubArray = stubArray_1;
|
|
64408
|
+
/** Used for built-in method references. */
|
|
64409
|
+
|
|
64410
|
+
var objectProto$6 = Object.prototype;
|
|
64411
|
+
/** Built-in value references. */
|
|
64412
|
+
|
|
64413
|
+
var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
|
|
64414
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
64415
|
+
|
|
64416
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
64417
|
+
/**
|
|
64418
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
64419
|
+
*
|
|
64420
|
+
* @private
|
|
64421
|
+
* @param {Object} object The object to query.
|
|
64422
|
+
* @returns {Array} Returns the array of symbols.
|
|
64423
|
+
*/
|
|
64424
|
+
|
|
64425
|
+
var getSymbols$1 = !nativeGetSymbols ? stubArray : function (object) {
|
|
64426
|
+
if (object == null) {
|
|
64427
|
+
return [];
|
|
64428
|
+
}
|
|
64429
|
+
|
|
64430
|
+
object = Object(object);
|
|
64431
|
+
return arrayFilter(nativeGetSymbols(object), function (symbol) {
|
|
64432
|
+
return propertyIsEnumerable$1.call(object, symbol);
|
|
64433
|
+
});
|
|
64434
|
+
};
|
|
64435
|
+
var _getSymbols = getSymbols$1;
|
|
64436
|
+
|
|
64437
|
+
/**
|
|
64438
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
|
64439
|
+
* or max array length checks.
|
|
64440
|
+
*
|
|
64441
|
+
* @private
|
|
64442
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
|
64443
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
64444
|
+
* @returns {Array} Returns the array of results.
|
|
64445
|
+
*/
|
|
64446
|
+
|
|
64447
|
+
function baseTimes$1(n, iteratee) {
|
|
64448
|
+
var index = -1,
|
|
64449
|
+
result = Array(n);
|
|
64450
|
+
|
|
64451
|
+
while (++index < n) {
|
|
64452
|
+
result[index] = iteratee(index);
|
|
64453
|
+
}
|
|
64454
|
+
|
|
64455
|
+
return result;
|
|
64456
|
+
}
|
|
64457
|
+
|
|
64458
|
+
var _baseTimes = baseTimes$1;
|
|
64459
|
+
|
|
64460
|
+
var baseGetTag$2 = _baseGetTag,
|
|
64461
|
+
isObjectLike$3 = isObjectLike_1;
|
|
64462
|
+
/** `Object#toString` result references. */
|
|
64463
|
+
|
|
64464
|
+
var argsTag$2 = '[object Arguments]';
|
|
64465
|
+
/**
|
|
64466
|
+
* The base implementation of `_.isArguments`.
|
|
64467
|
+
*
|
|
64468
|
+
* @private
|
|
64469
|
+
* @param {*} value The value to check.
|
|
64470
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
64471
|
+
*/
|
|
64472
|
+
|
|
64473
|
+
function baseIsArguments$1(value) {
|
|
64474
|
+
return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2;
|
|
64475
|
+
}
|
|
64476
|
+
|
|
64477
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
64478
|
+
|
|
64479
|
+
var baseIsArguments = _baseIsArguments,
|
|
64480
|
+
isObjectLike$2 = isObjectLike_1;
|
|
64481
|
+
/** Used for built-in method references. */
|
|
64482
|
+
|
|
64483
|
+
var objectProto$5 = Object.prototype;
|
|
64484
|
+
/** Used to check objects for own properties. */
|
|
64485
|
+
|
|
64486
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
64487
|
+
/** Built-in value references. */
|
|
64488
|
+
|
|
64489
|
+
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
64490
|
+
/**
|
|
64491
|
+
* Checks if `value` is likely an `arguments` object.
|
|
64492
|
+
*
|
|
64493
|
+
* @static
|
|
64494
|
+
* @memberOf _
|
|
64495
|
+
* @since 0.1.0
|
|
64496
|
+
* @category Lang
|
|
64497
|
+
* @param {*} value The value to check.
|
|
64498
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
64499
|
+
* else `false`.
|
|
64500
|
+
* @example
|
|
64501
|
+
*
|
|
64502
|
+
* _.isArguments(function() { return arguments; }());
|
|
64503
|
+
* // => true
|
|
64504
|
+
*
|
|
64505
|
+
* _.isArguments([1, 2, 3]);
|
|
64506
|
+
* // => false
|
|
64507
|
+
*/
|
|
64508
|
+
|
|
64509
|
+
var isArguments$2 = baseIsArguments(function () {
|
|
64510
|
+
return arguments;
|
|
64511
|
+
}()) ? baseIsArguments : function (value) {
|
|
64512
|
+
return isObjectLike$2(value) && hasOwnProperty$4.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
|
64513
|
+
};
|
|
64514
|
+
var isArguments_1 = isArguments$2;
|
|
64515
|
+
|
|
64516
|
+
var isBuffer$2 = {exports: {}};
|
|
64517
|
+
|
|
64518
|
+
/**
|
|
64519
|
+
* This method returns `false`.
|
|
64520
|
+
*
|
|
64521
|
+
* @static
|
|
64522
|
+
* @memberOf _
|
|
64523
|
+
* @since 4.13.0
|
|
64524
|
+
* @category Util
|
|
64525
|
+
* @returns {boolean} Returns `false`.
|
|
64526
|
+
* @example
|
|
64527
|
+
*
|
|
64528
|
+
* _.times(2, _.stubFalse);
|
|
64529
|
+
* // => [false, false]
|
|
64530
|
+
*/
|
|
64531
|
+
|
|
64532
|
+
function stubFalse() {
|
|
64533
|
+
return false;
|
|
64534
|
+
}
|
|
64535
|
+
|
|
64536
|
+
var stubFalse_1 = stubFalse;
|
|
64537
|
+
|
|
64538
|
+
(function (module, exports) {
|
|
64539
|
+
var root = _root,
|
|
64540
|
+
stubFalse = stubFalse_1;
|
|
64541
|
+
/** Detect free variable `exports`. */
|
|
64542
|
+
|
|
64543
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
64544
|
+
/** Detect free variable `module`. */
|
|
64545
|
+
|
|
64546
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
64547
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
64548
|
+
|
|
64549
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
64550
|
+
/** Built-in value references. */
|
|
64551
|
+
|
|
64552
|
+
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
64553
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
64554
|
+
|
|
64555
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
64556
|
+
/**
|
|
64557
|
+
* Checks if `value` is a buffer.
|
|
64558
|
+
*
|
|
64559
|
+
* @static
|
|
64560
|
+
* @memberOf _
|
|
64561
|
+
* @since 4.3.0
|
|
64562
|
+
* @category Lang
|
|
64563
|
+
* @param {*} value The value to check.
|
|
64564
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
64565
|
+
* @example
|
|
64566
|
+
*
|
|
64567
|
+
* _.isBuffer(new Buffer(2));
|
|
64568
|
+
* // => true
|
|
64569
|
+
*
|
|
64570
|
+
* _.isBuffer(new Uint8Array(2));
|
|
64571
|
+
* // => false
|
|
64572
|
+
*/
|
|
64573
|
+
|
|
64574
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
64575
|
+
module.exports = isBuffer;
|
|
64576
|
+
})(isBuffer$2, isBuffer$2.exports);
|
|
64577
|
+
|
|
64578
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
64579
|
+
/** Used to detect unsigned integer values. */
|
|
64580
|
+
|
|
64581
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
64582
|
+
/**
|
|
64583
|
+
* Checks if `value` is a valid array-like index.
|
|
64584
|
+
*
|
|
64585
|
+
* @private
|
|
64586
|
+
* @param {*} value The value to check.
|
|
64587
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
64588
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
64589
|
+
*/
|
|
64590
|
+
|
|
64591
|
+
function isIndex$2(value, length) {
|
|
64592
|
+
var type = _typeof(value);
|
|
64593
|
+
|
|
64594
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
64595
|
+
return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|
64596
|
+
}
|
|
64597
|
+
|
|
64598
|
+
var _isIndex = isIndex$2;
|
|
64599
|
+
|
|
64600
|
+
/** Used as references for various `Number` constants. */
|
|
64601
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
64602
|
+
/**
|
|
64603
|
+
* Checks if `value` is a valid array-like length.
|
|
64604
|
+
*
|
|
64605
|
+
* **Note:** This method is loosely based on
|
|
64606
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
64607
|
+
*
|
|
64608
|
+
* @static
|
|
64609
|
+
* @memberOf _
|
|
64610
|
+
* @since 4.0.0
|
|
64611
|
+
* @category Lang
|
|
64612
|
+
* @param {*} value The value to check.
|
|
64613
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
64614
|
+
* @example
|
|
64615
|
+
*
|
|
64616
|
+
* _.isLength(3);
|
|
64617
|
+
* // => true
|
|
64618
|
+
*
|
|
64619
|
+
* _.isLength(Number.MIN_VALUE);
|
|
64620
|
+
* // => false
|
|
64621
|
+
*
|
|
64622
|
+
* _.isLength(Infinity);
|
|
64623
|
+
* // => false
|
|
64624
|
+
*
|
|
64625
|
+
* _.isLength('3');
|
|
64626
|
+
* // => false
|
|
64627
|
+
*/
|
|
64628
|
+
|
|
64629
|
+
function isLength$3(value) {
|
|
64630
|
+
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
64631
|
+
}
|
|
64632
|
+
|
|
64633
|
+
var isLength_1 = isLength$3;
|
|
64634
|
+
|
|
64635
|
+
var baseGetTag$1 = _baseGetTag,
|
|
64636
|
+
isLength$2 = isLength_1,
|
|
64637
|
+
isObjectLike$1 = isObjectLike_1;
|
|
64638
|
+
/** `Object#toString` result references. */
|
|
64639
|
+
|
|
64640
|
+
var argsTag$1 = '[object Arguments]',
|
|
64641
|
+
arrayTag$1 = '[object Array]',
|
|
64642
|
+
boolTag = '[object Boolean]',
|
|
64643
|
+
dateTag = '[object Date]',
|
|
64644
|
+
errorTag = '[object Error]',
|
|
64645
|
+
funcTag = '[object Function]',
|
|
64646
|
+
mapTag$1 = '[object Map]',
|
|
64647
|
+
numberTag = '[object Number]',
|
|
64648
|
+
objectTag$2 = '[object Object]',
|
|
64649
|
+
regexpTag = '[object RegExp]',
|
|
64650
|
+
setTag$1 = '[object Set]',
|
|
64651
|
+
stringTag = '[object String]',
|
|
64652
|
+
weakMapTag$1 = '[object WeakMap]';
|
|
64653
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
64654
|
+
dataViewTag$1 = '[object DataView]',
|
|
64655
|
+
float32Tag = '[object Float32Array]',
|
|
64656
|
+
float64Tag = '[object Float64Array]',
|
|
64657
|
+
int8Tag = '[object Int8Array]',
|
|
64658
|
+
int16Tag = '[object Int16Array]',
|
|
64659
|
+
int32Tag = '[object Int32Array]',
|
|
64660
|
+
uint8Tag = '[object Uint8Array]',
|
|
64661
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
64662
|
+
uint16Tag = '[object Uint16Array]',
|
|
64663
|
+
uint32Tag = '[object Uint32Array]';
|
|
64664
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
64665
|
+
|
|
64666
|
+
var typedArrayTags = {};
|
|
64667
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
64668
|
+
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false;
|
|
64669
|
+
/**
|
|
64670
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
64671
|
+
*
|
|
64672
|
+
* @private
|
|
64673
|
+
* @param {*} value The value to check.
|
|
64674
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
64675
|
+
*/
|
|
64676
|
+
|
|
64677
|
+
function baseIsTypedArray$1(value) {
|
|
64678
|
+
return isObjectLike$1(value) && isLength$2(value.length) && !!typedArrayTags[baseGetTag$1(value)];
|
|
64679
|
+
}
|
|
64680
|
+
|
|
64681
|
+
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
64682
|
+
|
|
64683
|
+
/**
|
|
64684
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
64685
|
+
*
|
|
64686
|
+
* @private
|
|
64687
|
+
* @param {Function} func The function to cap arguments for.
|
|
64688
|
+
* @returns {Function} Returns the new capped function.
|
|
64689
|
+
*/
|
|
64690
|
+
|
|
64691
|
+
function baseUnary$1(func) {
|
|
64692
|
+
return function (value) {
|
|
64693
|
+
return func(value);
|
|
64694
|
+
};
|
|
64695
|
+
}
|
|
64696
|
+
|
|
64697
|
+
var _baseUnary = baseUnary$1;
|
|
64698
|
+
|
|
64699
|
+
var _nodeUtil = {exports: {}};
|
|
64700
|
+
|
|
64701
|
+
(function (module, exports) {
|
|
64702
|
+
var freeGlobal = _freeGlobal;
|
|
64703
|
+
/** Detect free variable `exports`. */
|
|
64704
|
+
|
|
64705
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
64706
|
+
/** Detect free variable `module`. */
|
|
64707
|
+
|
|
64708
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
64709
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
64710
|
+
|
|
64711
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
64712
|
+
/** Detect free variable `process` from Node.js. */
|
|
64713
|
+
|
|
64714
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
64715
|
+
/** Used to access faster Node.js helpers. */
|
|
64716
|
+
|
|
64717
|
+
var nodeUtil = function () {
|
|
64718
|
+
try {
|
|
64719
|
+
// Use `util.types` for Node.js 10+.
|
|
64720
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
64721
|
+
|
|
64722
|
+
if (types) {
|
|
64723
|
+
return types;
|
|
64724
|
+
} // Legacy `process.binding('util')` for Node.js < 10.
|
|
64725
|
+
|
|
64726
|
+
|
|
64727
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
64728
|
+
} catch (e) {}
|
|
64729
|
+
}();
|
|
64730
|
+
|
|
64731
|
+
module.exports = nodeUtil;
|
|
64732
|
+
})(_nodeUtil, _nodeUtil.exports);
|
|
64733
|
+
|
|
64734
|
+
var baseIsTypedArray = _baseIsTypedArray,
|
|
64735
|
+
baseUnary = _baseUnary,
|
|
64736
|
+
nodeUtil = _nodeUtil.exports;
|
|
64737
|
+
/* Node.js helper references. */
|
|
64738
|
+
|
|
64739
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
64740
|
+
/**
|
|
64741
|
+
* Checks if `value` is classified as a typed array.
|
|
64742
|
+
*
|
|
64743
|
+
* @static
|
|
64744
|
+
* @memberOf _
|
|
64745
|
+
* @since 3.0.0
|
|
64746
|
+
* @category Lang
|
|
64747
|
+
* @param {*} value The value to check.
|
|
64748
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
64749
|
+
* @example
|
|
64750
|
+
*
|
|
64751
|
+
* _.isTypedArray(new Uint8Array);
|
|
64752
|
+
* // => true
|
|
64753
|
+
*
|
|
64754
|
+
* _.isTypedArray([]);
|
|
64755
|
+
* // => false
|
|
64756
|
+
*/
|
|
64757
|
+
|
|
64758
|
+
var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
64759
|
+
var isTypedArray_1 = isTypedArray$2;
|
|
64760
|
+
|
|
64761
|
+
var baseTimes = _baseTimes,
|
|
64762
|
+
isArguments$1 = isArguments_1,
|
|
64763
|
+
isArray$6 = isArray_1,
|
|
64764
|
+
isBuffer$1 = isBuffer$2.exports,
|
|
64765
|
+
isIndex$1 = _isIndex,
|
|
64766
|
+
isTypedArray$1 = isTypedArray_1;
|
|
64767
|
+
/** Used for built-in method references. */
|
|
64768
|
+
|
|
64769
|
+
var objectProto$4 = Object.prototype;
|
|
64770
|
+
/** Used to check objects for own properties. */
|
|
64771
|
+
|
|
64772
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
64773
|
+
/**
|
|
64774
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
|
64775
|
+
*
|
|
64776
|
+
* @private
|
|
64777
|
+
* @param {*} value The value to query.
|
|
64778
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
|
64779
|
+
* @returns {Array} Returns the array of property names.
|
|
64780
|
+
*/
|
|
64781
|
+
|
|
64782
|
+
function arrayLikeKeys$1(value, inherited) {
|
|
64783
|
+
var isArr = isArray$6(value),
|
|
64784
|
+
isArg = !isArr && isArguments$1(value),
|
|
64785
|
+
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
64786
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
|
|
64787
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
64788
|
+
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
64789
|
+
length = result.length;
|
|
64790
|
+
|
|
64791
|
+
for (var key in value) {
|
|
64792
|
+
if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
64793
|
+
key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
64794
|
+
isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
64795
|
+
isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.
|
|
64796
|
+
isIndex$1(key, length)))) {
|
|
64797
|
+
result.push(key);
|
|
64798
|
+
}
|
|
64799
|
+
}
|
|
64800
|
+
|
|
64801
|
+
return result;
|
|
64802
|
+
}
|
|
64803
|
+
|
|
64804
|
+
var _arrayLikeKeys = arrayLikeKeys$1;
|
|
64805
|
+
|
|
64806
|
+
/** Used for built-in method references. */
|
|
64807
|
+
var objectProto$3 = Object.prototype;
|
|
64808
|
+
/**
|
|
64809
|
+
* Checks if `value` is likely a prototype object.
|
|
64810
|
+
*
|
|
64811
|
+
* @private
|
|
64812
|
+
* @param {*} value The value to check.
|
|
64813
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
64814
|
+
*/
|
|
64815
|
+
|
|
64816
|
+
function isPrototype$1(value) {
|
|
64817
|
+
var Ctor = value && value.constructor,
|
|
64818
|
+
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto$3;
|
|
64819
|
+
return value === proto;
|
|
64820
|
+
}
|
|
64821
|
+
|
|
64822
|
+
var _isPrototype = isPrototype$1;
|
|
64823
|
+
|
|
64824
|
+
/**
|
|
64825
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
64826
|
+
*
|
|
64827
|
+
* @private
|
|
64828
|
+
* @param {Function} func The function to wrap.
|
|
64829
|
+
* @param {Function} transform The argument transform.
|
|
64830
|
+
* @returns {Function} Returns the new function.
|
|
64831
|
+
*/
|
|
64832
|
+
|
|
64833
|
+
function overArg$1(func, transform) {
|
|
64834
|
+
return function (arg) {
|
|
64835
|
+
return func(transform(arg));
|
|
64836
|
+
};
|
|
64837
|
+
}
|
|
64838
|
+
|
|
64839
|
+
var _overArg = overArg$1;
|
|
64840
|
+
|
|
64841
|
+
var overArg = _overArg;
|
|
64842
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
64843
|
+
|
|
64844
|
+
var nativeKeys$1 = overArg(Object.keys, Object);
|
|
64845
|
+
var _nativeKeys = nativeKeys$1;
|
|
64846
|
+
|
|
64847
|
+
var isPrototype = _isPrototype,
|
|
64848
|
+
nativeKeys = _nativeKeys;
|
|
64849
|
+
/** Used for built-in method references. */
|
|
64850
|
+
|
|
64851
|
+
var objectProto$2 = Object.prototype;
|
|
64852
|
+
/** Used to check objects for own properties. */
|
|
64853
|
+
|
|
64854
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
64855
|
+
/**
|
|
64856
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
64857
|
+
*
|
|
64858
|
+
* @private
|
|
64859
|
+
* @param {Object} object The object to query.
|
|
64860
|
+
* @returns {Array} Returns the array of property names.
|
|
64861
|
+
*/
|
|
64862
|
+
|
|
64863
|
+
function baseKeys$1(object) {
|
|
64864
|
+
if (!isPrototype(object)) {
|
|
64865
|
+
return nativeKeys(object);
|
|
64866
|
+
}
|
|
64867
|
+
|
|
64868
|
+
var result = [];
|
|
64869
|
+
|
|
64870
|
+
for (var key in Object(object)) {
|
|
64871
|
+
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
64872
|
+
result.push(key);
|
|
64873
|
+
}
|
|
64874
|
+
}
|
|
64875
|
+
|
|
64876
|
+
return result;
|
|
64877
|
+
}
|
|
64878
|
+
|
|
64879
|
+
var _baseKeys = baseKeys$1;
|
|
64880
|
+
|
|
64881
|
+
var isFunction = isFunction_1,
|
|
64882
|
+
isLength$1 = isLength_1;
|
|
64883
|
+
/**
|
|
64884
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
64885
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
64886
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
64887
|
+
*
|
|
64888
|
+
* @static
|
|
64889
|
+
* @memberOf _
|
|
64890
|
+
* @since 4.0.0
|
|
64891
|
+
* @category Lang
|
|
64892
|
+
* @param {*} value The value to check.
|
|
64893
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
64894
|
+
* @example
|
|
64895
|
+
*
|
|
64896
|
+
* _.isArrayLike([1, 2, 3]);
|
|
64897
|
+
* // => true
|
|
64898
|
+
*
|
|
64899
|
+
* _.isArrayLike(document.body.children);
|
|
64900
|
+
* // => true
|
|
64901
|
+
*
|
|
64902
|
+
* _.isArrayLike('abc');
|
|
64903
|
+
* // => true
|
|
64904
|
+
*
|
|
64905
|
+
* _.isArrayLike(_.noop);
|
|
64906
|
+
* // => false
|
|
64907
|
+
*/
|
|
64908
|
+
|
|
64909
|
+
function isArrayLike$1(value) {
|
|
64910
|
+
return value != null && isLength$1(value.length) && !isFunction(value);
|
|
64911
|
+
}
|
|
64912
|
+
|
|
64913
|
+
var isArrayLike_1 = isArrayLike$1;
|
|
64914
|
+
|
|
64915
|
+
var arrayLikeKeys = _arrayLikeKeys,
|
|
64916
|
+
baseKeys = _baseKeys,
|
|
64917
|
+
isArrayLike = isArrayLike_1;
|
|
64918
|
+
/**
|
|
64919
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
64920
|
+
*
|
|
64921
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
64922
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
64923
|
+
* for more details.
|
|
64924
|
+
*
|
|
64925
|
+
* @static
|
|
64926
|
+
* @since 0.1.0
|
|
64927
|
+
* @memberOf _
|
|
64928
|
+
* @category Object
|
|
64929
|
+
* @param {Object} object The object to query.
|
|
64930
|
+
* @returns {Array} Returns the array of property names.
|
|
64931
|
+
* @example
|
|
64932
|
+
*
|
|
64933
|
+
* function Foo() {
|
|
64934
|
+
* this.a = 1;
|
|
64935
|
+
* this.b = 2;
|
|
64936
|
+
* }
|
|
64937
|
+
*
|
|
64938
|
+
* Foo.prototype.c = 3;
|
|
64939
|
+
*
|
|
64940
|
+
* _.keys(new Foo);
|
|
64941
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
64942
|
+
*
|
|
64943
|
+
* _.keys('hi');
|
|
64944
|
+
* // => ['0', '1']
|
|
64945
|
+
*/
|
|
64946
|
+
|
|
64947
|
+
function keys$2(object) {
|
|
64948
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
64949
|
+
}
|
|
64950
|
+
|
|
64951
|
+
var keys_1 = keys$2;
|
|
64952
|
+
|
|
64953
|
+
var baseGetAllKeys = _baseGetAllKeys,
|
|
64954
|
+
getSymbols = _getSymbols,
|
|
64955
|
+
keys$1 = keys_1;
|
|
64956
|
+
/**
|
|
64957
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
64958
|
+
*
|
|
64959
|
+
* @private
|
|
64960
|
+
* @param {Object} object The object to query.
|
|
64961
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
64962
|
+
*/
|
|
64963
|
+
|
|
64964
|
+
function getAllKeys$1(object) {
|
|
64965
|
+
return baseGetAllKeys(object, keys$1, getSymbols);
|
|
64966
|
+
}
|
|
64967
|
+
|
|
64968
|
+
var _getAllKeys = getAllKeys$1;
|
|
64969
|
+
|
|
64970
|
+
var getAllKeys = _getAllKeys;
|
|
64971
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
64972
|
+
|
|
64973
|
+
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
64974
|
+
/** Used for built-in method references. */
|
|
64975
|
+
|
|
64976
|
+
var objectProto$1 = Object.prototype;
|
|
64977
|
+
/** Used to check objects for own properties. */
|
|
64978
|
+
|
|
64979
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
64980
|
+
/**
|
|
64981
|
+
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
64982
|
+
* partial deep comparisons.
|
|
64983
|
+
*
|
|
64984
|
+
* @private
|
|
64985
|
+
* @param {Object} object The object to compare.
|
|
64986
|
+
* @param {Object} other The other object to compare.
|
|
64987
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
64988
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
64989
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
64990
|
+
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
64991
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
64992
|
+
*/
|
|
64993
|
+
|
|
64994
|
+
function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
64995
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
|
|
64996
|
+
objProps = getAllKeys(object),
|
|
64997
|
+
objLength = objProps.length,
|
|
64998
|
+
othProps = getAllKeys(other),
|
|
64999
|
+
othLength = othProps.length;
|
|
65000
|
+
|
|
65001
|
+
if (objLength != othLength && !isPartial) {
|
|
65002
|
+
return false;
|
|
65003
|
+
}
|
|
65004
|
+
|
|
65005
|
+
var index = objLength;
|
|
65006
|
+
|
|
65007
|
+
while (index--) {
|
|
65008
|
+
var key = objProps[index];
|
|
65009
|
+
|
|
65010
|
+
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
65011
|
+
return false;
|
|
65012
|
+
}
|
|
65013
|
+
} // Check that cyclic values are equal.
|
|
65014
|
+
|
|
65015
|
+
|
|
65016
|
+
var objStacked = stack.get(object);
|
|
65017
|
+
var othStacked = stack.get(other);
|
|
65018
|
+
|
|
65019
|
+
if (objStacked && othStacked) {
|
|
65020
|
+
return objStacked == other && othStacked == object;
|
|
65021
|
+
}
|
|
65022
|
+
|
|
65023
|
+
var result = true;
|
|
65024
|
+
stack.set(object, other);
|
|
65025
|
+
stack.set(other, object);
|
|
65026
|
+
var skipCtor = isPartial;
|
|
65027
|
+
|
|
65028
|
+
while (++index < objLength) {
|
|
65029
|
+
key = objProps[index];
|
|
65030
|
+
var objValue = object[key],
|
|
65031
|
+
othValue = other[key];
|
|
65032
|
+
|
|
65033
|
+
if (customizer) {
|
|
65034
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
65035
|
+
} // Recursively compare objects (susceptible to call stack limits).
|
|
65036
|
+
|
|
65037
|
+
|
|
65038
|
+
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
65039
|
+
result = false;
|
|
65040
|
+
break;
|
|
65041
|
+
}
|
|
65042
|
+
|
|
65043
|
+
skipCtor || (skipCtor = key == 'constructor');
|
|
65044
|
+
}
|
|
65045
|
+
|
|
65046
|
+
if (result && !skipCtor) {
|
|
65047
|
+
var objCtor = object.constructor,
|
|
65048
|
+
othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.
|
|
65049
|
+
|
|
65050
|
+
if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
65051
|
+
result = false;
|
|
65052
|
+
}
|
|
65053
|
+
}
|
|
65054
|
+
|
|
65055
|
+
stack['delete'](object);
|
|
65056
|
+
stack['delete'](other);
|
|
65057
|
+
return result;
|
|
65058
|
+
}
|
|
65059
|
+
|
|
65060
|
+
var _equalObjects = equalObjects$1;
|
|
65061
|
+
|
|
65062
|
+
var getNative$3 = _getNative,
|
|
65063
|
+
root$3 = _root;
|
|
65064
|
+
/* Built-in method references that are verified to be native. */
|
|
65065
|
+
|
|
65066
|
+
var DataView$1 = getNative$3(root$3, 'DataView');
|
|
65067
|
+
var _DataView = DataView$1;
|
|
65068
|
+
|
|
65069
|
+
var getNative$2 = _getNative,
|
|
65070
|
+
root$2 = _root;
|
|
65071
|
+
/* Built-in method references that are verified to be native. */
|
|
65072
|
+
|
|
65073
|
+
var Promise$2 = getNative$2(root$2, 'Promise');
|
|
65074
|
+
var _Promise = Promise$2;
|
|
65075
|
+
|
|
65076
|
+
var getNative$1 = _getNative,
|
|
65077
|
+
root$1 = _root;
|
|
65078
|
+
/* Built-in method references that are verified to be native. */
|
|
65079
|
+
|
|
65080
|
+
var Set$2 = getNative$1(root$1, 'Set');
|
|
65081
|
+
var _Set = Set$2;
|
|
65082
|
+
|
|
65083
|
+
var getNative = _getNative,
|
|
65084
|
+
root = _root;
|
|
65085
|
+
/* Built-in method references that are verified to be native. */
|
|
65086
|
+
|
|
65087
|
+
var WeakMap$2 = getNative(root, 'WeakMap');
|
|
65088
|
+
var _WeakMap = WeakMap$2;
|
|
65089
|
+
|
|
65090
|
+
var DataView = _DataView,
|
|
65091
|
+
Map$1 = _Map,
|
|
65092
|
+
Promise$1 = _Promise,
|
|
65093
|
+
Set$1 = _Set,
|
|
65094
|
+
WeakMap$1 = _WeakMap,
|
|
65095
|
+
baseGetTag = _baseGetTag,
|
|
65096
|
+
toSource = _toSource;
|
|
65097
|
+
/** `Object#toString` result references. */
|
|
65098
|
+
|
|
65099
|
+
var mapTag = '[object Map]',
|
|
65100
|
+
objectTag$1 = '[object Object]',
|
|
65101
|
+
promiseTag = '[object Promise]',
|
|
65102
|
+
setTag = '[object Set]',
|
|
65103
|
+
weakMapTag = '[object WeakMap]';
|
|
65104
|
+
var dataViewTag = '[object DataView]';
|
|
65105
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
65106
|
+
|
|
65107
|
+
var dataViewCtorString = toSource(DataView),
|
|
65108
|
+
mapCtorString = toSource(Map$1),
|
|
65109
|
+
promiseCtorString = toSource(Promise$1),
|
|
65110
|
+
setCtorString = toSource(Set$1),
|
|
65111
|
+
weakMapCtorString = toSource(WeakMap$1);
|
|
65112
|
+
/**
|
|
65113
|
+
* Gets the `toStringTag` of `value`.
|
|
65114
|
+
*
|
|
65115
|
+
* @private
|
|
65116
|
+
* @param {*} value The value to query.
|
|
65117
|
+
* @returns {string} Returns the `toStringTag`.
|
|
65118
|
+
*/
|
|
65119
|
+
|
|
65120
|
+
var getTag$1 = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
65121
|
+
|
|
65122
|
+
if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map$1 && getTag$1(new Map$1()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set$1 && getTag$1(new Set$1()) != setTag || WeakMap$1 && getTag$1(new WeakMap$1()) != weakMapTag) {
|
|
65123
|
+
getTag$1 = function getTag(value) {
|
|
65124
|
+
var result = baseGetTag(value),
|
|
65125
|
+
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
65126
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
|
65127
|
+
|
|
65128
|
+
if (ctorString) {
|
|
65129
|
+
switch (ctorString) {
|
|
65130
|
+
case dataViewCtorString:
|
|
65131
|
+
return dataViewTag;
|
|
65132
|
+
|
|
65133
|
+
case mapCtorString:
|
|
65134
|
+
return mapTag;
|
|
65135
|
+
|
|
65136
|
+
case promiseCtorString:
|
|
65137
|
+
return promiseTag;
|
|
65138
|
+
|
|
65139
|
+
case setCtorString:
|
|
65140
|
+
return setTag;
|
|
65141
|
+
|
|
65142
|
+
case weakMapCtorString:
|
|
65143
|
+
return weakMapTag;
|
|
65144
|
+
}
|
|
65145
|
+
}
|
|
65146
|
+
|
|
65147
|
+
return result;
|
|
65148
|
+
};
|
|
65149
|
+
}
|
|
65150
|
+
|
|
65151
|
+
var _getTag = getTag$1;
|
|
65152
|
+
|
|
65153
|
+
var Stack$1 = _Stack,
|
|
65154
|
+
equalArrays = _equalArrays,
|
|
65155
|
+
equalByTag = _equalByTag,
|
|
65156
|
+
equalObjects = _equalObjects,
|
|
65157
|
+
getTag = _getTag,
|
|
65158
|
+
isArray$5 = isArray_1,
|
|
65159
|
+
isBuffer = isBuffer$2.exports,
|
|
65160
|
+
isTypedArray = isTypedArray_1;
|
|
65161
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
65162
|
+
|
|
65163
|
+
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
65164
|
+
/** `Object#toString` result references. */
|
|
65165
|
+
|
|
65166
|
+
var argsTag = '[object Arguments]',
|
|
65167
|
+
arrayTag = '[object Array]',
|
|
65168
|
+
objectTag = '[object Object]';
|
|
65169
|
+
/** Used for built-in method references. */
|
|
65170
|
+
|
|
65171
|
+
var objectProto = Object.prototype;
|
|
65172
|
+
/** Used to check objects for own properties. */
|
|
65173
|
+
|
|
65174
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
65175
|
+
/**
|
|
65176
|
+
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
65177
|
+
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
65178
|
+
* references to be compared.
|
|
65179
|
+
*
|
|
65180
|
+
* @private
|
|
65181
|
+
* @param {Object} object The object to compare.
|
|
65182
|
+
* @param {Object} other The other object to compare.
|
|
65183
|
+
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
65184
|
+
* @param {Function} customizer The function to customize comparisons.
|
|
65185
|
+
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
65186
|
+
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
65187
|
+
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
65188
|
+
*/
|
|
65189
|
+
|
|
65190
|
+
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
65191
|
+
var objIsArr = isArray$5(object),
|
|
65192
|
+
othIsArr = isArray$5(other),
|
|
65193
|
+
objTag = objIsArr ? arrayTag : getTag(object),
|
|
65194
|
+
othTag = othIsArr ? arrayTag : getTag(other);
|
|
65195
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
65196
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
65197
|
+
var objIsObj = objTag == objectTag,
|
|
65198
|
+
othIsObj = othTag == objectTag,
|
|
65199
|
+
isSameTag = objTag == othTag;
|
|
65200
|
+
|
|
65201
|
+
if (isSameTag && isBuffer(object)) {
|
|
65202
|
+
if (!isBuffer(other)) {
|
|
65203
|
+
return false;
|
|
65204
|
+
}
|
|
65205
|
+
|
|
65206
|
+
objIsArr = true;
|
|
65207
|
+
objIsObj = false;
|
|
65208
|
+
}
|
|
65209
|
+
|
|
65210
|
+
if (isSameTag && !objIsObj) {
|
|
65211
|
+
stack || (stack = new Stack$1());
|
|
65212
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
65213
|
+
}
|
|
65214
|
+
|
|
65215
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
65216
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
65217
|
+
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
65218
|
+
|
|
65219
|
+
if (objIsWrapped || othIsWrapped) {
|
|
65220
|
+
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
65221
|
+
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
65222
|
+
stack || (stack = new Stack$1());
|
|
65223
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
65224
|
+
}
|
|
65225
|
+
}
|
|
65226
|
+
|
|
65227
|
+
if (!isSameTag) {
|
|
65228
|
+
return false;
|
|
65229
|
+
}
|
|
65230
|
+
|
|
65231
|
+
stack || (stack = new Stack$1());
|
|
65232
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
65233
|
+
}
|
|
65234
|
+
|
|
65235
|
+
var _baseIsEqualDeep = baseIsEqualDeep$1;
|
|
65236
|
+
|
|
65237
|
+
var baseIsEqualDeep = _baseIsEqualDeep,
|
|
65238
|
+
isObjectLike = isObjectLike_1;
|
|
65239
|
+
/**
|
|
65240
|
+
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
65241
|
+
* and tracks traversed objects.
|
|
65242
|
+
*
|
|
65243
|
+
* @private
|
|
65244
|
+
* @param {*} value The value to compare.
|
|
65245
|
+
* @param {*} other The other value to compare.
|
|
65246
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
65247
|
+
* 1 - Unordered comparison
|
|
65248
|
+
* 2 - Partial comparison
|
|
65249
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
65250
|
+
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
65251
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
65252
|
+
*/
|
|
65253
|
+
|
|
65254
|
+
function baseIsEqual$2(value, other, bitmask, customizer, stack) {
|
|
65255
|
+
if (value === other) {
|
|
65256
|
+
return true;
|
|
65257
|
+
}
|
|
65258
|
+
|
|
65259
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
65260
|
+
return value !== value && other !== other;
|
|
65261
|
+
}
|
|
65262
|
+
|
|
65263
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$2, stack);
|
|
65264
|
+
}
|
|
65265
|
+
|
|
65266
|
+
var _baseIsEqual = baseIsEqual$2;
|
|
65267
|
+
|
|
65268
|
+
var Stack = _Stack,
|
|
65269
|
+
baseIsEqual$1 = _baseIsEqual;
|
|
65270
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
65271
|
+
|
|
65272
|
+
var COMPARE_PARTIAL_FLAG$1 = 1,
|
|
65273
|
+
COMPARE_UNORDERED_FLAG$1 = 2;
|
|
65274
|
+
/**
|
|
65275
|
+
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
65276
|
+
*
|
|
65277
|
+
* @private
|
|
65278
|
+
* @param {Object} object The object to inspect.
|
|
65279
|
+
* @param {Object} source The object of property values to match.
|
|
65280
|
+
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
65281
|
+
* @param {Function} [customizer] The function to customize comparisons.
|
|
65282
|
+
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
65283
|
+
*/
|
|
65284
|
+
|
|
65285
|
+
function baseIsMatch$1(object, source, matchData, customizer) {
|
|
65286
|
+
var index = matchData.length,
|
|
65287
|
+
length = index,
|
|
65288
|
+
noCustomizer = !customizer;
|
|
65289
|
+
|
|
65290
|
+
if (object == null) {
|
|
65291
|
+
return !length;
|
|
65292
|
+
}
|
|
65293
|
+
|
|
65294
|
+
object = Object(object);
|
|
65295
|
+
|
|
65296
|
+
while (index--) {
|
|
65297
|
+
var data = matchData[index];
|
|
65298
|
+
|
|
65299
|
+
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
65300
|
+
return false;
|
|
65301
|
+
}
|
|
65302
|
+
}
|
|
65303
|
+
|
|
65304
|
+
while (++index < length) {
|
|
65305
|
+
data = matchData[index];
|
|
65306
|
+
var key = data[0],
|
|
65307
|
+
objValue = object[key],
|
|
65308
|
+
srcValue = data[1];
|
|
65309
|
+
|
|
65310
|
+
if (noCustomizer && data[2]) {
|
|
65311
|
+
if (objValue === undefined && !(key in object)) {
|
|
65312
|
+
return false;
|
|
65313
|
+
}
|
|
65314
|
+
} else {
|
|
65315
|
+
var stack = new Stack();
|
|
65316
|
+
|
|
65317
|
+
if (customizer) {
|
|
65318
|
+
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
65319
|
+
}
|
|
65320
|
+
|
|
65321
|
+
if (!(result === undefined ? baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
|
|
65322
|
+
return false;
|
|
65323
|
+
}
|
|
65324
|
+
}
|
|
65325
|
+
}
|
|
65326
|
+
|
|
65327
|
+
return true;
|
|
65328
|
+
}
|
|
65329
|
+
|
|
65330
|
+
var _baseIsMatch = baseIsMatch$1;
|
|
65331
|
+
|
|
65332
|
+
var isObject = isObject_1;
|
|
65333
|
+
/**
|
|
65334
|
+
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
65335
|
+
*
|
|
65336
|
+
* @private
|
|
65337
|
+
* @param {*} value The value to check.
|
|
65338
|
+
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
65339
|
+
* equality comparisons, else `false`.
|
|
65340
|
+
*/
|
|
65341
|
+
|
|
65342
|
+
function isStrictComparable$2(value) {
|
|
65343
|
+
return value === value && !isObject(value);
|
|
65344
|
+
}
|
|
65345
|
+
|
|
65346
|
+
var _isStrictComparable = isStrictComparable$2;
|
|
65347
|
+
|
|
65348
|
+
var isStrictComparable$1 = _isStrictComparable,
|
|
65349
|
+
keys = keys_1;
|
|
65350
|
+
/**
|
|
65351
|
+
* Gets the property names, values, and compare flags of `object`.
|
|
65352
|
+
*
|
|
65353
|
+
* @private
|
|
65354
|
+
* @param {Object} object The object to query.
|
|
65355
|
+
* @returns {Array} Returns the match data of `object`.
|
|
65356
|
+
*/
|
|
65357
|
+
|
|
65358
|
+
function getMatchData$1(object) {
|
|
65359
|
+
var result = keys(object),
|
|
65360
|
+
length = result.length;
|
|
65361
|
+
|
|
65362
|
+
while (length--) {
|
|
65363
|
+
var key = result[length],
|
|
65364
|
+
value = object[key];
|
|
65365
|
+
result[length] = [key, value, isStrictComparable$1(value)];
|
|
65366
|
+
}
|
|
65367
|
+
|
|
65368
|
+
return result;
|
|
65369
|
+
}
|
|
65370
|
+
|
|
65371
|
+
var _getMatchData = getMatchData$1;
|
|
65372
|
+
|
|
65373
|
+
/**
|
|
65374
|
+
* A specialized version of `matchesProperty` for source values suitable
|
|
65375
|
+
* for strict equality comparisons, i.e. `===`.
|
|
65376
|
+
*
|
|
65377
|
+
* @private
|
|
65378
|
+
* @param {string} key The key of the property to get.
|
|
65379
|
+
* @param {*} srcValue The value to match.
|
|
65380
|
+
* @returns {Function} Returns the new spec function.
|
|
65381
|
+
*/
|
|
65382
|
+
|
|
65383
|
+
function matchesStrictComparable$2(key, srcValue) {
|
|
65384
|
+
return function (object) {
|
|
65385
|
+
if (object == null) {
|
|
65386
|
+
return false;
|
|
65387
|
+
}
|
|
65388
|
+
|
|
65389
|
+
return object[key] === srcValue && (srcValue !== undefined || key in Object(object));
|
|
65390
|
+
};
|
|
65391
|
+
}
|
|
65392
|
+
|
|
65393
|
+
var _matchesStrictComparable = matchesStrictComparable$2;
|
|
65394
|
+
|
|
65395
|
+
var baseIsMatch = _baseIsMatch,
|
|
65396
|
+
getMatchData = _getMatchData,
|
|
65397
|
+
matchesStrictComparable$1 = _matchesStrictComparable;
|
|
65398
|
+
/**
|
|
65399
|
+
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
65400
|
+
*
|
|
65401
|
+
* @private
|
|
65402
|
+
* @param {Object} source The object of property values to match.
|
|
65403
|
+
* @returns {Function} Returns the new spec function.
|
|
65404
|
+
*/
|
|
65405
|
+
|
|
65406
|
+
function baseMatches$1(source) {
|
|
65407
|
+
var matchData = getMatchData(source);
|
|
65408
|
+
|
|
65409
|
+
if (matchData.length == 1 && matchData[0][2]) {
|
|
65410
|
+
return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
|
|
65411
|
+
}
|
|
65412
|
+
|
|
65413
|
+
return function (object) {
|
|
65414
|
+
return object === source || baseIsMatch(object, source, matchData);
|
|
65415
|
+
};
|
|
65416
|
+
}
|
|
65417
|
+
|
|
65418
|
+
var _baseMatches = baseMatches$1;
|
|
65419
|
+
|
|
65420
|
+
var isArray$4 = isArray_1,
|
|
65421
|
+
isSymbol$2 = isSymbol_1;
|
|
65422
|
+
/** Used to match property names within property paths. */
|
|
65423
|
+
|
|
65424
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
65425
|
+
reIsPlainProp = /^\w*$/;
|
|
65426
|
+
/**
|
|
65427
|
+
* Checks if `value` is a property name and not a property path.
|
|
65428
|
+
*
|
|
65429
|
+
* @private
|
|
65430
|
+
* @param {*} value The value to check.
|
|
65431
|
+
* @param {Object} [object] The object to query keys on.
|
|
65432
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
65433
|
+
*/
|
|
65434
|
+
|
|
65435
|
+
function isKey$3(value, object) {
|
|
65436
|
+
if (isArray$4(value)) {
|
|
65437
|
+
return false;
|
|
65438
|
+
}
|
|
65439
|
+
|
|
65440
|
+
var type = _typeof(value);
|
|
65441
|
+
|
|
65442
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol$2(value)) {
|
|
65443
|
+
return true;
|
|
65444
|
+
}
|
|
65445
|
+
|
|
65446
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
65447
|
+
}
|
|
65448
|
+
|
|
65449
|
+
var _isKey = isKey$3;
|
|
65450
|
+
|
|
65451
|
+
var MapCache = _MapCache;
|
|
65452
|
+
/** Error message constants. */
|
|
65453
|
+
|
|
65454
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
65455
|
+
/**
|
|
65456
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
65457
|
+
* provided, it determines the cache key for storing the result based on the
|
|
65458
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
65459
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
65460
|
+
* is invoked with the `this` binding of the memoized function.
|
|
65461
|
+
*
|
|
65462
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
65463
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
65464
|
+
* constructor with one whose instances implement the
|
|
65465
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
65466
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
65467
|
+
*
|
|
65468
|
+
* @static
|
|
65469
|
+
* @memberOf _
|
|
65470
|
+
* @since 0.1.0
|
|
65471
|
+
* @category Function
|
|
65472
|
+
* @param {Function} func The function to have its output memoized.
|
|
65473
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
65474
|
+
* @returns {Function} Returns the new memoized function.
|
|
65475
|
+
* @example
|
|
65476
|
+
*
|
|
65477
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
65478
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
65479
|
+
*
|
|
65480
|
+
* var values = _.memoize(_.values);
|
|
65481
|
+
* values(object);
|
|
65482
|
+
* // => [1, 2]
|
|
65483
|
+
*
|
|
65484
|
+
* values(other);
|
|
65485
|
+
* // => [3, 4]
|
|
65486
|
+
*
|
|
65487
|
+
* object.a = 2;
|
|
65488
|
+
* values(object);
|
|
65489
|
+
* // => [1, 2]
|
|
65490
|
+
*
|
|
65491
|
+
* // Modify the result cache.
|
|
65492
|
+
* values.cache.set(object, ['a', 'b']);
|
|
65493
|
+
* values(object);
|
|
65494
|
+
* // => ['a', 'b']
|
|
65495
|
+
*
|
|
65496
|
+
* // Replace `_.memoize.Cache`.
|
|
65497
|
+
* _.memoize.Cache = WeakMap;
|
|
65498
|
+
*/
|
|
65499
|
+
|
|
65500
|
+
function memoize$1(func, resolver) {
|
|
65501
|
+
if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {
|
|
65502
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
65503
|
+
}
|
|
65504
|
+
|
|
65505
|
+
var memoized = function memoized() {
|
|
65506
|
+
var args = arguments,
|
|
65507
|
+
key = resolver ? resolver.apply(this, args) : args[0],
|
|
65508
|
+
cache = memoized.cache;
|
|
65509
|
+
|
|
65510
|
+
if (cache.has(key)) {
|
|
65511
|
+
return cache.get(key);
|
|
65512
|
+
}
|
|
65513
|
+
|
|
65514
|
+
var result = func.apply(this, args);
|
|
65515
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
65516
|
+
return result;
|
|
65517
|
+
};
|
|
65518
|
+
|
|
65519
|
+
memoized.cache = new (memoize$1.Cache || MapCache)();
|
|
65520
|
+
return memoized;
|
|
65521
|
+
} // Expose `MapCache`.
|
|
65522
|
+
|
|
65523
|
+
|
|
65524
|
+
memoize$1.Cache = MapCache;
|
|
65525
|
+
var memoize_1 = memoize$1;
|
|
65526
|
+
|
|
65527
|
+
var memoize = memoize_1;
|
|
65528
|
+
/** Used as the maximum memoize cache size. */
|
|
65529
|
+
|
|
65530
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
65531
|
+
/**
|
|
65532
|
+
* A specialized version of `_.memoize` which clears the memoized function's
|
|
65533
|
+
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
65534
|
+
*
|
|
65535
|
+
* @private
|
|
65536
|
+
* @param {Function} func The function to have its output memoized.
|
|
65537
|
+
* @returns {Function} Returns the new memoized function.
|
|
65538
|
+
*/
|
|
65539
|
+
|
|
65540
|
+
function memoizeCapped$1(func) {
|
|
65541
|
+
var result = memoize(func, function (key) {
|
|
65542
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
65543
|
+
cache.clear();
|
|
65544
|
+
}
|
|
65545
|
+
|
|
65546
|
+
return key;
|
|
65547
|
+
});
|
|
65548
|
+
var cache = result.cache;
|
|
65549
|
+
return result;
|
|
65550
|
+
}
|
|
65551
|
+
|
|
65552
|
+
var _memoizeCapped = memoizeCapped$1;
|
|
65553
|
+
|
|
65554
|
+
var memoizeCapped = _memoizeCapped;
|
|
65555
|
+
/** Used to match property names within property paths. */
|
|
65556
|
+
|
|
65557
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
65558
|
+
/** Used to match backslashes in property paths. */
|
|
65559
|
+
|
|
65560
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
65561
|
+
/**
|
|
65562
|
+
* Converts `string` to a property path array.
|
|
65563
|
+
*
|
|
65564
|
+
* @private
|
|
65565
|
+
* @param {string} string The string to convert.
|
|
65566
|
+
* @returns {Array} Returns the property path array.
|
|
65567
|
+
*/
|
|
65568
|
+
|
|
65569
|
+
var stringToPath$1 = memoizeCapped(function (string) {
|
|
65570
|
+
var result = [];
|
|
65571
|
+
|
|
65572
|
+
if (string.charCodeAt(0) === 46
|
|
65573
|
+
/* . */
|
|
65574
|
+
) {
|
|
65575
|
+
result.push('');
|
|
65576
|
+
}
|
|
65577
|
+
|
|
65578
|
+
string.replace(rePropName, function (match, number, quote, subString) {
|
|
65579
|
+
result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);
|
|
65580
|
+
});
|
|
65581
|
+
return result;
|
|
65582
|
+
});
|
|
65583
|
+
var _stringToPath = stringToPath$1;
|
|
65584
|
+
|
|
65585
|
+
/**
|
|
65586
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
65587
|
+
* shorthands.
|
|
65588
|
+
*
|
|
65589
|
+
* @private
|
|
65590
|
+
* @param {Array} [array] The array to iterate over.
|
|
65591
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
65592
|
+
* @returns {Array} Returns the new mapped array.
|
|
65593
|
+
*/
|
|
65594
|
+
|
|
65595
|
+
function arrayMap$1(array, iteratee) {
|
|
65596
|
+
var index = -1,
|
|
65597
|
+
length = array == null ? 0 : array.length,
|
|
65598
|
+
result = Array(length);
|
|
65599
|
+
|
|
65600
|
+
while (++index < length) {
|
|
65601
|
+
result[index] = iteratee(array[index], index, array);
|
|
65602
|
+
}
|
|
65603
|
+
|
|
65604
|
+
return result;
|
|
65605
|
+
}
|
|
65606
|
+
|
|
65607
|
+
var _arrayMap = arrayMap$1;
|
|
65608
|
+
|
|
65609
|
+
var _Symbol = _Symbol$4,
|
|
65610
|
+
arrayMap = _arrayMap,
|
|
65611
|
+
isArray$3 = isArray_1,
|
|
65612
|
+
isSymbol$1 = isSymbol_1;
|
|
65613
|
+
/** Used as references for various `Number` constants. */
|
|
65614
|
+
|
|
65615
|
+
var INFINITY$1 = 1 / 0;
|
|
65616
|
+
/** Used to convert symbols to primitives and strings. */
|
|
65617
|
+
|
|
65618
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
|
65619
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
65620
|
+
/**
|
|
65621
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
65622
|
+
* values to empty strings.
|
|
65623
|
+
*
|
|
65624
|
+
* @private
|
|
65625
|
+
* @param {*} value The value to process.
|
|
65626
|
+
* @returns {string} Returns the string.
|
|
65627
|
+
*/
|
|
65628
|
+
|
|
65629
|
+
function baseToString$1(value) {
|
|
65630
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
65631
|
+
if (typeof value == 'string') {
|
|
65632
|
+
return value;
|
|
65633
|
+
}
|
|
65634
|
+
|
|
65635
|
+
if (isArray$3(value)) {
|
|
65636
|
+
// Recursively convert values (susceptible to call stack limits).
|
|
65637
|
+
return arrayMap(value, baseToString$1) + '';
|
|
65638
|
+
}
|
|
65639
|
+
|
|
65640
|
+
if (isSymbol$1(value)) {
|
|
65641
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
65642
|
+
}
|
|
65643
|
+
|
|
65644
|
+
var result = value + '';
|
|
65645
|
+
return result == '0' && 1 / value == -INFINITY$1 ? '-0' : result;
|
|
65646
|
+
}
|
|
65647
|
+
|
|
65648
|
+
var _baseToString = baseToString$1;
|
|
65649
|
+
|
|
65650
|
+
var baseToString = _baseToString;
|
|
65651
|
+
/**
|
|
65652
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
65653
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
65654
|
+
*
|
|
65655
|
+
* @static
|
|
65656
|
+
* @memberOf _
|
|
65657
|
+
* @since 4.0.0
|
|
65658
|
+
* @category Lang
|
|
65659
|
+
* @param {*} value The value to convert.
|
|
65660
|
+
* @returns {string} Returns the converted string.
|
|
65661
|
+
* @example
|
|
65662
|
+
*
|
|
65663
|
+
* _.toString(null);
|
|
65664
|
+
* // => ''
|
|
65665
|
+
*
|
|
65666
|
+
* _.toString(-0);
|
|
65667
|
+
* // => '-0'
|
|
65668
|
+
*
|
|
65669
|
+
* _.toString([1, 2, 3]);
|
|
65670
|
+
* // => '1,2,3'
|
|
65671
|
+
*/
|
|
65672
|
+
|
|
65673
|
+
function toString$1(value) {
|
|
65674
|
+
return value == null ? '' : baseToString(value);
|
|
65675
|
+
}
|
|
65676
|
+
|
|
65677
|
+
var toString_1 = toString$1;
|
|
65678
|
+
|
|
65679
|
+
var isArray$2 = isArray_1,
|
|
65680
|
+
isKey$2 = _isKey,
|
|
65681
|
+
stringToPath = _stringToPath,
|
|
65682
|
+
toString = toString_1;
|
|
65683
|
+
/**
|
|
65684
|
+
* Casts `value` to a path array if it's not one.
|
|
65685
|
+
*
|
|
65686
|
+
* @private
|
|
65687
|
+
* @param {*} value The value to inspect.
|
|
65688
|
+
* @param {Object} [object] The object to query keys on.
|
|
65689
|
+
* @returns {Array} Returns the cast property path array.
|
|
65690
|
+
*/
|
|
65691
|
+
|
|
65692
|
+
function castPath$2(value, object) {
|
|
65693
|
+
if (isArray$2(value)) {
|
|
65694
|
+
return value;
|
|
65695
|
+
}
|
|
65696
|
+
|
|
65697
|
+
return isKey$2(value, object) ? [value] : stringToPath(toString(value));
|
|
65698
|
+
}
|
|
65699
|
+
|
|
65700
|
+
var _castPath = castPath$2;
|
|
65701
|
+
|
|
65702
|
+
var isSymbol = isSymbol_1;
|
|
65703
|
+
/** Used as references for various `Number` constants. */
|
|
65704
|
+
|
|
65705
|
+
var INFINITY = 1 / 0;
|
|
65706
|
+
/**
|
|
65707
|
+
* Converts `value` to a string key if it's not a string or symbol.
|
|
65708
|
+
*
|
|
65709
|
+
* @private
|
|
65710
|
+
* @param {*} value The value to inspect.
|
|
65711
|
+
* @returns {string|symbol} Returns the key.
|
|
65712
|
+
*/
|
|
65713
|
+
|
|
65714
|
+
function toKey$4(value) {
|
|
65715
|
+
if (typeof value == 'string' || isSymbol(value)) {
|
|
65716
|
+
return value;
|
|
65717
|
+
}
|
|
65718
|
+
|
|
65719
|
+
var result = value + '';
|
|
65720
|
+
return result == '0' && 1 / value == -INFINITY ? '-0' : result;
|
|
65721
|
+
}
|
|
65722
|
+
|
|
65723
|
+
var _toKey = toKey$4;
|
|
65724
|
+
|
|
65725
|
+
var castPath$1 = _castPath,
|
|
65726
|
+
toKey$3 = _toKey;
|
|
65727
|
+
/**
|
|
65728
|
+
* The base implementation of `_.get` without support for default values.
|
|
65729
|
+
*
|
|
65730
|
+
* @private
|
|
65731
|
+
* @param {Object} object The object to query.
|
|
65732
|
+
* @param {Array|string} path The path of the property to get.
|
|
65733
|
+
* @returns {*} Returns the resolved value.
|
|
65734
|
+
*/
|
|
65735
|
+
|
|
65736
|
+
function baseGet$2(object, path) {
|
|
65737
|
+
path = castPath$1(path, object);
|
|
65738
|
+
var index = 0,
|
|
65739
|
+
length = path.length;
|
|
65740
|
+
|
|
65741
|
+
while (object != null && index < length) {
|
|
65742
|
+
object = object[toKey$3(path[index++])];
|
|
65743
|
+
}
|
|
65744
|
+
|
|
65745
|
+
return index && index == length ? object : undefined;
|
|
65746
|
+
}
|
|
65747
|
+
|
|
65748
|
+
var _baseGet = baseGet$2;
|
|
65749
|
+
|
|
65750
|
+
var baseGet$1 = _baseGet;
|
|
65751
|
+
/**
|
|
65752
|
+
* Gets the value at `path` of `object`. If the resolved value is
|
|
65753
|
+
* `undefined`, the `defaultValue` is returned in its place.
|
|
65754
|
+
*
|
|
65755
|
+
* @static
|
|
65756
|
+
* @memberOf _
|
|
65757
|
+
* @since 3.7.0
|
|
65758
|
+
* @category Object
|
|
65759
|
+
* @param {Object} object The object to query.
|
|
65760
|
+
* @param {Array|string} path The path of the property to get.
|
|
65761
|
+
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
65762
|
+
* @returns {*} Returns the resolved value.
|
|
65763
|
+
* @example
|
|
65764
|
+
*
|
|
65765
|
+
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
65766
|
+
*
|
|
65767
|
+
* _.get(object, 'a[0].b.c');
|
|
65768
|
+
* // => 3
|
|
65769
|
+
*
|
|
65770
|
+
* _.get(object, ['a', '0', 'b', 'c']);
|
|
65771
|
+
* // => 3
|
|
65772
|
+
*
|
|
65773
|
+
* _.get(object, 'a.b.c', 'default');
|
|
65774
|
+
* // => 'default'
|
|
65775
|
+
*/
|
|
65776
|
+
|
|
65777
|
+
function get$1(object, path, defaultValue) {
|
|
65778
|
+
var result = object == null ? undefined : baseGet$1(object, path);
|
|
65779
|
+
return result === undefined ? defaultValue : result;
|
|
65780
|
+
}
|
|
65781
|
+
|
|
65782
|
+
var get_1 = get$1;
|
|
65783
|
+
|
|
65784
|
+
/**
|
|
65785
|
+
* The base implementation of `_.hasIn` without support for deep paths.
|
|
65786
|
+
*
|
|
65787
|
+
* @private
|
|
65788
|
+
* @param {Object} [object] The object to query.
|
|
65789
|
+
* @param {Array|string} key The key to check.
|
|
65790
|
+
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
65791
|
+
*/
|
|
65792
|
+
|
|
65793
|
+
function baseHasIn$1(object, key) {
|
|
65794
|
+
return object != null && key in Object(object);
|
|
65795
|
+
}
|
|
65796
|
+
|
|
65797
|
+
var _baseHasIn = baseHasIn$1;
|
|
65798
|
+
|
|
65799
|
+
var castPath = _castPath,
|
|
65800
|
+
isArguments = isArguments_1,
|
|
65801
|
+
isArray$1 = isArray_1,
|
|
65802
|
+
isIndex = _isIndex,
|
|
65803
|
+
isLength = isLength_1,
|
|
65804
|
+
toKey$2 = _toKey;
|
|
65805
|
+
/**
|
|
65806
|
+
* Checks if `path` exists on `object`.
|
|
65807
|
+
*
|
|
65808
|
+
* @private
|
|
65809
|
+
* @param {Object} object The object to query.
|
|
65810
|
+
* @param {Array|string} path The path to check.
|
|
65811
|
+
* @param {Function} hasFunc The function to check properties.
|
|
65812
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
65813
|
+
*/
|
|
65814
|
+
|
|
65815
|
+
function hasPath$1(object, path, hasFunc) {
|
|
65816
|
+
path = castPath(path, object);
|
|
65817
|
+
var index = -1,
|
|
65818
|
+
length = path.length,
|
|
65819
|
+
result = false;
|
|
65820
|
+
|
|
65821
|
+
while (++index < length) {
|
|
65822
|
+
var key = toKey$2(path[index]);
|
|
65823
|
+
|
|
65824
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
65825
|
+
break;
|
|
65826
|
+
}
|
|
65827
|
+
|
|
65828
|
+
object = object[key];
|
|
65829
|
+
}
|
|
65830
|
+
|
|
65831
|
+
if (result || ++index != length) {
|
|
65832
|
+
return result;
|
|
65833
|
+
}
|
|
65834
|
+
|
|
65835
|
+
length = object == null ? 0 : object.length;
|
|
65836
|
+
return !!length && isLength(length) && isIndex(key, length) && (isArray$1(object) || isArguments(object));
|
|
65837
|
+
}
|
|
65838
|
+
|
|
65839
|
+
var _hasPath = hasPath$1;
|
|
65840
|
+
|
|
65841
|
+
var baseHasIn = _baseHasIn,
|
|
65842
|
+
hasPath = _hasPath;
|
|
65843
|
+
/**
|
|
65844
|
+
* Checks if `path` is a direct or inherited property of `object`.
|
|
65845
|
+
*
|
|
65846
|
+
* @static
|
|
65847
|
+
* @memberOf _
|
|
65848
|
+
* @since 4.0.0
|
|
65849
|
+
* @category Object
|
|
65850
|
+
* @param {Object} object The object to query.
|
|
65851
|
+
* @param {Array|string} path The path to check.
|
|
65852
|
+
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
65853
|
+
* @example
|
|
65854
|
+
*
|
|
65855
|
+
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
65856
|
+
*
|
|
65857
|
+
* _.hasIn(object, 'a');
|
|
65858
|
+
* // => true
|
|
65859
|
+
*
|
|
65860
|
+
* _.hasIn(object, 'a.b');
|
|
65861
|
+
* // => true
|
|
65862
|
+
*
|
|
65863
|
+
* _.hasIn(object, ['a', 'b']);
|
|
65864
|
+
* // => true
|
|
65865
|
+
*
|
|
65866
|
+
* _.hasIn(object, 'b');
|
|
65867
|
+
* // => false
|
|
65868
|
+
*/
|
|
65869
|
+
|
|
65870
|
+
function hasIn$1(object, path) {
|
|
65871
|
+
return object != null && hasPath(object, path, baseHasIn);
|
|
65872
|
+
}
|
|
65873
|
+
|
|
65874
|
+
var hasIn_1 = hasIn$1;
|
|
65875
|
+
|
|
65876
|
+
var baseIsEqual = _baseIsEqual,
|
|
65877
|
+
get = get_1,
|
|
65878
|
+
hasIn = hasIn_1,
|
|
65879
|
+
isKey$1 = _isKey,
|
|
65880
|
+
isStrictComparable = _isStrictComparable,
|
|
65881
|
+
matchesStrictComparable = _matchesStrictComparable,
|
|
65882
|
+
toKey$1 = _toKey;
|
|
65883
|
+
/** Used to compose bitmasks for value comparisons. */
|
|
65884
|
+
|
|
65885
|
+
var COMPARE_PARTIAL_FLAG = 1,
|
|
65886
|
+
COMPARE_UNORDERED_FLAG = 2;
|
|
65887
|
+
/**
|
|
65888
|
+
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
65889
|
+
*
|
|
65890
|
+
* @private
|
|
65891
|
+
* @param {string} path The path of the property to get.
|
|
65892
|
+
* @param {*} srcValue The value to match.
|
|
65893
|
+
* @returns {Function} Returns the new spec function.
|
|
65894
|
+
*/
|
|
65895
|
+
|
|
65896
|
+
function baseMatchesProperty$1(path, srcValue) {
|
|
65897
|
+
if (isKey$1(path) && isStrictComparable(srcValue)) {
|
|
65898
|
+
return matchesStrictComparable(toKey$1(path), srcValue);
|
|
65899
|
+
}
|
|
65900
|
+
|
|
65901
|
+
return function (object) {
|
|
65902
|
+
var objValue = get(object, path);
|
|
65903
|
+
return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
65904
|
+
};
|
|
65905
|
+
}
|
|
65906
|
+
|
|
65907
|
+
var _baseMatchesProperty = baseMatchesProperty$1;
|
|
65908
|
+
|
|
65909
|
+
/**
|
|
65910
|
+
* This method returns the first argument it receives.
|
|
65911
|
+
*
|
|
65912
|
+
* @static
|
|
65913
|
+
* @since 0.1.0
|
|
65914
|
+
* @memberOf _
|
|
65915
|
+
* @category Util
|
|
65916
|
+
* @param {*} value Any value.
|
|
65917
|
+
* @returns {*} Returns `value`.
|
|
65918
|
+
* @example
|
|
65919
|
+
*
|
|
65920
|
+
* var object = { 'a': 1 };
|
|
65921
|
+
*
|
|
65922
|
+
* console.log(_.identity(object) === object);
|
|
65923
|
+
* // => true
|
|
65924
|
+
*/
|
|
65925
|
+
|
|
65926
|
+
function identity$1(value) {
|
|
65927
|
+
return value;
|
|
65928
|
+
}
|
|
65929
|
+
|
|
65930
|
+
var identity_1 = identity$1;
|
|
65931
|
+
|
|
65932
|
+
/**
|
|
65933
|
+
* The base implementation of `_.property` without support for deep paths.
|
|
65934
|
+
*
|
|
65935
|
+
* @private
|
|
65936
|
+
* @param {string} key The key of the property to get.
|
|
65937
|
+
* @returns {Function} Returns the new accessor function.
|
|
65938
|
+
*/
|
|
65939
|
+
|
|
65940
|
+
function baseProperty$1(key) {
|
|
65941
|
+
return function (object) {
|
|
65942
|
+
return object == null ? undefined : object[key];
|
|
65943
|
+
};
|
|
65944
|
+
}
|
|
65945
|
+
|
|
65946
|
+
var _baseProperty = baseProperty$1;
|
|
65947
|
+
|
|
65948
|
+
var baseGet = _baseGet;
|
|
65949
|
+
/**
|
|
65950
|
+
* A specialized version of `baseProperty` which supports deep paths.
|
|
65951
|
+
*
|
|
65952
|
+
* @private
|
|
65953
|
+
* @param {Array|string} path The path of the property to get.
|
|
65954
|
+
* @returns {Function} Returns the new accessor function.
|
|
65955
|
+
*/
|
|
65956
|
+
|
|
65957
|
+
function basePropertyDeep$1(path) {
|
|
65958
|
+
return function (object) {
|
|
65959
|
+
return baseGet(object, path);
|
|
65960
|
+
};
|
|
65961
|
+
}
|
|
65962
|
+
|
|
65963
|
+
var _basePropertyDeep = basePropertyDeep$1;
|
|
65964
|
+
|
|
65965
|
+
var baseProperty = _baseProperty,
|
|
65966
|
+
basePropertyDeep = _basePropertyDeep,
|
|
65967
|
+
isKey = _isKey,
|
|
65968
|
+
toKey = _toKey;
|
|
65969
|
+
/**
|
|
65970
|
+
* Creates a function that returns the value at `path` of a given object.
|
|
65971
|
+
*
|
|
65972
|
+
* @static
|
|
65973
|
+
* @memberOf _
|
|
65974
|
+
* @since 2.4.0
|
|
65975
|
+
* @category Util
|
|
65976
|
+
* @param {Array|string} path The path of the property to get.
|
|
65977
|
+
* @returns {Function} Returns the new accessor function.
|
|
65978
|
+
* @example
|
|
65979
|
+
*
|
|
65980
|
+
* var objects = [
|
|
65981
|
+
* { 'a': { 'b': 2 } },
|
|
65982
|
+
* { 'a': { 'b': 1 } }
|
|
65983
|
+
* ];
|
|
65984
|
+
*
|
|
65985
|
+
* _.map(objects, _.property('a.b'));
|
|
65986
|
+
* // => [2, 1]
|
|
65987
|
+
*
|
|
65988
|
+
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
65989
|
+
* // => [1, 2]
|
|
65990
|
+
*/
|
|
65991
|
+
|
|
65992
|
+
function property$1(path) {
|
|
65993
|
+
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
65994
|
+
}
|
|
65995
|
+
|
|
65996
|
+
var property_1 = property$1;
|
|
65997
|
+
|
|
65998
|
+
var baseMatches = _baseMatches,
|
|
65999
|
+
baseMatchesProperty = _baseMatchesProperty,
|
|
66000
|
+
identity = identity_1,
|
|
66001
|
+
isArray = isArray_1,
|
|
66002
|
+
property = property_1;
|
|
66003
|
+
/**
|
|
66004
|
+
* The base implementation of `_.iteratee`.
|
|
66005
|
+
*
|
|
66006
|
+
* @private
|
|
66007
|
+
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
66008
|
+
* @returns {Function} Returns the iteratee.
|
|
66009
|
+
*/
|
|
66010
|
+
|
|
66011
|
+
function baseIteratee$1(value) {
|
|
66012
|
+
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
66013
|
+
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
66014
|
+
if (typeof value == 'function') {
|
|
66015
|
+
return value;
|
|
66016
|
+
}
|
|
66017
|
+
|
|
66018
|
+
if (value == null) {
|
|
66019
|
+
return identity;
|
|
66020
|
+
}
|
|
66021
|
+
|
|
66022
|
+
if (_typeof(value) == 'object') {
|
|
66023
|
+
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
66024
|
+
}
|
|
66025
|
+
|
|
66026
|
+
return property(value);
|
|
66027
|
+
}
|
|
66028
|
+
|
|
66029
|
+
var _baseIteratee = baseIteratee$1;
|
|
66030
|
+
|
|
66031
|
+
var baseExtremum = _baseExtremum,
|
|
66032
|
+
baseGt = _baseGt,
|
|
66033
|
+
baseIteratee = _baseIteratee;
|
|
66034
|
+
/**
|
|
66035
|
+
* This method is like `_.max` except that it accepts `iteratee` which is
|
|
66036
|
+
* invoked for each element in `array` to generate the criterion by which
|
|
66037
|
+
* the value is ranked. The iteratee is invoked with one argument: (value).
|
|
66038
|
+
*
|
|
66039
|
+
* @static
|
|
66040
|
+
* @memberOf _
|
|
66041
|
+
* @since 4.0.0
|
|
66042
|
+
* @category Math
|
|
66043
|
+
* @param {Array} array The array to iterate over.
|
|
66044
|
+
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
|
|
66045
|
+
* @returns {*} Returns the maximum value.
|
|
66046
|
+
* @example
|
|
66047
|
+
*
|
|
66048
|
+
* var objects = [{ 'n': 1 }, { 'n': 2 }];
|
|
66049
|
+
*
|
|
66050
|
+
* _.maxBy(objects, function(o) { return o.n; });
|
|
66051
|
+
* // => { 'n': 2 }
|
|
66052
|
+
*
|
|
66053
|
+
* // The `_.property` iteratee shorthand.
|
|
66054
|
+
* _.maxBy(objects, 'n');
|
|
66055
|
+
* // => { 'n': 2 }
|
|
66056
|
+
*/
|
|
66057
|
+
|
|
66058
|
+
function maxBy(array, iteratee) {
|
|
66059
|
+
return array && array.length ? baseExtremum(array, baseIteratee(iteratee), baseGt) : undefined;
|
|
66060
|
+
}
|
|
66061
|
+
|
|
66062
|
+
var maxBy_1 = maxBy;
|
|
66063
|
+
|
|
66064
|
+
var THREE_SECONDS = 3000;
|
|
66065
|
+
var MAX_TRIES = 3;
|
|
66066
|
+
/** Check if the user's primary creator node is healthy */
|
|
66067
|
+
|
|
66068
|
+
var checkPrimaryHealthy = /*#__PURE__*/function () {
|
|
66069
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(libs, primary, tries) {
|
|
66070
|
+
var healthy;
|
|
66071
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
66072
|
+
while (1) {
|
|
66073
|
+
switch (_context.prev = _context.next) {
|
|
66074
|
+
case 0:
|
|
66075
|
+
_context.next = 2;
|
|
66076
|
+
return Utils.isHealthy(primary);
|
|
66077
|
+
|
|
66078
|
+
case 2:
|
|
66079
|
+
healthy = _context.sent;
|
|
66080
|
+
|
|
66081
|
+
if (!healthy) {
|
|
66082
|
+
_context.next = 7;
|
|
66083
|
+
break;
|
|
66084
|
+
}
|
|
66085
|
+
|
|
66086
|
+
return _context.abrupt("return", healthy);
|
|
66087
|
+
|
|
66088
|
+
case 7:
|
|
66089
|
+
if (!(tries === 0)) {
|
|
66090
|
+
_context.next = 9;
|
|
66091
|
+
break;
|
|
66092
|
+
}
|
|
66093
|
+
|
|
66094
|
+
return _context.abrupt("return", false);
|
|
66095
|
+
|
|
66096
|
+
case 9:
|
|
66097
|
+
_context.next = 11;
|
|
66098
|
+
return Utils.wait(THREE_SECONDS);
|
|
66099
|
+
|
|
66100
|
+
case 11:
|
|
66101
|
+
_context.next = 13;
|
|
66102
|
+
return checkPrimaryHealthy(libs, primary, tries - 1);
|
|
66103
|
+
|
|
66104
|
+
case 13:
|
|
66105
|
+
return _context.abrupt("return", _context.sent);
|
|
66106
|
+
|
|
66107
|
+
case 14:
|
|
66108
|
+
case "end":
|
|
66109
|
+
return _context.stop();
|
|
66110
|
+
}
|
|
66111
|
+
}
|
|
66112
|
+
}, _callee);
|
|
66113
|
+
}));
|
|
66114
|
+
|
|
66115
|
+
return function checkPrimaryHealthy(_x, _x2, _x3) {
|
|
66116
|
+
return _ref.apply(this, arguments);
|
|
66117
|
+
};
|
|
66118
|
+
}();
|
|
66119
|
+
/** Gets new endpoints from a user's secondaries */
|
|
66120
|
+
|
|
66121
|
+
|
|
66122
|
+
var getNewPrimary = /*#__PURE__*/function () {
|
|
66123
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(secondaries, wallet) {
|
|
66124
|
+
var _maxBy;
|
|
66125
|
+
|
|
66126
|
+
var secondaryStatuses, max;
|
|
66127
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
66128
|
+
while (1) {
|
|
66129
|
+
switch (_context3.prev = _context3.next) {
|
|
66130
|
+
case 0:
|
|
66131
|
+
_context3.next = 2;
|
|
66132
|
+
return Promise.all(secondaries.map( /*#__PURE__*/function () {
|
|
66133
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(secondary) {
|
|
66134
|
+
var clockValue;
|
|
66135
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
66136
|
+
while (1) {
|
|
66137
|
+
switch (_context2.prev = _context2.next) {
|
|
66138
|
+
case 0:
|
|
66139
|
+
_context2.prev = 0;
|
|
66140
|
+
_context2.next = 3;
|
|
66141
|
+
return CreatorNode.getClockValue(secondary, wallet);
|
|
66142
|
+
|
|
66143
|
+
case 3:
|
|
66144
|
+
clockValue = _context2.sent;
|
|
66145
|
+
|
|
66146
|
+
if (!clockValue) {
|
|
66147
|
+
_context2.next = 6;
|
|
66148
|
+
break;
|
|
66149
|
+
}
|
|
66150
|
+
|
|
66151
|
+
return _context2.abrupt("return", {
|
|
66152
|
+
secondary: secondary,
|
|
66153
|
+
clockValue: clockValue
|
|
66154
|
+
});
|
|
66155
|
+
|
|
66156
|
+
case 6:
|
|
66157
|
+
return _context2.abrupt("return", undefined);
|
|
66158
|
+
|
|
66159
|
+
case 9:
|
|
66160
|
+
_context2.prev = 9;
|
|
66161
|
+
_context2.t0 = _context2["catch"](0);
|
|
66162
|
+
console.warn(_context2.t0);
|
|
66163
|
+
return _context2.abrupt("return", undefined);
|
|
66164
|
+
|
|
66165
|
+
case 13:
|
|
66166
|
+
case "end":
|
|
66167
|
+
return _context2.stop();
|
|
66168
|
+
}
|
|
66169
|
+
}
|
|
66170
|
+
}, _callee2, null, [[0, 9]]);
|
|
66171
|
+
}));
|
|
66172
|
+
|
|
66173
|
+
return function (_x6) {
|
|
66174
|
+
return _ref3.apply(this, arguments);
|
|
66175
|
+
};
|
|
66176
|
+
}()));
|
|
66177
|
+
|
|
66178
|
+
case 2:
|
|
66179
|
+
secondaryStatuses = _context3.sent.filter(Boolean);
|
|
66180
|
+
max = (_maxBy = maxBy_1(secondaryStatuses, function (s) {
|
|
66181
|
+
return s === null || s === void 0 ? void 0 : s.clockValue;
|
|
66182
|
+
})) === null || _maxBy === void 0 ? void 0 : _maxBy.secondary;
|
|
66183
|
+
|
|
66184
|
+
if (max) {
|
|
66185
|
+
_context3.next = 6;
|
|
66186
|
+
break;
|
|
66187
|
+
}
|
|
66188
|
+
|
|
66189
|
+
throw new Error("Could not find valid secondaries for user ".concat(secondaries));
|
|
66190
|
+
|
|
66191
|
+
case 6:
|
|
66192
|
+
return _context3.abrupt("return", max);
|
|
66193
|
+
|
|
66194
|
+
case 7:
|
|
66195
|
+
case "end":
|
|
66196
|
+
return _context3.stop();
|
|
66197
|
+
}
|
|
66198
|
+
}
|
|
66199
|
+
}, _callee3);
|
|
66200
|
+
}));
|
|
66201
|
+
|
|
66202
|
+
return function getNewPrimary(_x4, _x5) {
|
|
66203
|
+
return _ref2.apply(this, arguments);
|
|
66204
|
+
};
|
|
66205
|
+
}();
|
|
66206
|
+
|
|
66207
|
+
var rolloverNodes = /*#__PURE__*/function () {
|
|
66208
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(libs, creatorNodeWhitelist, creatorNodeBlacklist) {
|
|
66209
|
+
var _libs$userStateManage;
|
|
66210
|
+
|
|
66211
|
+
var user, primary, healthy, secondaries, _libs$ServiceProvider, _libs$User, _libs$User2, _libs$creatorNode, _libs$User3, newPrimary, index, newSecondaries, autoselect, newEndpoints, newMetadata;
|
|
66212
|
+
|
|
66213
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
66214
|
+
while (1) {
|
|
66215
|
+
switch (_context4.prev = _context4.next) {
|
|
66216
|
+
case 0:
|
|
66217
|
+
console.debug('Sanity Check - rolloverNodes');
|
|
66218
|
+
user = (_libs$userStateManage = libs.userStateManager) === null || _libs$userStateManage === void 0 ? void 0 : _libs$userStateManage.getCurrentUser();
|
|
66219
|
+
|
|
66220
|
+
if (user) {
|
|
66221
|
+
_context4.next = 4;
|
|
66222
|
+
break;
|
|
66223
|
+
}
|
|
66224
|
+
|
|
66225
|
+
return _context4.abrupt("return");
|
|
66226
|
+
|
|
66227
|
+
case 4:
|
|
66228
|
+
primary = CreatorNode.getPrimary(user.creator_node_endpoint);
|
|
66229
|
+
|
|
66230
|
+
if (primary) {
|
|
66231
|
+
_context4.next = 7;
|
|
66232
|
+
break;
|
|
66233
|
+
}
|
|
66234
|
+
|
|
66235
|
+
return _context4.abrupt("return");
|
|
66236
|
+
|
|
66237
|
+
case 7:
|
|
66238
|
+
_context4.next = 9;
|
|
66239
|
+
return checkPrimaryHealthy(libs, primary, MAX_TRIES);
|
|
66240
|
+
|
|
66241
|
+
case 9:
|
|
66242
|
+
healthy = _context4.sent;
|
|
66243
|
+
|
|
66244
|
+
if (!(healthy && !(creatorNodeBlacklist !== null && creatorNodeBlacklist !== void 0 && creatorNodeBlacklist.has(primary)))) {
|
|
66245
|
+
_context4.next = 12;
|
|
66246
|
+
break;
|
|
66247
|
+
}
|
|
66248
|
+
|
|
66249
|
+
return _context4.abrupt("return");
|
|
66250
|
+
|
|
66251
|
+
case 12:
|
|
66252
|
+
secondaries = CreatorNode.getSecondaries(user.creator_node_endpoint);
|
|
66253
|
+
_context4.prev = 13;
|
|
66254
|
+
_context4.next = 16;
|
|
66255
|
+
return getNewPrimary(secondaries, user.wallet);
|
|
66256
|
+
|
|
66257
|
+
case 16:
|
|
66258
|
+
newPrimary = _context4.sent;
|
|
66259
|
+
index = secondaries.indexOf(newPrimary); // Get new secondaries and backfill up to 2
|
|
66260
|
+
|
|
66261
|
+
newSecondaries = _toConsumableArray(secondaries);
|
|
66262
|
+
newSecondaries.splice(index, 1);
|
|
66263
|
+
_context4.next = 22;
|
|
66264
|
+
return (_libs$ServiceProvider = libs.ServiceProvider) === null || _libs$ServiceProvider === void 0 ? void 0 : _libs$ServiceProvider.autoSelectCreatorNodes({
|
|
66265
|
+
numberOfNodes: 2 - newSecondaries.length,
|
|
66266
|
+
whitelist: creatorNodeWhitelist,
|
|
66267
|
+
// Exclude ones we currently have
|
|
66268
|
+
blacklist: new Set([newPrimary].concat(_toConsumableArray(newSecondaries))),
|
|
66269
|
+
preferHigherPatchForPrimary: (_libs$User = libs.User) === null || _libs$User === void 0 ? void 0 : _libs$User.preferHigherPatchForPrimary,
|
|
66270
|
+
preferHigherPatchForSecondaries: (_libs$User2 = libs.User) === null || _libs$User2 === void 0 ? void 0 : _libs$User2.preferHigherPatchForSecondaries
|
|
66271
|
+
});
|
|
66272
|
+
|
|
66273
|
+
case 22:
|
|
66274
|
+
autoselect = _context4.sent;
|
|
66275
|
+
|
|
66276
|
+
if (autoselect) {
|
|
66277
|
+
newSecondaries = newSecondaries.concat([autoselect.primary].concat(_toConsumableArray(autoselect.secondaries)));
|
|
66278
|
+
} // Set the new endpoint and connect to it
|
|
66279
|
+
|
|
66280
|
+
|
|
66281
|
+
newEndpoints = [newPrimary].concat(_toConsumableArray(newSecondaries));
|
|
66282
|
+
_context4.next = 27;
|
|
66283
|
+
return (_libs$creatorNode = libs.creatorNode) === null || _libs$creatorNode === void 0 ? void 0 : _libs$creatorNode.setEndpoint(newEndpoints[0]);
|
|
66284
|
+
|
|
66285
|
+
case 27:
|
|
66286
|
+
// Update the user
|
|
66287
|
+
newMetadata = _objectSpread2({}, user);
|
|
66288
|
+
newMetadata.creator_node_endpoint = newEndpoints.join(',');
|
|
66289
|
+
console.debug("Sanity Check - rolloverNodes - new nodes ".concat(newMetadata.creator_node_endpoint));
|
|
66290
|
+
_context4.next = 32;
|
|
66291
|
+
return (_libs$User3 = libs.User) === null || _libs$User3 === void 0 ? void 0 : _libs$User3.updateCreator(user.user_id, newMetadata, true
|
|
66292
|
+
/* useEntityManager */
|
|
66293
|
+
);
|
|
66294
|
+
|
|
66295
|
+
case 32:
|
|
66296
|
+
_context4.next = 37;
|
|
66297
|
+
break;
|
|
66298
|
+
|
|
66299
|
+
case 34:
|
|
66300
|
+
_context4.prev = 34;
|
|
66301
|
+
_context4.t0 = _context4["catch"](13);
|
|
66302
|
+
console.error(_context4.t0);
|
|
66303
|
+
|
|
66304
|
+
case 37:
|
|
66305
|
+
case "end":
|
|
66306
|
+
return _context4.stop();
|
|
66307
|
+
}
|
|
66308
|
+
}
|
|
66309
|
+
}, _callee4, null, [[13, 34]]);
|
|
66310
|
+
}));
|
|
66311
|
+
|
|
66312
|
+
return function rolloverNodes(_x7, _x8, _x9) {
|
|
66313
|
+
return _ref4.apply(this, arguments);
|
|
63128
66314
|
};
|
|
63129
66315
|
}();
|
|
63130
66316
|
|