scratch-paint 4.1.49 → 4.1.51
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/.nvmrc +1 -1
- package/dist/scratch-paint.js +1615 -331
- package/dist/scratch-paint.js.map +1 -1
- package/package.json +12 -12
package/dist/scratch-paint.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 109);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -19302,7 +19302,7 @@ module.exports = content.locals || {};
|
|
|
19302
19302
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19303
19303
|
|
|
19304
19304
|
var api = __webpack_require__(11);
|
|
19305
|
-
var content = __webpack_require__(
|
|
19305
|
+
var content = __webpack_require__(108);
|
|
19306
19306
|
|
|
19307
19307
|
content = content.__esModule ? content.default : content;
|
|
19308
19308
|
|
|
@@ -19326,7 +19326,7 @@ module.exports = content.locals || {};
|
|
|
19326
19326
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19327
19327
|
|
|
19328
19328
|
var api = __webpack_require__(11);
|
|
19329
|
-
var content = __webpack_require__(
|
|
19329
|
+
var content = __webpack_require__(106);
|
|
19330
19330
|
|
|
19331
19331
|
content = content.__esModule ? content.default : content;
|
|
19332
19332
|
|
|
@@ -19755,7 +19755,7 @@ function toComment(sourceMap) {
|
|
|
19755
19755
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19756
19756
|
|
|
19757
19757
|
var api = __webpack_require__(11);
|
|
19758
|
-
var content = __webpack_require__(
|
|
19758
|
+
var content = __webpack_require__(107);
|
|
19759
19759
|
|
|
19760
19760
|
content = content.__esModule ? content.default : content;
|
|
19761
19761
|
|
|
@@ -19927,10 +19927,10 @@ module.exports = function (cstr) {
|
|
|
19927
19927
|
/* 16 */
|
|
19928
19928
|
/***/ (function(module, exports, __webpack_require__) {
|
|
19929
19929
|
|
|
19930
|
-
/* WEBPACK VAR INJECTION */(function(global) {/**
|
|
19931
|
-
*
|
|
19930
|
+
/* WEBPACK VAR INJECTION */(function(global, module) {/**
|
|
19931
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
19932
19932
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
19933
|
-
* Copyright
|
|
19933
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
19934
19934
|
* Released under MIT license <https://lodash.com/license>
|
|
19935
19935
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
19936
19936
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
@@ -19939,18 +19939,66 @@ module.exports = function (cstr) {
|
|
|
19939
19939
|
/** Used as the size to enable large array optimizations. */
|
|
19940
19940
|
var LARGE_ARRAY_SIZE = 200;
|
|
19941
19941
|
|
|
19942
|
+
/** Error message constants. */
|
|
19943
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
19944
|
+
|
|
19942
19945
|
/** Used to stand-in for `undefined` hash values. */
|
|
19943
19946
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
19944
19947
|
|
|
19948
|
+
/** Used as the maximum memoize cache size. */
|
|
19949
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
19950
|
+
|
|
19951
|
+
/** Used to compose bitmasks for cloning. */
|
|
19952
|
+
var CLONE_DEEP_FLAG = 1,
|
|
19953
|
+
CLONE_FLAT_FLAG = 2,
|
|
19954
|
+
CLONE_SYMBOLS_FLAG = 4;
|
|
19955
|
+
|
|
19956
|
+
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
19957
|
+
var HOT_COUNT = 800,
|
|
19958
|
+
HOT_SPAN = 16;
|
|
19959
|
+
|
|
19945
19960
|
/** Used as references for various `Number` constants. */
|
|
19946
19961
|
var INFINITY = 1 / 0,
|
|
19947
19962
|
MAX_SAFE_INTEGER = 9007199254740991;
|
|
19948
19963
|
|
|
19949
19964
|
/** `Object#toString` result references. */
|
|
19950
19965
|
var argsTag = '[object Arguments]',
|
|
19966
|
+
arrayTag = '[object Array]',
|
|
19967
|
+
asyncTag = '[object AsyncFunction]',
|
|
19968
|
+
boolTag = '[object Boolean]',
|
|
19969
|
+
dateTag = '[object Date]',
|
|
19970
|
+
errorTag = '[object Error]',
|
|
19951
19971
|
funcTag = '[object Function]',
|
|
19952
19972
|
genTag = '[object GeneratorFunction]',
|
|
19953
|
-
|
|
19973
|
+
mapTag = '[object Map]',
|
|
19974
|
+
numberTag = '[object Number]',
|
|
19975
|
+
nullTag = '[object Null]',
|
|
19976
|
+
objectTag = '[object Object]',
|
|
19977
|
+
promiseTag = '[object Promise]',
|
|
19978
|
+
proxyTag = '[object Proxy]',
|
|
19979
|
+
regexpTag = '[object RegExp]',
|
|
19980
|
+
setTag = '[object Set]',
|
|
19981
|
+
stringTag = '[object String]',
|
|
19982
|
+
symbolTag = '[object Symbol]',
|
|
19983
|
+
undefinedTag = '[object Undefined]',
|
|
19984
|
+
weakMapTag = '[object WeakMap]';
|
|
19985
|
+
|
|
19986
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
19987
|
+
dataViewTag = '[object DataView]',
|
|
19988
|
+
float32Tag = '[object Float32Array]',
|
|
19989
|
+
float64Tag = '[object Float64Array]',
|
|
19990
|
+
int8Tag = '[object Int8Array]',
|
|
19991
|
+
int16Tag = '[object Int16Array]',
|
|
19992
|
+
int32Tag = '[object Int32Array]',
|
|
19993
|
+
uint8Tag = '[object Uint8Array]',
|
|
19994
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
19995
|
+
uint16Tag = '[object Uint16Array]',
|
|
19996
|
+
uint32Tag = '[object Uint32Array]';
|
|
19997
|
+
|
|
19998
|
+
/** Used to match property names within property paths. */
|
|
19999
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
20000
|
+
reIsPlainProp = /^\w*$/,
|
|
20001
|
+
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
19954
20002
|
|
|
19955
20003
|
/**
|
|
19956
20004
|
* Used to match `RegExp`
|
|
@@ -19958,12 +20006,50 @@ var argsTag = '[object Arguments]',
|
|
|
19958
20006
|
*/
|
|
19959
20007
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
19960
20008
|
|
|
20009
|
+
/** Used to match backslashes in property paths. */
|
|
20010
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
20011
|
+
|
|
20012
|
+
/** Used to match `RegExp` flags from their coerced string values. */
|
|
20013
|
+
var reFlags = /\w*$/;
|
|
20014
|
+
|
|
19961
20015
|
/** Used to detect host constructors (Safari). */
|
|
19962
20016
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
19963
20017
|
|
|
19964
20018
|
/** Used to detect unsigned integer values. */
|
|
19965
20019
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
19966
20020
|
|
|
20021
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
20022
|
+
var typedArrayTags = {};
|
|
20023
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
20024
|
+
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
20025
|
+
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
20026
|
+
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
20027
|
+
typedArrayTags[uint32Tag] = true;
|
|
20028
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
20029
|
+
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
20030
|
+
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
20031
|
+
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
20032
|
+
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
20033
|
+
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
20034
|
+
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
20035
|
+
typedArrayTags[weakMapTag] = false;
|
|
20036
|
+
|
|
20037
|
+
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
|
20038
|
+
var cloneableTags = {};
|
|
20039
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
|
20040
|
+
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
|
20041
|
+
cloneableTags[boolTag] = cloneableTags[dateTag] =
|
|
20042
|
+
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
|
20043
|
+
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
|
20044
|
+
cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
|
20045
|
+
cloneableTags[numberTag] = cloneableTags[objectTag] =
|
|
20046
|
+
cloneableTags[regexpTag] = cloneableTags[setTag] =
|
|
20047
|
+
cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
|
20048
|
+
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
|
20049
|
+
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
20050
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] =
|
|
20051
|
+
cloneableTags[weakMapTag] = false;
|
|
20052
|
+
|
|
19967
20053
|
/** Detect free variable `global` from Node.js. */
|
|
19968
20054
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
19969
20055
|
|
|
@@ -19973,6 +20059,38 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
|
|
|
19973
20059
|
/** Used as a reference to the global object. */
|
|
19974
20060
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
19975
20061
|
|
|
20062
|
+
/** Detect free variable `exports`. */
|
|
20063
|
+
var freeExports = true && exports && !exports.nodeType && exports;
|
|
20064
|
+
|
|
20065
|
+
/** Detect free variable `module`. */
|
|
20066
|
+
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
20067
|
+
|
|
20068
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
20069
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
20070
|
+
|
|
20071
|
+
/** Detect free variable `process` from Node.js. */
|
|
20072
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
20073
|
+
|
|
20074
|
+
/** Used to access faster Node.js helpers. */
|
|
20075
|
+
var nodeUtil = (function() {
|
|
20076
|
+
try {
|
|
20077
|
+
// Use `util.types` for Node.js 10+.
|
|
20078
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
20079
|
+
|
|
20080
|
+
if (types) {
|
|
20081
|
+
return types;
|
|
20082
|
+
}
|
|
20083
|
+
|
|
20084
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
20085
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
20086
|
+
} catch (e) {}
|
|
20087
|
+
}());
|
|
20088
|
+
|
|
20089
|
+
/* Node.js helper references. */
|
|
20090
|
+
var nodeIsMap = nodeUtil && nodeUtil.isMap,
|
|
20091
|
+
nodeIsSet = nodeUtil && nodeUtil.isSet,
|
|
20092
|
+
nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
20093
|
+
|
|
19976
20094
|
/**
|
|
19977
20095
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
19978
20096
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
@@ -19994,38 +20112,48 @@ function apply(func, thisArg, args) {
|
|
|
19994
20112
|
}
|
|
19995
20113
|
|
|
19996
20114
|
/**
|
|
19997
|
-
* A specialized version of `_.
|
|
19998
|
-
*
|
|
20115
|
+
* A specialized version of `_.forEach` for arrays without support for
|
|
20116
|
+
* iteratee shorthands.
|
|
19999
20117
|
*
|
|
20000
20118
|
* @private
|
|
20001
|
-
* @param {Array} [array] The array to
|
|
20002
|
-
* @param {
|
|
20003
|
-
* @returns {
|
|
20119
|
+
* @param {Array} [array] The array to iterate over.
|
|
20120
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
20121
|
+
* @returns {Array} Returns `array`.
|
|
20004
20122
|
*/
|
|
20005
|
-
function
|
|
20006
|
-
var
|
|
20007
|
-
|
|
20123
|
+
function arrayEach(array, iteratee) {
|
|
20124
|
+
var index = -1,
|
|
20125
|
+
length = array == null ? 0 : array.length;
|
|
20126
|
+
|
|
20127
|
+
while (++index < length) {
|
|
20128
|
+
if (iteratee(array[index], index, array) === false) {
|
|
20129
|
+
break;
|
|
20130
|
+
}
|
|
20131
|
+
}
|
|
20132
|
+
return array;
|
|
20008
20133
|
}
|
|
20009
20134
|
|
|
20010
20135
|
/**
|
|
20011
|
-
*
|
|
20136
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
20137
|
+
* iteratee shorthands.
|
|
20012
20138
|
*
|
|
20013
20139
|
* @private
|
|
20014
|
-
* @param {Array} [array] The array to
|
|
20015
|
-
* @param {
|
|
20016
|
-
* @
|
|
20017
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
20140
|
+
* @param {Array} [array] The array to iterate over.
|
|
20141
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
20142
|
+
* @returns {Array} Returns the new filtered array.
|
|
20018
20143
|
*/
|
|
20019
|
-
function
|
|
20144
|
+
function arrayFilter(array, predicate) {
|
|
20020
20145
|
var index = -1,
|
|
20021
|
-
length = array ? array.length
|
|
20146
|
+
length = array == null ? 0 : array.length,
|
|
20147
|
+
resIndex = 0,
|
|
20148
|
+
result = [];
|
|
20022
20149
|
|
|
20023
20150
|
while (++index < length) {
|
|
20024
|
-
|
|
20025
|
-
|
|
20151
|
+
var value = array[index];
|
|
20152
|
+
if (predicate(value, index, array)) {
|
|
20153
|
+
result[resIndex++] = value;
|
|
20026
20154
|
}
|
|
20027
20155
|
}
|
|
20028
|
-
return
|
|
20156
|
+
return result;
|
|
20029
20157
|
}
|
|
20030
20158
|
|
|
20031
20159
|
/**
|
|
@@ -20039,7 +20167,7 @@ function arrayIncludesWith(array, value, comparator) {
|
|
|
20039
20167
|
*/
|
|
20040
20168
|
function arrayMap(array, iteratee) {
|
|
20041
20169
|
var index = -1,
|
|
20042
|
-
length = array ? array.length
|
|
20170
|
+
length = array == null ? 0 : array.length,
|
|
20043
20171
|
result = Array(length);
|
|
20044
20172
|
|
|
20045
20173
|
while (++index < length) {
|
|
@@ -20067,64 +20195,6 @@ function arrayPush(array, values) {
|
|
|
20067
20195
|
return array;
|
|
20068
20196
|
}
|
|
20069
20197
|
|
|
20070
|
-
/**
|
|
20071
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
20072
|
-
* support for iteratee shorthands.
|
|
20073
|
-
*
|
|
20074
|
-
* @private
|
|
20075
|
-
* @param {Array} array The array to inspect.
|
|
20076
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
20077
|
-
* @param {number} fromIndex The index to search from.
|
|
20078
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
20079
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
20080
|
-
*/
|
|
20081
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
20082
|
-
var length = array.length,
|
|
20083
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
20084
|
-
|
|
20085
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
20086
|
-
if (predicate(array[index], index, array)) {
|
|
20087
|
-
return index;
|
|
20088
|
-
}
|
|
20089
|
-
}
|
|
20090
|
-
return -1;
|
|
20091
|
-
}
|
|
20092
|
-
|
|
20093
|
-
/**
|
|
20094
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
20095
|
-
*
|
|
20096
|
-
* @private
|
|
20097
|
-
* @param {Array} array The array to inspect.
|
|
20098
|
-
* @param {*} value The value to search for.
|
|
20099
|
-
* @param {number} fromIndex The index to search from.
|
|
20100
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
20101
|
-
*/
|
|
20102
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
20103
|
-
if (value !== value) {
|
|
20104
|
-
return baseFindIndex(array, baseIsNaN, fromIndex);
|
|
20105
|
-
}
|
|
20106
|
-
var index = fromIndex - 1,
|
|
20107
|
-
length = array.length;
|
|
20108
|
-
|
|
20109
|
-
while (++index < length) {
|
|
20110
|
-
if (array[index] === value) {
|
|
20111
|
-
return index;
|
|
20112
|
-
}
|
|
20113
|
-
}
|
|
20114
|
-
return -1;
|
|
20115
|
-
}
|
|
20116
|
-
|
|
20117
|
-
/**
|
|
20118
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
20119
|
-
*
|
|
20120
|
-
* @private
|
|
20121
|
-
* @param {*} value The value to check.
|
|
20122
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
20123
|
-
*/
|
|
20124
|
-
function baseIsNaN(value) {
|
|
20125
|
-
return value !== value;
|
|
20126
|
-
}
|
|
20127
|
-
|
|
20128
20198
|
/**
|
|
20129
20199
|
* The base implementation of `_.times` without support for iteratee shorthands
|
|
20130
20200
|
* or max array length checks.
|
|
@@ -20157,18 +20227,6 @@ function baseUnary(func) {
|
|
|
20157
20227
|
};
|
|
20158
20228
|
}
|
|
20159
20229
|
|
|
20160
|
-
/**
|
|
20161
|
-
* Checks if a cache value for `key` exists.
|
|
20162
|
-
*
|
|
20163
|
-
* @private
|
|
20164
|
-
* @param {Object} cache The cache to query.
|
|
20165
|
-
* @param {string} key The key of the entry to check.
|
|
20166
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
20167
|
-
*/
|
|
20168
|
-
function cacheHas(cache, key) {
|
|
20169
|
-
return cache.has(key);
|
|
20170
|
-
}
|
|
20171
|
-
|
|
20172
20230
|
/**
|
|
20173
20231
|
* Gets the value at `key` of `object`.
|
|
20174
20232
|
*
|
|
@@ -20181,25 +20239,6 @@ function getValue(object, key) {
|
|
|
20181
20239
|
return object == null ? undefined : object[key];
|
|
20182
20240
|
}
|
|
20183
20241
|
|
|
20184
|
-
/**
|
|
20185
|
-
* Checks if `value` is a host object in IE < 9.
|
|
20186
|
-
*
|
|
20187
|
-
* @private
|
|
20188
|
-
* @param {*} value The value to check.
|
|
20189
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
20190
|
-
*/
|
|
20191
|
-
function isHostObject(value) {
|
|
20192
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
20193
|
-
// despite having improperly defined `toString` methods.
|
|
20194
|
-
var result = false;
|
|
20195
|
-
if (value != null && typeof value.toString != 'function') {
|
|
20196
|
-
try {
|
|
20197
|
-
result = !!(value + '');
|
|
20198
|
-
} catch (e) {}
|
|
20199
|
-
}
|
|
20200
|
-
return result;
|
|
20201
|
-
}
|
|
20202
|
-
|
|
20203
20242
|
/**
|
|
20204
20243
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
20205
20244
|
*
|
|
@@ -20222,24 +20261,27 @@ var arrayProto = Array.prototype,
|
|
|
20222
20261
|
/** Used to detect overreaching core-js shims. */
|
|
20223
20262
|
var coreJsData = root['__core-js_shared__'];
|
|
20224
20263
|
|
|
20225
|
-
/** Used to detect methods masquerading as native. */
|
|
20226
|
-
var maskSrcKey = (function() {
|
|
20227
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
20228
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
20229
|
-
}());
|
|
20230
|
-
|
|
20231
20264
|
/** Used to resolve the decompiled source of functions. */
|
|
20232
20265
|
var funcToString = funcProto.toString;
|
|
20233
20266
|
|
|
20234
20267
|
/** Used to check objects for own properties. */
|
|
20235
20268
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
20236
20269
|
|
|
20270
|
+
/** Used to detect methods masquerading as native. */
|
|
20271
|
+
var maskSrcKey = (function() {
|
|
20272
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
20273
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
20274
|
+
}());
|
|
20275
|
+
|
|
20237
20276
|
/**
|
|
20238
20277
|
* Used to resolve the
|
|
20239
20278
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
20240
20279
|
* of values.
|
|
20241
20280
|
*/
|
|
20242
|
-
var
|
|
20281
|
+
var nativeObjectToString = objectProto.toString;
|
|
20282
|
+
|
|
20283
|
+
/** Used to infer the `Object` constructor. */
|
|
20284
|
+
var objectCtorString = funcToString.call(Object);
|
|
20243
20285
|
|
|
20244
20286
|
/** Used to detect if a method is native. */
|
|
20245
20287
|
var reIsNative = RegExp('^' +
|
|
@@ -20248,20 +20290,76 @@ var reIsNative = RegExp('^' +
|
|
|
20248
20290
|
);
|
|
20249
20291
|
|
|
20250
20292
|
/** Built-in value references. */
|
|
20251
|
-
var
|
|
20293
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
20294
|
+
Symbol = root.Symbol,
|
|
20295
|
+
Uint8Array = root.Uint8Array,
|
|
20296
|
+
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
|
|
20252
20297
|
getPrototype = overArg(Object.getPrototypeOf, Object),
|
|
20298
|
+
objectCreate = Object.create,
|
|
20253
20299
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
|
20254
20300
|
splice = arrayProto.splice,
|
|
20255
|
-
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined
|
|
20301
|
+
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
|
|
20302
|
+
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
20303
|
+
|
|
20304
|
+
var defineProperty = (function() {
|
|
20305
|
+
try {
|
|
20306
|
+
var func = getNative(Object, 'defineProperty');
|
|
20307
|
+
func({}, '', {});
|
|
20308
|
+
return func;
|
|
20309
|
+
} catch (e) {}
|
|
20310
|
+
}());
|
|
20256
20311
|
|
|
20257
20312
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
20258
20313
|
var nativeGetSymbols = Object.getOwnPropertySymbols,
|
|
20259
|
-
|
|
20314
|
+
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
|
20315
|
+
nativeKeys = overArg(Object.keys, Object),
|
|
20316
|
+
nativeMax = Math.max,
|
|
20317
|
+
nativeNow = Date.now;
|
|
20260
20318
|
|
|
20261
20319
|
/* Built-in method references that are verified to be native. */
|
|
20262
|
-
var
|
|
20320
|
+
var DataView = getNative(root, 'DataView'),
|
|
20321
|
+
Map = getNative(root, 'Map'),
|
|
20322
|
+
Promise = getNative(root, 'Promise'),
|
|
20323
|
+
Set = getNative(root, 'Set'),
|
|
20324
|
+
WeakMap = getNative(root, 'WeakMap'),
|
|
20263
20325
|
nativeCreate = getNative(Object, 'create');
|
|
20264
20326
|
|
|
20327
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
20328
|
+
var dataViewCtorString = toSource(DataView),
|
|
20329
|
+
mapCtorString = toSource(Map),
|
|
20330
|
+
promiseCtorString = toSource(Promise),
|
|
20331
|
+
setCtorString = toSource(Set),
|
|
20332
|
+
weakMapCtorString = toSource(WeakMap);
|
|
20333
|
+
|
|
20334
|
+
/** Used to convert symbols to primitives and strings. */
|
|
20335
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
20336
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
|
|
20337
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
20338
|
+
|
|
20339
|
+
/**
|
|
20340
|
+
* The base implementation of `_.create` without support for assigning
|
|
20341
|
+
* properties to the created object.
|
|
20342
|
+
*
|
|
20343
|
+
* @private
|
|
20344
|
+
* @param {Object} proto The object to inherit from.
|
|
20345
|
+
* @returns {Object} Returns the new object.
|
|
20346
|
+
*/
|
|
20347
|
+
var baseCreate = (function() {
|
|
20348
|
+
function object() {}
|
|
20349
|
+
return function(proto) {
|
|
20350
|
+
if (!isObject(proto)) {
|
|
20351
|
+
return {};
|
|
20352
|
+
}
|
|
20353
|
+
if (objectCreate) {
|
|
20354
|
+
return objectCreate(proto);
|
|
20355
|
+
}
|
|
20356
|
+
object.prototype = proto;
|
|
20357
|
+
var result = new object;
|
|
20358
|
+
object.prototype = undefined;
|
|
20359
|
+
return result;
|
|
20360
|
+
};
|
|
20361
|
+
}());
|
|
20362
|
+
|
|
20265
20363
|
/**
|
|
20266
20364
|
* Creates a hash object.
|
|
20267
20365
|
*
|
|
@@ -20271,7 +20369,7 @@ var Map = getNative(root, 'Map'),
|
|
|
20271
20369
|
*/
|
|
20272
20370
|
function Hash(entries) {
|
|
20273
20371
|
var index = -1,
|
|
20274
|
-
length = entries ? entries.length
|
|
20372
|
+
length = entries == null ? 0 : entries.length;
|
|
20275
20373
|
|
|
20276
20374
|
this.clear();
|
|
20277
20375
|
while (++index < length) {
|
|
@@ -20289,6 +20387,7 @@ function Hash(entries) {
|
|
|
20289
20387
|
*/
|
|
20290
20388
|
function hashClear() {
|
|
20291
20389
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
20390
|
+
this.size = 0;
|
|
20292
20391
|
}
|
|
20293
20392
|
|
|
20294
20393
|
/**
|
|
@@ -20302,7 +20401,9 @@ function hashClear() {
|
|
|
20302
20401
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
20303
20402
|
*/
|
|
20304
20403
|
function hashDelete(key) {
|
|
20305
|
-
|
|
20404
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
20405
|
+
this.size -= result ? 1 : 0;
|
|
20406
|
+
return result;
|
|
20306
20407
|
}
|
|
20307
20408
|
|
|
20308
20409
|
/**
|
|
@@ -20334,7 +20435,7 @@ function hashGet(key) {
|
|
|
20334
20435
|
*/
|
|
20335
20436
|
function hashHas(key) {
|
|
20336
20437
|
var data = this.__data__;
|
|
20337
|
-
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
|
20438
|
+
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
20338
20439
|
}
|
|
20339
20440
|
|
|
20340
20441
|
/**
|
|
@@ -20349,6 +20450,7 @@ function hashHas(key) {
|
|
|
20349
20450
|
*/
|
|
20350
20451
|
function hashSet(key, value) {
|
|
20351
20452
|
var data = this.__data__;
|
|
20453
|
+
this.size += this.has(key) ? 0 : 1;
|
|
20352
20454
|
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
20353
20455
|
return this;
|
|
20354
20456
|
}
|
|
@@ -20369,7 +20471,7 @@ Hash.prototype.set = hashSet;
|
|
|
20369
20471
|
*/
|
|
20370
20472
|
function ListCache(entries) {
|
|
20371
20473
|
var index = -1,
|
|
20372
|
-
length = entries ? entries.length
|
|
20474
|
+
length = entries == null ? 0 : entries.length;
|
|
20373
20475
|
|
|
20374
20476
|
this.clear();
|
|
20375
20477
|
while (++index < length) {
|
|
@@ -20387,6 +20489,7 @@ function ListCache(entries) {
|
|
|
20387
20489
|
*/
|
|
20388
20490
|
function listCacheClear() {
|
|
20389
20491
|
this.__data__ = [];
|
|
20492
|
+
this.size = 0;
|
|
20390
20493
|
}
|
|
20391
20494
|
|
|
20392
20495
|
/**
|
|
@@ -20411,6 +20514,7 @@ function listCacheDelete(key) {
|
|
|
20411
20514
|
} else {
|
|
20412
20515
|
splice.call(data, index, 1);
|
|
20413
20516
|
}
|
|
20517
|
+
--this.size;
|
|
20414
20518
|
return true;
|
|
20415
20519
|
}
|
|
20416
20520
|
|
|
@@ -20458,6 +20562,7 @@ function listCacheSet(key, value) {
|
|
|
20458
20562
|
index = assocIndexOf(data, key);
|
|
20459
20563
|
|
|
20460
20564
|
if (index < 0) {
|
|
20565
|
+
++this.size;
|
|
20461
20566
|
data.push([key, value]);
|
|
20462
20567
|
} else {
|
|
20463
20568
|
data[index][1] = value;
|
|
@@ -20481,7 +20586,7 @@ ListCache.prototype.set = listCacheSet;
|
|
|
20481
20586
|
*/
|
|
20482
20587
|
function MapCache(entries) {
|
|
20483
20588
|
var index = -1,
|
|
20484
|
-
length = entries ? entries.length
|
|
20589
|
+
length = entries == null ? 0 : entries.length;
|
|
20485
20590
|
|
|
20486
20591
|
this.clear();
|
|
20487
20592
|
while (++index < length) {
|
|
@@ -20498,6 +20603,7 @@ function MapCache(entries) {
|
|
|
20498
20603
|
* @memberOf MapCache
|
|
20499
20604
|
*/
|
|
20500
20605
|
function mapCacheClear() {
|
|
20606
|
+
this.size = 0;
|
|
20501
20607
|
this.__data__ = {
|
|
20502
20608
|
'hash': new Hash,
|
|
20503
20609
|
'map': new (Map || ListCache),
|
|
@@ -20515,7 +20621,9 @@ function mapCacheClear() {
|
|
|
20515
20621
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
20516
20622
|
*/
|
|
20517
20623
|
function mapCacheDelete(key) {
|
|
20518
|
-
|
|
20624
|
+
var result = getMapData(this, key)['delete'](key);
|
|
20625
|
+
this.size -= result ? 1 : 0;
|
|
20626
|
+
return result;
|
|
20519
20627
|
}
|
|
20520
20628
|
|
|
20521
20629
|
/**
|
|
@@ -20555,7 +20663,11 @@ function mapCacheHas(key) {
|
|
|
20555
20663
|
* @returns {Object} Returns the map cache instance.
|
|
20556
20664
|
*/
|
|
20557
20665
|
function mapCacheSet(key, value) {
|
|
20558
|
-
getMapData(this, key)
|
|
20666
|
+
var data = getMapData(this, key),
|
|
20667
|
+
size = data.size;
|
|
20668
|
+
|
|
20669
|
+
data.set(key, value);
|
|
20670
|
+
this.size += data.size == size ? 0 : 1;
|
|
20559
20671
|
return this;
|
|
20560
20672
|
}
|
|
20561
20673
|
|
|
@@ -20567,54 +20679,104 @@ MapCache.prototype.has = mapCacheHas;
|
|
|
20567
20679
|
MapCache.prototype.set = mapCacheSet;
|
|
20568
20680
|
|
|
20569
20681
|
/**
|
|
20570
|
-
*
|
|
20571
|
-
* Creates an array cache object to store unique values.
|
|
20682
|
+
* Creates a stack cache object to store key-value pairs.
|
|
20572
20683
|
*
|
|
20573
20684
|
* @private
|
|
20574
20685
|
* @constructor
|
|
20575
|
-
* @param {Array} [
|
|
20686
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
20576
20687
|
*/
|
|
20577
|
-
function
|
|
20578
|
-
var
|
|
20579
|
-
|
|
20688
|
+
function Stack(entries) {
|
|
20689
|
+
var data = this.__data__ = new ListCache(entries);
|
|
20690
|
+
this.size = data.size;
|
|
20691
|
+
}
|
|
20580
20692
|
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20693
|
+
/**
|
|
20694
|
+
* Removes all key-value entries from the stack.
|
|
20695
|
+
*
|
|
20696
|
+
* @private
|
|
20697
|
+
* @name clear
|
|
20698
|
+
* @memberOf Stack
|
|
20699
|
+
*/
|
|
20700
|
+
function stackClear() {
|
|
20701
|
+
this.__data__ = new ListCache;
|
|
20702
|
+
this.size = 0;
|
|
20585
20703
|
}
|
|
20586
20704
|
|
|
20587
20705
|
/**
|
|
20588
|
-
*
|
|
20706
|
+
* Removes `key` and its value from the stack.
|
|
20589
20707
|
*
|
|
20590
20708
|
* @private
|
|
20591
|
-
* @name
|
|
20592
|
-
* @memberOf
|
|
20593
|
-
* @
|
|
20594
|
-
* @
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20709
|
+
* @name delete
|
|
20710
|
+
* @memberOf Stack
|
|
20711
|
+
* @param {string} key The key of the value to remove.
|
|
20712
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
20713
|
+
*/
|
|
20714
|
+
function stackDelete(key) {
|
|
20715
|
+
var data = this.__data__,
|
|
20716
|
+
result = data['delete'](key);
|
|
20717
|
+
|
|
20718
|
+
this.size = data.size;
|
|
20719
|
+
return result;
|
|
20720
|
+
}
|
|
20721
|
+
|
|
20722
|
+
/**
|
|
20723
|
+
* Gets the stack value for `key`.
|
|
20724
|
+
*
|
|
20725
|
+
* @private
|
|
20726
|
+
* @name get
|
|
20727
|
+
* @memberOf Stack
|
|
20728
|
+
* @param {string} key The key of the value to get.
|
|
20729
|
+
* @returns {*} Returns the entry value.
|
|
20730
|
+
*/
|
|
20731
|
+
function stackGet(key) {
|
|
20732
|
+
return this.__data__.get(key);
|
|
20600
20733
|
}
|
|
20601
20734
|
|
|
20602
20735
|
/**
|
|
20603
|
-
* Checks if
|
|
20736
|
+
* Checks if a stack value for `key` exists.
|
|
20604
20737
|
*
|
|
20605
20738
|
* @private
|
|
20606
20739
|
* @name has
|
|
20607
|
-
* @memberOf
|
|
20608
|
-
* @param {
|
|
20609
|
-
* @returns {
|
|
20740
|
+
* @memberOf Stack
|
|
20741
|
+
* @param {string} key The key of the entry to check.
|
|
20742
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
20743
|
+
*/
|
|
20744
|
+
function stackHas(key) {
|
|
20745
|
+
return this.__data__.has(key);
|
|
20746
|
+
}
|
|
20747
|
+
|
|
20748
|
+
/**
|
|
20749
|
+
* Sets the stack `key` to `value`.
|
|
20750
|
+
*
|
|
20751
|
+
* @private
|
|
20752
|
+
* @name set
|
|
20753
|
+
* @memberOf Stack
|
|
20754
|
+
* @param {string} key The key of the value to set.
|
|
20755
|
+
* @param {*} value The value to set.
|
|
20756
|
+
* @returns {Object} Returns the stack cache instance.
|
|
20610
20757
|
*/
|
|
20611
|
-
function
|
|
20612
|
-
|
|
20758
|
+
function stackSet(key, value) {
|
|
20759
|
+
var data = this.__data__;
|
|
20760
|
+
if (data instanceof ListCache) {
|
|
20761
|
+
var pairs = data.__data__;
|
|
20762
|
+
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
20763
|
+
pairs.push([key, value]);
|
|
20764
|
+
this.size = ++data.size;
|
|
20765
|
+
return this;
|
|
20766
|
+
}
|
|
20767
|
+
data = this.__data__ = new MapCache(pairs);
|
|
20768
|
+
}
|
|
20769
|
+
data.set(key, value);
|
|
20770
|
+
this.size = data.size;
|
|
20771
|
+
return this;
|
|
20613
20772
|
}
|
|
20614
20773
|
|
|
20615
|
-
// Add methods to `
|
|
20616
|
-
|
|
20617
|
-
|
|
20774
|
+
// Add methods to `Stack`.
|
|
20775
|
+
Stack.prototype.clear = stackClear;
|
|
20776
|
+
Stack.prototype['delete'] = stackDelete;
|
|
20777
|
+
Stack.prototype.get = stackGet;
|
|
20778
|
+
Stack.prototype.has = stackHas;
|
|
20779
|
+
Stack.prototype.set = stackSet;
|
|
20618
20780
|
|
|
20619
20781
|
/**
|
|
20620
20782
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -20625,24 +20787,50 @@ SetCache.prototype.has = setCacheHas;
|
|
|
20625
20787
|
* @returns {Array} Returns the array of property names.
|
|
20626
20788
|
*/
|
|
20627
20789
|
function arrayLikeKeys(value, inherited) {
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
skipIndexes = !!length;
|
|
20790
|
+
var isArr = isArray(value),
|
|
20791
|
+
isArg = !isArr && isArguments(value),
|
|
20792
|
+
isBuff = !isArr && !isArg && isBuffer(value),
|
|
20793
|
+
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
20794
|
+
skipIndexes = isArr || isArg || isBuff || isType,
|
|
20795
|
+
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
20796
|
+
length = result.length;
|
|
20636
20797
|
|
|
20637
20798
|
for (var key in value) {
|
|
20638
20799
|
if ((inherited || hasOwnProperty.call(value, key)) &&
|
|
20639
|
-
!(skipIndexes && (
|
|
20800
|
+
!(skipIndexes && (
|
|
20801
|
+
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
20802
|
+
key == 'length' ||
|
|
20803
|
+
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
20804
|
+
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
20805
|
+
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
20806
|
+
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
20807
|
+
// Skip index properties.
|
|
20808
|
+
isIndex(key, length)
|
|
20809
|
+
))) {
|
|
20640
20810
|
result.push(key);
|
|
20641
20811
|
}
|
|
20642
20812
|
}
|
|
20643
20813
|
return result;
|
|
20644
20814
|
}
|
|
20645
20815
|
|
|
20816
|
+
/**
|
|
20817
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
20818
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
20819
|
+
* for equality comparisons.
|
|
20820
|
+
*
|
|
20821
|
+
* @private
|
|
20822
|
+
* @param {Object} object The object to modify.
|
|
20823
|
+
* @param {string} key The key of the property to assign.
|
|
20824
|
+
* @param {*} value The value to assign.
|
|
20825
|
+
*/
|
|
20826
|
+
function assignValue(object, key, value) {
|
|
20827
|
+
var objValue = object[key];
|
|
20828
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
|
20829
|
+
(value === undefined && !(key in object))) {
|
|
20830
|
+
baseAssignValue(object, key, value);
|
|
20831
|
+
}
|
|
20832
|
+
}
|
|
20833
|
+
|
|
20646
20834
|
/**
|
|
20647
20835
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
20648
20836
|
*
|
|
@@ -20662,63 +20850,147 @@ function assocIndexOf(array, key) {
|
|
|
20662
20850
|
}
|
|
20663
20851
|
|
|
20664
20852
|
/**
|
|
20665
|
-
* The base implementation of
|
|
20666
|
-
*
|
|
20853
|
+
* The base implementation of `_.assign` without support for multiple sources
|
|
20854
|
+
* or `customizer` functions.
|
|
20667
20855
|
*
|
|
20668
20856
|
* @private
|
|
20669
|
-
* @param {
|
|
20670
|
-
* @param {
|
|
20671
|
-
* @
|
|
20672
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
20673
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
20857
|
+
* @param {Object} object The destination object.
|
|
20858
|
+
* @param {Object} source The source object.
|
|
20859
|
+
* @returns {Object} Returns `object`.
|
|
20674
20860
|
*/
|
|
20675
|
-
function
|
|
20676
|
-
|
|
20677
|
-
includes = arrayIncludes,
|
|
20678
|
-
isCommon = true,
|
|
20679
|
-
length = array.length,
|
|
20680
|
-
result = [],
|
|
20681
|
-
valuesLength = values.length;
|
|
20682
|
-
|
|
20683
|
-
if (!length) {
|
|
20684
|
-
return result;
|
|
20685
|
-
}
|
|
20686
|
-
if (iteratee) {
|
|
20687
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
20688
|
-
}
|
|
20689
|
-
if (comparator) {
|
|
20690
|
-
includes = arrayIncludesWith;
|
|
20691
|
-
isCommon = false;
|
|
20692
|
-
}
|
|
20693
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
20694
|
-
includes = cacheHas;
|
|
20695
|
-
isCommon = false;
|
|
20696
|
-
values = new SetCache(values);
|
|
20697
|
-
}
|
|
20698
|
-
outer:
|
|
20699
|
-
while (++index < length) {
|
|
20700
|
-
var value = array[index],
|
|
20701
|
-
computed = iteratee ? iteratee(value) : value;
|
|
20702
|
-
|
|
20703
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
20704
|
-
if (isCommon && computed === computed) {
|
|
20705
|
-
var valuesIndex = valuesLength;
|
|
20706
|
-
while (valuesIndex--) {
|
|
20707
|
-
if (values[valuesIndex] === computed) {
|
|
20708
|
-
continue outer;
|
|
20709
|
-
}
|
|
20710
|
-
}
|
|
20711
|
-
result.push(value);
|
|
20712
|
-
}
|
|
20713
|
-
else if (!includes(values, computed, comparator)) {
|
|
20714
|
-
result.push(value);
|
|
20715
|
-
}
|
|
20716
|
-
}
|
|
20717
|
-
return result;
|
|
20861
|
+
function baseAssign(object, source) {
|
|
20862
|
+
return object && copyObject(source, keys(source), object);
|
|
20718
20863
|
}
|
|
20719
20864
|
|
|
20720
20865
|
/**
|
|
20721
|
-
* The base implementation of `_.
|
|
20866
|
+
* The base implementation of `_.assignIn` without support for multiple sources
|
|
20867
|
+
* or `customizer` functions.
|
|
20868
|
+
*
|
|
20869
|
+
* @private
|
|
20870
|
+
* @param {Object} object The destination object.
|
|
20871
|
+
* @param {Object} source The source object.
|
|
20872
|
+
* @returns {Object} Returns `object`.
|
|
20873
|
+
*/
|
|
20874
|
+
function baseAssignIn(object, source) {
|
|
20875
|
+
return object && copyObject(source, keysIn(source), object);
|
|
20876
|
+
}
|
|
20877
|
+
|
|
20878
|
+
/**
|
|
20879
|
+
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
20880
|
+
* value checks.
|
|
20881
|
+
*
|
|
20882
|
+
* @private
|
|
20883
|
+
* @param {Object} object The object to modify.
|
|
20884
|
+
* @param {string} key The key of the property to assign.
|
|
20885
|
+
* @param {*} value The value to assign.
|
|
20886
|
+
*/
|
|
20887
|
+
function baseAssignValue(object, key, value) {
|
|
20888
|
+
if (key == '__proto__' && defineProperty) {
|
|
20889
|
+
defineProperty(object, key, {
|
|
20890
|
+
'configurable': true,
|
|
20891
|
+
'enumerable': true,
|
|
20892
|
+
'value': value,
|
|
20893
|
+
'writable': true
|
|
20894
|
+
});
|
|
20895
|
+
} else {
|
|
20896
|
+
object[key] = value;
|
|
20897
|
+
}
|
|
20898
|
+
}
|
|
20899
|
+
|
|
20900
|
+
/**
|
|
20901
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
|
20902
|
+
* traversed objects.
|
|
20903
|
+
*
|
|
20904
|
+
* @private
|
|
20905
|
+
* @param {*} value The value to clone.
|
|
20906
|
+
* @param {boolean} bitmask The bitmask flags.
|
|
20907
|
+
* 1 - Deep clone
|
|
20908
|
+
* 2 - Flatten inherited properties
|
|
20909
|
+
* 4 - Clone symbols
|
|
20910
|
+
* @param {Function} [customizer] The function to customize cloning.
|
|
20911
|
+
* @param {string} [key] The key of `value`.
|
|
20912
|
+
* @param {Object} [object] The parent object of `value`.
|
|
20913
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
|
20914
|
+
* @returns {*} Returns the cloned value.
|
|
20915
|
+
*/
|
|
20916
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
20917
|
+
var result,
|
|
20918
|
+
isDeep = bitmask & CLONE_DEEP_FLAG,
|
|
20919
|
+
isFlat = bitmask & CLONE_FLAT_FLAG,
|
|
20920
|
+
isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
|
20921
|
+
|
|
20922
|
+
if (customizer) {
|
|
20923
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
20924
|
+
}
|
|
20925
|
+
if (result !== undefined) {
|
|
20926
|
+
return result;
|
|
20927
|
+
}
|
|
20928
|
+
if (!isObject(value)) {
|
|
20929
|
+
return value;
|
|
20930
|
+
}
|
|
20931
|
+
var isArr = isArray(value);
|
|
20932
|
+
if (isArr) {
|
|
20933
|
+
result = initCloneArray(value);
|
|
20934
|
+
if (!isDeep) {
|
|
20935
|
+
return copyArray(value, result);
|
|
20936
|
+
}
|
|
20937
|
+
} else {
|
|
20938
|
+
var tag = getTag(value),
|
|
20939
|
+
isFunc = tag == funcTag || tag == genTag;
|
|
20940
|
+
|
|
20941
|
+
if (isBuffer(value)) {
|
|
20942
|
+
return cloneBuffer(value, isDeep);
|
|
20943
|
+
}
|
|
20944
|
+
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
|
20945
|
+
result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
|
20946
|
+
if (!isDeep) {
|
|
20947
|
+
return isFlat
|
|
20948
|
+
? copySymbolsIn(value, baseAssignIn(result, value))
|
|
20949
|
+
: copySymbols(value, baseAssign(result, value));
|
|
20950
|
+
}
|
|
20951
|
+
} else {
|
|
20952
|
+
if (!cloneableTags[tag]) {
|
|
20953
|
+
return object ? value : {};
|
|
20954
|
+
}
|
|
20955
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
20956
|
+
}
|
|
20957
|
+
}
|
|
20958
|
+
// Check for circular references and return its corresponding clone.
|
|
20959
|
+
stack || (stack = new Stack);
|
|
20960
|
+
var stacked = stack.get(value);
|
|
20961
|
+
if (stacked) {
|
|
20962
|
+
return stacked;
|
|
20963
|
+
}
|
|
20964
|
+
stack.set(value, result);
|
|
20965
|
+
|
|
20966
|
+
if (isSet(value)) {
|
|
20967
|
+
value.forEach(function(subValue) {
|
|
20968
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
20969
|
+
});
|
|
20970
|
+
} else if (isMap(value)) {
|
|
20971
|
+
value.forEach(function(subValue, key) {
|
|
20972
|
+
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
20973
|
+
});
|
|
20974
|
+
}
|
|
20975
|
+
|
|
20976
|
+
var keysFunc = isFull
|
|
20977
|
+
? (isFlat ? getAllKeysIn : getAllKeys)
|
|
20978
|
+
: (isFlat ? keysIn : keys);
|
|
20979
|
+
|
|
20980
|
+
var props = isArr ? undefined : keysFunc(value);
|
|
20981
|
+
arrayEach(props || value, function(subValue, key) {
|
|
20982
|
+
if (props) {
|
|
20983
|
+
key = subValue;
|
|
20984
|
+
subValue = value[key];
|
|
20985
|
+
}
|
|
20986
|
+
// Recursively populate clone (susceptible to call stack limits).
|
|
20987
|
+
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|
20988
|
+
});
|
|
20989
|
+
return result;
|
|
20990
|
+
}
|
|
20991
|
+
|
|
20992
|
+
/**
|
|
20993
|
+
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
20722
20994
|
*
|
|
20723
20995
|
* @private
|
|
20724
20996
|
* @param {Array} array The array to flatten.
|
|
@@ -20751,6 +21023,26 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
|
20751
21023
|
return result;
|
|
20752
21024
|
}
|
|
20753
21025
|
|
|
21026
|
+
/**
|
|
21027
|
+
* The base implementation of `_.get` without support for default values.
|
|
21028
|
+
*
|
|
21029
|
+
* @private
|
|
21030
|
+
* @param {Object} object The object to query.
|
|
21031
|
+
* @param {Array|string} path The path of the property to get.
|
|
21032
|
+
* @returns {*} Returns the resolved value.
|
|
21033
|
+
*/
|
|
21034
|
+
function baseGet(object, path) {
|
|
21035
|
+
path = castPath(path, object);
|
|
21036
|
+
|
|
21037
|
+
var index = 0,
|
|
21038
|
+
length = path.length;
|
|
21039
|
+
|
|
21040
|
+
while (object != null && index < length) {
|
|
21041
|
+
object = object[toKey(path[index++])];
|
|
21042
|
+
}
|
|
21043
|
+
return (index && index == length) ? object : undefined;
|
|
21044
|
+
}
|
|
21045
|
+
|
|
20754
21046
|
/**
|
|
20755
21047
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
20756
21048
|
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
@@ -20767,6 +21059,44 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
|
20767
21059
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
20768
21060
|
}
|
|
20769
21061
|
|
|
21062
|
+
/**
|
|
21063
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
21064
|
+
*
|
|
21065
|
+
* @private
|
|
21066
|
+
* @param {*} value The value to query.
|
|
21067
|
+
* @returns {string} Returns the `toStringTag`.
|
|
21068
|
+
*/
|
|
21069
|
+
function baseGetTag(value) {
|
|
21070
|
+
if (value == null) {
|
|
21071
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
21072
|
+
}
|
|
21073
|
+
return (symToStringTag && symToStringTag in Object(value))
|
|
21074
|
+
? getRawTag(value)
|
|
21075
|
+
: objectToString(value);
|
|
21076
|
+
}
|
|
21077
|
+
|
|
21078
|
+
/**
|
|
21079
|
+
* The base implementation of `_.isArguments`.
|
|
21080
|
+
*
|
|
21081
|
+
* @private
|
|
21082
|
+
* @param {*} value The value to check.
|
|
21083
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
21084
|
+
*/
|
|
21085
|
+
function baseIsArguments(value) {
|
|
21086
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
21087
|
+
}
|
|
21088
|
+
|
|
21089
|
+
/**
|
|
21090
|
+
* The base implementation of `_.isMap` without Node.js optimizations.
|
|
21091
|
+
*
|
|
21092
|
+
* @private
|
|
21093
|
+
* @param {*} value The value to check.
|
|
21094
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
21095
|
+
*/
|
|
21096
|
+
function baseIsMap(value) {
|
|
21097
|
+
return isObjectLike(value) && getTag(value) == mapTag;
|
|
21098
|
+
}
|
|
21099
|
+
|
|
20770
21100
|
/**
|
|
20771
21101
|
* The base implementation of `_.isNative` without bad shim checks.
|
|
20772
21102
|
*
|
|
@@ -20779,10 +21109,53 @@ function baseIsNative(value) {
|
|
|
20779
21109
|
if (!isObject(value) || isMasked(value)) {
|
|
20780
21110
|
return false;
|
|
20781
21111
|
}
|
|
20782
|
-
var pattern =
|
|
21112
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
20783
21113
|
return pattern.test(toSource(value));
|
|
20784
21114
|
}
|
|
20785
21115
|
|
|
21116
|
+
/**
|
|
21117
|
+
* The base implementation of `_.isSet` without Node.js optimizations.
|
|
21118
|
+
*
|
|
21119
|
+
* @private
|
|
21120
|
+
* @param {*} value The value to check.
|
|
21121
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
21122
|
+
*/
|
|
21123
|
+
function baseIsSet(value) {
|
|
21124
|
+
return isObjectLike(value) && getTag(value) == setTag;
|
|
21125
|
+
}
|
|
21126
|
+
|
|
21127
|
+
/**
|
|
21128
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
21129
|
+
*
|
|
21130
|
+
* @private
|
|
21131
|
+
* @param {*} value The value to check.
|
|
21132
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
21133
|
+
*/
|
|
21134
|
+
function baseIsTypedArray(value) {
|
|
21135
|
+
return isObjectLike(value) &&
|
|
21136
|
+
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
21137
|
+
}
|
|
21138
|
+
|
|
21139
|
+
/**
|
|
21140
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
21141
|
+
*
|
|
21142
|
+
* @private
|
|
21143
|
+
* @param {Object} object The object to query.
|
|
21144
|
+
* @returns {Array} Returns the array of property names.
|
|
21145
|
+
*/
|
|
21146
|
+
function baseKeys(object) {
|
|
21147
|
+
if (!isPrototype(object)) {
|
|
21148
|
+
return nativeKeys(object);
|
|
21149
|
+
}
|
|
21150
|
+
var result = [];
|
|
21151
|
+
for (var key in Object(object)) {
|
|
21152
|
+
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
|
21153
|
+
result.push(key);
|
|
21154
|
+
}
|
|
21155
|
+
}
|
|
21156
|
+
return result;
|
|
21157
|
+
}
|
|
21158
|
+
|
|
20786
21159
|
/**
|
|
20787
21160
|
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
|
|
20788
21161
|
*
|
|
@@ -20806,73 +21179,326 @@ function baseKeysIn(object) {
|
|
|
20806
21179
|
}
|
|
20807
21180
|
|
|
20808
21181
|
/**
|
|
20809
|
-
* The base implementation of `
|
|
20810
|
-
* property identifiers.
|
|
21182
|
+
* The base implementation of `setToString` without support for hot loop shorting.
|
|
20811
21183
|
*
|
|
20812
21184
|
* @private
|
|
20813
|
-
* @param {
|
|
20814
|
-
* @param {
|
|
20815
|
-
* @returns {
|
|
21185
|
+
* @param {Function} func The function to modify.
|
|
21186
|
+
* @param {Function} string The `toString` result.
|
|
21187
|
+
* @returns {Function} Returns `func`.
|
|
20816
21188
|
*/
|
|
20817
|
-
function
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
21189
|
+
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
21190
|
+
return defineProperty(func, 'toString', {
|
|
21191
|
+
'configurable': true,
|
|
21192
|
+
'enumerable': false,
|
|
21193
|
+
'value': constant(string),
|
|
21194
|
+
'writable': true
|
|
20821
21195
|
});
|
|
21196
|
+
};
|
|
21197
|
+
|
|
21198
|
+
/**
|
|
21199
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
21200
|
+
*
|
|
21201
|
+
* @private
|
|
21202
|
+
* @param {Array} array The array to slice.
|
|
21203
|
+
* @param {number} [start=0] The start position.
|
|
21204
|
+
* @param {number} [end=array.length] The end position.
|
|
21205
|
+
* @returns {Array} Returns the slice of `array`.
|
|
21206
|
+
*/
|
|
21207
|
+
function baseSlice(array, start, end) {
|
|
21208
|
+
var index = -1,
|
|
21209
|
+
length = array.length;
|
|
21210
|
+
|
|
21211
|
+
if (start < 0) {
|
|
21212
|
+
start = -start > length ? 0 : (length + start);
|
|
21213
|
+
}
|
|
21214
|
+
end = end > length ? length : end;
|
|
21215
|
+
if (end < 0) {
|
|
21216
|
+
end += length;
|
|
21217
|
+
}
|
|
21218
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
21219
|
+
start >>>= 0;
|
|
21220
|
+
|
|
21221
|
+
var result = Array(length);
|
|
21222
|
+
while (++index < length) {
|
|
21223
|
+
result[index] = array[index + start];
|
|
21224
|
+
}
|
|
21225
|
+
return result;
|
|
20822
21226
|
}
|
|
20823
21227
|
|
|
20824
21228
|
/**
|
|
20825
|
-
* The base implementation of
|
|
21229
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
21230
|
+
* values to empty strings.
|
|
20826
21231
|
*
|
|
20827
21232
|
* @private
|
|
20828
|
-
* @param {
|
|
20829
|
-
* @
|
|
20830
|
-
* @param {Function} predicate The function invoked per property.
|
|
20831
|
-
* @returns {Object} Returns the new object.
|
|
21233
|
+
* @param {*} value The value to process.
|
|
21234
|
+
* @returns {string} Returns the string.
|
|
20832
21235
|
*/
|
|
20833
|
-
function
|
|
21236
|
+
function baseToString(value) {
|
|
21237
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
21238
|
+
if (typeof value == 'string') {
|
|
21239
|
+
return value;
|
|
21240
|
+
}
|
|
21241
|
+
if (isArray(value)) {
|
|
21242
|
+
// Recursively convert values (susceptible to call stack limits).
|
|
21243
|
+
return arrayMap(value, baseToString) + '';
|
|
21244
|
+
}
|
|
21245
|
+
if (isSymbol(value)) {
|
|
21246
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
21247
|
+
}
|
|
21248
|
+
var result = (value + '');
|
|
21249
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
21250
|
+
}
|
|
21251
|
+
|
|
21252
|
+
/**
|
|
21253
|
+
* The base implementation of `_.unset`.
|
|
21254
|
+
*
|
|
21255
|
+
* @private
|
|
21256
|
+
* @param {Object} object The object to modify.
|
|
21257
|
+
* @param {Array|string} path The property path to unset.
|
|
21258
|
+
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
21259
|
+
*/
|
|
21260
|
+
function baseUnset(object, path) {
|
|
21261
|
+
path = castPath(path, object);
|
|
21262
|
+
|
|
21263
|
+
// Prevent prototype pollution:
|
|
21264
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
21265
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh
|
|
21266
|
+
// https://github.com/lodash/lodash/security/advisories/GHSA-w36w-cm3g-pc62
|
|
20834
21267
|
var index = -1,
|
|
20835
|
-
length =
|
|
20836
|
-
|
|
21268
|
+
length = path.length;
|
|
21269
|
+
|
|
21270
|
+
if (!length) {
|
|
21271
|
+
return true;
|
|
21272
|
+
}
|
|
20837
21273
|
|
|
20838
21274
|
while (++index < length) {
|
|
20839
|
-
var key =
|
|
20840
|
-
value = object[key];
|
|
21275
|
+
var key = toKey(path[index]);
|
|
20841
21276
|
|
|
20842
|
-
if
|
|
20843
|
-
|
|
21277
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
21278
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
21279
|
+
return false;
|
|
21280
|
+
}
|
|
21281
|
+
|
|
21282
|
+
// Block constructor/prototype as non-terminal traversal keys to prevent
|
|
21283
|
+
// escaping the object graph into built-in constructors and prototypes.
|
|
21284
|
+
if ((key === 'constructor' || key === 'prototype') && index < length - 1) {
|
|
21285
|
+
return false;
|
|
20844
21286
|
}
|
|
20845
21287
|
}
|
|
21288
|
+
|
|
21289
|
+
var obj = parent(object, path);
|
|
21290
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
21291
|
+
}
|
|
21292
|
+
|
|
21293
|
+
/**
|
|
21294
|
+
* Casts `value` to a path array if it's not one.
|
|
21295
|
+
*
|
|
21296
|
+
* @private
|
|
21297
|
+
* @param {*} value The value to inspect.
|
|
21298
|
+
* @param {Object} [object] The object to query keys on.
|
|
21299
|
+
* @returns {Array} Returns the cast property path array.
|
|
21300
|
+
*/
|
|
21301
|
+
function castPath(value, object) {
|
|
21302
|
+
if (isArray(value)) {
|
|
21303
|
+
return value;
|
|
21304
|
+
}
|
|
21305
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
21306
|
+
}
|
|
21307
|
+
|
|
21308
|
+
/**
|
|
21309
|
+
* Creates a clone of `buffer`.
|
|
21310
|
+
*
|
|
21311
|
+
* @private
|
|
21312
|
+
* @param {Buffer} buffer The buffer to clone.
|
|
21313
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
21314
|
+
* @returns {Buffer} Returns the cloned buffer.
|
|
21315
|
+
*/
|
|
21316
|
+
function cloneBuffer(buffer, isDeep) {
|
|
21317
|
+
if (isDeep) {
|
|
21318
|
+
return buffer.slice();
|
|
21319
|
+
}
|
|
21320
|
+
var length = buffer.length,
|
|
21321
|
+
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
21322
|
+
|
|
21323
|
+
buffer.copy(result);
|
|
20846
21324
|
return result;
|
|
20847
21325
|
}
|
|
20848
21326
|
|
|
20849
21327
|
/**
|
|
20850
|
-
*
|
|
21328
|
+
* Creates a clone of `arrayBuffer`.
|
|
20851
21329
|
*
|
|
20852
21330
|
* @private
|
|
20853
|
-
* @param {
|
|
20854
|
-
* @
|
|
20855
|
-
* @returns {Function} Returns the new function.
|
|
21331
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
|
21332
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
|
20856
21333
|
*/
|
|
20857
|
-
function
|
|
20858
|
-
|
|
20859
|
-
|
|
20860
|
-
|
|
20861
|
-
|
|
20862
|
-
length = nativeMax(args.length - start, 0),
|
|
20863
|
-
array = Array(length);
|
|
21334
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
21335
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
21336
|
+
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
|
21337
|
+
return result;
|
|
21338
|
+
}
|
|
20864
21339
|
|
|
20865
|
-
|
|
20866
|
-
|
|
21340
|
+
/**
|
|
21341
|
+
* Creates a clone of `dataView`.
|
|
21342
|
+
*
|
|
21343
|
+
* @private
|
|
21344
|
+
* @param {Object} dataView The data view to clone.
|
|
21345
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
21346
|
+
* @returns {Object} Returns the cloned data view.
|
|
21347
|
+
*/
|
|
21348
|
+
function cloneDataView(dataView, isDeep) {
|
|
21349
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
21350
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
21351
|
+
}
|
|
21352
|
+
|
|
21353
|
+
/**
|
|
21354
|
+
* Creates a clone of `regexp`.
|
|
21355
|
+
*
|
|
21356
|
+
* @private
|
|
21357
|
+
* @param {Object} regexp The regexp to clone.
|
|
21358
|
+
* @returns {Object} Returns the cloned regexp.
|
|
21359
|
+
*/
|
|
21360
|
+
function cloneRegExp(regexp) {
|
|
21361
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
21362
|
+
result.lastIndex = regexp.lastIndex;
|
|
21363
|
+
return result;
|
|
21364
|
+
}
|
|
21365
|
+
|
|
21366
|
+
/**
|
|
21367
|
+
* Creates a clone of the `symbol` object.
|
|
21368
|
+
*
|
|
21369
|
+
* @private
|
|
21370
|
+
* @param {Object} symbol The symbol object to clone.
|
|
21371
|
+
* @returns {Object} Returns the cloned symbol object.
|
|
21372
|
+
*/
|
|
21373
|
+
function cloneSymbol(symbol) {
|
|
21374
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
|
21375
|
+
}
|
|
21376
|
+
|
|
21377
|
+
/**
|
|
21378
|
+
* Creates a clone of `typedArray`.
|
|
21379
|
+
*
|
|
21380
|
+
* @private
|
|
21381
|
+
* @param {Object} typedArray The typed array to clone.
|
|
21382
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
21383
|
+
* @returns {Object} Returns the cloned typed array.
|
|
21384
|
+
*/
|
|
21385
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
21386
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
21387
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
21388
|
+
}
|
|
21389
|
+
|
|
21390
|
+
/**
|
|
21391
|
+
* Copies the values of `source` to `array`.
|
|
21392
|
+
*
|
|
21393
|
+
* @private
|
|
21394
|
+
* @param {Array} source The array to copy values from.
|
|
21395
|
+
* @param {Array} [array=[]] The array to copy values to.
|
|
21396
|
+
* @returns {Array} Returns `array`.
|
|
21397
|
+
*/
|
|
21398
|
+
function copyArray(source, array) {
|
|
21399
|
+
var index = -1,
|
|
21400
|
+
length = source.length;
|
|
21401
|
+
|
|
21402
|
+
array || (array = Array(length));
|
|
21403
|
+
while (++index < length) {
|
|
21404
|
+
array[index] = source[index];
|
|
21405
|
+
}
|
|
21406
|
+
return array;
|
|
21407
|
+
}
|
|
21408
|
+
|
|
21409
|
+
/**
|
|
21410
|
+
* Copies properties of `source` to `object`.
|
|
21411
|
+
*
|
|
21412
|
+
* @private
|
|
21413
|
+
* @param {Object} source The object to copy properties from.
|
|
21414
|
+
* @param {Array} props The property identifiers to copy.
|
|
21415
|
+
* @param {Object} [object={}] The object to copy properties to.
|
|
21416
|
+
* @param {Function} [customizer] The function to customize copied values.
|
|
21417
|
+
* @returns {Object} Returns `object`.
|
|
21418
|
+
*/
|
|
21419
|
+
function copyObject(source, props, object, customizer) {
|
|
21420
|
+
var isNew = !object;
|
|
21421
|
+
object || (object = {});
|
|
21422
|
+
|
|
21423
|
+
var index = -1,
|
|
21424
|
+
length = props.length;
|
|
21425
|
+
|
|
21426
|
+
while (++index < length) {
|
|
21427
|
+
var key = props[index];
|
|
21428
|
+
|
|
21429
|
+
var newValue = customizer
|
|
21430
|
+
? customizer(object[key], source[key], key, object, source)
|
|
21431
|
+
: undefined;
|
|
21432
|
+
|
|
21433
|
+
if (newValue === undefined) {
|
|
21434
|
+
newValue = source[key];
|
|
20867
21435
|
}
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
21436
|
+
if (isNew) {
|
|
21437
|
+
baseAssignValue(object, key, newValue);
|
|
21438
|
+
} else {
|
|
21439
|
+
assignValue(object, key, newValue);
|
|
20872
21440
|
}
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
21441
|
+
}
|
|
21442
|
+
return object;
|
|
21443
|
+
}
|
|
21444
|
+
|
|
21445
|
+
/**
|
|
21446
|
+
* Copies own symbols of `source` to `object`.
|
|
21447
|
+
*
|
|
21448
|
+
* @private
|
|
21449
|
+
* @param {Object} source The object to copy symbols from.
|
|
21450
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
21451
|
+
* @returns {Object} Returns `object`.
|
|
21452
|
+
*/
|
|
21453
|
+
function copySymbols(source, object) {
|
|
21454
|
+
return copyObject(source, getSymbols(source), object);
|
|
21455
|
+
}
|
|
21456
|
+
|
|
21457
|
+
/**
|
|
21458
|
+
* Copies own and inherited symbols of `source` to `object`.
|
|
21459
|
+
*
|
|
21460
|
+
* @private
|
|
21461
|
+
* @param {Object} source The object to copy symbols from.
|
|
21462
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
|
21463
|
+
* @returns {Object} Returns `object`.
|
|
21464
|
+
*/
|
|
21465
|
+
function copySymbolsIn(source, object) {
|
|
21466
|
+
return copyObject(source, getSymbolsIn(source), object);
|
|
21467
|
+
}
|
|
21468
|
+
|
|
21469
|
+
/**
|
|
21470
|
+
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
|
|
21471
|
+
* objects.
|
|
21472
|
+
*
|
|
21473
|
+
* @private
|
|
21474
|
+
* @param {*} value The value to inspect.
|
|
21475
|
+
* @param {string} key The key of the property to inspect.
|
|
21476
|
+
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
|
|
21477
|
+
*/
|
|
21478
|
+
function customOmitClone(value) {
|
|
21479
|
+
return isPlainObject(value) ? undefined : value;
|
|
21480
|
+
}
|
|
21481
|
+
|
|
21482
|
+
/**
|
|
21483
|
+
* A specialized version of `baseRest` which flattens the rest array.
|
|
21484
|
+
*
|
|
21485
|
+
* @private
|
|
21486
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
21487
|
+
* @returns {Function} Returns the new function.
|
|
21488
|
+
*/
|
|
21489
|
+
function flatRest(func) {
|
|
21490
|
+
return setToString(overRest(func, undefined, flatten), func + '');
|
|
21491
|
+
}
|
|
21492
|
+
|
|
21493
|
+
/**
|
|
21494
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
21495
|
+
*
|
|
21496
|
+
* @private
|
|
21497
|
+
* @param {Object} object The object to query.
|
|
21498
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
21499
|
+
*/
|
|
21500
|
+
function getAllKeys(object) {
|
|
21501
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
20876
21502
|
}
|
|
20877
21503
|
|
|
20878
21504
|
/**
|
|
@@ -20916,17 +21542,51 @@ function getNative(object, key) {
|
|
|
20916
21542
|
}
|
|
20917
21543
|
|
|
20918
21544
|
/**
|
|
20919
|
-
*
|
|
21545
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
21546
|
+
*
|
|
21547
|
+
* @private
|
|
21548
|
+
* @param {*} value The value to query.
|
|
21549
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
21550
|
+
*/
|
|
21551
|
+
function getRawTag(value) {
|
|
21552
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
|
21553
|
+
tag = value[symToStringTag];
|
|
21554
|
+
|
|
21555
|
+
try {
|
|
21556
|
+
value[symToStringTag] = undefined;
|
|
21557
|
+
var unmasked = true;
|
|
21558
|
+
} catch (e) {}
|
|
21559
|
+
|
|
21560
|
+
var result = nativeObjectToString.call(value);
|
|
21561
|
+
if (unmasked) {
|
|
21562
|
+
if (isOwn) {
|
|
21563
|
+
value[symToStringTag] = tag;
|
|
21564
|
+
} else {
|
|
21565
|
+
delete value[symToStringTag];
|
|
21566
|
+
}
|
|
21567
|
+
}
|
|
21568
|
+
return result;
|
|
21569
|
+
}
|
|
21570
|
+
|
|
21571
|
+
/**
|
|
21572
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
20920
21573
|
*
|
|
20921
21574
|
* @private
|
|
20922
21575
|
* @param {Object} object The object to query.
|
|
20923
21576
|
* @returns {Array} Returns the array of symbols.
|
|
20924
21577
|
*/
|
|
20925
|
-
var getSymbols = nativeGetSymbols ?
|
|
21578
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
21579
|
+
if (object == null) {
|
|
21580
|
+
return [];
|
|
21581
|
+
}
|
|
21582
|
+
object = Object(object);
|
|
21583
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
21584
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
21585
|
+
});
|
|
21586
|
+
};
|
|
20926
21587
|
|
|
20927
21588
|
/**
|
|
20928
|
-
* Creates an array of the own and inherited enumerable
|
|
20929
|
-
* of `object`.
|
|
21589
|
+
* Creates an array of the own and inherited enumerable symbols of `object`.
|
|
20930
21590
|
*
|
|
20931
21591
|
* @private
|
|
20932
21592
|
* @param {Object} object The object to query.
|
|
@@ -20941,6 +21601,119 @@ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
|
20941
21601
|
return result;
|
|
20942
21602
|
};
|
|
20943
21603
|
|
|
21604
|
+
/**
|
|
21605
|
+
* Gets the `toStringTag` of `value`.
|
|
21606
|
+
*
|
|
21607
|
+
* @private
|
|
21608
|
+
* @param {*} value The value to query.
|
|
21609
|
+
* @returns {string} Returns the `toStringTag`.
|
|
21610
|
+
*/
|
|
21611
|
+
var getTag = baseGetTag;
|
|
21612
|
+
|
|
21613
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
21614
|
+
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
21615
|
+
(Map && getTag(new Map) != mapTag) ||
|
|
21616
|
+
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
21617
|
+
(Set && getTag(new Set) != setTag) ||
|
|
21618
|
+
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
21619
|
+
getTag = function(value) {
|
|
21620
|
+
var result = baseGetTag(value),
|
|
21621
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
|
21622
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
|
21623
|
+
|
|
21624
|
+
if (ctorString) {
|
|
21625
|
+
switch (ctorString) {
|
|
21626
|
+
case dataViewCtorString: return dataViewTag;
|
|
21627
|
+
case mapCtorString: return mapTag;
|
|
21628
|
+
case promiseCtorString: return promiseTag;
|
|
21629
|
+
case setCtorString: return setTag;
|
|
21630
|
+
case weakMapCtorString: return weakMapTag;
|
|
21631
|
+
}
|
|
21632
|
+
}
|
|
21633
|
+
return result;
|
|
21634
|
+
};
|
|
21635
|
+
}
|
|
21636
|
+
|
|
21637
|
+
/**
|
|
21638
|
+
* Initializes an array clone.
|
|
21639
|
+
*
|
|
21640
|
+
* @private
|
|
21641
|
+
* @param {Array} array The array to clone.
|
|
21642
|
+
* @returns {Array} Returns the initialized clone.
|
|
21643
|
+
*/
|
|
21644
|
+
function initCloneArray(array) {
|
|
21645
|
+
var length = array.length,
|
|
21646
|
+
result = new array.constructor(length);
|
|
21647
|
+
|
|
21648
|
+
// Add properties assigned by `RegExp#exec`.
|
|
21649
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
|
21650
|
+
result.index = array.index;
|
|
21651
|
+
result.input = array.input;
|
|
21652
|
+
}
|
|
21653
|
+
return result;
|
|
21654
|
+
}
|
|
21655
|
+
|
|
21656
|
+
/**
|
|
21657
|
+
* Initializes an object clone.
|
|
21658
|
+
*
|
|
21659
|
+
* @private
|
|
21660
|
+
* @param {Object} object The object to clone.
|
|
21661
|
+
* @returns {Object} Returns the initialized clone.
|
|
21662
|
+
*/
|
|
21663
|
+
function initCloneObject(object) {
|
|
21664
|
+
return (typeof object.constructor == 'function' && !isPrototype(object))
|
|
21665
|
+
? baseCreate(getPrototype(object))
|
|
21666
|
+
: {};
|
|
21667
|
+
}
|
|
21668
|
+
|
|
21669
|
+
/**
|
|
21670
|
+
* Initializes an object clone based on its `toStringTag`.
|
|
21671
|
+
*
|
|
21672
|
+
* **Note:** This function only supports cloning values with tags of
|
|
21673
|
+
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
|
|
21674
|
+
*
|
|
21675
|
+
* @private
|
|
21676
|
+
* @param {Object} object The object to clone.
|
|
21677
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
|
21678
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
|
21679
|
+
* @returns {Object} Returns the initialized clone.
|
|
21680
|
+
*/
|
|
21681
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
21682
|
+
var Ctor = object.constructor;
|
|
21683
|
+
switch (tag) {
|
|
21684
|
+
case arrayBufferTag:
|
|
21685
|
+
return cloneArrayBuffer(object);
|
|
21686
|
+
|
|
21687
|
+
case boolTag:
|
|
21688
|
+
case dateTag:
|
|
21689
|
+
return new Ctor(+object);
|
|
21690
|
+
|
|
21691
|
+
case dataViewTag:
|
|
21692
|
+
return cloneDataView(object, isDeep);
|
|
21693
|
+
|
|
21694
|
+
case float32Tag: case float64Tag:
|
|
21695
|
+
case int8Tag: case int16Tag: case int32Tag:
|
|
21696
|
+
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
|
|
21697
|
+
return cloneTypedArray(object, isDeep);
|
|
21698
|
+
|
|
21699
|
+
case mapTag:
|
|
21700
|
+
return new Ctor;
|
|
21701
|
+
|
|
21702
|
+
case numberTag:
|
|
21703
|
+
case stringTag:
|
|
21704
|
+
return new Ctor(object);
|
|
21705
|
+
|
|
21706
|
+
case regexpTag:
|
|
21707
|
+
return cloneRegExp(object);
|
|
21708
|
+
|
|
21709
|
+
case setTag:
|
|
21710
|
+
return new Ctor;
|
|
21711
|
+
|
|
21712
|
+
case symbolTag:
|
|
21713
|
+
return cloneSymbol(object);
|
|
21714
|
+
}
|
|
21715
|
+
}
|
|
21716
|
+
|
|
20944
21717
|
/**
|
|
20945
21718
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
20946
21719
|
*
|
|
@@ -20962,10 +21735,34 @@ function isFlattenable(value) {
|
|
|
20962
21735
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
20963
21736
|
*/
|
|
20964
21737
|
function isIndex(value, length) {
|
|
21738
|
+
var type = typeof value;
|
|
20965
21739
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
21740
|
+
|
|
20966
21741
|
return !!length &&
|
|
20967
|
-
(
|
|
20968
|
-
|
|
21742
|
+
(type == 'number' ||
|
|
21743
|
+
(type != 'symbol' && reIsUint.test(value))) &&
|
|
21744
|
+
(value > -1 && value % 1 == 0 && value < length);
|
|
21745
|
+
}
|
|
21746
|
+
|
|
21747
|
+
/**
|
|
21748
|
+
* Checks if `value` is a property name and not a property path.
|
|
21749
|
+
*
|
|
21750
|
+
* @private
|
|
21751
|
+
* @param {*} value The value to check.
|
|
21752
|
+
* @param {Object} [object] The object to query keys on.
|
|
21753
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
21754
|
+
*/
|
|
21755
|
+
function isKey(value, object) {
|
|
21756
|
+
if (isArray(value)) {
|
|
21757
|
+
return false;
|
|
21758
|
+
}
|
|
21759
|
+
var type = typeof value;
|
|
21760
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
21761
|
+
value == null || isSymbol(value)) {
|
|
21762
|
+
return true;
|
|
21763
|
+
}
|
|
21764
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
21765
|
+
(object != null && value in Object(object));
|
|
20969
21766
|
}
|
|
20970
21767
|
|
|
20971
21768
|
/**
|
|
@@ -21007,6 +21804,26 @@ function isPrototype(value) {
|
|
|
21007
21804
|
return value === proto;
|
|
21008
21805
|
}
|
|
21009
21806
|
|
|
21807
|
+
/**
|
|
21808
|
+
* A specialized version of `_.memoize` which clears the memoized function's
|
|
21809
|
+
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
21810
|
+
*
|
|
21811
|
+
* @private
|
|
21812
|
+
* @param {Function} func The function to have its output memoized.
|
|
21813
|
+
* @returns {Function} Returns the new memoized function.
|
|
21814
|
+
*/
|
|
21815
|
+
function memoizeCapped(func) {
|
|
21816
|
+
var result = memoize(func, function(key) {
|
|
21817
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
21818
|
+
cache.clear();
|
|
21819
|
+
}
|
|
21820
|
+
return key;
|
|
21821
|
+
});
|
|
21822
|
+
|
|
21823
|
+
var cache = result.cache;
|
|
21824
|
+
return result;
|
|
21825
|
+
}
|
|
21826
|
+
|
|
21010
21827
|
/**
|
|
21011
21828
|
* This function is like
|
|
21012
21829
|
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
@@ -21026,40 +21843,255 @@ function nativeKeysIn(object) {
|
|
|
21026
21843
|
return result;
|
|
21027
21844
|
}
|
|
21028
21845
|
|
|
21846
|
+
/**
|
|
21847
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
21848
|
+
*
|
|
21849
|
+
* @private
|
|
21850
|
+
* @param {*} value The value to convert.
|
|
21851
|
+
* @returns {string} Returns the converted string.
|
|
21852
|
+
*/
|
|
21853
|
+
function objectToString(value) {
|
|
21854
|
+
return nativeObjectToString.call(value);
|
|
21855
|
+
}
|
|
21856
|
+
|
|
21857
|
+
/**
|
|
21858
|
+
* A specialized version of `baseRest` which transforms the rest array.
|
|
21859
|
+
*
|
|
21860
|
+
* @private
|
|
21861
|
+
* @param {Function} func The function to apply a rest parameter to.
|
|
21862
|
+
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
21863
|
+
* @param {Function} transform The rest array transform.
|
|
21864
|
+
* @returns {Function} Returns the new function.
|
|
21865
|
+
*/
|
|
21866
|
+
function overRest(func, start, transform) {
|
|
21867
|
+
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
21868
|
+
return function() {
|
|
21869
|
+
var args = arguments,
|
|
21870
|
+
index = -1,
|
|
21871
|
+
length = nativeMax(args.length - start, 0),
|
|
21872
|
+
array = Array(length);
|
|
21873
|
+
|
|
21874
|
+
while (++index < length) {
|
|
21875
|
+
array[index] = args[start + index];
|
|
21876
|
+
}
|
|
21877
|
+
index = -1;
|
|
21878
|
+
var otherArgs = Array(start + 1);
|
|
21879
|
+
while (++index < start) {
|
|
21880
|
+
otherArgs[index] = args[index];
|
|
21881
|
+
}
|
|
21882
|
+
otherArgs[start] = transform(array);
|
|
21883
|
+
return apply(func, this, otherArgs);
|
|
21884
|
+
};
|
|
21885
|
+
}
|
|
21886
|
+
|
|
21887
|
+
/**
|
|
21888
|
+
* Gets the parent value at `path` of `object`.
|
|
21889
|
+
*
|
|
21890
|
+
* @private
|
|
21891
|
+
* @param {Object} object The object to query.
|
|
21892
|
+
* @param {Array} path The path to get the parent value of.
|
|
21893
|
+
* @returns {*} Returns the parent value.
|
|
21894
|
+
*/
|
|
21895
|
+
function parent(object, path) {
|
|
21896
|
+
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
21897
|
+
}
|
|
21898
|
+
|
|
21899
|
+
/**
|
|
21900
|
+
* Sets the `toString` method of `func` to return `string`.
|
|
21901
|
+
*
|
|
21902
|
+
* @private
|
|
21903
|
+
* @param {Function} func The function to modify.
|
|
21904
|
+
* @param {Function} string The `toString` result.
|
|
21905
|
+
* @returns {Function} Returns `func`.
|
|
21906
|
+
*/
|
|
21907
|
+
var setToString = shortOut(baseSetToString);
|
|
21908
|
+
|
|
21909
|
+
/**
|
|
21910
|
+
* Creates a function that'll short out and invoke `identity` instead
|
|
21911
|
+
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
21912
|
+
* milliseconds.
|
|
21913
|
+
*
|
|
21914
|
+
* @private
|
|
21915
|
+
* @param {Function} func The function to restrict.
|
|
21916
|
+
* @returns {Function} Returns the new shortable function.
|
|
21917
|
+
*/
|
|
21918
|
+
function shortOut(func) {
|
|
21919
|
+
var count = 0,
|
|
21920
|
+
lastCalled = 0;
|
|
21921
|
+
|
|
21922
|
+
return function() {
|
|
21923
|
+
var stamp = nativeNow(),
|
|
21924
|
+
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
21925
|
+
|
|
21926
|
+
lastCalled = stamp;
|
|
21927
|
+
if (remaining > 0) {
|
|
21928
|
+
if (++count >= HOT_COUNT) {
|
|
21929
|
+
return arguments[0];
|
|
21930
|
+
}
|
|
21931
|
+
} else {
|
|
21932
|
+
count = 0;
|
|
21933
|
+
}
|
|
21934
|
+
return func.apply(undefined, arguments);
|
|
21935
|
+
};
|
|
21936
|
+
}
|
|
21937
|
+
|
|
21938
|
+
/**
|
|
21939
|
+
* Converts `string` to a property path array.
|
|
21940
|
+
*
|
|
21941
|
+
* @private
|
|
21942
|
+
* @param {string} string The string to convert.
|
|
21943
|
+
* @returns {Array} Returns the property path array.
|
|
21944
|
+
*/
|
|
21945
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
21946
|
+
var result = [];
|
|
21947
|
+
if (string.charCodeAt(0) === 46 /* . */) {
|
|
21948
|
+
result.push('');
|
|
21949
|
+
}
|
|
21950
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
21951
|
+
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
21952
|
+
});
|
|
21953
|
+
return result;
|
|
21954
|
+
});
|
|
21955
|
+
|
|
21029
21956
|
/**
|
|
21030
21957
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
21031
21958
|
*
|
|
21032
|
-
* @private
|
|
21033
|
-
* @param {*} value The value to inspect.
|
|
21034
|
-
* @returns {string|symbol} Returns the key.
|
|
21959
|
+
* @private
|
|
21960
|
+
* @param {*} value The value to inspect.
|
|
21961
|
+
* @returns {string|symbol} Returns the key.
|
|
21962
|
+
*/
|
|
21963
|
+
function toKey(value) {
|
|
21964
|
+
if (typeof value == 'string' || isSymbol(value)) {
|
|
21965
|
+
return value;
|
|
21966
|
+
}
|
|
21967
|
+
var result = (value + '');
|
|
21968
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
21969
|
+
}
|
|
21970
|
+
|
|
21971
|
+
/**
|
|
21972
|
+
* Converts `func` to its source code.
|
|
21973
|
+
*
|
|
21974
|
+
* @private
|
|
21975
|
+
* @param {Function} func The function to convert.
|
|
21976
|
+
* @returns {string} Returns the source code.
|
|
21977
|
+
*/
|
|
21978
|
+
function toSource(func) {
|
|
21979
|
+
if (func != null) {
|
|
21980
|
+
try {
|
|
21981
|
+
return funcToString.call(func);
|
|
21982
|
+
} catch (e) {}
|
|
21983
|
+
try {
|
|
21984
|
+
return (func + '');
|
|
21985
|
+
} catch (e) {}
|
|
21986
|
+
}
|
|
21987
|
+
return '';
|
|
21988
|
+
}
|
|
21989
|
+
|
|
21990
|
+
/**
|
|
21991
|
+
* Flattens `array` a single level deep.
|
|
21992
|
+
*
|
|
21993
|
+
* @static
|
|
21994
|
+
* @memberOf _
|
|
21995
|
+
* @since 0.1.0
|
|
21996
|
+
* @category Array
|
|
21997
|
+
* @param {Array} array The array to flatten.
|
|
21998
|
+
* @returns {Array} Returns the new flattened array.
|
|
21999
|
+
* @example
|
|
22000
|
+
*
|
|
22001
|
+
* _.flatten([1, [2, [3, [4]], 5]]);
|
|
22002
|
+
* // => [1, 2, [3, [4]], 5]
|
|
22003
|
+
*/
|
|
22004
|
+
function flatten(array) {
|
|
22005
|
+
var length = array == null ? 0 : array.length;
|
|
22006
|
+
return length ? baseFlatten(array, 1) : [];
|
|
22007
|
+
}
|
|
22008
|
+
|
|
22009
|
+
/**
|
|
22010
|
+
* Gets the last element of `array`.
|
|
22011
|
+
*
|
|
22012
|
+
* @static
|
|
22013
|
+
* @memberOf _
|
|
22014
|
+
* @since 0.1.0
|
|
22015
|
+
* @category Array
|
|
22016
|
+
* @param {Array} array The array to query.
|
|
22017
|
+
* @returns {*} Returns the last element of `array`.
|
|
22018
|
+
* @example
|
|
22019
|
+
*
|
|
22020
|
+
* _.last([1, 2, 3]);
|
|
22021
|
+
* // => 3
|
|
21035
22022
|
*/
|
|
21036
|
-
function
|
|
21037
|
-
|
|
21038
|
-
|
|
21039
|
-
}
|
|
21040
|
-
var result = (value + '');
|
|
21041
|
-
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
22023
|
+
function last(array) {
|
|
22024
|
+
var length = array == null ? 0 : array.length;
|
|
22025
|
+
return length ? array[length - 1] : undefined;
|
|
21042
22026
|
}
|
|
21043
22027
|
|
|
21044
22028
|
/**
|
|
21045
|
-
*
|
|
22029
|
+
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
22030
|
+
* provided, it determines the cache key for storing the result based on the
|
|
22031
|
+
* arguments provided to the memoized function. By default, the first argument
|
|
22032
|
+
* provided to the memoized function is used as the map cache key. The `func`
|
|
22033
|
+
* is invoked with the `this` binding of the memoized function.
|
|
22034
|
+
*
|
|
22035
|
+
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
22036
|
+
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
22037
|
+
* constructor with one whose instances implement the
|
|
22038
|
+
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
22039
|
+
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
21046
22040
|
*
|
|
21047
|
-
* @
|
|
21048
|
-
* @
|
|
21049
|
-
* @
|
|
22041
|
+
* @static
|
|
22042
|
+
* @memberOf _
|
|
22043
|
+
* @since 0.1.0
|
|
22044
|
+
* @category Function
|
|
22045
|
+
* @param {Function} func The function to have its output memoized.
|
|
22046
|
+
* @param {Function} [resolver] The function to resolve the cache key.
|
|
22047
|
+
* @returns {Function} Returns the new memoized function.
|
|
22048
|
+
* @example
|
|
22049
|
+
*
|
|
22050
|
+
* var object = { 'a': 1, 'b': 2 };
|
|
22051
|
+
* var other = { 'c': 3, 'd': 4 };
|
|
22052
|
+
*
|
|
22053
|
+
* var values = _.memoize(_.values);
|
|
22054
|
+
* values(object);
|
|
22055
|
+
* // => [1, 2]
|
|
22056
|
+
*
|
|
22057
|
+
* values(other);
|
|
22058
|
+
* // => [3, 4]
|
|
22059
|
+
*
|
|
22060
|
+
* object.a = 2;
|
|
22061
|
+
* values(object);
|
|
22062
|
+
* // => [1, 2]
|
|
22063
|
+
*
|
|
22064
|
+
* // Modify the result cache.
|
|
22065
|
+
* values.cache.set(object, ['a', 'b']);
|
|
22066
|
+
* values(object);
|
|
22067
|
+
* // => ['a', 'b']
|
|
22068
|
+
*
|
|
22069
|
+
* // Replace `_.memoize.Cache`.
|
|
22070
|
+
* _.memoize.Cache = WeakMap;
|
|
21050
22071
|
*/
|
|
21051
|
-
function
|
|
21052
|
-
if (func != null) {
|
|
21053
|
-
|
|
21054
|
-
return funcToString.call(func);
|
|
21055
|
-
} catch (e) {}
|
|
21056
|
-
try {
|
|
21057
|
-
return (func + '');
|
|
21058
|
-
} catch (e) {}
|
|
22072
|
+
function memoize(func, resolver) {
|
|
22073
|
+
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
22074
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
21059
22075
|
}
|
|
21060
|
-
|
|
22076
|
+
var memoized = function() {
|
|
22077
|
+
var args = arguments,
|
|
22078
|
+
key = resolver ? resolver.apply(this, args) : args[0],
|
|
22079
|
+
cache = memoized.cache;
|
|
22080
|
+
|
|
22081
|
+
if (cache.has(key)) {
|
|
22082
|
+
return cache.get(key);
|
|
22083
|
+
}
|
|
22084
|
+
var result = func.apply(this, args);
|
|
22085
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
22086
|
+
return result;
|
|
22087
|
+
};
|
|
22088
|
+
memoized.cache = new (memoize.Cache || MapCache);
|
|
22089
|
+
return memoized;
|
|
21061
22090
|
}
|
|
21062
22091
|
|
|
22092
|
+
// Expose `MapCache`.
|
|
22093
|
+
memoize.Cache = MapCache;
|
|
22094
|
+
|
|
21063
22095
|
/**
|
|
21064
22096
|
* Performs a
|
|
21065
22097
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
@@ -21114,11 +22146,10 @@ function eq(value, other) {
|
|
|
21114
22146
|
* _.isArguments([1, 2, 3]);
|
|
21115
22147
|
* // => false
|
|
21116
22148
|
*/
|
|
21117
|
-
|
|
21118
|
-
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
}
|
|
22149
|
+
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
22150
|
+
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
22151
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
22152
|
+
};
|
|
21122
22153
|
|
|
21123
22154
|
/**
|
|
21124
22155
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -21175,33 +22206,23 @@ function isArrayLike(value) {
|
|
|
21175
22206
|
}
|
|
21176
22207
|
|
|
21177
22208
|
/**
|
|
21178
|
-
*
|
|
21179
|
-
* is an object.
|
|
22209
|
+
* Checks if `value` is a buffer.
|
|
21180
22210
|
*
|
|
21181
22211
|
* @static
|
|
21182
22212
|
* @memberOf _
|
|
21183
|
-
* @since 4.
|
|
22213
|
+
* @since 4.3.0
|
|
21184
22214
|
* @category Lang
|
|
21185
22215
|
* @param {*} value The value to check.
|
|
21186
|
-
* @returns {boolean} Returns `true` if `value` is
|
|
21187
|
-
* else `false`.
|
|
22216
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
21188
22217
|
* @example
|
|
21189
22218
|
*
|
|
21190
|
-
* _.
|
|
21191
|
-
* // => true
|
|
21192
|
-
*
|
|
21193
|
-
* _.isArrayLikeObject(document.body.children);
|
|
22219
|
+
* _.isBuffer(new Buffer(2));
|
|
21194
22220
|
* // => true
|
|
21195
22221
|
*
|
|
21196
|
-
* _.
|
|
21197
|
-
* // => false
|
|
21198
|
-
*
|
|
21199
|
-
* _.isArrayLikeObject(_.noop);
|
|
22222
|
+
* _.isBuffer(new Uint8Array(2));
|
|
21200
22223
|
* // => false
|
|
21201
22224
|
*/
|
|
21202
|
-
|
|
21203
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
21204
|
-
}
|
|
22225
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
21205
22226
|
|
|
21206
22227
|
/**
|
|
21207
22228
|
* Checks if `value` is classified as a `Function` object.
|
|
@@ -21221,10 +22242,13 @@ function isArrayLikeObject(value) {
|
|
|
21221
22242
|
* // => false
|
|
21222
22243
|
*/
|
|
21223
22244
|
function isFunction(value) {
|
|
22245
|
+
if (!isObject(value)) {
|
|
22246
|
+
return false;
|
|
22247
|
+
}
|
|
21224
22248
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
21225
|
-
// in Safari
|
|
21226
|
-
var tag =
|
|
21227
|
-
return tag == funcTag || tag == genTag;
|
|
22249
|
+
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
22250
|
+
var tag = baseGetTag(value);
|
|
22251
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
21228
22252
|
}
|
|
21229
22253
|
|
|
21230
22254
|
/**
|
|
@@ -21285,7 +22309,7 @@ function isLength(value) {
|
|
|
21285
22309
|
*/
|
|
21286
22310
|
function isObject(value) {
|
|
21287
22311
|
var type = typeof value;
|
|
21288
|
-
return
|
|
22312
|
+
return value != null && (type == 'object' || type == 'function');
|
|
21289
22313
|
}
|
|
21290
22314
|
|
|
21291
22315
|
/**
|
|
@@ -21313,9 +22337,88 @@ function isObject(value) {
|
|
|
21313
22337
|
* // => false
|
|
21314
22338
|
*/
|
|
21315
22339
|
function isObjectLike(value) {
|
|
21316
|
-
return
|
|
22340
|
+
return value != null && typeof value == 'object';
|
|
22341
|
+
}
|
|
22342
|
+
|
|
22343
|
+
/**
|
|
22344
|
+
* Checks if `value` is classified as a `Map` object.
|
|
22345
|
+
*
|
|
22346
|
+
* @static
|
|
22347
|
+
* @memberOf _
|
|
22348
|
+
* @since 4.3.0
|
|
22349
|
+
* @category Lang
|
|
22350
|
+
* @param {*} value The value to check.
|
|
22351
|
+
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
|
|
22352
|
+
* @example
|
|
22353
|
+
*
|
|
22354
|
+
* _.isMap(new Map);
|
|
22355
|
+
* // => true
|
|
22356
|
+
*
|
|
22357
|
+
* _.isMap(new WeakMap);
|
|
22358
|
+
* // => false
|
|
22359
|
+
*/
|
|
22360
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
22361
|
+
|
|
22362
|
+
/**
|
|
22363
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
22364
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
22365
|
+
*
|
|
22366
|
+
* @static
|
|
22367
|
+
* @memberOf _
|
|
22368
|
+
* @since 0.8.0
|
|
22369
|
+
* @category Lang
|
|
22370
|
+
* @param {*} value The value to check.
|
|
22371
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
22372
|
+
* @example
|
|
22373
|
+
*
|
|
22374
|
+
* function Foo() {
|
|
22375
|
+
* this.a = 1;
|
|
22376
|
+
* }
|
|
22377
|
+
*
|
|
22378
|
+
* _.isPlainObject(new Foo);
|
|
22379
|
+
* // => false
|
|
22380
|
+
*
|
|
22381
|
+
* _.isPlainObject([1, 2, 3]);
|
|
22382
|
+
* // => false
|
|
22383
|
+
*
|
|
22384
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
22385
|
+
* // => true
|
|
22386
|
+
*
|
|
22387
|
+
* _.isPlainObject(Object.create(null));
|
|
22388
|
+
* // => true
|
|
22389
|
+
*/
|
|
22390
|
+
function isPlainObject(value) {
|
|
22391
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
22392
|
+
return false;
|
|
22393
|
+
}
|
|
22394
|
+
var proto = getPrototype(value);
|
|
22395
|
+
if (proto === null) {
|
|
22396
|
+
return true;
|
|
22397
|
+
}
|
|
22398
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
22399
|
+
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
22400
|
+
funcToString.call(Ctor) == objectCtorString;
|
|
21317
22401
|
}
|
|
21318
22402
|
|
|
22403
|
+
/**
|
|
22404
|
+
* Checks if `value` is classified as a `Set` object.
|
|
22405
|
+
*
|
|
22406
|
+
* @static
|
|
22407
|
+
* @memberOf _
|
|
22408
|
+
* @since 4.3.0
|
|
22409
|
+
* @category Lang
|
|
22410
|
+
* @param {*} value The value to check.
|
|
22411
|
+
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
|
|
22412
|
+
* @example
|
|
22413
|
+
*
|
|
22414
|
+
* _.isSet(new Set);
|
|
22415
|
+
* // => true
|
|
22416
|
+
*
|
|
22417
|
+
* _.isSet(new WeakSet);
|
|
22418
|
+
* // => false
|
|
22419
|
+
*/
|
|
22420
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
22421
|
+
|
|
21319
22422
|
/**
|
|
21320
22423
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
21321
22424
|
*
|
|
@@ -21335,7 +22438,83 @@ function isObjectLike(value) {
|
|
|
21335
22438
|
*/
|
|
21336
22439
|
function isSymbol(value) {
|
|
21337
22440
|
return typeof value == 'symbol' ||
|
|
21338
|
-
(isObjectLike(value) &&
|
|
22441
|
+
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
22442
|
+
}
|
|
22443
|
+
|
|
22444
|
+
/**
|
|
22445
|
+
* Checks if `value` is classified as a typed array.
|
|
22446
|
+
*
|
|
22447
|
+
* @static
|
|
22448
|
+
* @memberOf _
|
|
22449
|
+
* @since 3.0.0
|
|
22450
|
+
* @category Lang
|
|
22451
|
+
* @param {*} value The value to check.
|
|
22452
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
22453
|
+
* @example
|
|
22454
|
+
*
|
|
22455
|
+
* _.isTypedArray(new Uint8Array);
|
|
22456
|
+
* // => true
|
|
22457
|
+
*
|
|
22458
|
+
* _.isTypedArray([]);
|
|
22459
|
+
* // => false
|
|
22460
|
+
*/
|
|
22461
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
22462
|
+
|
|
22463
|
+
/**
|
|
22464
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
22465
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
22466
|
+
*
|
|
22467
|
+
* @static
|
|
22468
|
+
* @memberOf _
|
|
22469
|
+
* @since 4.0.0
|
|
22470
|
+
* @category Lang
|
|
22471
|
+
* @param {*} value The value to convert.
|
|
22472
|
+
* @returns {string} Returns the converted string.
|
|
22473
|
+
* @example
|
|
22474
|
+
*
|
|
22475
|
+
* _.toString(null);
|
|
22476
|
+
* // => ''
|
|
22477
|
+
*
|
|
22478
|
+
* _.toString(-0);
|
|
22479
|
+
* // => '-0'
|
|
22480
|
+
*
|
|
22481
|
+
* _.toString([1, 2, 3]);
|
|
22482
|
+
* // => '1,2,3'
|
|
22483
|
+
*/
|
|
22484
|
+
function toString(value) {
|
|
22485
|
+
return value == null ? '' : baseToString(value);
|
|
22486
|
+
}
|
|
22487
|
+
|
|
22488
|
+
/**
|
|
22489
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
22490
|
+
*
|
|
22491
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
22492
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
22493
|
+
* for more details.
|
|
22494
|
+
*
|
|
22495
|
+
* @static
|
|
22496
|
+
* @since 0.1.0
|
|
22497
|
+
* @memberOf _
|
|
22498
|
+
* @category Object
|
|
22499
|
+
* @param {Object} object The object to query.
|
|
22500
|
+
* @returns {Array} Returns the array of property names.
|
|
22501
|
+
* @example
|
|
22502
|
+
*
|
|
22503
|
+
* function Foo() {
|
|
22504
|
+
* this.a = 1;
|
|
22505
|
+
* this.b = 2;
|
|
22506
|
+
* }
|
|
22507
|
+
*
|
|
22508
|
+
* Foo.prototype.c = 3;
|
|
22509
|
+
*
|
|
22510
|
+
* _.keys(new Foo);
|
|
22511
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
22512
|
+
*
|
|
22513
|
+
* _.keys('hi');
|
|
22514
|
+
* // => ['0', '1']
|
|
22515
|
+
*/
|
|
22516
|
+
function keys(object) {
|
|
22517
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
21339
22518
|
}
|
|
21340
22519
|
|
|
21341
22520
|
/**
|
|
@@ -21367,15 +22546,16 @@ function keysIn(object) {
|
|
|
21367
22546
|
|
|
21368
22547
|
/**
|
|
21369
22548
|
* The opposite of `_.pick`; this method creates an object composed of the
|
|
21370
|
-
* own and inherited enumerable
|
|
21371
|
-
*
|
|
22549
|
+
* own and inherited enumerable property paths of `object` that are not omitted.
|
|
22550
|
+
*
|
|
22551
|
+
* **Note:** This method is considerably slower than `_.pick`.
|
|
21372
22552
|
*
|
|
21373
22553
|
* @static
|
|
21374
22554
|
* @since 0.1.0
|
|
21375
22555
|
* @memberOf _
|
|
21376
22556
|
* @category Object
|
|
21377
22557
|
* @param {Object} object The source object.
|
|
21378
|
-
* @param {...(string|string[])} [
|
|
22558
|
+
* @param {...(string|string[])} [paths] The property paths to omit.
|
|
21379
22559
|
* @returns {Object} Returns the new object.
|
|
21380
22560
|
* @example
|
|
21381
22561
|
*
|
|
@@ -21384,14 +22564,73 @@ function keysIn(object) {
|
|
|
21384
22564
|
* _.omit(object, ['a', 'c']);
|
|
21385
22565
|
* // => { 'b': '2' }
|
|
21386
22566
|
*/
|
|
21387
|
-
var omit =
|
|
22567
|
+
var omit = flatRest(function(object, paths) {
|
|
22568
|
+
var result = {};
|
|
21388
22569
|
if (object == null) {
|
|
21389
|
-
return
|
|
22570
|
+
return result;
|
|
21390
22571
|
}
|
|
21391
|
-
|
|
21392
|
-
|
|
22572
|
+
var isDeep = false;
|
|
22573
|
+
paths = arrayMap(paths, function(path) {
|
|
22574
|
+
path = castPath(path, object);
|
|
22575
|
+
isDeep || (isDeep = path.length > 1);
|
|
22576
|
+
return path;
|
|
22577
|
+
});
|
|
22578
|
+
copyObject(object, getAllKeysIn(object), result);
|
|
22579
|
+
if (isDeep) {
|
|
22580
|
+
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
22581
|
+
}
|
|
22582
|
+
var length = paths.length;
|
|
22583
|
+
while (length--) {
|
|
22584
|
+
baseUnset(result, paths[length]);
|
|
22585
|
+
}
|
|
22586
|
+
return result;
|
|
21393
22587
|
});
|
|
21394
22588
|
|
|
22589
|
+
/**
|
|
22590
|
+
* Creates a function that returns `value`.
|
|
22591
|
+
*
|
|
22592
|
+
* @static
|
|
22593
|
+
* @memberOf _
|
|
22594
|
+
* @since 2.4.0
|
|
22595
|
+
* @category Util
|
|
22596
|
+
* @param {*} value The value to return from the new function.
|
|
22597
|
+
* @returns {Function} Returns the new constant function.
|
|
22598
|
+
* @example
|
|
22599
|
+
*
|
|
22600
|
+
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
22601
|
+
*
|
|
22602
|
+
* console.log(objects);
|
|
22603
|
+
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
22604
|
+
*
|
|
22605
|
+
* console.log(objects[0] === objects[1]);
|
|
22606
|
+
* // => true
|
|
22607
|
+
*/
|
|
22608
|
+
function constant(value) {
|
|
22609
|
+
return function() {
|
|
22610
|
+
return value;
|
|
22611
|
+
};
|
|
22612
|
+
}
|
|
22613
|
+
|
|
22614
|
+
/**
|
|
22615
|
+
* This method returns the first argument it receives.
|
|
22616
|
+
*
|
|
22617
|
+
* @static
|
|
22618
|
+
* @since 0.1.0
|
|
22619
|
+
* @memberOf _
|
|
22620
|
+
* @category Util
|
|
22621
|
+
* @param {*} value Any value.
|
|
22622
|
+
* @returns {*} Returns `value`.
|
|
22623
|
+
* @example
|
|
22624
|
+
*
|
|
22625
|
+
* var object = { 'a': 1 };
|
|
22626
|
+
*
|
|
22627
|
+
* console.log(_.identity(object) === object);
|
|
22628
|
+
* // => true
|
|
22629
|
+
*/
|
|
22630
|
+
function identity(value) {
|
|
22631
|
+
return value;
|
|
22632
|
+
}
|
|
22633
|
+
|
|
21395
22634
|
/**
|
|
21396
22635
|
* This method returns a new empty array.
|
|
21397
22636
|
*
|
|
@@ -21414,9 +22653,26 @@ function stubArray() {
|
|
|
21414
22653
|
return [];
|
|
21415
22654
|
}
|
|
21416
22655
|
|
|
22656
|
+
/**
|
|
22657
|
+
* This method returns `false`.
|
|
22658
|
+
*
|
|
22659
|
+
* @static
|
|
22660
|
+
* @memberOf _
|
|
22661
|
+
* @since 4.13.0
|
|
22662
|
+
* @category Util
|
|
22663
|
+
* @returns {boolean} Returns `false`.
|
|
22664
|
+
* @example
|
|
22665
|
+
*
|
|
22666
|
+
* _.times(2, _.stubFalse);
|
|
22667
|
+
* // => [false, false]
|
|
22668
|
+
*/
|
|
22669
|
+
function stubFalse() {
|
|
22670
|
+
return false;
|
|
22671
|
+
}
|
|
22672
|
+
|
|
21417
22673
|
module.exports = omit;
|
|
21418
22674
|
|
|
21419
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(45)))
|
|
22675
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(45), __webpack_require__(105)(module)))
|
|
21420
22676
|
|
|
21421
22677
|
/***/ }),
|
|
21422
22678
|
/* 17 */
|
|
@@ -29818,6 +31074,34 @@ module.exports = exports;
|
|
|
29818
31074
|
|
|
29819
31075
|
/***/ }),
|
|
29820
31076
|
/* 105 */
|
|
31077
|
+
/***/ (function(module, exports) {
|
|
31078
|
+
|
|
31079
|
+
module.exports = function(module) {
|
|
31080
|
+
if (!module.webpackPolyfill) {
|
|
31081
|
+
module.deprecate = function() {};
|
|
31082
|
+
module.paths = [];
|
|
31083
|
+
// module.parent = undefined by default
|
|
31084
|
+
if (!module.children) module.children = [];
|
|
31085
|
+
Object.defineProperty(module, "loaded", {
|
|
31086
|
+
enumerable: true,
|
|
31087
|
+
get: function() {
|
|
31088
|
+
return module.l;
|
|
31089
|
+
}
|
|
31090
|
+
});
|
|
31091
|
+
Object.defineProperty(module, "id", {
|
|
31092
|
+
enumerable: true,
|
|
31093
|
+
get: function() {
|
|
31094
|
+
return module.i;
|
|
31095
|
+
}
|
|
31096
|
+
});
|
|
31097
|
+
module.webpackPolyfill = 1;
|
|
31098
|
+
}
|
|
31099
|
+
return module;
|
|
31100
|
+
};
|
|
31101
|
+
|
|
31102
|
+
|
|
31103
|
+
/***/ }),
|
|
31104
|
+
/* 106 */
|
|
29821
31105
|
/***/ (function(module, exports, __webpack_require__) {
|
|
29822
31106
|
|
|
29823
31107
|
// Imports
|
|
@@ -29852,7 +31136,7 @@ module.exports = exports;
|
|
|
29852
31136
|
|
|
29853
31137
|
|
|
29854
31138
|
/***/ }),
|
|
29855
|
-
/*
|
|
31139
|
+
/* 107 */
|
|
29856
31140
|
/***/ (function(module, exports, __webpack_require__) {
|
|
29857
31141
|
|
|
29858
31142
|
// Imports
|
|
@@ -29875,7 +31159,7 @@ module.exports = exports;
|
|
|
29875
31159
|
|
|
29876
31160
|
|
|
29877
31161
|
/***/ }),
|
|
29878
|
-
/*
|
|
31162
|
+
/* 108 */
|
|
29879
31163
|
/***/ (function(module, exports, __webpack_require__) {
|
|
29880
31164
|
|
|
29881
31165
|
// Imports
|
|
@@ -29933,7 +31217,7 @@ module.exports = exports;
|
|
|
29933
31217
|
|
|
29934
31218
|
|
|
29935
31219
|
/***/ }),
|
|
29936
|
-
/*
|
|
31220
|
+
/* 109 */
|
|
29937
31221
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
29938
31222
|
|
|
29939
31223
|
"use strict";
|