|
@@ -9629,7 +9629,7 @@ module.exports = isSymbol;
|
|
var undefined;
|
|
var undefined;
|
|
|
|
|
|
/** Used as the semantic version number. */
|
|
/** Used as the semantic version number. */
|
|
- var VERSION = '4.17.4';
|
|
|
|
|
|
+ var VERSION = '4.17.10';
|
|
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
@@ -9760,7 +9760,6 @@ module.exports = isSymbol;
|
|
/** Used to match property names within property paths. */
|
|
/** Used to match property names within property paths. */
|
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
reIsPlainProp = /^\w*$/,
|
|
reIsPlainProp = /^\w*$/,
|
|
- reLeadingDot = /^\./,
|
|
|
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -9860,8 +9859,8 @@ module.exports = isSymbol;
|
|
reOptMod = rsModifier + '?',
|
|
reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
- rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)',
|
|
|
|
- rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)',
|
|
|
|
|
|
+ rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
|
|
+ rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
@@ -10054,6 +10053,14 @@ module.exports = isSymbol;
|
|
/** Used to access faster Node.js helpers. */
|
|
/** Used to access faster Node.js helpers. */
|
|
var nodeUtil = (function() {
|
|
var nodeUtil = (function() {
|
|
try {
|
|
try {
|
|
|
|
+ // Use `util.types` for Node.js 10+.
|
|
|
|
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
|
|
+
|
|
|
|
+ if (types) {
|
|
|
|
+ return types;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Legacy `process.binding('util')` for Node.js < 10.
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
} catch (e) {}
|
|
} catch (e) {}
|
|
}());
|
|
}());
|
|
@@ -10068,34 +10075,6 @@ module.exports = isSymbol;
|
|
|
|
|
|
/*--------------------------------------------------------------------------*/
|
|
/*--------------------------------------------------------------------------*/
|
|
|
|
|
|
- /**
|
|
|
|
- * Adds the key-value `pair` to `map`.
|
|
|
|
- *
|
|
|
|
- * @private
|
|
|
|
- * @param {Object} map The map to modify.
|
|
|
|
- * @param {Array} pair The key-value pair to add.
|
|
|
|
- * @returns {Object} Returns `map`.
|
|
|
|
- */
|
|
|
|
- function addMapEntry(map, pair) {
|
|
|
|
- // Don't return `map.set` because it's not chainable in IE 11.
|
|
|
|
- map.set(pair[0], pair[1]);
|
|
|
|
- return map;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * Adds `value` to `set`.
|
|
|
|
- *
|
|
|
|
- * @private
|
|
|
|
- * @param {Object} set The set to modify.
|
|
|
|
- * @param {*} value The value to add.
|
|
|
|
- * @returns {Object} Returns `set`.
|
|
|
|
- */
|
|
|
|
- function addSetEntry(set, value) {
|
|
|
|
- // Don't return `set.add` because it's not chainable in IE 11.
|
|
|
|
- set.add(value);
|
|
|
|
- return set;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
@@ -10862,6 +10841,20 @@ module.exports = isSymbol;
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Gets the value at `key`, unless `key` is "__proto__".
|
|
|
|
+ *
|
|
|
|
+ * @private
|
|
|
|
+ * @param {Object} object The object to query.
|
|
|
|
+ * @param {string} key The key of the property to get.
|
|
|
|
+ * @returns {*} Returns the property value.
|
|
|
|
+ */
|
|
|
|
+ function safeGet(object, key) {
|
|
|
|
+ return key == '__proto__'
|
|
|
|
+ ? undefined
|
|
|
|
+ : object[key];
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Converts `set` to an array of its values.
|
|
* Converts `set` to an array of its values.
|
|
*
|
|
*
|
|
@@ -12294,7 +12287,7 @@ module.exports = isSymbol;
|
|
if (!cloneableTags[tag]) {
|
|
if (!cloneableTags[tag]) {
|
|
return object ? value : {};
|
|
return object ? value : {};
|
|
}
|
|
}
|
|
- result = initCloneByTag(value, tag, baseClone, isDeep);
|
|
|
|
|
|
+ result = initCloneByTag(value, tag, isDeep);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// Check for circular references and return its corresponding clone.
|
|
// Check for circular references and return its corresponding clone.
|
|
@@ -12305,6 +12298,22 @@ module.exports = isSymbol;
|
|
}
|
|
}
|
|
stack.set(value, result);
|
|
stack.set(value, result);
|
|
|
|
|
|
|
|
+ if (isSet(value)) {
|
|
|
|
+ value.forEach(function(subValue) {
|
|
|
|
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (isMap(value)) {
|
|
|
|
+ value.forEach(function(subValue, key) {
|
|
|
|
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
var keysFunc = isFull
|
|
var keysFunc = isFull
|
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
: (isFlat ? keysIn : keys);
|
|
: (isFlat ? keysIn : keys);
|
|
@@ -13232,7 +13241,7 @@ module.exports = isSymbol;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
var newValue = customizer
|
|
var newValue = customizer
|
|
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
|
|
|
|
|
|
+ ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
|
: undefined;
|
|
: undefined;
|
|
|
|
|
|
if (newValue === undefined) {
|
|
if (newValue === undefined) {
|
|
@@ -13259,8 +13268,8 @@ module.exports = isSymbol;
|
|
* counterparts.
|
|
* counterparts.
|
|
*/
|
|
*/
|
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
- var objValue = object[key],
|
|
|
|
- srcValue = source[key],
|
|
|
|
|
|
+ var objValue = safeGet(object, key),
|
|
|
|
+ srcValue = safeGet(source, key),
|
|
stacked = stack.get(srcValue);
|
|
stacked = stack.get(srcValue);
|
|
|
|
|
|
if (stacked) {
|
|
if (stacked) {
|
|
@@ -14168,20 +14177,6 @@ module.exports = isSymbol;
|
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * Creates a clone of `map`.
|
|
|
|
- *
|
|
|
|
- * @private
|
|
|
|
- * @param {Object} map The map to clone.
|
|
|
|
- * @param {Function} cloneFunc The function to clone values.
|
|
|
|
- * @param {boolean} [isDeep] Specify a deep clone.
|
|
|
|
- * @returns {Object} Returns the cloned map.
|
|
|
|
- */
|
|
|
|
- function cloneMap(map, isDeep, cloneFunc) {
|
|
|
|
- var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);
|
|
|
|
- return arrayReduce(array, addMapEntry, new map.constructor);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Creates a clone of `regexp`.
|
|
* Creates a clone of `regexp`.
|
|
*
|
|
*
|
|
@@ -14195,20 +14190,6 @@ module.exports = isSymbol;
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * Creates a clone of `set`.
|
|
|
|
- *
|
|
|
|
- * @private
|
|
|
|
- * @param {Object} set The set to clone.
|
|
|
|
- * @param {Function} cloneFunc The function to clone values.
|
|
|
|
- * @param {boolean} [isDeep] Specify a deep clone.
|
|
|
|
- * @returns {Object} Returns the cloned set.
|
|
|
|
- */
|
|
|
|
- function cloneSet(set, isDeep, cloneFunc) {
|
|
|
|
- var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);
|
|
|
|
- return arrayReduce(array, addSetEntry, new set.constructor);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Creates a clone of the `symbol` object.
|
|
* Creates a clone of the `symbol` object.
|
|
*
|
|
*
|
|
@@ -15803,7 +15784,7 @@ module.exports = isSymbol;
|
|
*/
|
|
*/
|
|
function initCloneArray(array) {
|
|
function initCloneArray(array) {
|
|
var length = array.length,
|
|
var length = array.length,
|
|
- result = array.constructor(length);
|
|
|
|
|
|
+ result = new array.constructor(length);
|
|
|
|
|
|
// Add properties assigned by `RegExp#exec`.
|
|
// Add properties assigned by `RegExp#exec`.
|
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
@@ -15830,16 +15811,15 @@ module.exports = isSymbol;
|
|
* Initializes an object clone based on its `toStringTag`.
|
|
* Initializes an object clone based on its `toStringTag`.
|
|
*
|
|
*
|
|
* **Note:** This function only supports cloning values with tags of
|
|
* **Note:** This function only supports cloning values with tags of
|
|
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
|
|
|
|
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
*
|
|
*
|
|
* @private
|
|
* @private
|
|
* @param {Object} object The object to clone.
|
|
* @param {Object} object The object to clone.
|
|
* @param {string} tag The `toStringTag` of the object to clone.
|
|
* @param {string} tag The `toStringTag` of the object to clone.
|
|
- * @param {Function} cloneFunc The function to clone values.
|
|
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @param {boolean} [isDeep] Specify a deep clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
* @returns {Object} Returns the initialized clone.
|
|
*/
|
|
*/
|
|
- function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
|
|
|
|
|
+ function initCloneByTag(object, tag, isDeep) {
|
|
var Ctor = object.constructor;
|
|
var Ctor = object.constructor;
|
|
switch (tag) {
|
|
switch (tag) {
|
|
case arrayBufferTag:
|
|
case arrayBufferTag:
|
|
@@ -15858,7 +15838,7 @@ module.exports = isSymbol;
|
|
return cloneTypedArray(object, isDeep);
|
|
return cloneTypedArray(object, isDeep);
|
|
|
|
|
|
case mapTag:
|
|
case mapTag:
|
|
- return cloneMap(object, isDeep, cloneFunc);
|
|
|
|
|
|
+ return new Ctor;
|
|
|
|
|
|
case numberTag:
|
|
case numberTag:
|
|
case stringTag:
|
|
case stringTag:
|
|
@@ -15868,7 +15848,7 @@ module.exports = isSymbol;
|
|
return cloneRegExp(object);
|
|
return cloneRegExp(object);
|
|
|
|
|
|
case setTag:
|
|
case setTag:
|
|
- return cloneSet(object, isDeep, cloneFunc);
|
|
|
|
|
|
+ return new Ctor;
|
|
|
|
|
|
case symbolTag:
|
|
case symbolTag:
|
|
return cloneSymbol(object);
|
|
return cloneSymbol(object);
|
|
@@ -15915,10 +15895,13 @@ module.exports = isSymbol;
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
*/
|
|
*/
|
|
function isIndex(value, length) {
|
|
function isIndex(value, length) {
|
|
|
|
+ var type = typeof value;
|
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
|
|
+
|
|
return !!length &&
|
|
return !!length &&
|
|
- (typeof value == 'number' || reIsUint.test(value)) &&
|
|
|
|
- (value > -1 && value % 1 == 0 && value < length);
|
|
|
|
|
|
+ (type == 'number' ||
|
|
|
|
+ (type != 'symbol' && reIsUint.test(value))) &&
|
|
|
|
+ (value > -1 && value % 1 == 0 && value < length);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -16368,11 +16351,11 @@ module.exports = isSymbol;
|
|
*/
|
|
*/
|
|
var stringToPath = memoizeCapped(function(string) {
|
|
var stringToPath = memoizeCapped(function(string) {
|
|
var result = [];
|
|
var result = [];
|
|
- if (reLeadingDot.test(string)) {
|
|
|
|
|
|
+ if (string.charCodeAt(0) === 46 /* . */) {
|
|
result.push('');
|
|
result.push('');
|
|
}
|
|
}
|
|
- string.replace(rePropName, function(match, number, quote, string) {
|
|
|
|
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
|
|
|
|
|
|
+ string.replace(rePropName, function(match, number, quote, subString) {
|
|
|
|
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
});
|
|
});
|
|
return result;
|
|
return result;
|
|
});
|
|
});
|
|
@@ -19980,9 +19963,11 @@ module.exports = isSymbol;
|
|
function remainingWait(time) {
|
|
function remainingWait(time) {
|
|
var timeSinceLastCall = time - lastCallTime,
|
|
var timeSinceLastCall = time - lastCallTime,
|
|
timeSinceLastInvoke = time - lastInvokeTime,
|
|
timeSinceLastInvoke = time - lastInvokeTime,
|
|
- result = wait - timeSinceLastCall;
|
|
|
|
|
|
+ timeWaiting = wait - timeSinceLastCall;
|
|
|
|
|
|
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
|
|
|
|
|
|
+ return maxing
|
|
|
|
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
|
|
+ : timeWaiting;
|
|
}
|
|
}
|
|
|
|
|
|
function shouldInvoke(time) {
|
|
function shouldInvoke(time) {
|
|
@@ -22414,9 +22399,35 @@ module.exports = isSymbol;
|
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
|
|
* // => { 'a': 1, 'b': 2 }
|
|
* // => { 'a': 1, 'b': 2 }
|
|
*/
|
|
*/
|
|
- var defaults = baseRest(function(args) {
|
|
|
|
- args.push(undefined, customDefaultsAssignIn);
|
|
|
|
- return apply(assignInWith, undefined, args);
|
|
|
|
|
|
+ var defaults = baseRest(function(object, sources) {
|
|
|
|
+ object = Object(object);
|
|
|
|
+
|
|
|
|
+ var index = -1;
|
|
|
|
+ var length = sources.length;
|
|
|
|
+ var guard = length > 2 ? sources[2] : undefined;
|
|
|
|
+
|
|
|
|
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
|
|
+ length = 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ while (++index < length) {
|
|
|
|
+ var source = sources[index];
|
|
|
|
+ var props = keysIn(source);
|
|
|
|
+ var propsIndex = -1;
|
|
|
|
+ var propsLength = props.length;
|
|
|
|
+
|
|
|
|
+ while (++propsIndex < propsLength) {
|
|
|
|
+ var key = props[propsIndex];
|
|
|
|
+ var value = object[key];
|
|
|
|
+
|
|
|
|
+ if (value === undefined ||
|
|
|
|
+ (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
|
|
|
|
+ object[key] = source[key];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return object;
|
|
});
|
|
});
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -22813,6 +22824,11 @@ module.exports = isSymbol;
|
|
* // => { '1': 'c', '2': 'b' }
|
|
* // => { '1': 'c', '2': 'b' }
|
|
*/
|
|
*/
|
|
var invert = createInverter(function(result, value, key) {
|
|
var invert = createInverter(function(result, value, key) {
|
|
|
|
+ if (value != null &&
|
|
|
|
+ typeof value.toString != 'function') {
|
|
|
|
+ value = nativeObjectToString.call(value);
|
|
|
|
+ }
|
|
|
|
+
|
|
result[value] = key;
|
|
result[value] = key;
|
|
}, constant(identity));
|
|
}, constant(identity));
|
|
|
|
|
|
@@ -22843,6 +22859,11 @@ module.exports = isSymbol;
|
|
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
|
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
|
|
*/
|
|
*/
|
|
var invertBy = createInverter(function(result, value, key) {
|
|
var invertBy = createInverter(function(result, value, key) {
|
|
|
|
+ if (value != null &&
|
|
|
|
+ typeof value.toString != 'function') {
|
|
|
|
+ value = nativeObjectToString.call(value);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (hasOwnProperty.call(result, value)) {
|
|
if (hasOwnProperty.call(result, value)) {
|
|
result[value].push(key);
|
|
result[value].push(key);
|
|
} else {
|
|
} else {
|