mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
3131 lines
185 KiB
JavaScript
3131 lines
185 KiB
JavaScript
|
(function() {
|
|||
|
var undefined, FUNC_ERROR_TEXT = 'Expected a function', HASH_UNDEFINED = '__lodash_hash_undefined__', PLACEHOLDER = '__lodash_placeholder__', INFINITY = 1 / 0, NAN = 0 / 0, wrapFlags = [
|
|||
|
[
|
|||
|
'ary',
|
|||
|
128
|
|||
|
],
|
|||
|
[
|
|||
|
'bind',
|
|||
|
1
|
|||
|
],
|
|||
|
[
|
|||
|
'bindKey',
|
|||
|
2
|
|||
|
],
|
|||
|
[
|
|||
|
'curry',
|
|||
|
8
|
|||
|
],
|
|||
|
[
|
|||
|
'curryRight',
|
|||
|
16
|
|||
|
],
|
|||
|
[
|
|||
|
'flip',
|
|||
|
512
|
|||
|
],
|
|||
|
[
|
|||
|
'partial',
|
|||
|
32
|
|||
|
],
|
|||
|
[
|
|||
|
'partialRight',
|
|||
|
64
|
|||
|
],
|
|||
|
[
|
|||
|
'rearg',
|
|||
|
256
|
|||
|
]
|
|||
|
], argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]', arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]', reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g, reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source), reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g, reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source), reTrimStart = /^\s+/, reWhitespace = /\s/, reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /, reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/, reEscapeChar = /\\(\\)?/g, reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, reFlags = /\w*$/, reIsBadHex = /^[-+]0x[0-9a-f]+$/i, reIsBinary = /^0b[01]+$/i, reIsHostCtor = /^\[object .+?Constructor\]$/, reIsOctal = /^0o[0-7]+$/i, reIsUint = /^(?:0|[1-9]\d*)$/, reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, reNoMatch = /($^)/, reUnescapedString = /['\n\r\u2028\u2029\\]/g, rsAstralRange = '\\ud800-\\udfff', rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", rsDingbatRange = '\\u2700-\\u27bf', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', rsBreakRange = "\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsApos = "['\u2019]", rsBreak = '[' + rsBreakRange + ']', rsCombo = '[' + rsComboRange + ']', rsLower = '[' + rsLowerRange + ']', rsMisc = '[^' + rsAstralRange + rsBreakRange + '\\d+' + rsDingbatRange + rsLowerRange + rsUpperRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsUpper = '[' + rsUpperRange + ']', rsZWJ = '\\u200d', rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', reOptMod = '(?:' + rsCombo + '|' + rsFitz + ")?", rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [
|
|||
|
rsNonAstral,
|
|||
|
rsRegional,
|
|||
|
rsSurrPair
|
|||
|
].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [
|
|||
|
'[' + rsDingbatRange + ']',
|
|||
|
rsRegional,
|
|||
|
rsSurrPair
|
|||
|
].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [
|
|||
|
rsNonAstral + rsCombo + '?',
|
|||
|
rsCombo,
|
|||
|
rsRegional,
|
|||
|
rsSurrPair,
|
|||
|
'[' + rsAstralRange + ']'
|
|||
|
].join('|') + ')', reApos = RegExp(rsApos, 'g'), reComboMark = RegExp(rsCombo, 'g'), reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'), reUnicodeWord = RegExp([
|
|||
|
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [
|
|||
|
rsBreak,
|
|||
|
rsUpper,
|
|||
|
'$'
|
|||
|
].join('|') + ')',
|
|||
|
'(?:' + rsUpper + '|' + rsMisc + ")+" + rsOptContrUpper + '(?=' + [
|
|||
|
rsBreak,
|
|||
|
rsUpper + rsMiscLower,
|
|||
|
'$'
|
|||
|
].join('|') + ')',
|
|||
|
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|||
|
rsUpper + '+' + rsOptContrUpper,
|
|||
|
'\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|||
|
'\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|||
|
'\\d+',
|
|||
|
rsEmoji
|
|||
|
].join('|'), 'g'), reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'), reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, contextProps = [
|
|||
|
'Array',
|
|||
|
'Buffer',
|
|||
|
'DataView',
|
|||
|
'Date',
|
|||
|
'Error',
|
|||
|
'Float32Array',
|
|||
|
'Float64Array',
|
|||
|
'Function',
|
|||
|
'Int8Array',
|
|||
|
'Int16Array',
|
|||
|
'Int32Array',
|
|||
|
'Map',
|
|||
|
'Math',
|
|||
|
'Object',
|
|||
|
'Promise',
|
|||
|
'RegExp',
|
|||
|
'Set',
|
|||
|
'String',
|
|||
|
'Symbol',
|
|||
|
'TypeError',
|
|||
|
'Uint8Array',
|
|||
|
'Uint8ClampedArray',
|
|||
|
'Uint16Array',
|
|||
|
'Uint32Array',
|
|||
|
'WeakMap',
|
|||
|
'_',
|
|||
|
'clearTimeout',
|
|||
|
'isFinite',
|
|||
|
'parseInt',
|
|||
|
'setTimeout'
|
|||
|
], templateCounter = -1, typedArrayTags = {};
|
|||
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = !0, typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = !1;
|
|||
|
var cloneableTags = {};
|
|||
|
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = !0, cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = !1;
|
|||
|
var stringEscapes = {
|
|||
|
'\\': '\\',
|
|||
|
"'": "'",
|
|||
|
'\n': 'n',
|
|||
|
'\r': 'r',
|
|||
|
'\u2028': 'u2028',
|
|||
|
'\u2029': 'u2029'
|
|||
|
}, freeParseFloat = parseFloat, freeParseInt = parseInt, freeGlobal = 'object' == typeof global && global && global.Object === Object && global, freeSelf = 'object' == typeof self && self && self.Object === Object && self, root = freeGlobal || freeSelf || Function('return this')(), freeExports = 'object' == typeof exports && exports && !exports.nodeType && exports, freeModule = freeExports && 'object' == typeof module && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports, freeProcess = moduleExports && freeGlobal.process, nodeUtil = function() {
|
|||
|
try {
|
|||
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|||
|
if (types) return types;
|
|||
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|||
|
} catch (e) {}
|
|||
|
}(), nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|||
|
function apply(func, thisArg, args) {
|
|||
|
switch(args.length){
|
|||
|
case 0:
|
|||
|
return func.call(thisArg);
|
|||
|
case 1:
|
|||
|
return func.call(thisArg, args[0]);
|
|||
|
case 2:
|
|||
|
return func.call(thisArg, args[0], args[1]);
|
|||
|
case 3:
|
|||
|
return func.call(thisArg, args[0], args[1], args[2]);
|
|||
|
}
|
|||
|
return func.apply(thisArg, args);
|
|||
|
}
|
|||
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length; ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
setter(accumulator, value, iteratee(value), array);
|
|||
|
}
|
|||
|
return accumulator;
|
|||
|
}
|
|||
|
function arrayEach(array, iteratee) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length; ++index < length && !1 !== iteratee(array[index], index, array););
|
|||
|
return array;
|
|||
|
}
|
|||
|
function arrayEachRight(array, iteratee) {
|
|||
|
for(var length = null == array ? 0 : array.length; length-- && !1 !== iteratee(array[length], length, array););
|
|||
|
return array;
|
|||
|
}
|
|||
|
function arrayEvery(array, predicate) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length; ++index < length;)if (!predicate(array[index], index, array)) return !1;
|
|||
|
return !0;
|
|||
|
}
|
|||
|
function arrayFilter(array, predicate) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length, resIndex = 0, result = []; ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
predicate(value, index, array) && (result[resIndex++] = value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function arrayIncludes(array, value) {
|
|||
|
return !!(null == array ? 0 : array.length) && baseIndexOf(array, value, 0) > -1;
|
|||
|
}
|
|||
|
function arrayIncludesWith(array, value, comparator) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length; ++index < length;)if (comparator(value, array[index])) return !0;
|
|||
|
return !1;
|
|||
|
}
|
|||
|
function arrayMap(array, iteratee) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length, result = Array(length); ++index < length;)result[index] = iteratee(array[index], index, array);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function arrayPush(array, values) {
|
|||
|
for(var index = -1, length = values.length, offset = array.length; ++index < length;)array[offset + index] = values[index];
|
|||
|
return array;
|
|||
|
}
|
|||
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|||
|
var index = -1, length = null == array ? 0 : array.length;
|
|||
|
for(initAccum && length && (accumulator = array[++index]); ++index < length;)accumulator = iteratee(accumulator, array[index], index, array);
|
|||
|
return accumulator;
|
|||
|
}
|
|||
|
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
for(initAccum && length && (accumulator = array[--length]); length--;)accumulator = iteratee(accumulator, array[length], length, array);
|
|||
|
return accumulator;
|
|||
|
}
|
|||
|
function arraySome(array, predicate) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length; ++index < length;)if (predicate(array[index], index, array)) return !0;
|
|||
|
return !1;
|
|||
|
}
|
|||
|
var asciiSize = baseProperty('length');
|
|||
|
function baseFindKey(collection, predicate, eachFunc) {
|
|||
|
var result;
|
|||
|
return eachFunc(collection, function(value, key, collection) {
|
|||
|
if (predicate(value, key, collection)) return result = key, !1;
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|||
|
for(var length = array.length, index = fromIndex + (fromRight ? 1 : -1); fromRight ? index-- : ++index < length;)if (predicate(array[index], index, array)) return index;
|
|||
|
return -1;
|
|||
|
}
|
|||
|
function baseIndexOf(array, value, fromIndex) {
|
|||
|
return value == value ? function(array, value, fromIndex) {
|
|||
|
for(var index = fromIndex - 1, length = array.length; ++index < length;)if (array[index] === value) return index;
|
|||
|
return -1;
|
|||
|
}(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|||
|
}
|
|||
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|||
|
for(var index = fromIndex - 1, length = array.length; ++index < length;)if (comparator(array[index], value)) return index;
|
|||
|
return -1;
|
|||
|
}
|
|||
|
function baseIsNaN(value) {
|
|||
|
return value != value;
|
|||
|
}
|
|||
|
function baseMean(array, iteratee) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? baseSum(array, iteratee) / length : NAN;
|
|||
|
}
|
|||
|
function baseProperty(key) {
|
|||
|
return function(object) {
|
|||
|
return null == object ? undefined : object[key];
|
|||
|
};
|
|||
|
}
|
|||
|
function basePropertyOf(object) {
|
|||
|
return function(key) {
|
|||
|
return null == object ? undefined : object[key];
|
|||
|
};
|
|||
|
}
|
|||
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|||
|
return eachFunc(collection, function(value, index, collection) {
|
|||
|
accumulator = initAccum ? (initAccum = !1, value) : iteratee(accumulator, value, index, collection);
|
|||
|
}), accumulator;
|
|||
|
}
|
|||
|
function baseSum(array, iteratee) {
|
|||
|
for(var result, index = -1, length = array.length; ++index < length;){
|
|||
|
var current = iteratee(array[index]);
|
|||
|
current !== undefined && (result = result === undefined ? current : result + current);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseTimes(n, iteratee) {
|
|||
|
for(var index = -1, result = Array(n); ++index < n;)result[index] = iteratee(index);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseTrim(string) {
|
|||
|
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string;
|
|||
|
}
|
|||
|
function baseUnary(func) {
|
|||
|
return function(value) {
|
|||
|
return func(value);
|
|||
|
};
|
|||
|
}
|
|||
|
function baseValues(object, props) {
|
|||
|
return arrayMap(props, function(key) {
|
|||
|
return object[key];
|
|||
|
});
|
|||
|
}
|
|||
|
function cacheHas(cache, key) {
|
|||
|
return cache.has(key);
|
|||
|
}
|
|||
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|||
|
for(var index = -1, length = strSymbols.length; ++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1;);
|
|||
|
return index;
|
|||
|
}
|
|||
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|||
|
for(var index = strSymbols.length; index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1;);
|
|||
|
return index;
|
|||
|
}
|
|||
|
var deburrLetter = basePropertyOf({
|
|||
|
À: 'A',
|
|||
|
Á: 'A',
|
|||
|
Â: 'A',
|
|||
|
Ã: 'A',
|
|||
|
Ä: 'A',
|
|||
|
Å: 'A',
|
|||
|
à: 'a',
|
|||
|
á: 'a',
|
|||
|
â: 'a',
|
|||
|
ã: 'a',
|
|||
|
ä: 'a',
|
|||
|
å: 'a',
|
|||
|
Ç: 'C',
|
|||
|
ç: 'c',
|
|||
|
Ð: 'D',
|
|||
|
ð: 'd',
|
|||
|
È: 'E',
|
|||
|
É: 'E',
|
|||
|
Ê: 'E',
|
|||
|
Ë: 'E',
|
|||
|
è: 'e',
|
|||
|
é: 'e',
|
|||
|
ê: 'e',
|
|||
|
ë: 'e',
|
|||
|
Ì: 'I',
|
|||
|
Í: 'I',
|
|||
|
Î: 'I',
|
|||
|
Ï: 'I',
|
|||
|
ì: 'i',
|
|||
|
í: 'i',
|
|||
|
î: 'i',
|
|||
|
ï: 'i',
|
|||
|
Ñ: 'N',
|
|||
|
ñ: 'n',
|
|||
|
Ò: 'O',
|
|||
|
Ó: 'O',
|
|||
|
Ô: 'O',
|
|||
|
Õ: 'O',
|
|||
|
Ö: 'O',
|
|||
|
Ø: 'O',
|
|||
|
ò: 'o',
|
|||
|
ó: 'o',
|
|||
|
ô: 'o',
|
|||
|
õ: 'o',
|
|||
|
ö: 'o',
|
|||
|
ø: 'o',
|
|||
|
Ù: 'U',
|
|||
|
Ú: 'U',
|
|||
|
Û: 'U',
|
|||
|
Ü: 'U',
|
|||
|
ù: 'u',
|
|||
|
ú: 'u',
|
|||
|
û: 'u',
|
|||
|
ü: 'u',
|
|||
|
Ý: 'Y',
|
|||
|
ý: 'y',
|
|||
|
ÿ: 'y',
|
|||
|
Æ: 'Ae',
|
|||
|
æ: 'ae',
|
|||
|
Þ: 'Th',
|
|||
|
þ: 'th',
|
|||
|
ß: 'ss',
|
|||
|
Ā: 'A',
|
|||
|
Ă: 'A',
|
|||
|
Ą: 'A',
|
|||
|
ā: 'a',
|
|||
|
ă: 'a',
|
|||
|
ą: 'a',
|
|||
|
Ć: 'C',
|
|||
|
Ĉ: 'C',
|
|||
|
Ċ: 'C',
|
|||
|
Č: 'C',
|
|||
|
ć: 'c',
|
|||
|
ĉ: 'c',
|
|||
|
ċ: 'c',
|
|||
|
č: 'c',
|
|||
|
Ď: 'D',
|
|||
|
Đ: 'D',
|
|||
|
ď: 'd',
|
|||
|
đ: 'd',
|
|||
|
Ē: 'E',
|
|||
|
Ĕ: 'E',
|
|||
|
Ė: 'E',
|
|||
|
Ę: 'E',
|
|||
|
Ě: 'E',
|
|||
|
ē: 'e',
|
|||
|
ĕ: 'e',
|
|||
|
ė: 'e',
|
|||
|
ę: 'e',
|
|||
|
ě: 'e',
|
|||
|
Ĝ: 'G',
|
|||
|
Ğ: 'G',
|
|||
|
Ġ: 'G',
|
|||
|
Ģ: 'G',
|
|||
|
ĝ: 'g',
|
|||
|
ğ: 'g',
|
|||
|
ġ: 'g',
|
|||
|
ģ: 'g',
|
|||
|
Ĥ: 'H',
|
|||
|
Ħ: 'H',
|
|||
|
ĥ: 'h',
|
|||
|
ħ: 'h',
|
|||
|
Ĩ: 'I',
|
|||
|
Ī: 'I',
|
|||
|
Ĭ: 'I',
|
|||
|
Į: 'I',
|
|||
|
İ: 'I',
|
|||
|
ĩ: 'i',
|
|||
|
ī: 'i',
|
|||
|
ĭ: 'i',
|
|||
|
į: 'i',
|
|||
|
ı: 'i',
|
|||
|
Ĵ: 'J',
|
|||
|
ĵ: 'j',
|
|||
|
Ķ: 'K',
|
|||
|
ķ: 'k',
|
|||
|
ĸ: 'k',
|
|||
|
Ĺ: 'L',
|
|||
|
Ļ: 'L',
|
|||
|
Ľ: 'L',
|
|||
|
Ŀ: 'L',
|
|||
|
Ł: 'L',
|
|||
|
ĺ: 'l',
|
|||
|
ļ: 'l',
|
|||
|
ľ: 'l',
|
|||
|
ŀ: 'l',
|
|||
|
ł: 'l',
|
|||
|
Ń: 'N',
|
|||
|
Ņ: 'N',
|
|||
|
Ň: 'N',
|
|||
|
Ŋ: 'N',
|
|||
|
ń: 'n',
|
|||
|
ņ: 'n',
|
|||
|
ň: 'n',
|
|||
|
ŋ: 'n',
|
|||
|
Ō: 'O',
|
|||
|
Ŏ: 'O',
|
|||
|
Ő: 'O',
|
|||
|
ō: 'o',
|
|||
|
ŏ: 'o',
|
|||
|
ő: 'o',
|
|||
|
Ŕ: 'R',
|
|||
|
Ŗ: 'R',
|
|||
|
Ř: 'R',
|
|||
|
ŕ: 'r',
|
|||
|
ŗ: 'r',
|
|||
|
ř: 'r',
|
|||
|
Ś: 'S',
|
|||
|
Ŝ: 'S',
|
|||
|
Ş: 'S',
|
|||
|
Š: 'S',
|
|||
|
ś: 's',
|
|||
|
ŝ: 's',
|
|||
|
ş: 's',
|
|||
|
š: 's',
|
|||
|
Ţ: 'T',
|
|||
|
Ť: 'T',
|
|||
|
Ŧ: 'T',
|
|||
|
ţ: 't',
|
|||
|
ť: 't',
|
|||
|
ŧ: 't',
|
|||
|
Ũ: 'U',
|
|||
|
Ū: 'U',
|
|||
|
Ŭ: 'U',
|
|||
|
Ů: 'U',
|
|||
|
Ű: 'U',
|
|||
|
Ų: 'U',
|
|||
|
ũ: 'u',
|
|||
|
ū: 'u',
|
|||
|
ŭ: 'u',
|
|||
|
ů: 'u',
|
|||
|
ű: 'u',
|
|||
|
ų: 'u',
|
|||
|
Ŵ: 'W',
|
|||
|
ŵ: 'w',
|
|||
|
Ŷ: 'Y',
|
|||
|
ŷ: 'y',
|
|||
|
Ÿ: 'Y',
|
|||
|
Ź: 'Z',
|
|||
|
Ż: 'Z',
|
|||
|
Ž: 'Z',
|
|||
|
ź: 'z',
|
|||
|
ż: 'z',
|
|||
|
ž: 'z',
|
|||
|
IJ: 'IJ',
|
|||
|
ij: 'ij',
|
|||
|
Œ: 'Oe',
|
|||
|
œ: 'oe',
|
|||
|
ʼn: "'n",
|
|||
|
ſ: 's'
|
|||
|
}), escapeHtmlChar = basePropertyOf({
|
|||
|
'&': '&',
|
|||
|
'<': '<',
|
|||
|
'>': '>',
|
|||
|
'"': '"',
|
|||
|
"'": '''
|
|||
|
});
|
|||
|
function escapeStringChar(chr) {
|
|||
|
return '\\' + stringEscapes[chr];
|
|||
|
}
|
|||
|
function hasUnicode(string) {
|
|||
|
return reHasUnicode.test(string);
|
|||
|
}
|
|||
|
function mapToArray(map) {
|
|||
|
var index = -1, result = Array(map.size);
|
|||
|
return map.forEach(function(value, key) {
|
|||
|
result[++index] = [
|
|||
|
key,
|
|||
|
value
|
|||
|
];
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function overArg(func, transform) {
|
|||
|
return function(arg) {
|
|||
|
return func(transform(arg));
|
|||
|
};
|
|||
|
}
|
|||
|
function replaceHolders(array, placeholder) {
|
|||
|
for(var index = -1, length = array.length, resIndex = 0, result = []; ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
(value === placeholder || value === PLACEHOLDER) && (array[index] = PLACEHOLDER, result[resIndex++] = index);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function setToArray(set) {
|
|||
|
var index = -1, result = Array(set.size);
|
|||
|
return set.forEach(function(value) {
|
|||
|
result[++index] = value;
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function stringSize(string) {
|
|||
|
return hasUnicode(string) ? function(string) {
|
|||
|
for(var result = reUnicode.lastIndex = 0; reUnicode.test(string);)++result;
|
|||
|
return result;
|
|||
|
}(string) : asciiSize(string);
|
|||
|
}
|
|||
|
function stringToArray(string) {
|
|||
|
var string1, string2;
|
|||
|
return hasUnicode(string) ? (string2 = string, string2.match(reUnicode) || []) : string.split('');
|
|||
|
}
|
|||
|
function trimmedEndIndex(string) {
|
|||
|
for(var index = string.length; index-- && reWhitespace.test(string.charAt(index)););
|
|||
|
return index;
|
|||
|
}
|
|||
|
var unescapeHtmlChar = basePropertyOf({
|
|||
|
'&': '&',
|
|||
|
'<': '<',
|
|||
|
'>': '>',
|
|||
|
'"': '"',
|
|||
|
''': "'"
|
|||
|
}), _ = function runInContext(context) {
|
|||
|
var uid, Array1 = (context = null == context ? root : _.defaults(root.Object(), context, _.pick(root, contextProps))).Array, Date = context.Date, Error = context.Error, Function1 = context.Function, Math = context.Math, Object1 = context.Object, RegExp1 = context.RegExp, String = context.String, TypeError = context.TypeError, arrayProto = Array1.prototype, funcProto = Function1.prototype, objectProto = Object1.prototype, coreJsData = context['__core-js_shared__'], funcToString = funcProto.toString, hasOwnProperty = objectProto.hasOwnProperty, idCounter = 0, maskSrcKey = (uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '')) ? 'Symbol(src)_1.' + uid : '', nativeObjectToString = objectProto.toString, objectCtorString = funcToString.call(Object1), oldDash = root._, reIsNative = RegExp1('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'), Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object1.getPrototypeOf, Object1), objectCreate = Object1.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined, defineProperty = function() {
|
|||
|
try {
|
|||
|
var func = getNative(Object1, 'defineProperty');
|
|||
|
return func({}, '', {}), func;
|
|||
|
} catch (e) {}
|
|||
|
}(), ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout, nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object1.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object1.keys, Object1), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse, DataView = getNative(context, 'DataView'), Map = getNative(context, 'Map'), Promise = getNative(context, 'Promise'), Set = getNative(context, 'Set'), WeakMap = getNative(context, 'WeakMap'), nativeCreate = getNative(Object1, 'create'), metaMap = WeakMap && new WeakMap, realNames = {}, dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap), symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|||
|
function lodash(value) {
|
|||
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|||
|
if (value instanceof LodashWrapper) return value;
|
|||
|
if (hasOwnProperty.call(value, '__wrapped__')) return wrapperClone(value);
|
|||
|
}
|
|||
|
return new LodashWrapper(value);
|
|||
|
}
|
|||
|
var baseCreate = function() {
|
|||
|
function object() {}
|
|||
|
return function(proto) {
|
|||
|
if (!isObject(proto)) return {};
|
|||
|
if (objectCreate) return objectCreate(proto);
|
|||
|
object.prototype = proto;
|
|||
|
var result = new object;
|
|||
|
return object.prototype = undefined, result;
|
|||
|
};
|
|||
|
}();
|
|||
|
function baseLodash() {}
|
|||
|
function LodashWrapper(value, chainAll) {
|
|||
|
this.__wrapped__ = value, this.__actions__ = [], this.__chain__ = !!chainAll, this.__index__ = 0, this.__values__ = undefined;
|
|||
|
}
|
|||
|
function LazyWrapper(value) {
|
|||
|
this.__wrapped__ = value, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = 4294967295, this.__views__ = [];
|
|||
|
}
|
|||
|
function Hash(entries) {
|
|||
|
var index = -1, length = null == entries ? 0 : entries.length;
|
|||
|
for(this.clear(); ++index < length;){
|
|||
|
var entry = entries[index];
|
|||
|
this.set(entry[0], entry[1]);
|
|||
|
}
|
|||
|
}
|
|||
|
function ListCache(entries) {
|
|||
|
var index = -1, length = null == entries ? 0 : entries.length;
|
|||
|
for(this.clear(); ++index < length;){
|
|||
|
var entry = entries[index];
|
|||
|
this.set(entry[0], entry[1]);
|
|||
|
}
|
|||
|
}
|
|||
|
function MapCache(entries) {
|
|||
|
var index = -1, length = null == entries ? 0 : entries.length;
|
|||
|
for(this.clear(); ++index < length;){
|
|||
|
var entry = entries[index];
|
|||
|
this.set(entry[0], entry[1]);
|
|||
|
}
|
|||
|
}
|
|||
|
function SetCache(values) {
|
|||
|
var index = -1, length = null == values ? 0 : values.length;
|
|||
|
for(this.__data__ = new MapCache; ++index < length;)this.add(values[index]);
|
|||
|
}
|
|||
|
function Stack(entries) {
|
|||
|
var data = this.__data__ = new ListCache(entries);
|
|||
|
this.size = data.size;
|
|||
|
}
|
|||
|
function arrayLikeKeys(value, inherited) {
|
|||
|
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|||
|
for(var key in value)(inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ('length' == key || isBuff && ('offset' == key || 'parent' == key) || isType && ('buffer' == key || 'byteLength' == key || 'byteOffset' == key) || isIndex(key, length))) && result.push(key);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function arraySample(array) {
|
|||
|
var length = array.length;
|
|||
|
return length ? array[baseRandom(0, length - 1)] : undefined;
|
|||
|
}
|
|||
|
function arraySampleSize(array, n) {
|
|||
|
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
|
|||
|
}
|
|||
|
function arrayShuffle(array) {
|
|||
|
return shuffleSelf(copyArray(array));
|
|||
|
}
|
|||
|
function assignMergeValue(object, key, value) {
|
|||
|
(value === undefined || eq(object[key], value)) && (value !== undefined || key in object) || baseAssignValue(object, key, value);
|
|||
|
}
|
|||
|
function assignValue(object, key, value) {
|
|||
|
var objValue = object[key];
|
|||
|
hasOwnProperty.call(object, key) && eq(objValue, value) && (value !== undefined || key in object) || baseAssignValue(object, key, value);
|
|||
|
}
|
|||
|
function assocIndexOf(array, key) {
|
|||
|
for(var length = array.length; length--;)if (eq(array[length][0], key)) return length;
|
|||
|
return -1;
|
|||
|
}
|
|||
|
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|||
|
return baseEach(collection, function(value, key, collection) {
|
|||
|
setter(accumulator, value, iteratee(value), collection);
|
|||
|
}), accumulator;
|
|||
|
}
|
|||
|
function baseAssign(object, source) {
|
|||
|
return object && copyObject(source, keys(source), object);
|
|||
|
}
|
|||
|
function baseAssignValue(object, key, value) {
|
|||
|
'__proto__' == key && defineProperty ? defineProperty(object, key, {
|
|||
|
configurable: !0,
|
|||
|
enumerable: !0,
|
|||
|
value: value,
|
|||
|
writable: !0
|
|||
|
}) : object[key] = value;
|
|||
|
}
|
|||
|
function baseAt(object, paths) {
|
|||
|
for(var index = -1, length = paths.length, result = Array1(length), skip = null == object; ++index < length;)result[index] = skip ? undefined : get(object, paths[index]);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseClamp(number, lower, upper) {
|
|||
|
return number == number && (upper !== undefined && (number = number <= upper ? number : upper), lower !== undefined && (number = number >= lower ? number : lower)), number;
|
|||
|
}
|
|||
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|||
|
var result, isDeep = 1 & bitmask, isFlat = 2 & bitmask;
|
|||
|
if (customizer && (result = object ? customizer(value, key, object, stack) : customizer(value)), result !== undefined) return result;
|
|||
|
if (!isObject(value)) return value;
|
|||
|
var isArr = isArray(value);
|
|||
|
if (isArr) {
|
|||
|
if (length = (array = value).length, result1 = new array.constructor(length), result = (length && 'string' == typeof array[0] && hasOwnProperty.call(array, 'index') && (result1.index = array.index, result1.input = array.input), result1), !isDeep) return copyArray(value, result);
|
|||
|
} else {
|
|||
|
var array, length, result1, source, object1, source1, object2, object3, source2, tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|||
|
if (isBuffer(value)) return cloneBuffer(value, isDeep);
|
|||
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|||
|
if (result = isFlat || isFunc ? {} : initCloneObject(value), !isDeep) {
|
|||
|
return isFlat ? (source = value, object1 = (object3 = result, source2 = value, object3 && copyObject(source2, keysIn(source2), object3)), copyObject(source, getSymbolsIn(source), object1)) : (source1 = value, object2 = baseAssign(result, value), copyObject(source1, getSymbols(source1), object2));
|
|||
|
}
|
|||
|
} else {
|
|||
|
if (!cloneableTags[tag]) return object ? value : {};
|
|||
|
result = function(object, tag, isDeep) {
|
|||
|
var dataView, isDeep1, buffer, regexp, result, symbol, Ctor = object.constructor;
|
|||
|
switch(tag){
|
|||
|
case arrayBufferTag:
|
|||
|
return cloneArrayBuffer(object);
|
|||
|
case boolTag:
|
|||
|
case dateTag:
|
|||
|
return new Ctor(+object);
|
|||
|
case dataViewTag:
|
|||
|
return buffer = isDeep ? cloneArrayBuffer(object.buffer) : object.buffer, new object.constructor(buffer, object.byteOffset, object.byteLength);
|
|||
|
case float32Tag:
|
|||
|
case float64Tag:
|
|||
|
case int8Tag:
|
|||
|
case int16Tag:
|
|||
|
case int32Tag:
|
|||
|
case uint8Tag:
|
|||
|
case uint8ClampedTag:
|
|||
|
case uint16Tag:
|
|||
|
case uint32Tag:
|
|||
|
return cloneTypedArray(object, isDeep);
|
|||
|
case mapTag:
|
|||
|
return new Ctor;
|
|||
|
case numberTag:
|
|||
|
case stringTag:
|
|||
|
return new Ctor(object);
|
|||
|
case regexpTag:
|
|||
|
return (result = new object.constructor(object.source, reFlags.exec(object))).lastIndex = object.lastIndex, result;
|
|||
|
case setTag:
|
|||
|
return new Ctor;
|
|||
|
case symbolTag:
|
|||
|
return symbolValueOf ? Object1(symbolValueOf.call(object)) : {};
|
|||
|
}
|
|||
|
}(value, tag, isDeep);
|
|||
|
}
|
|||
|
}
|
|||
|
stack || (stack = new Stack);
|
|||
|
var stacked = stack.get(value);
|
|||
|
if (stacked) return stacked;
|
|||
|
stack.set(value, result), isSet(value) ? value.forEach(function(subValue) {
|
|||
|
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|||
|
}) : isMap(value) && value.forEach(function(subValue, key) {
|
|||
|
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|||
|
});
|
|||
|
var props = isArr ? undefined : (4 & bitmask ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys)(value);
|
|||
|
return arrayEach(props || value, function(subValue, key) {
|
|||
|
props && (subValue = value[key = subValue]), assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function baseConformsTo(object, source, props) {
|
|||
|
var length = props.length;
|
|||
|
if (null == object) return !length;
|
|||
|
for(object = Object1(object); length--;){
|
|||
|
var key = props[length], predicate = source[key], value = object[key];
|
|||
|
if (value === undefined && !(key in object) || !predicate(value)) return !1;
|
|||
|
}
|
|||
|
return !0;
|
|||
|
}
|
|||
|
function baseDelay(func, wait, args) {
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return setTimeout(function() {
|
|||
|
func.apply(undefined, args);
|
|||
|
}, wait);
|
|||
|
}
|
|||
|
function baseDifference(array, values, iteratee, comparator) {
|
|||
|
var index = -1, includes = arrayIncludes, isCommon = !0, length = array.length, result = [], valuesLength = values.length;
|
|||
|
if (!length) return result;
|
|||
|
iteratee && (values = arrayMap(values, baseUnary(iteratee))), comparator ? (includes = arrayIncludesWith, isCommon = !1) : values.length >= 200 && (includes = cacheHas, isCommon = !1, values = new SetCache(values));
|
|||
|
outer: for(; ++index < length;){
|
|||
|
var value = array[index], computed = null == iteratee ? value : iteratee(value);
|
|||
|
if (value = comparator || 0 !== value ? value : 0, isCommon && computed == computed) {
|
|||
|
for(var valuesIndex = valuesLength; valuesIndex--;)if (values[valuesIndex] === computed) continue outer;
|
|||
|
result.push(value);
|
|||
|
} else includes(values, computed, comparator) || result.push(value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
lodash.templateSettings = {
|
|||
|
escape: reEscape,
|
|||
|
evaluate: reEvaluate,
|
|||
|
interpolate: reInterpolate,
|
|||
|
variable: '',
|
|||
|
imports: {
|
|||
|
_: lodash
|
|||
|
}
|
|||
|
}, lodash.prototype = baseLodash.prototype, lodash.prototype.constructor = lodash, LodashWrapper.prototype = baseCreate(baseLodash.prototype), LodashWrapper.prototype.constructor = LodashWrapper, LazyWrapper.prototype = baseCreate(baseLodash.prototype), LazyWrapper.prototype.constructor = LazyWrapper, Hash.prototype.clear = function() {
|
|||
|
this.__data__ = nativeCreate ? nativeCreate(null) : {}, this.size = 0;
|
|||
|
}, Hash.prototype.delete = function(key) {
|
|||
|
var result = this.has(key) && delete this.__data__[key];
|
|||
|
return this.size -= result ? 1 : 0, result;
|
|||
|
}, Hash.prototype.get = function(key) {
|
|||
|
var data = this.__data__;
|
|||
|
if (nativeCreate) {
|
|||
|
var result = data[key];
|
|||
|
return result === HASH_UNDEFINED ? undefined : result;
|
|||
|
}
|
|||
|
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|||
|
}, Hash.prototype.has = function(key) {
|
|||
|
var data = this.__data__;
|
|||
|
return nativeCreate ? undefined !== data[key] : hasOwnProperty.call(data, key);
|
|||
|
}, Hash.prototype.set = function(key, value) {
|
|||
|
var data = this.__data__;
|
|||
|
return this.size += this.has(key) ? 0 : 1, data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value, this;
|
|||
|
}, ListCache.prototype.clear = function() {
|
|||
|
this.__data__ = [], this.size = 0;
|
|||
|
}, ListCache.prototype.delete = function(key) {
|
|||
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|||
|
return !(index < 0) && (index == data.length - 1 ? data.pop() : splice.call(data, index, 1), --this.size, !0);
|
|||
|
}, ListCache.prototype.get = function(key) {
|
|||
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|||
|
return index < 0 ? undefined : data[index][1];
|
|||
|
}, ListCache.prototype.has = function(key) {
|
|||
|
return assocIndexOf(this.__data__, key) > -1;
|
|||
|
}, ListCache.prototype.set = function(key, value) {
|
|||
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|||
|
return index < 0 ? (++this.size, data.push([
|
|||
|
key,
|
|||
|
value
|
|||
|
])) : data[index][1] = value, this;
|
|||
|
}, MapCache.prototype.clear = function() {
|
|||
|
this.size = 0, this.__data__ = {
|
|||
|
hash: new Hash,
|
|||
|
map: new (Map || ListCache),
|
|||
|
string: new Hash
|
|||
|
};
|
|||
|
}, MapCache.prototype.delete = function(key) {
|
|||
|
var result = getMapData(this, key).delete(key);
|
|||
|
return this.size -= result ? 1 : 0, result;
|
|||
|
}, MapCache.prototype.get = function(key) {
|
|||
|
return getMapData(this, key).get(key);
|
|||
|
}, MapCache.prototype.has = function(key) {
|
|||
|
return getMapData(this, key).has(key);
|
|||
|
}, MapCache.prototype.set = function(key, value) {
|
|||
|
var data = getMapData(this, key), size = data.size;
|
|||
|
return data.set(key, value), this.size += data.size == size ? 0 : 1, this;
|
|||
|
}, SetCache.prototype.add = SetCache.prototype.push = function(value) {
|
|||
|
return this.__data__.set(value, HASH_UNDEFINED), this;
|
|||
|
}, SetCache.prototype.has = function(value) {
|
|||
|
return this.__data__.has(value);
|
|||
|
}, Stack.prototype.clear = function() {
|
|||
|
this.__data__ = new ListCache, this.size = 0;
|
|||
|
}, Stack.prototype.delete = function(key) {
|
|||
|
var data = this.__data__, result = data.delete(key);
|
|||
|
return this.size = data.size, result;
|
|||
|
}, Stack.prototype.get = function(key) {
|
|||
|
return this.__data__.get(key);
|
|||
|
}, Stack.prototype.has = function(key) {
|
|||
|
return this.__data__.has(key);
|
|||
|
}, Stack.prototype.set = function(key, value) {
|
|||
|
var data = this.__data__;
|
|||
|
if (data instanceof ListCache) {
|
|||
|
var pairs = data.__data__;
|
|||
|
if (!Map || pairs.length < 199) return pairs.push([
|
|||
|
key,
|
|||
|
value
|
|||
|
]), this.size = ++data.size, this;
|
|||
|
data = this.__data__ = new MapCache(pairs);
|
|||
|
}
|
|||
|
return data.set(key, value), this.size = data.size, this;
|
|||
|
};
|
|||
|
var baseEach = createBaseEach(baseForOwn), baseEachRight = createBaseEach(baseForOwnRight, !0);
|
|||
|
function baseEvery(collection, predicate) {
|
|||
|
var result = !0;
|
|||
|
return baseEach(collection, function(value, index, collection) {
|
|||
|
return result = !!predicate(value, index, collection);
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function baseExtremum(array, iteratee, comparator) {
|
|||
|
for(var index = -1, length = array.length; ++index < length;){
|
|||
|
var value = array[index], current = iteratee(value);
|
|||
|
if (null != current && (computed === undefined ? current == current && !isSymbol(current) : comparator(current, computed))) var computed = current, result = value;
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseFilter(collection, predicate) {
|
|||
|
var result = [];
|
|||
|
return baseEach(collection, function(value, index, collection) {
|
|||
|
predicate(value, index, collection) && result.push(value);
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|||
|
var index = -1, length = array.length;
|
|||
|
for(predicate || (predicate = isFlattenable), result || (result = []); ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
depth > 0 && predicate(value) ? depth > 1 ? baseFlatten(value, depth - 1, predicate, isStrict, result) : arrayPush(result, value) : isStrict || (result[result.length] = value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
var baseFor = createBaseFor(), baseForRight = createBaseFor(!0);
|
|||
|
function baseForOwn(object, iteratee) {
|
|||
|
return object && baseFor(object, iteratee, keys);
|
|||
|
}
|
|||
|
function baseForOwnRight(object, iteratee) {
|
|||
|
return object && baseForRight(object, iteratee, keys);
|
|||
|
}
|
|||
|
function baseFunctions(object, props) {
|
|||
|
return arrayFilter(props, function(key) {
|
|||
|
return isFunction(object[key]);
|
|||
|
});
|
|||
|
}
|
|||
|
function baseGet(object, path) {
|
|||
|
path = castPath(path, object);
|
|||
|
for(var index = 0, length = path.length; null != object && index < length;)object = object[toKey(path[index++])];
|
|||
|
return index && index == length ? object : undefined;
|
|||
|
}
|
|||
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|||
|
var result = keysFunc(object);
|
|||
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|||
|
}
|
|||
|
function baseGetTag(value) {
|
|||
|
var value1;
|
|||
|
return null == value ? value === undefined ? '[object Undefined]' : '[object Null]' : symToStringTag && symToStringTag in Object1(value) ? function(value) {
|
|||
|
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|||
|
try {
|
|||
|
value[symToStringTag] = undefined;
|
|||
|
var unmasked = !0;
|
|||
|
} catch (e) {}
|
|||
|
var result = nativeObjectToString.call(value);
|
|||
|
return unmasked && (isOwn ? value[symToStringTag] = tag : delete value[symToStringTag]), result;
|
|||
|
}(value) : (value1 = value, nativeObjectToString.call(value1));
|
|||
|
}
|
|||
|
function baseGt(value, other) {
|
|||
|
return value > other;
|
|||
|
}
|
|||
|
function baseHas(object, key) {
|
|||
|
return null != object && hasOwnProperty.call(object, key);
|
|||
|
}
|
|||
|
function baseHasIn(object, key) {
|
|||
|
return null != object && key in Object1(object);
|
|||
|
}
|
|||
|
function baseIntersection(arrays, iteratee, comparator) {
|
|||
|
for(var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array1(othLength), maxLength = 1 / 0, result = []; othIndex--;){
|
|||
|
var array = arrays[othIndex];
|
|||
|
othIndex && iteratee && (array = arrayMap(array, baseUnary(iteratee))), maxLength = nativeMin(array.length, maxLength), caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
|
|||
|
}
|
|||
|
array = arrays[0];
|
|||
|
var index = -1, seen = caches[0];
|
|||
|
outer: for(; ++index < length && result.length < maxLength;){
|
|||
|
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|||
|
if (value = comparator || 0 !== value ? value : 0, !(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) {
|
|||
|
for(othIndex = othLength; --othIndex;){
|
|||
|
var cache = caches[othIndex];
|
|||
|
if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) continue outer;
|
|||
|
}
|
|||
|
seen && seen.push(computed), result.push(value);
|
|||
|
}
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseInvoke(object, path, args) {
|
|||
|
path = castPath(path, object);
|
|||
|
var func = null == (object = parent(object, path)) ? object : object[toKey(last(path))];
|
|||
|
return null == func ? undefined : apply(func, object, args);
|
|||
|
}
|
|||
|
function baseIsArguments(value) {
|
|||
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|||
|
}
|
|||
|
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|||
|
return value === other || (null != value && null != other && (isObjectLike(value) || isObjectLike(other)) ? function(object, other, bitmask, customizer, equalFunc, stack) {
|
|||
|
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|||
|
objTag = objTag == argsTag ? objectTag : objTag, othTag = othTag == argsTag ? objectTag : othTag;
|
|||
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|||
|
if (isSameTag && isBuffer(object)) {
|
|||
|
if (!isBuffer(other)) return !1;
|
|||
|
objIsArr = !0, objIsObj = !1;
|
|||
|
}
|
|||
|
if (isSameTag && !objIsObj) return stack || (stack = new Stack), objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : function(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|||
|
switch(tag){
|
|||
|
case dataViewTag:
|
|||
|
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) break;
|
|||
|
object = object.buffer, other = other.buffer;
|
|||
|
case arrayBufferTag:
|
|||
|
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) break;
|
|||
|
return !0;
|
|||
|
case boolTag:
|
|||
|
case dateTag:
|
|||
|
case numberTag:
|
|||
|
return eq(+object, +other);
|
|||
|
case errorTag:
|
|||
|
return object.name == other.name && object.message == other.message;
|
|||
|
case regexpTag:
|
|||
|
case stringTag:
|
|||
|
return object == other + '';
|
|||
|
case mapTag:
|
|||
|
var convert = mapToArray;
|
|||
|
case setTag:
|
|||
|
var isPartial = 1 & bitmask;
|
|||
|
if (convert || (convert = setToArray), object.size != other.size && !isPartial) break;
|
|||
|
var stacked = stack.get(object);
|
|||
|
if (stacked) return stacked == other;
|
|||
|
bitmask |= 2, stack.set(object, other);
|
|||
|
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|||
|
return stack.delete(object), result;
|
|||
|
case symbolTag:
|
|||
|
if (symbolValueOf) return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|||
|
}
|
|||
|
return !1;
|
|||
|
}(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|||
|
if (!(1 & bitmask)) {
|
|||
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|||
|
if (objIsWrapped || othIsWrapped) {
|
|||
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|||
|
return stack || (stack = new Stack), equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|||
|
}
|
|||
|
}
|
|||
|
return !!isSameTag && (stack || (stack = new Stack), function(object, other, bitmask, customizer, equalFunc, stack) {
|
|||
|
var isPartial = 1 & bitmask, objProps = getAllKeys(object), objLength = objProps.length, othLength = getAllKeys(other).length;
|
|||
|
if (objLength != othLength && !isPartial) return !1;
|
|||
|
for(var index = objLength; index--;){
|
|||
|
var key = objProps[index];
|
|||
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) return !1;
|
|||
|
}
|
|||
|
var objStacked = stack.get(object), othStacked = stack.get(other);
|
|||
|
if (objStacked && othStacked) return objStacked == other && othStacked == object;
|
|||
|
var result = !0;
|
|||
|
stack.set(object, other), stack.set(other, object);
|
|||
|
for(var skipCtor = isPartial; ++index < objLength;){
|
|||
|
var objValue = object[key = objProps[index]], othValue = other[key];
|
|||
|
if (customizer) var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|||
|
if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|||
|
result = !1;
|
|||
|
break;
|
|||
|
}
|
|||
|
skipCtor || (skipCtor = 'constructor' == key);
|
|||
|
}
|
|||
|
if (result && !skipCtor) {
|
|||
|
var objCtor = object.constructor, othCtor = other.constructor;
|
|||
|
objCtor != othCtor && 'constructor' in object && 'constructor' in other && !('function' == typeof objCtor && objCtor instanceof objCtor && 'function' == typeof othCtor && othCtor instanceof othCtor) && (result = !1);
|
|||
|
}
|
|||
|
return stack.delete(object), stack.delete(other), result;
|
|||
|
}(object, other, bitmask, customizer, equalFunc, stack));
|
|||
|
}(value, other, bitmask, customizer, baseIsEqual, stack) : value != value && other != other);
|
|||
|
}
|
|||
|
function baseIsMatch(object, source, matchData, customizer) {
|
|||
|
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|||
|
if (null == object) return !length;
|
|||
|
for(object = Object1(object); index--;){
|
|||
|
var data = matchData[index];
|
|||
|
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) return !1;
|
|||
|
}
|
|||
|
for(; ++index < length;){
|
|||
|
var key = (data = matchData[index])[0], objValue = object[key], srcValue = data[1];
|
|||
|
if (noCustomizer && data[2]) {
|
|||
|
if (objValue === undefined && !(key in object)) return !1;
|
|||
|
} else {
|
|||
|
var stack = new Stack;
|
|||
|
if (customizer) var result = customizer(objValue, srcValue, key, object, source, stack);
|
|||
|
if (!(result === undefined ? baseIsEqual(srcValue, objValue, 3, customizer, stack) : result)) return !1;
|
|||
|
}
|
|||
|
}
|
|||
|
return !0;
|
|||
|
}
|
|||
|
function baseIsNative(value) {
|
|||
|
var func;
|
|||
|
return !(!isObject(value) || (func = value, maskSrcKey && maskSrcKey in func)) && (isFunction(value) ? reIsNative : reIsHostCtor).test(toSource(value));
|
|||
|
}
|
|||
|
function baseIteratee(value) {
|
|||
|
return 'function' == typeof value ? value : null == value ? identity : 'object' == typeof value ? isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value) : property(value);
|
|||
|
}
|
|||
|
function baseKeys(object) {
|
|||
|
if (!isPrototype(object)) return nativeKeys(object);
|
|||
|
var result = [];
|
|||
|
for(var key in Object1(object))hasOwnProperty.call(object, key) && 'constructor' != key && result.push(key);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseLt(value, other) {
|
|||
|
return value < other;
|
|||
|
}
|
|||
|
function baseMap(collection, iteratee) {
|
|||
|
var index = -1, result = isArrayLike(collection) ? Array1(collection.length) : [];
|
|||
|
return baseEach(collection, function(value, key, collection) {
|
|||
|
result[++index] = iteratee(value, key, collection);
|
|||
|
}), result;
|
|||
|
}
|
|||
|
function baseMatches(source) {
|
|||
|
var matchData = getMatchData(source);
|
|||
|
return 1 == matchData.length && matchData[0][2] ? matchesStrictComparable(matchData[0][0], matchData[0][1]) : function(object) {
|
|||
|
return object === source || baseIsMatch(object, source, matchData);
|
|||
|
};
|
|||
|
}
|
|||
|
function baseMatchesProperty(path, srcValue) {
|
|||
|
return isKey(path) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path), srcValue) : function(object) {
|
|||
|
var objValue = get(object, path);
|
|||
|
return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, 3);
|
|||
|
};
|
|||
|
}
|
|||
|
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|||
|
object !== source && baseFor(source, function(srcValue, key) {
|
|||
|
if (stack || (stack = new Stack), isObject(srcValue)) !function(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|||
|
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
|||
|
if (stacked) {
|
|||
|
assignMergeValue(object, key, stacked);
|
|||
|
return;
|
|||
|
}
|
|||
|
var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined, isCommon = newValue === undefined;
|
|||
|
if (isCommon) {
|
|||
|
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|||
|
newValue = srcValue, isArr || isBuff || isTyped ? isArray(objValue) ? newValue = objValue : isArrayLikeObject(objValue) ? newValue = copyArray(objValue) : isBuff ? (isCommon = !1, newValue = cloneBuffer(srcValue, !0)) : isTyped ? (isCommon = !1, newValue = cloneTypedArray(srcValue, !0)) : newValue = [] : isPlainObject(srcValue) || isArguments(srcValue) ? (newValue = objValue, isArguments(objValue) ? newValue = toPlainObject(objValue) : (!isObject(objValue) || isFunction(objValue)) && (newValue = initCloneObject(srcValue))) : isCommon = !1;
|
|||
|
}
|
|||
|
isCommon && (stack.set(srcValue, newValue), mergeFunc(newValue, srcValue, srcIndex, customizer, stack), stack.delete(srcValue)), assignMergeValue(object, key, newValue);
|
|||
|
}(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|||
|
else {
|
|||
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) : undefined;
|
|||
|
newValue === undefined && (newValue = srcValue), assignMergeValue(object, key, newValue);
|
|||
|
}
|
|||
|
}, keysIn);
|
|||
|
}
|
|||
|
function baseNth(array, n) {
|
|||
|
var length = array.length;
|
|||
|
if (length) return isIndex(n += n < 0 ? length : 0, length) ? array[n] : undefined;
|
|||
|
}
|
|||
|
function baseOrderBy(collection, iteratees, orders) {
|
|||
|
iteratees = iteratees.length ? arrayMap(iteratees, function(iteratee) {
|
|||
|
return isArray(iteratee) ? function(value) {
|
|||
|
return baseGet(value, 1 === iteratee.length ? iteratee[0] : iteratee);
|
|||
|
} : iteratee;
|
|||
|
}) : [
|
|||
|
identity
|
|||
|
];
|
|||
|
var index = -1;
|
|||
|
return iteratees = arrayMap(iteratees, baseUnary(getIteratee())), function(array, comparer) {
|
|||
|
var length = array.length;
|
|||
|
for(array.sort(comparer); length--;)array[length] = array[length].value;
|
|||
|
return array;
|
|||
|
}(baseMap(collection, function(value, key, collection) {
|
|||
|
return {
|
|||
|
criteria: arrayMap(iteratees, function(iteratee) {
|
|||
|
return iteratee(value);
|
|||
|
}),
|
|||
|
index: ++index,
|
|||
|
value: value
|
|||
|
};
|
|||
|
}), function(object, other) {
|
|||
|
return function(object, other, orders) {
|
|||
|
for(var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; ++index < length;){
|
|||
|
var result = compareAscending(objCriteria[index], othCriteria[index]);
|
|||
|
if (result) {
|
|||
|
if (index >= ordersLength) return result;
|
|||
|
return result * ('desc' == orders[index] ? -1 : 1);
|
|||
|
}
|
|||
|
}
|
|||
|
return object.index - other.index;
|
|||
|
}(object, other, orders);
|
|||
|
});
|
|||
|
}
|
|||
|
function basePickBy(object, paths, predicate) {
|
|||
|
for(var index = -1, length = paths.length, result = {}; ++index < length;){
|
|||
|
var path = paths[index], value = baseGet(object, path);
|
|||
|
predicate(value, path) && baseSet(result, castPath(path, object), value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function basePullAll(array, values, iteratee, comparator) {
|
|||
|
var indexOf = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values.length, seen = array;
|
|||
|
for(array === values && (values = copyArray(values)), iteratee && (seen = arrayMap(array, baseUnary(iteratee))); ++index < length;)for(var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value; (fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1;)seen !== array && splice.call(seen, fromIndex, 1), splice.call(array, fromIndex, 1);
|
|||
|
return array;
|
|||
|
}
|
|||
|
function basePullAt(array, indexes) {
|
|||
|
for(var length = array ? indexes.length : 0, lastIndex = length - 1; length--;){
|
|||
|
var index = indexes[length];
|
|||
|
if (length == lastIndex || index !== previous) {
|
|||
|
var previous = index;
|
|||
|
isIndex(index) ? splice.call(array, index, 1) : baseUnset(array, index);
|
|||
|
}
|
|||
|
}
|
|||
|
return array;
|
|||
|
}
|
|||
|
function baseRandom(lower, upper) {
|
|||
|
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
|
|||
|
}
|
|||
|
function baseRepeat(string, n) {
|
|||
|
var result = '';
|
|||
|
if (!string || n < 1 || n > 9007199254740991) return result;
|
|||
|
do n % 2 && (result += string), (n = nativeFloor(n / 2)) && (string += string);
|
|||
|
while (n)
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseRest(func, start) {
|
|||
|
return setToString(overRest(func, start, identity), func + '');
|
|||
|
}
|
|||
|
function baseSample(collection) {
|
|||
|
return arraySample(values(collection));
|
|||
|
}
|
|||
|
function baseSampleSize(collection, n) {
|
|||
|
var array = values(collection);
|
|||
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|||
|
}
|
|||
|
function baseSet(object, path, value, customizer) {
|
|||
|
if (!isObject(object)) return object;
|
|||
|
path = castPath(path, object);
|
|||
|
for(var index = -1, length = path.length, lastIndex = length - 1, nested = object; null != nested && ++index < length;){
|
|||
|
var key = toKey(path[index]), newValue = value;
|
|||
|
if ('__proto__' === key || 'constructor' === key || 'prototype' === key) break;
|
|||
|
if (index != lastIndex) {
|
|||
|
var objValue = nested[key];
|
|||
|
undefined === (newValue = customizer ? customizer(objValue, key, nested) : undefined) && (newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {});
|
|||
|
}
|
|||
|
assignValue(nested, key, newValue), nested = nested[key];
|
|||
|
}
|
|||
|
return object;
|
|||
|
}
|
|||
|
var baseSetData = metaMap ? function(func, data) {
|
|||
|
return metaMap.set(func, data), func;
|
|||
|
} : identity;
|
|||
|
function baseShuffle(collection) {
|
|||
|
return shuffleSelf(values(collection));
|
|||
|
}
|
|||
|
function baseSlice(array, start, end) {
|
|||
|
var index = -1, length = array.length;
|
|||
|
start < 0 && (start = -start > length ? 0 : length + start), (end = end > length ? length : end) < 0 && (end += length), length = start > end ? 0 : end - start >>> 0, start >>>= 0;
|
|||
|
for(var result = Array1(length); ++index < length;)result[index] = array[index + start];
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseSome(collection, predicate) {
|
|||
|
var result;
|
|||
|
return baseEach(collection, function(value, index, collection) {
|
|||
|
return !(result = predicate(value, index, collection));
|
|||
|
}), !!result;
|
|||
|
}
|
|||
|
function baseSortedIndex(array, value, retHighest) {
|
|||
|
var low = 0, high = null == array ? low : array.length;
|
|||
|
if ('number' == typeof value && value == value && high <= 2147483647) {
|
|||
|
for(; low < high;){
|
|||
|
var mid = low + high >>> 1, computed = array[mid];
|
|||
|
null !== computed && !isSymbol(computed) && (retHighest ? computed <= value : computed < value) ? low = mid + 1 : high = mid;
|
|||
|
}
|
|||
|
return high;
|
|||
|
}
|
|||
|
return baseSortedIndexBy(array, value, identity, retHighest);
|
|||
|
}
|
|||
|
function baseSortedIndexBy(array, value, iteratee, retHighest) {
|
|||
|
var low = 0, high = null == array ? 0 : array.length;
|
|||
|
if (0 === high) return 0;
|
|||
|
for(var valIsNaN = (value = iteratee(value)) != value, valIsNull = null === value, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined; low < high;){
|
|||
|
var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), othIsDefined = computed !== undefined, othIsNull = null === computed, othIsReflexive = computed == computed, othIsSymbol = isSymbol(computed);
|
|||
|
if (valIsNaN) var setLow = retHighest || othIsReflexive;
|
|||
|
else setLow = valIsUndefined ? othIsReflexive && (retHighest || othIsDefined) : valIsNull ? othIsReflexive && othIsDefined && (retHighest || !othIsNull) : valIsSymbol ? othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol) : !othIsNull && !othIsSymbol && (retHighest ? computed <= value : computed < value);
|
|||
|
setLow ? low = mid + 1 : high = mid;
|
|||
|
}
|
|||
|
return nativeMin(high, 4294967294);
|
|||
|
}
|
|||
|
function baseSortedUniq(array, iteratee) {
|
|||
|
for(var index = -1, length = array.length, resIndex = 0, result = []; ++index < length;){
|
|||
|
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|||
|
if (!index || !eq(computed, seen)) {
|
|||
|
var seen = computed;
|
|||
|
result[resIndex++] = 0 === value ? 0 : value;
|
|||
|
}
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseToNumber(value) {
|
|||
|
return 'number' == typeof value ? value : isSymbol(value) ? NAN : +value;
|
|||
|
}
|
|||
|
function baseToString(value) {
|
|||
|
if ('string' == typeof value) return value;
|
|||
|
if (isArray(value)) return arrayMap(value, baseToString) + '';
|
|||
|
if (isSymbol(value)) return symbolToString ? symbolToString.call(value) : '';
|
|||
|
var result = value + '';
|
|||
|
return '0' == result && 1 / value == -INFINITY ? '-0' : result;
|
|||
|
}
|
|||
|
function baseUniq(array, iteratee, comparator) {
|
|||
|
var index = -1, includes = arrayIncludes, length = array.length, isCommon = !0, result = [], seen = result;
|
|||
|
if (comparator) isCommon = !1, includes = arrayIncludesWith;
|
|||
|
else if (length >= 200) {
|
|||
|
var set = iteratee ? null : createSet(array);
|
|||
|
if (set) return setToArray(set);
|
|||
|
isCommon = !1, includes = cacheHas, seen = new SetCache;
|
|||
|
} else seen = iteratee ? [] : result;
|
|||
|
outer: for(; ++index < length;){
|
|||
|
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|||
|
if (value = comparator || 0 !== value ? value : 0, isCommon && computed == computed) {
|
|||
|
for(var seenIndex = seen.length; seenIndex--;)if (seen[seenIndex] === computed) continue outer;
|
|||
|
iteratee && seen.push(computed), result.push(value);
|
|||
|
} else includes(seen, computed, comparator) || (seen !== result && seen.push(computed), result.push(value));
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function baseUnset(object, path) {
|
|||
|
return path = castPath(path, object), null == (object = parent(object, path)) || delete object[toKey(last(path))];
|
|||
|
}
|
|||
|
function baseUpdate(object, path, updater, customizer) {
|
|||
|
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|||
|
}
|
|||
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|||
|
for(var length = array.length, index = fromRight ? length : -1; (fromRight ? index-- : ++index < length) && predicate(array[index], index, array););
|
|||
|
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
|
|||
|
}
|
|||
|
function baseWrapperValue(value, actions) {
|
|||
|
var result = value;
|
|||
|
return result instanceof LazyWrapper && (result = result.value()), arrayReduce(actions, function(result, action) {
|
|||
|
return action.func.apply(action.thisArg, arrayPush([
|
|||
|
result
|
|||
|
], action.args));
|
|||
|
}, result);
|
|||
|
}
|
|||
|
function baseXor(arrays, iteratee, comparator) {
|
|||
|
var length = arrays.length;
|
|||
|
if (length < 2) return length ? baseUniq(arrays[0]) : [];
|
|||
|
for(var index = -1, result = Array1(length); ++index < length;)for(var array = arrays[index], othIndex = -1; ++othIndex < length;)othIndex != index && (result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator));
|
|||
|
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
|
|||
|
}
|
|||
|
function baseZipObject(props, values, assignFunc) {
|
|||
|
for(var index = -1, length = props.length, valsLength = values.length, result = {}; ++index < length;){
|
|||
|
var value = index < valsLength ? values[index] : undefined;
|
|||
|
assignFunc(result, props[index], value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function castArrayLikeObject(value) {
|
|||
|
return isArrayLikeObject(value) ? value : [];
|
|||
|
}
|
|||
|
function castFunction(value) {
|
|||
|
return 'function' == typeof value ? value : identity;
|
|||
|
}
|
|||
|
function castPath(value, object) {
|
|||
|
return isArray(value) ? value : isKey(value, object) ? [
|
|||
|
value
|
|||
|
] : stringToPath(toString(value));
|
|||
|
}
|
|||
|
function castSlice(array, start, end) {
|
|||
|
var length = array.length;
|
|||
|
return end = end === undefined ? length : end, !start && end >= length ? array : baseSlice(array, start, end);
|
|||
|
}
|
|||
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|||
|
return root.clearTimeout(id);
|
|||
|
};
|
|||
|
function cloneBuffer(buffer, isDeep) {
|
|||
|
if (isDeep) return buffer.slice();
|
|||
|
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|||
|
return buffer.copy(result), result;
|
|||
|
}
|
|||
|
function cloneArrayBuffer(arrayBuffer) {
|
|||
|
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|||
|
return new Uint8Array(result).set(new Uint8Array(arrayBuffer)), result;
|
|||
|
}
|
|||
|
function cloneTypedArray(typedArray, isDeep) {
|
|||
|
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|||
|
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|||
|
}
|
|||
|
function compareAscending(value, other) {
|
|||
|
if (value !== other) {
|
|||
|
var valIsDefined = value !== undefined, valIsNull = null === value, valIsReflexive = value == value, valIsSymbol = isSymbol(value), othIsDefined = other !== undefined, othIsNull = null === other, othIsReflexive = other == other, othIsSymbol = isSymbol(other);
|
|||
|
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) return 1;
|
|||
|
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) return -1;
|
|||
|
}
|
|||
|
return 0;
|
|||
|
}
|
|||
|
function composeArgs(args, partials, holders, isCurried) {
|
|||
|
for(var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array1(leftLength + rangeLength), isUncurried = !isCurried; ++leftIndex < leftLength;)result[leftIndex] = partials[leftIndex];
|
|||
|
for(; ++argsIndex < holdersLength;)(isUncurried || argsIndex < argsLength) && (result[holders[argsIndex]] = args[argsIndex]);
|
|||
|
for(; rangeLength--;)result[leftIndex++] = args[argsIndex++];
|
|||
|
return result;
|
|||
|
}
|
|||
|
function composeArgsRight(args, partials, holders, isCurried) {
|
|||
|
for(var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array1(rangeLength + rightLength), isUncurried = !isCurried; ++argsIndex < rangeLength;)result[argsIndex] = args[argsIndex];
|
|||
|
for(var offset = argsIndex; ++rightIndex < rightLength;)result[offset + rightIndex] = partials[rightIndex];
|
|||
|
for(; ++holdersIndex < holdersLength;)(isUncurried || argsIndex < argsLength) && (result[offset + holders[holdersIndex]] = args[argsIndex++]);
|
|||
|
return result;
|
|||
|
}
|
|||
|
function copyArray(source, array) {
|
|||
|
var index = -1, length = source.length;
|
|||
|
for(array || (array = Array1(length)); ++index < length;)array[index] = source[index];
|
|||
|
return array;
|
|||
|
}
|
|||
|
function copyObject(source, props, object, customizer) {
|
|||
|
var isNew = !object;
|
|||
|
object || (object = {});
|
|||
|
for(var index = -1, length = props.length; ++index < length;){
|
|||
|
var key = props[index], newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
|
|||
|
newValue === undefined && (newValue = source[key]), isNew ? baseAssignValue(object, key, newValue) : assignValue(object, key, newValue);
|
|||
|
}
|
|||
|
return object;
|
|||
|
}
|
|||
|
function createAggregator(setter, initializer) {
|
|||
|
return function(collection, iteratee) {
|
|||
|
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
|
|||
|
return func(collection, setter, getIteratee(iteratee, 2), accumulator);
|
|||
|
};
|
|||
|
}
|
|||
|
function createAssigner(assigner) {
|
|||
|
return baseRest(function(object, sources) {
|
|||
|
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined;
|
|||
|
for(customizer = assigner.length > 3 && 'function' == typeof customizer ? (length--, customizer) : undefined, guard && isIterateeCall(sources[0], sources[1], guard) && (customizer = length < 3 ? undefined : customizer, length = 1), object = Object1(object); ++index < length;){
|
|||
|
var source = sources[index];
|
|||
|
source && assigner(object, source, index, customizer);
|
|||
|
}
|
|||
|
return object;
|
|||
|
});
|
|||
|
}
|
|||
|
function createBaseEach(eachFunc, fromRight) {
|
|||
|
return function(collection, iteratee) {
|
|||
|
if (null == collection) return collection;
|
|||
|
if (!isArrayLike(collection)) return eachFunc(collection, iteratee);
|
|||
|
for(var length = collection.length, index = fromRight ? length : -1, iterable = Object1(collection); (fromRight ? index-- : ++index < length) && !1 !== iteratee(iterable[index], index, iterable););
|
|||
|
return collection;
|
|||
|
};
|
|||
|
}
|
|||
|
function createBaseFor(fromRight) {
|
|||
|
return function(object, iteratee, keysFunc) {
|
|||
|
for(var index = -1, iterable = Object1(object), props = keysFunc(object), length = props.length; length--;){
|
|||
|
var key = props[fromRight ? length : ++index];
|
|||
|
if (!1 === iteratee(iterable[key], key, iterable)) break;
|
|||
|
}
|
|||
|
return object;
|
|||
|
};
|
|||
|
}
|
|||
|
function createCaseFirst(methodName) {
|
|||
|
return function(string) {
|
|||
|
string = toString(string);
|
|||
|
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined, chr = strSymbols ? strSymbols[0] : string.charAt(0), trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);
|
|||
|
return chr[methodName]() + trailing;
|
|||
|
};
|
|||
|
}
|
|||
|
function createCompounder(callback) {
|
|||
|
return function(string) {
|
|||
|
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
|||
|
};
|
|||
|
}
|
|||
|
function createCtor(Ctor) {
|
|||
|
return function() {
|
|||
|
var args = arguments;
|
|||
|
switch(args.length){
|
|||
|
case 0:
|
|||
|
return new Ctor;
|
|||
|
case 1:
|
|||
|
return new Ctor(args[0]);
|
|||
|
case 2:
|
|||
|
return new Ctor(args[0], args[1]);
|
|||
|
case 3:
|
|||
|
return new Ctor(args[0], args[1], args[2]);
|
|||
|
case 4:
|
|||
|
return new Ctor(args[0], args[1], args[2], args[3]);
|
|||
|
case 5:
|
|||
|
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
|
|||
|
case 6:
|
|||
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
|
|||
|
case 7:
|
|||
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|||
|
}
|
|||
|
var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args);
|
|||
|
return isObject(result) ? result : thisBinding;
|
|||
|
};
|
|||
|
}
|
|||
|
function createFind(findIndexFunc) {
|
|||
|
return function(collection, predicate, fromIndex) {
|
|||
|
var iterable = Object1(collection);
|
|||
|
if (!isArrayLike(collection)) {
|
|||
|
var iteratee = getIteratee(predicate, 3);
|
|||
|
collection = keys(collection), predicate = function(key) {
|
|||
|
return iteratee(iterable[key], key, iterable);
|
|||
|
};
|
|||
|
}
|
|||
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|||
|
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
|||
|
};
|
|||
|
}
|
|||
|
function createFlow(fromRight) {
|
|||
|
return flatRest(function(funcs) {
|
|||
|
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
|
|||
|
for(fromRight && funcs.reverse(); index--;){
|
|||
|
var func = funcs[index];
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
if (prereq && !wrapper && 'wrapper' == getFuncName(func)) var wrapper = new LodashWrapper([], !0);
|
|||
|
}
|
|||
|
for(index = wrapper ? index : length; ++index < length;){
|
|||
|
var funcName = getFuncName(func = funcs[index]), data = 'wrapper' == funcName ? getData(func) : undefined;
|
|||
|
wrapper = data && isLaziable(data[0]) && 424 == data[1] && !data[4].length && 1 == data[9] ? wrapper[getFuncName(data[0])].apply(wrapper, data[3]) : 1 == func.length && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
|
|||
|
}
|
|||
|
return function() {
|
|||
|
var args = arguments, value = args[0];
|
|||
|
if (wrapper && 1 == args.length && isArray(value)) return wrapper.plant(value).value();
|
|||
|
for(var index = 0, result = length ? funcs[index].apply(this, args) : value; ++index < length;)result = funcs[index].call(this, result);
|
|||
|
return result;
|
|||
|
};
|
|||
|
});
|
|||
|
}
|
|||
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
|
|||
|
var isAry = 128 & bitmask, isBind = 1 & bitmask, isBindKey = 2 & bitmask, isCurried = 24 & bitmask, isFlip = 512 & bitmask, Ctor = isBindKey ? undefined : createCtor(func);
|
|||
|
function wrapper() {
|
|||
|
for(var length = arguments.length, args = Array1(length), index = length; index--;)args[index] = arguments[index];
|
|||
|
if (isCurried) var placeholder = getHolder(wrapper), holdersCount = function(array, placeholder) {
|
|||
|
for(var length = array.length, result = 0; length--;)array[length] === placeholder && ++result;
|
|||
|
return result;
|
|||
|
}(args, placeholder);
|
|||
|
if (partials && (args = composeArgs(args, partials, holders, isCurried)), partialsRight && (args = composeArgsRight(args, partialsRight, holdersRight, isCurried)), length -= holdersCount, isCurried && length < arity) {
|
|||
|
var newHolders = replaceHolders(args, placeholder);
|
|||
|
return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length);
|
|||
|
}
|
|||
|
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
|
|||
|
return length = args.length, argPos ? args = function(array, indexes) {
|
|||
|
for(var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); length--;){
|
|||
|
var index = indexes[length];
|
|||
|
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
|
|||
|
}
|
|||
|
return array;
|
|||
|
}(args, argPos) : isFlip && length > 1 && args.reverse(), isAry && ary < length && (args.length = ary), this && this !== root && this instanceof wrapper && (fn = Ctor || createCtor(fn)), fn.apply(thisBinding, args);
|
|||
|
}
|
|||
|
return wrapper;
|
|||
|
}
|
|||
|
function createInverter(setter, toIteratee) {
|
|||
|
return function(object, iteratee) {
|
|||
|
var object1, setter1, iteratee1, accumulator;
|
|||
|
return iteratee1 = toIteratee(iteratee), accumulator = {}, baseForOwn(object, function(value, key, object) {
|
|||
|
setter(accumulator, iteratee1(value), key, object);
|
|||
|
}), accumulator;
|
|||
|
};
|
|||
|
}
|
|||
|
function createMathOperation(operator, defaultValue) {
|
|||
|
return function(value, other) {
|
|||
|
var result;
|
|||
|
if (value === undefined && other === undefined) return defaultValue;
|
|||
|
if (value !== undefined && (result = value), other !== undefined) {
|
|||
|
if (result === undefined) return other;
|
|||
|
'string' == typeof value || 'string' == typeof other ? (value = baseToString(value), other = baseToString(other)) : (value = baseToNumber(value), other = baseToNumber(other)), result = operator(value, other);
|
|||
|
}
|
|||
|
return result;
|
|||
|
};
|
|||
|
}
|
|||
|
function createOver(arrayFunc) {
|
|||
|
return flatRest(function(iteratees) {
|
|||
|
return iteratees = arrayMap(iteratees, baseUnary(getIteratee())), baseRest(function(args) {
|
|||
|
var thisArg = this;
|
|||
|
return arrayFunc(iteratees, function(iteratee) {
|
|||
|
return apply(iteratee, thisArg, args);
|
|||
|
});
|
|||
|
});
|
|||
|
});
|
|||
|
}
|
|||
|
function createPadding(length, chars) {
|
|||
|
var charsLength = (chars = chars === undefined ? ' ' : baseToString(chars)).length;
|
|||
|
if (charsLength < 2) return charsLength ? baseRepeat(chars, length) : chars;
|
|||
|
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
|||
|
return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length);
|
|||
|
}
|
|||
|
function createRange(fromRight) {
|
|||
|
return function(start, end, step) {
|
|||
|
return step && 'number' != typeof step && isIterateeCall(start, end, step) && (end = step = undefined), start = toFinite(start), end === undefined ? (end = start, start = 0) : end = toFinite(end), step = step === undefined ? start < end ? 1 : -1 : toFinite(step), function(start, end, step, fromRight) {
|
|||
|
for(var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array1(length); length--;)result[fromRight ? length : ++index] = start, start += step;
|
|||
|
return result;
|
|||
|
}(start, end, step, fromRight);
|
|||
|
};
|
|||
|
}
|
|||
|
function createRelationalOperation(operator) {
|
|||
|
return function(value, other) {
|
|||
|
return 'string' == typeof value && 'string' == typeof other || (value = toNumber(value), other = toNumber(other)), operator(value, other);
|
|||
|
};
|
|||
|
}
|
|||
|
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
|
|||
|
var isCurry = 8 & bitmask;
|
|||
|
bitmask |= isCurry ? 32 : 64, 4 & (bitmask &= ~(isCurry ? 64 : 32)) || (bitmask &= -4);
|
|||
|
var newData = [
|
|||
|
func,
|
|||
|
bitmask,
|
|||
|
thisArg,
|
|||
|
isCurry ? partials : undefined,
|
|||
|
isCurry ? holders : undefined,
|
|||
|
isCurry ? undefined : partials,
|
|||
|
isCurry ? undefined : holders,
|
|||
|
argPos,
|
|||
|
ary,
|
|||
|
arity
|
|||
|
], result = wrapFunc.apply(undefined, newData);
|
|||
|
return isLaziable(func) && setData(result, newData), result.placeholder = placeholder, setWrapToString(result, func, bitmask);
|
|||
|
}
|
|||
|
function createRound(methodName) {
|
|||
|
var func = Math[methodName];
|
|||
|
return function(number, precision) {
|
|||
|
if (number = toNumber(number), (precision = null == precision ? 0 : nativeMin(toInteger(precision), 292)) && nativeIsFinite(number)) {
|
|||
|
var pair = (toString(number) + 'e').split('e'), value = func(pair[0] + 'e' + (+pair[1] + precision));
|
|||
|
return +((pair = (toString(value) + 'e').split('e'))[0] + 'e' + (+pair[1] - precision));
|
|||
|
}
|
|||
|
return func(number);
|
|||
|
};
|
|||
|
}
|
|||
|
var createSet = Set && 1 / setToArray(new Set([
|
|||
|
,
|
|||
|
-0
|
|||
|
]))[1] == INFINITY ? function(values) {
|
|||
|
return new Set(values);
|
|||
|
} : noop;
|
|||
|
function createToPairs(keysFunc) {
|
|||
|
return function(object) {
|
|||
|
var set, index, result, object1, props, tag = getTag(object);
|
|||
|
return tag == mapTag ? mapToArray(object) : tag == setTag ? (set = object, index = -1, result = Array(set.size), set.forEach(function(value) {
|
|||
|
result[++index] = [
|
|||
|
value,
|
|||
|
value
|
|||
|
];
|
|||
|
}), result) : (props = keysFunc(object), arrayMap(props, function(key) {
|
|||
|
return [
|
|||
|
key,
|
|||
|
object[key]
|
|||
|
];
|
|||
|
}));
|
|||
|
};
|
|||
|
}
|
|||
|
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
|
|||
|
var isBindKey = 2 & bitmask;
|
|||
|
if (!isBindKey && 'function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
var length = partials ? partials.length : 0;
|
|||
|
if (length || (bitmask &= -97, partials = holders = undefined), ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0), arity = arity === undefined ? arity : toInteger(arity), length -= holders ? holders.length : 0, 64 & bitmask) {
|
|||
|
var partialsRight = partials, holdersRight = holders;
|
|||
|
partials = holders = undefined;
|
|||
|
}
|
|||
|
var data = isBindKey ? undefined : getData(func), newData = [
|
|||
|
func,
|
|||
|
bitmask,
|
|||
|
thisArg,
|
|||
|
partials,
|
|||
|
holders,
|
|||
|
partialsRight,
|
|||
|
holdersRight,
|
|||
|
argPos,
|
|||
|
ary,
|
|||
|
arity
|
|||
|
];
|
|||
|
if (data && function(data, source) {
|
|||
|
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < 131, isCombo = 128 == srcBitmask && 8 == bitmask || 128 == srcBitmask && 256 == bitmask && data[7].length <= source[8] || 384 == srcBitmask && source[7].length <= source[8] && 8 == bitmask;
|
|||
|
if (!(isCommon || isCombo)) return data;
|
|||
|
1 & srcBitmask && (data[2] = source[2], newBitmask |= 1 & bitmask ? 0 : 4);
|
|||
|
var value = source[3];
|
|||
|
if (value) {
|
|||
|
var partials = data[3];
|
|||
|
data[3] = partials ? composeArgs(partials, value, source[4]) : value, data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
|
|||
|
}
|
|||
|
(value = source[5]) && (partials = data[5], data[5] = partials ? composeArgsRight(partials, value, source[6]) : value, data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]), (value = source[7]) && (data[7] = value), 128 & srcBitmask && (data[8] = null == data[8] ? source[8] : nativeMin(data[8], source[8])), null == data[9] && (data[9] = source[9]), data[0] = source[0], data[1] = newBitmask;
|
|||
|
}(newData, data), func = newData[0], bitmask = newData[1], thisArg = newData[2], partials = newData[3], holders = newData[4], (arity = newData[9] = undefined === newData[9] ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0)) || !(24 & bitmask) || (bitmask &= -25), bitmask && 1 != bitmask) 8 == bitmask || 16 == bitmask ? result = function(func, bitmask, arity) {
|
|||
|
var Ctor = createCtor(func);
|
|||
|
function wrapper() {
|
|||
|
for(var length = arguments.length, args = Array1(length), index = length, placeholder = getHolder(wrapper); index--;)args[index] = arguments[index];
|
|||
|
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|||
|
if ((length -= holders.length) < arity) return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);
|
|||
|
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
|
|||
|
return apply(fn, this, args);
|
|||
|
}
|
|||
|
return wrapper;
|
|||
|
}(func, bitmask, arity) : 32 != bitmask && 33 != bitmask || holders.length ? result = createHybrid.apply(undefined, newData) : (func1 = func, bitmask1 = bitmask, thisArg1 = thisArg, partials1 = partials, isBind = 1 & bitmask1, Ctor = createCtor(func1), result = function wrapper() {
|
|||
|
for(var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials1.length, args = Array1(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func1; ++leftIndex < leftLength;)args[leftIndex] = partials1[leftIndex];
|
|||
|
for(; argsLength--;)args[leftIndex++] = arguments[++argsIndex];
|
|||
|
return apply(fn, isBind ? thisArg1 : this, args);
|
|||
|
});
|
|||
|
else var func1, bitmask1, thisArg1, partials1, isBind, Ctor, func2, bitmask2, thisArg2, isBind1, Ctor1, result = (func2 = func, bitmask2 = bitmask, thisArg2 = thisArg, isBind1 = 1 & bitmask2, Ctor1 = createCtor(func2), function wrapper() {
|
|||
|
return (this && this !== root && this instanceof wrapper ? Ctor1 : func2).apply(isBind1 ? thisArg2 : this, arguments);
|
|||
|
});
|
|||
|
return setWrapToString((data ? baseSetData : setData)(result, newData), func, bitmask);
|
|||
|
}
|
|||
|
function customDefaultsAssignIn(objValue, srcValue, key, object) {
|
|||
|
return objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key) ? srcValue : objValue;
|
|||
|
}
|
|||
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|||
|
return isObject(objValue) && isObject(srcValue) && (stack.set(srcValue, objValue), baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack), stack.delete(srcValue)), objValue;
|
|||
|
}
|
|||
|
function customOmitClone(value) {
|
|||
|
return isPlainObject(value) ? undefined : value;
|
|||
|
}
|
|||
|
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|||
|
var isPartial = 1 & bitmask, arrLength = array.length, othLength = other.length;
|
|||
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) return !1;
|
|||
|
var arrStacked = stack.get(array), othStacked = stack.get(other);
|
|||
|
if (arrStacked && othStacked) return arrStacked == other && othStacked == array;
|
|||
|
var index = -1, result = !0, seen = 2 & bitmask ? new SetCache : undefined;
|
|||
|
for(stack.set(array, other), stack.set(other, array); ++index < arrLength;){
|
|||
|
var arrValue = array[index], othValue = other[index];
|
|||
|
if (customizer) var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|||
|
if (compared !== undefined) {
|
|||
|
if (compared) continue;
|
|||
|
result = !1;
|
|||
|
break;
|
|||
|
}
|
|||
|
if (seen) {
|
|||
|
if (!arraySome(other, function(othValue, othIndex) {
|
|||
|
if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) return seen.push(othIndex);
|
|||
|
})) {
|
|||
|
result = !1;
|
|||
|
break;
|
|||
|
}
|
|||
|
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|||
|
result = !1;
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
return stack.delete(array), stack.delete(other), result;
|
|||
|
}
|
|||
|
function flatRest(func) {
|
|||
|
return setToString(overRest(func, undefined, flatten), func + '');
|
|||
|
}
|
|||
|
function getAllKeys(object) {
|
|||
|
return baseGetAllKeys(object, keys, getSymbols);
|
|||
|
}
|
|||
|
function getAllKeysIn(object) {
|
|||
|
return baseGetAllKeys(object, keysIn, getSymbolsIn);
|
|||
|
}
|
|||
|
var getData = metaMap ? function(func) {
|
|||
|
return metaMap.get(func);
|
|||
|
} : noop;
|
|||
|
function getFuncName(func) {
|
|||
|
for(var result = func.name + '', array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; length--;){
|
|||
|
var data = array[length], otherFunc = data.func;
|
|||
|
if (null == otherFunc || otherFunc == func) return data.name;
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function getHolder(func) {
|
|||
|
return (hasOwnProperty.call(lodash, 'placeholder') ? lodash : func).placeholder;
|
|||
|
}
|
|||
|
function getIteratee() {
|
|||
|
var result = lodash.iteratee || iteratee;
|
|||
|
return result = result === iteratee ? baseIteratee : result, arguments.length ? result(arguments[0], arguments[1]) : result;
|
|||
|
}
|
|||
|
function getMapData(map, key) {
|
|||
|
var value, type, data = map.__data__;
|
|||
|
return (value = key, type = typeof value, 'string' == type || 'number' == type || 'symbol' == type || 'boolean' == type ? '__proto__' !== value : null === value) ? data['string' == typeof key ? 'string' : 'hash'] : data.map;
|
|||
|
}
|
|||
|
function getMatchData(object) {
|
|||
|
for(var result = keys(object), length = result.length; length--;){
|
|||
|
var key = result[length], value = object[key];
|
|||
|
result[length] = [
|
|||
|
key,
|
|||
|
value,
|
|||
|
isStrictComparable(value)
|
|||
|
];
|
|||
|
}
|
|||
|
return result;
|
|||
|
}
|
|||
|
function getNative(object, key) {
|
|||
|
var object1, key1, value = null == object ? undefined : object[key];
|
|||
|
return baseIsNative(value) ? value : undefined;
|
|||
|
}
|
|||
|
var getSymbols = nativeGetSymbols ? function(object) {
|
|||
|
return null == object ? [] : (object = Object1(object), arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|||
|
return propertyIsEnumerable.call(object, symbol);
|
|||
|
}));
|
|||
|
} : stubArray, getSymbolsIn = nativeGetSymbols ? function(object) {
|
|||
|
for(var result = []; object;)arrayPush(result, getSymbols(object)), object = getPrototype(object);
|
|||
|
return result;
|
|||
|
} : stubArray, getTag = baseGetTag;
|
|||
|
function hasPath(object, path, hasFunc) {
|
|||
|
path = castPath(path, object);
|
|||
|
for(var index = -1, length = path.length, result = !1; ++index < length;){
|
|||
|
var key = toKey(path[index]);
|
|||
|
if (!(result = null != object && hasFunc(object, key))) break;
|
|||
|
object = object[key];
|
|||
|
}
|
|||
|
return result || ++index != length ? result : !!(length = null == object ? 0 : object.length) && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|||
|
}
|
|||
|
function initCloneObject(object) {
|
|||
|
return 'function' != typeof object.constructor || isPrototype(object) ? {} : baseCreate(getPrototype(object));
|
|||
|
}
|
|||
|
function isFlattenable(value) {
|
|||
|
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|||
|
}
|
|||
|
function isIndex(value, length) {
|
|||
|
var type = typeof value;
|
|||
|
return !!(length = null == length ? 9007199254740991 : length) && ('number' == type || 'symbol' != type && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
|||
|
}
|
|||
|
function isIterateeCall(value, index, object) {
|
|||
|
if (!isObject(object)) return !1;
|
|||
|
var type = typeof index;
|
|||
|
return ('number' == type ? !!(isArrayLike(object) && isIndex(index, object.length)) : 'string' == type && index in object) && eq(object[index], value);
|
|||
|
}
|
|||
|
function isKey(value, object) {
|
|||
|
if (isArray(value)) return !1;
|
|||
|
var type = typeof value;
|
|||
|
return !!('number' == type || 'symbol' == type || 'boolean' == type || null == value || isSymbol(value)) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || null != object && value in Object1(object);
|
|||
|
}
|
|||
|
function isLaziable(func) {
|
|||
|
var funcName = getFuncName(func), other = lodash[funcName];
|
|||
|
if ('function' != typeof other || !(funcName in LazyWrapper.prototype)) return !1;
|
|||
|
if (func === other) return !0;
|
|||
|
var data = getData(other);
|
|||
|
return !!data && func === data[0];
|
|||
|
}
|
|||
|
(DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set) != setTag || WeakMap && getTag(new WeakMap) != weakMapTag) && (getTag = function(value) {
|
|||
|
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : '';
|
|||
|
if (ctorString) switch(ctorString){
|
|||
|
case dataViewCtorString:
|
|||
|
return dataViewTag;
|
|||
|
case mapCtorString:
|
|||
|
return mapTag;
|
|||
|
case promiseCtorString:
|
|||
|
return promiseTag;
|
|||
|
case setCtorString:
|
|||
|
return setTag;
|
|||
|
case weakMapCtorString:
|
|||
|
return weakMapTag;
|
|||
|
}
|
|||
|
return result;
|
|||
|
});
|
|||
|
var isMaskable = coreJsData ? isFunction : stubFalse;
|
|||
|
function isPrototype(value) {
|
|||
|
var Ctor = value && value.constructor;
|
|||
|
return value === ('function' == typeof Ctor && Ctor.prototype || objectProto);
|
|||
|
}
|
|||
|
function isStrictComparable(value) {
|
|||
|
return value == value && !isObject(value);
|
|||
|
}
|
|||
|
function matchesStrictComparable(key, srcValue) {
|
|||
|
return function(object) {
|
|||
|
return null != object && object[key] === srcValue && (srcValue !== undefined || key in Object1(object));
|
|||
|
};
|
|||
|
}
|
|||
|
function overRest(func, start, transform) {
|
|||
|
return start = nativeMax(start === undefined ? func.length - 1 : start, 0), function() {
|
|||
|
for(var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array1(length); ++index < length;)array[index] = args[start + index];
|
|||
|
index = -1;
|
|||
|
for(var otherArgs = Array1(start + 1); ++index < start;)otherArgs[index] = args[index];
|
|||
|
return otherArgs[start] = transform(array), apply(func, this, otherArgs);
|
|||
|
};
|
|||
|
}
|
|||
|
function parent(object, path) {
|
|||
|
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|||
|
}
|
|||
|
function safeGet(object, key) {
|
|||
|
if (('constructor' !== key || 'function' != typeof object[key]) && '__proto__' != key) return object[key];
|
|||
|
}
|
|||
|
var setData = shortOut(baseSetData), setTimeout = ctxSetTimeout || function(func, wait) {
|
|||
|
return root.setTimeout(func, wait);
|
|||
|
}, setToString = shortOut(defineProperty ? function(func, string) {
|
|||
|
return defineProperty(func, 'toString', {
|
|||
|
configurable: !0,
|
|||
|
enumerable: !1,
|
|||
|
value: constant(string),
|
|||
|
writable: !0
|
|||
|
});
|
|||
|
} : identity);
|
|||
|
function setWrapToString(wrapper, reference, bitmask) {
|
|||
|
var source, match, details, bitmask1, source1 = reference + '';
|
|||
|
return setToString(wrapper, function(source, details) {
|
|||
|
var length = details.length;
|
|||
|
if (!length) return source;
|
|||
|
var lastIndex = length - 1;
|
|||
|
return details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex], details = details.join(length > 2 ? ', ' : ' '), source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
|
|||
|
}(source1, (details = (match = source1.match(reWrapDetails)) ? match[1].split(reSplitDetails) : [], bitmask1 = bitmask, arrayEach(wrapFlags, function(pair) {
|
|||
|
var value = '_.' + pair[0];
|
|||
|
bitmask1 & pair[1] && !arrayIncludes(details, value) && details.push(value);
|
|||
|
}), details.sort())));
|
|||
|
}
|
|||
|
function shortOut(func) {
|
|||
|
var count = 0, lastCalled = 0;
|
|||
|
return function() {
|
|||
|
var stamp = nativeNow(), remaining = 16 - (stamp - lastCalled);
|
|||
|
if (lastCalled = stamp, remaining > 0) {
|
|||
|
if (++count >= 800) return arguments[0];
|
|||
|
} else count = 0;
|
|||
|
return func.apply(undefined, arguments);
|
|||
|
};
|
|||
|
}
|
|||
|
function shuffleSelf(array, size) {
|
|||
|
var index = -1, length = array.length, lastIndex = length - 1;
|
|||
|
for(size = size === undefined ? length : size; ++index < size;){
|
|||
|
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|||
|
array[rand] = array[index], array[index] = value;
|
|||
|
}
|
|||
|
return array.length = size, array;
|
|||
|
}
|
|||
|
var func, result, cache, stringToPath = (cache = (result = memoize(func = function(string) {
|
|||
|
var result = [];
|
|||
|
return 46 === string.charCodeAt(0) && result.push(''), string.replace(rePropName, function(match, number, quote, subString) {
|
|||
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);
|
|||
|
}), result;
|
|||
|
}, function(key) {
|
|||
|
return 500 === cache.size && cache.clear(), key;
|
|||
|
})).cache, result);
|
|||
|
function toKey(value) {
|
|||
|
if ('string' == typeof value || isSymbol(value)) return value;
|
|||
|
var result = value + '';
|
|||
|
return '0' == result && 1 / value == -INFINITY ? '-0' : result;
|
|||
|
}
|
|||
|
function toSource(func) {
|
|||
|
if (null != func) {
|
|||
|
try {
|
|||
|
return funcToString.call(func);
|
|||
|
} catch (e) {}
|
|||
|
try {
|
|||
|
return func + '';
|
|||
|
} catch (e1) {}
|
|||
|
}
|
|||
|
return '';
|
|||
|
}
|
|||
|
function wrapperClone(wrapper) {
|
|||
|
if (wrapper instanceof LazyWrapper) return wrapper.clone();
|
|||
|
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
|
|||
|
return result.__actions__ = copyArray(wrapper.__actions__), result.__index__ = wrapper.__index__, result.__values__ = wrapper.__values__, result;
|
|||
|
}
|
|||
|
var difference = baseRest(function(array, values) {
|
|||
|
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, !0)) : [];
|
|||
|
}), differenceBy = baseRest(function(array, values) {
|
|||
|
var iteratee = last(values);
|
|||
|
return isArrayLikeObject(iteratee) && (iteratee = undefined), isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, !0), getIteratee(iteratee, 2)) : [];
|
|||
|
}), differenceWith = baseRest(function(array, values) {
|
|||
|
var comparator = last(values);
|
|||
|
return isArrayLikeObject(comparator) && (comparator = undefined), isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, !0), undefined, comparator) : [];
|
|||
|
});
|
|||
|
function findIndex(array, predicate, fromIndex) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (!length) return -1;
|
|||
|
var index = null == fromIndex ? 0 : toInteger(fromIndex);
|
|||
|
return index < 0 && (index = nativeMax(length + index, 0)), baseFindIndex(array, getIteratee(predicate, 3), index);
|
|||
|
}
|
|||
|
function findLastIndex(array, predicate, fromIndex) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (!length) return -1;
|
|||
|
var index = length - 1;
|
|||
|
return fromIndex !== undefined && (index = toInteger(fromIndex), index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1)), baseFindIndex(array, getIteratee(predicate, 3), index, !0);
|
|||
|
}
|
|||
|
function flatten(array) {
|
|||
|
return (null == array ? 0 : array.length) ? baseFlatten(array, 1) : [];
|
|||
|
}
|
|||
|
function head(array) {
|
|||
|
return array && array.length ? array[0] : undefined;
|
|||
|
}
|
|||
|
var intersection = baseRest(function(arrays) {
|
|||
|
var mapped = arrayMap(arrays, castArrayLikeObject);
|
|||
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
|
|||
|
}), intersectionBy = baseRest(function(arrays) {
|
|||
|
var iteratee = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|||
|
return iteratee === last(mapped) ? iteratee = undefined : mapped.pop(), mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee, 2)) : [];
|
|||
|
}), intersectionWith = baseRest(function(arrays) {
|
|||
|
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
|
|||
|
return (comparator = 'function' == typeof comparator ? comparator : undefined) && mapped.pop(), mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : [];
|
|||
|
});
|
|||
|
function last(array) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? array[length - 1] : undefined;
|
|||
|
}
|
|||
|
var pull = baseRest(pullAll);
|
|||
|
function pullAll(array, values) {
|
|||
|
return array && array.length && values && values.length ? basePullAll(array, values) : array;
|
|||
|
}
|
|||
|
var pullAt = flatRest(function(array, indexes) {
|
|||
|
var length = null == array ? 0 : array.length, result = baseAt(array, indexes);
|
|||
|
return basePullAt(array, arrayMap(indexes, function(index) {
|
|||
|
return isIndex(index, length) ? +index : index;
|
|||
|
}).sort(compareAscending)), result;
|
|||
|
});
|
|||
|
function reverse(array) {
|
|||
|
return null == array ? array : nativeReverse.call(array);
|
|||
|
}
|
|||
|
function sortedIndex(array, value) {
|
|||
|
return baseSortedIndex(array, value);
|
|||
|
}
|
|||
|
var union = baseRest(function(arrays) {
|
|||
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0));
|
|||
|
}), unionBy = baseRest(function(arrays) {
|
|||
|
var iteratee = last(arrays);
|
|||
|
return isArrayLikeObject(iteratee) && (iteratee = undefined), baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0), getIteratee(iteratee, 2));
|
|||
|
}), unionWith = baseRest(function(arrays) {
|
|||
|
var comparator = last(arrays);
|
|||
|
return comparator = 'function' == typeof comparator ? comparator : undefined, baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, !0), undefined, comparator);
|
|||
|
});
|
|||
|
function unzip(array) {
|
|||
|
if (!(array && array.length)) return [];
|
|||
|
var length = 0;
|
|||
|
return array = arrayFilter(array, function(group) {
|
|||
|
if (isArrayLikeObject(group)) return length = nativeMax(group.length, length), !0;
|
|||
|
}), baseTimes(length, function(index) {
|
|||
|
return arrayMap(array, baseProperty(index));
|
|||
|
});
|
|||
|
}
|
|||
|
function unzipWith(array, iteratee) {
|
|||
|
if (!(array && array.length)) return [];
|
|||
|
var result = unzip(array);
|
|||
|
return null == iteratee ? result : arrayMap(result, function(group) {
|
|||
|
return apply(iteratee, undefined, group);
|
|||
|
});
|
|||
|
}
|
|||
|
var without = baseRest(function(array, values) {
|
|||
|
return isArrayLikeObject(array) ? baseDifference(array, values) : [];
|
|||
|
}), xor = baseRest(function(arrays) {
|
|||
|
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
|||
|
}), xorBy = baseRest(function(arrays) {
|
|||
|
var iteratee = last(arrays);
|
|||
|
return isArrayLikeObject(iteratee) && (iteratee = undefined), baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
|
|||
|
}), xorWith = baseRest(function(arrays) {
|
|||
|
var comparator = last(arrays);
|
|||
|
return comparator = 'function' == typeof comparator ? comparator : undefined, baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
|
|||
|
}), zip = baseRest(unzip), zipWith = baseRest(function(arrays) {
|
|||
|
var length = arrays.length, iteratee = length > 1 ? arrays[length - 1] : undefined;
|
|||
|
return iteratee = 'function' == typeof iteratee ? (arrays.pop(), iteratee) : undefined, unzipWith(arrays, iteratee);
|
|||
|
});
|
|||
|
function chain(value) {
|
|||
|
var result = lodash(value);
|
|||
|
return result.__chain__ = !0, result;
|
|||
|
}
|
|||
|
function tap(value, interceptor) {
|
|||
|
return interceptor(value), value;
|
|||
|
}
|
|||
|
function thru(value, interceptor) {
|
|||
|
return interceptor(value);
|
|||
|
}
|
|||
|
var wrapperAt = flatRest(function(paths) {
|
|||
|
var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
|
|||
|
return baseAt(object, paths);
|
|||
|
};
|
|||
|
return !(length > 1) && !this.__actions__.length && value instanceof LazyWrapper && isIndex(start) ? ((value = value.slice(start, +start + (length ? 1 : 0))).__actions__.push({
|
|||
|
func: thru,
|
|||
|
args: [
|
|||
|
interceptor
|
|||
|
],
|
|||
|
thisArg: undefined
|
|||
|
}), new LodashWrapper(value, this.__chain__).thru(function(array) {
|
|||
|
return length && !array.length && array.push(undefined), array;
|
|||
|
})) : this.thru(interceptor);
|
|||
|
}), countBy = createAggregator(function(result, value, key) {
|
|||
|
hasOwnProperty.call(result, key) ? ++result[key] : baseAssignValue(result, key, 1);
|
|||
|
}), find = createFind(findIndex), findLast = createFind(findLastIndex);
|
|||
|
function forEach(collection, iteratee) {
|
|||
|
return (isArray(collection) ? arrayEach : baseEach)(collection, getIteratee(iteratee, 3));
|
|||
|
}
|
|||
|
function forEachRight(collection, iteratee) {
|
|||
|
return (isArray(collection) ? arrayEachRight : baseEachRight)(collection, getIteratee(iteratee, 3));
|
|||
|
}
|
|||
|
var groupBy = createAggregator(function(result, value, key) {
|
|||
|
hasOwnProperty.call(result, key) ? result[key].push(value) : baseAssignValue(result, key, [
|
|||
|
value
|
|||
|
]);
|
|||
|
}), invokeMap = baseRest(function(collection, path, args) {
|
|||
|
var index = -1, isFunc = 'function' == typeof path, result = isArrayLike(collection) ? Array1(collection.length) : [];
|
|||
|
return baseEach(collection, function(value) {
|
|||
|
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|||
|
}), result;
|
|||
|
}), keyBy = createAggregator(function(result, value, key) {
|
|||
|
baseAssignValue(result, key, value);
|
|||
|
});
|
|||
|
function map(collection, iteratee) {
|
|||
|
return (isArray(collection) ? arrayMap : baseMap)(collection, getIteratee(iteratee, 3));
|
|||
|
}
|
|||
|
var partition = createAggregator(function(result, value, key) {
|
|||
|
result[key ? 0 : 1].push(value);
|
|||
|
}, function() {
|
|||
|
return [
|
|||
|
[],
|
|||
|
[]
|
|||
|
];
|
|||
|
}), sortBy = baseRest(function(collection, iteratees) {
|
|||
|
if (null == collection) return [];
|
|||
|
var length = iteratees.length;
|
|||
|
return length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1]) ? iteratees = [] : length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2]) && (iteratees = [
|
|||
|
iteratees[0]
|
|||
|
]), baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
|||
|
}), now = ctxNow || function() {
|
|||
|
return root.Date.now();
|
|||
|
};
|
|||
|
function ary(func, n, guard) {
|
|||
|
return n = guard ? undefined : n, n = func && null == n ? func.length : n, createWrap(func, 128, undefined, undefined, undefined, undefined, n);
|
|||
|
}
|
|||
|
function before(n, func) {
|
|||
|
var result;
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return n = toInteger(n), function() {
|
|||
|
return --n > 0 && (result = func.apply(this, arguments)), n <= 1 && (func = undefined), result;
|
|||
|
};
|
|||
|
}
|
|||
|
var bind = baseRest(function(func, thisArg, partials) {
|
|||
|
var bitmask = 1;
|
|||
|
if (partials.length) {
|
|||
|
var holders = replaceHolders(partials, getHolder(bind));
|
|||
|
bitmask |= 32;
|
|||
|
}
|
|||
|
return createWrap(func, bitmask, thisArg, partials, holders);
|
|||
|
}), bindKey = baseRest(function(object, key, partials) {
|
|||
|
var bitmask = 3;
|
|||
|
if (partials.length) {
|
|||
|
var holders = replaceHolders(partials, getHolder(bindKey));
|
|||
|
bitmask |= 32;
|
|||
|
}
|
|||
|
return createWrap(key, bitmask, object, partials, holders);
|
|||
|
});
|
|||
|
function curry(func, arity, guard) {
|
|||
|
arity = guard ? undefined : arity;
|
|||
|
var result = createWrap(func, 8, undefined, undefined, undefined, undefined, undefined, arity);
|
|||
|
return result.placeholder = curry.placeholder, result;
|
|||
|
}
|
|||
|
function curryRight(func, arity, guard) {
|
|||
|
arity = guard ? undefined : arity;
|
|||
|
var result = createWrap(func, 16, undefined, undefined, undefined, undefined, undefined, arity);
|
|||
|
return result.placeholder = curryRight.placeholder, result;
|
|||
|
}
|
|||
|
function debounce(func, wait, options) {
|
|||
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = !1, maxing = !1, trailing = !0;
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
function invokeFunc(time) {
|
|||
|
var args = lastArgs, thisArg = lastThis;
|
|||
|
return lastArgs = lastThis = undefined, lastInvokeTime = time, result = func.apply(thisArg, args);
|
|||
|
}
|
|||
|
function shouldInvoke(time) {
|
|||
|
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|||
|
return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|||
|
}
|
|||
|
function timerExpired() {
|
|||
|
var time, timeSinceLastCall, timeSinceLastInvoke, timeWaiting, time1 = now();
|
|||
|
if (shouldInvoke(time1)) return trailingEdge(time1);
|
|||
|
timerId = setTimeout(timerExpired, (timeSinceLastCall = time1 - lastCallTime, timeSinceLastInvoke = time1 - lastInvokeTime, timeWaiting = wait - timeSinceLastCall, maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting));
|
|||
|
}
|
|||
|
function trailingEdge(time) {
|
|||
|
return (timerId = undefined, trailing && lastArgs) ? invokeFunc(time) : (lastArgs = lastThis = undefined, result);
|
|||
|
}
|
|||
|
function debounced() {
|
|||
|
var time, time1 = now(), isInvoking = shouldInvoke(time1);
|
|||
|
if (lastArgs = arguments, lastThis = this, lastCallTime = time1, isInvoking) {
|
|||
|
if (timerId === undefined) return lastInvokeTime = time = lastCallTime, timerId = setTimeout(timerExpired, wait), leading ? invokeFunc(time) : result;
|
|||
|
if (maxing) return clearTimeout(timerId), timerId = setTimeout(timerExpired, wait), invokeFunc(lastCallTime);
|
|||
|
}
|
|||
|
return timerId === undefined && (timerId = setTimeout(timerExpired, wait)), result;
|
|||
|
}
|
|||
|
return wait = toNumber(wait) || 0, isObject(options) && (leading = !!options.leading, maxWait = (maxing = 'maxWait' in options) ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait, trailing = 'trailing' in options ? !!options.trailing : trailing), debounced.cancel = function() {
|
|||
|
timerId !== undefined && clearTimeout(timerId), lastInvokeTime = 0, lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|||
|
}, debounced.flush = function() {
|
|||
|
return timerId === undefined ? result : trailingEdge(now());
|
|||
|
}, debounced;
|
|||
|
}
|
|||
|
var defer = baseRest(function(func, args) {
|
|||
|
return baseDelay(func, 1, args);
|
|||
|
}), delay = baseRest(function(func, wait, args) {
|
|||
|
return baseDelay(func, toNumber(wait) || 0, args);
|
|||
|
});
|
|||
|
function memoize(func, resolver) {
|
|||
|
if ('function' != typeof func || null != resolver && 'function' != typeof resolver) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
var memoized = function() {
|
|||
|
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|||
|
if (cache.has(key)) return cache.get(key);
|
|||
|
var result = func.apply(this, args);
|
|||
|
return memoized.cache = cache.set(key, result) || cache, result;
|
|||
|
};
|
|||
|
return memoized.cache = new (memoize.Cache || MapCache), memoized;
|
|||
|
}
|
|||
|
function negate(predicate) {
|
|||
|
if ('function' != typeof predicate) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return function() {
|
|||
|
var args = arguments;
|
|||
|
switch(args.length){
|
|||
|
case 0:
|
|||
|
return !predicate.call(this);
|
|||
|
case 1:
|
|||
|
return !predicate.call(this, args[0]);
|
|||
|
case 2:
|
|||
|
return !predicate.call(this, args[0], args[1]);
|
|||
|
case 3:
|
|||
|
return !predicate.call(this, args[0], args[1], args[2]);
|
|||
|
}
|
|||
|
return !predicate.apply(this, args);
|
|||
|
};
|
|||
|
}
|
|||
|
memoize.Cache = MapCache;
|
|||
|
var overArgs = baseRest(function(func, transforms) {
|
|||
|
var funcsLength = (transforms = 1 == transforms.length && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()))).length;
|
|||
|
return baseRest(function(args) {
|
|||
|
for(var index = -1, length = nativeMin(args.length, funcsLength); ++index < length;)args[index] = transforms[index].call(this, args[index]);
|
|||
|
return apply(func, this, args);
|
|||
|
});
|
|||
|
}), partial = baseRest(function(func, partials) {
|
|||
|
var holders = replaceHolders(partials, getHolder(partial));
|
|||
|
return createWrap(func, 32, undefined, partials, holders);
|
|||
|
}), partialRight = baseRest(function(func, partials) {
|
|||
|
var holders = replaceHolders(partials, getHolder(partialRight));
|
|||
|
return createWrap(func, 64, undefined, partials, holders);
|
|||
|
}), rearg = flatRest(function(func, indexes) {
|
|||
|
return createWrap(func, 256, undefined, undefined, undefined, indexes);
|
|||
|
});
|
|||
|
function eq(value, other) {
|
|||
|
return value === other || value != value && other != other;
|
|||
|
}
|
|||
|
var gt = createRelationalOperation(baseGt), gte = createRelationalOperation(function(value, other) {
|
|||
|
return value >= other;
|
|||
|
}), isArguments = baseIsArguments(function() {
|
|||
|
return arguments;
|
|||
|
}()) ? baseIsArguments : function(value) {
|
|||
|
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
|
|||
|
}, isArray = Array1.isArray, isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : function(value) {
|
|||
|
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
|
|||
|
};
|
|||
|
function isArrayLike(value) {
|
|||
|
return null != value && isLength(value.length) && !isFunction(value);
|
|||
|
}
|
|||
|
function isArrayLikeObject(value) {
|
|||
|
return isObjectLike(value) && isArrayLike(value);
|
|||
|
}
|
|||
|
var isBuffer = nativeIsBuffer || stubFalse, isDate = nodeIsDate ? baseUnary(nodeIsDate) : function(value) {
|
|||
|
return isObjectLike(value) && baseGetTag(value) == dateTag;
|
|||
|
};
|
|||
|
function isEqual(value, other) {
|
|||
|
return baseIsEqual(value, other);
|
|||
|
}
|
|||
|
function isError(value) {
|
|||
|
if (!isObjectLike(value)) return !1;
|
|||
|
var tag = baseGetTag(value);
|
|||
|
return tag == errorTag || '[object DOMException]' == tag || 'string' == typeof value.message && 'string' == typeof value.name && !isPlainObject(value);
|
|||
|
}
|
|||
|
function isFunction(value) {
|
|||
|
if (!isObject(value)) return !1;
|
|||
|
var tag = baseGetTag(value);
|
|||
|
return tag == funcTag || tag == genTag || '[object AsyncFunction]' == tag || '[object Proxy]' == tag;
|
|||
|
}
|
|||
|
function isInteger(value) {
|
|||
|
return 'number' == typeof value && value == toInteger(value);
|
|||
|
}
|
|||
|
function isLength(value) {
|
|||
|
return 'number' == typeof value && value > -1 && value % 1 == 0 && value <= 9007199254740991;
|
|||
|
}
|
|||
|
function isObject(value) {
|
|||
|
var type = typeof value;
|
|||
|
return null != value && ('object' == type || 'function' == type);
|
|||
|
}
|
|||
|
function isObjectLike(value) {
|
|||
|
return null != value && 'object' == typeof value;
|
|||
|
}
|
|||
|
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : function(value) {
|
|||
|
return isObjectLike(value) && getTag(value) == mapTag;
|
|||
|
};
|
|||
|
function isNumber(value) {
|
|||
|
return 'number' == typeof value || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|||
|
}
|
|||
|
function isPlainObject(value) {
|
|||
|
if (!isObjectLike(value) || baseGetTag(value) != objectTag) return !1;
|
|||
|
var proto = getPrototype(value);
|
|||
|
if (null === proto) return !0;
|
|||
|
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|||
|
return 'function' == typeof Ctor && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|||
|
}
|
|||
|
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : function(value) {
|
|||
|
return isObjectLike(value) && baseGetTag(value) == regexpTag;
|
|||
|
}, isSet = nodeIsSet ? baseUnary(nodeIsSet) : function(value) {
|
|||
|
return isObjectLike(value) && getTag(value) == setTag;
|
|||
|
};
|
|||
|
function isString(value) {
|
|||
|
return 'string' == typeof value || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|||
|
}
|
|||
|
function isSymbol(value) {
|
|||
|
return 'symbol' == typeof value || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|||
|
}
|
|||
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : function(value) {
|
|||
|
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|||
|
}, lt = createRelationalOperation(baseLt), lte = createRelationalOperation(function(value, other) {
|
|||
|
return value <= other;
|
|||
|
});
|
|||
|
function toArray(value) {
|
|||
|
if (!value) return [];
|
|||
|
if (isArrayLike(value)) return isString(value) ? stringToArray(value) : copyArray(value);
|
|||
|
if (symIterator && value[symIterator]) return function(iterator) {
|
|||
|
for(var data, result = []; !(data = iterator.next()).done;)result.push(data.value);
|
|||
|
return result;
|
|||
|
}(value[symIterator]());
|
|||
|
var tag = getTag(value);
|
|||
|
return (tag == mapTag ? mapToArray : tag == setTag ? setToArray : values)(value);
|
|||
|
}
|
|||
|
function toFinite(value) {
|
|||
|
return value ? (value = toNumber(value)) === INFINITY || value === -INFINITY ? (value < 0 ? -1 : 1) * 1.7976931348623157e+308 : value == value ? value : 0 : 0 === value ? value : 0;
|
|||
|
}
|
|||
|
function toInteger(value) {
|
|||
|
var result = toFinite(value), remainder = result % 1;
|
|||
|
return result == result ? remainder ? result - remainder : result : 0;
|
|||
|
}
|
|||
|
function toLength(value) {
|
|||
|
return value ? baseClamp(toInteger(value), 0, 4294967295) : 0;
|
|||
|
}
|
|||
|
function toNumber(value) {
|
|||
|
if ('number' == typeof value) return value;
|
|||
|
if (isSymbol(value)) return NAN;
|
|||
|
if (isObject(value)) {
|
|||
|
var other = 'function' == typeof value.valueOf ? value.valueOf() : value;
|
|||
|
value = isObject(other) ? other + '' : other;
|
|||
|
}
|
|||
|
if ('string' != typeof value) return 0 === value ? value : +value;
|
|||
|
value = baseTrim(value);
|
|||
|
var isBinary = reIsBinary.test(value);
|
|||
|
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|||
|
}
|
|||
|
function toPlainObject(value) {
|
|||
|
return copyObject(value, keysIn(value));
|
|||
|
}
|
|||
|
function toString(value) {
|
|||
|
return null == value ? '' : baseToString(value);
|
|||
|
}
|
|||
|
var assign = createAssigner(function(object, source) {
|
|||
|
if (isPrototype(source) || isArrayLike(source)) {
|
|||
|
copyObject(source, keys(source), object);
|
|||
|
return;
|
|||
|
}
|
|||
|
for(var key in source)hasOwnProperty.call(source, key) && assignValue(object, key, source[key]);
|
|||
|
}), assignIn = createAssigner(function(object, source) {
|
|||
|
copyObject(source, keysIn(source), object);
|
|||
|
}), assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|||
|
copyObject(source, keysIn(source), object, customizer);
|
|||
|
}), assignWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|||
|
copyObject(source, keys(source), object, customizer);
|
|||
|
}), at = flatRest(baseAt), defaults = baseRest(function(object, sources) {
|
|||
|
object = Object1(object);
|
|||
|
var index = -1, length = sources.length, guard = length > 2 ? sources[2] : undefined;
|
|||
|
for(guard && isIterateeCall(sources[0], sources[1], guard) && (length = 1); ++index < length;)for(var source = sources[index], props = keysIn(source), propsIndex = -1, propsLength = props.length; ++propsIndex < propsLength;){
|
|||
|
var key = props[propsIndex], value = object[key];
|
|||
|
(value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) && (object[key] = source[key]);
|
|||
|
}
|
|||
|
return object;
|
|||
|
}), defaultsDeep = baseRest(function(args) {
|
|||
|
return args.push(undefined, customDefaultsMerge), apply(mergeWith, undefined, args);
|
|||
|
});
|
|||
|
function get(object, path, defaultValue) {
|
|||
|
var result = null == object ? undefined : baseGet(object, path);
|
|||
|
return result === undefined ? defaultValue : result;
|
|||
|
}
|
|||
|
function hasIn(object, path) {
|
|||
|
return null != object && hasPath(object, path, baseHasIn);
|
|||
|
}
|
|||
|
var invert = createInverter(function(result, value, key) {
|
|||
|
null != value && 'function' != typeof value.toString && (value = nativeObjectToString.call(value)), result[value] = key;
|
|||
|
}, constant(identity)), invertBy = createInverter(function(result, value, key) {
|
|||
|
null != value && 'function' != typeof value.toString && (value = nativeObjectToString.call(value)), hasOwnProperty.call(result, value) ? result[value].push(key) : result[value] = [
|
|||
|
key
|
|||
|
];
|
|||
|
}, getIteratee), invoke = baseRest(baseInvoke);
|
|||
|
function keys(object) {
|
|||
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|||
|
}
|
|||
|
function keysIn(object) {
|
|||
|
return isArrayLike(object) ? arrayLikeKeys(object, !0) : function(object) {
|
|||
|
if (!isObject(object)) return function(object) {
|
|||
|
var result = [];
|
|||
|
if (null != object) for(var key in Object1(object))result.push(key);
|
|||
|
return result;
|
|||
|
}(object);
|
|||
|
var isProto = isPrototype(object), result = [];
|
|||
|
for(var key in object)'constructor' == key && (isProto || !hasOwnProperty.call(object, key)) || result.push(key);
|
|||
|
return result;
|
|||
|
}(object);
|
|||
|
}
|
|||
|
var merge = createAssigner(function(object, source, srcIndex) {
|
|||
|
baseMerge(object, source, srcIndex);
|
|||
|
}), mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
|
|||
|
baseMerge(object, source, srcIndex, customizer);
|
|||
|
}), omit = flatRest(function(object, paths) {
|
|||
|
var result = {};
|
|||
|
if (null == object) return result;
|
|||
|
var isDeep = !1;
|
|||
|
paths = arrayMap(paths, function(path) {
|
|||
|
return path = castPath(path, object), isDeep || (isDeep = path.length > 1), path;
|
|||
|
}), copyObject(object, getAllKeysIn(object), result), isDeep && (result = baseClone(result, 7, customOmitClone));
|
|||
|
for(var length = paths.length; length--;)baseUnset(result, paths[length]);
|
|||
|
return result;
|
|||
|
}), pick = flatRest(function(object, paths) {
|
|||
|
var object1, paths1;
|
|||
|
return null == object ? {} : basePickBy(object, paths, function(value, path) {
|
|||
|
return hasIn(object, path);
|
|||
|
});
|
|||
|
});
|
|||
|
function pickBy(object, predicate) {
|
|||
|
if (null == object) return {};
|
|||
|
var props = arrayMap(getAllKeysIn(object), function(prop) {
|
|||
|
return [
|
|||
|
prop
|
|||
|
];
|
|||
|
});
|
|||
|
return predicate = getIteratee(predicate), basePickBy(object, props, function(value, path) {
|
|||
|
return predicate(value, path[0]);
|
|||
|
});
|
|||
|
}
|
|||
|
var toPairs = createToPairs(keys), toPairsIn = createToPairs(keysIn);
|
|||
|
function values(object) {
|
|||
|
return null == object ? [] : baseValues(object, keys(object));
|
|||
|
}
|
|||
|
var camelCase = createCompounder(function(result, word, index) {
|
|||
|
return word = word.toLowerCase(), result + (index ? capitalize(word) : word);
|
|||
|
});
|
|||
|
function capitalize(string) {
|
|||
|
return upperFirst(toString(string).toLowerCase());
|
|||
|
}
|
|||
|
function deburr(string) {
|
|||
|
return (string = toString(string)) && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
|||
|
}
|
|||
|
var kebabCase = createCompounder(function(result, word, index) {
|
|||
|
return result + (index ? '-' : '') + word.toLowerCase();
|
|||
|
}), lowerCase = createCompounder(function(result, word, index) {
|
|||
|
return result + (index ? ' ' : '') + word.toLowerCase();
|
|||
|
}), lowerFirst = createCaseFirst('toLowerCase'), snakeCase = createCompounder(function(result, word, index) {
|
|||
|
return result + (index ? '_' : '') + word.toLowerCase();
|
|||
|
}), startCase = createCompounder(function(result, word, index) {
|
|||
|
return result + (index ? ' ' : '') + upperFirst(word);
|
|||
|
}), upperCase = createCompounder(function(result, word, index) {
|
|||
|
return result + (index ? ' ' : '') + word.toUpperCase();
|
|||
|
}), upperFirst = createCaseFirst('toUpperCase');
|
|||
|
function words(string, pattern, guard) {
|
|||
|
if (string = toString(string), undefined === (pattern = guard ? undefined : pattern)) {
|
|||
|
var string1, string2, string3;
|
|||
|
return (string1 = string, reHasUnicodeWord.test(string1)) ? (string2 = string).match(reUnicodeWord) || [] : (string3 = string).match(reAsciiWord) || [];
|
|||
|
}
|
|||
|
return string.match(pattern) || [];
|
|||
|
}
|
|||
|
var attempt = baseRest(function(func, args) {
|
|||
|
try {
|
|||
|
return apply(func, undefined, args);
|
|||
|
} catch (e) {
|
|||
|
return isError(e) ? e : new Error(e);
|
|||
|
}
|
|||
|
}), bindAll = flatRest(function(object, methodNames) {
|
|||
|
return arrayEach(methodNames, function(key) {
|
|||
|
key = toKey(key), baseAssignValue(object, key, bind(object[key], object));
|
|||
|
}), object;
|
|||
|
});
|
|||
|
function constant(value) {
|
|||
|
return function() {
|
|||
|
return value;
|
|||
|
};
|
|||
|
}
|
|||
|
var flow = createFlow(), flowRight = createFlow(!0);
|
|||
|
function identity(value) {
|
|||
|
return value;
|
|||
|
}
|
|||
|
function iteratee(func) {
|
|||
|
return baseIteratee('function' == typeof func ? func : baseClone(func, 1));
|
|||
|
}
|
|||
|
var method = baseRest(function(path, args) {
|
|||
|
return function(object) {
|
|||
|
return baseInvoke(object, path, args);
|
|||
|
};
|
|||
|
}), methodOf = baseRest(function(object, args) {
|
|||
|
return function(path) {
|
|||
|
return baseInvoke(object, path, args);
|
|||
|
};
|
|||
|
});
|
|||
|
function mixin(object, source, options) {
|
|||
|
var props = keys(source), methodNames = baseFunctions(source, props);
|
|||
|
null != options || isObject(source) && (methodNames.length || !props.length) || (options = source, source = object, object = this, methodNames = baseFunctions(source, keys(source)));
|
|||
|
var chain = !(isObject(options) && 'chain' in options) || !!options.chain, isFunc = isFunction(object);
|
|||
|
return arrayEach(methodNames, function(methodName) {
|
|||
|
var func = source[methodName];
|
|||
|
object[methodName] = func, isFunc && (object.prototype[methodName] = function() {
|
|||
|
var chainAll = this.__chain__;
|
|||
|
if (chain || chainAll) {
|
|||
|
var result = object(this.__wrapped__);
|
|||
|
return (result.__actions__ = copyArray(this.__actions__)).push({
|
|||
|
func: func,
|
|||
|
args: arguments,
|
|||
|
thisArg: object
|
|||
|
}), result.__chain__ = chainAll, result;
|
|||
|
}
|
|||
|
return func.apply(object, arrayPush([
|
|||
|
this.value()
|
|||
|
], arguments));
|
|||
|
});
|
|||
|
}), object;
|
|||
|
}
|
|||
|
function noop() {}
|
|||
|
var over = createOver(arrayMap), overEvery = createOver(arrayEvery), overSome = createOver(arraySome);
|
|||
|
function property(path) {
|
|||
|
var path1;
|
|||
|
return isKey(path) ? baseProperty(toKey(path)) : function(object) {
|
|||
|
return baseGet(object, path);
|
|||
|
};
|
|||
|
}
|
|||
|
var range = createRange(), rangeRight = createRange(!0);
|
|||
|
function stubArray() {
|
|||
|
return [];
|
|||
|
}
|
|||
|
function stubFalse() {
|
|||
|
return !1;
|
|||
|
}
|
|||
|
function stubObject() {
|
|||
|
return {};
|
|||
|
}
|
|||
|
function stubString() {
|
|||
|
return '';
|
|||
|
}
|
|||
|
function stubTrue() {
|
|||
|
return !0;
|
|||
|
}
|
|||
|
var source, add = createMathOperation(function(augend, addend) {
|
|||
|
return augend + addend;
|
|||
|
}, 0), ceil = createRound('ceil'), divide = createMathOperation(function(dividend, divisor) {
|
|||
|
return dividend / divisor;
|
|||
|
}, 1), floor = createRound('floor'), multiply = createMathOperation(function(multiplier, multiplicand) {
|
|||
|
return multiplier * multiplicand;
|
|||
|
}, 1), round = createRound('round'), subtract = createMathOperation(function(minuend, subtrahend) {
|
|||
|
return minuend - subtrahend;
|
|||
|
}, 0);
|
|||
|
return lodash.after = function(n, func) {
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return n = toInteger(n), function() {
|
|||
|
if (--n < 1) return func.apply(this, arguments);
|
|||
|
};
|
|||
|
}, lodash.ary = ary, lodash.assign = assign, lodash.assignIn = assignIn, lodash.assignInWith = assignInWith, lodash.assignWith = assignWith, lodash.at = at, lodash.before = before, lodash.bind = bind, lodash.bindAll = bindAll, lodash.bindKey = bindKey, lodash.castArray = function() {
|
|||
|
if (!arguments.length) return [];
|
|||
|
var value = arguments[0];
|
|||
|
return isArray(value) ? value : [
|
|||
|
value
|
|||
|
];
|
|||
|
}, lodash.chain = chain, lodash.chunk = function(array, size, guard) {
|
|||
|
size = (guard ? isIterateeCall(array, size, guard) : size === undefined) ? 1 : nativeMax(toInteger(size), 0);
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (!length || size < 1) return [];
|
|||
|
for(var index = 0, resIndex = 0, result = Array1(nativeCeil(length / size)); index < length;)result[resIndex++] = baseSlice(array, index, index += size);
|
|||
|
return result;
|
|||
|
}, lodash.compact = function(array) {
|
|||
|
for(var index = -1, length = null == array ? 0 : array.length, resIndex = 0, result = []; ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
value && (result[resIndex++] = value);
|
|||
|
}
|
|||
|
return result;
|
|||
|
}, lodash.concat = function() {
|
|||
|
var length = arguments.length;
|
|||
|
if (!length) return [];
|
|||
|
for(var args = Array1(length - 1), array = arguments[0], index = length; index--;)args[index - 1] = arguments[index];
|
|||
|
return arrayPush(isArray(array) ? copyArray(array) : [
|
|||
|
array
|
|||
|
], baseFlatten(args, 1));
|
|||
|
}, lodash.cond = function(pairs) {
|
|||
|
var length = null == pairs ? 0 : pairs.length, toIteratee = getIteratee();
|
|||
|
return pairs = length ? arrayMap(pairs, function(pair) {
|
|||
|
if ('function' != typeof pair[1]) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return [
|
|||
|
toIteratee(pair[0]),
|
|||
|
pair[1]
|
|||
|
];
|
|||
|
}) : [], baseRest(function(args) {
|
|||
|
for(var index = -1; ++index < length;){
|
|||
|
var pair = pairs[index];
|
|||
|
if (apply(pair[0], this, args)) return apply(pair[1], this, args);
|
|||
|
}
|
|||
|
});
|
|||
|
}, lodash.conforms = function(source) {
|
|||
|
var source1, props;
|
|||
|
return source1 = baseClone(source, 1), props = keys(source1), function(object) {
|
|||
|
return baseConformsTo(object, source1, props);
|
|||
|
};
|
|||
|
}, lodash.constant = constant, lodash.countBy = countBy, lodash.create = function(prototype, properties) {
|
|||
|
var result = baseCreate(prototype);
|
|||
|
return null == properties ? result : baseAssign(result, properties);
|
|||
|
}, lodash.curry = curry, lodash.curryRight = curryRight, lodash.debounce = debounce, lodash.defaults = defaults, lodash.defaultsDeep = defaultsDeep, lodash.defer = defer, lodash.delay = delay, lodash.difference = difference, lodash.differenceBy = differenceBy, lodash.differenceWith = differenceWith, lodash.drop = function(array, n, guard) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? (n = guard || n === undefined ? 1 : toInteger(n), baseSlice(array, n < 0 ? 0 : n, length)) : [];
|
|||
|
}, lodash.dropRight = function(array, n, guard) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? (n = guard || n === undefined ? 1 : toInteger(n), baseSlice(array, 0, (n = length - n) < 0 ? 0 : n)) : [];
|
|||
|
}, lodash.dropRightWhile = function(array, predicate) {
|
|||
|
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !0, !0) : [];
|
|||
|
}, lodash.dropWhile = function(array, predicate) {
|
|||
|
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !0) : [];
|
|||
|
}, lodash.fill = function(array, value, start, end) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? (start && 'number' != typeof start && isIterateeCall(array, value, start) && (start = 0, end = length), function(array, value, start, end) {
|
|||
|
var length = array.length;
|
|||
|
for((start = toInteger(start)) < 0 && (start = -start > length ? 0 : length + start), (end = end === undefined || end > length ? length : toInteger(end)) < 0 && (end += length), end = start > end ? 0 : toLength(end); start < end;)array[start++] = value;
|
|||
|
return array;
|
|||
|
}(array, value, start, end)) : [];
|
|||
|
}, lodash.filter = function(collection, predicate) {
|
|||
|
return (isArray(collection) ? arrayFilter : baseFilter)(collection, getIteratee(predicate, 3));
|
|||
|
}, lodash.flatMap = function(collection, iteratee) {
|
|||
|
return baseFlatten(map(collection, iteratee), 1);
|
|||
|
}, lodash.flatMapDeep = function(collection, iteratee) {
|
|||
|
return baseFlatten(map(collection, iteratee), INFINITY);
|
|||
|
}, lodash.flatMapDepth = function(collection, iteratee, depth) {
|
|||
|
return depth = depth === undefined ? 1 : toInteger(depth), baseFlatten(map(collection, iteratee), depth);
|
|||
|
}, lodash.flatten = flatten, lodash.flattenDeep = function(array) {
|
|||
|
return (null == array ? 0 : array.length) ? baseFlatten(array, INFINITY) : [];
|
|||
|
}, lodash.flattenDepth = function(array, depth) {
|
|||
|
return (null == array ? 0 : array.length) ? (depth = depth === undefined ? 1 : toInteger(depth), baseFlatten(array, depth)) : [];
|
|||
|
}, lodash.flip = function(func) {
|
|||
|
return createWrap(func, 512);
|
|||
|
}, lodash.flow = flow, lodash.flowRight = flowRight, lodash.fromPairs = function(pairs) {
|
|||
|
for(var index = -1, length = null == pairs ? 0 : pairs.length, result = {}; ++index < length;){
|
|||
|
var pair = pairs[index];
|
|||
|
result[pair[0]] = pair[1];
|
|||
|
}
|
|||
|
return result;
|
|||
|
}, lodash.functions = function(object) {
|
|||
|
return null == object ? [] : baseFunctions(object, keys(object));
|
|||
|
}, lodash.functionsIn = function(object) {
|
|||
|
return null == object ? [] : baseFunctions(object, keysIn(object));
|
|||
|
}, lodash.groupBy = groupBy, lodash.initial = function(array) {
|
|||
|
return (null == array ? 0 : array.length) ? baseSlice(array, 0, -1) : [];
|
|||
|
}, lodash.intersection = intersection, lodash.intersectionBy = intersectionBy, lodash.intersectionWith = intersectionWith, lodash.invert = invert, lodash.invertBy = invertBy, lodash.invokeMap = invokeMap, lodash.iteratee = iteratee, lodash.keyBy = keyBy, lodash.keys = keys, lodash.keysIn = keysIn, lodash.map = map, lodash.mapKeys = function(object, iteratee) {
|
|||
|
var result = {};
|
|||
|
return iteratee = getIteratee(iteratee, 3), baseForOwn(object, function(value, key, object) {
|
|||
|
baseAssignValue(result, iteratee(value, key, object), value);
|
|||
|
}), result;
|
|||
|
}, lodash.mapValues = function(object, iteratee) {
|
|||
|
var result = {};
|
|||
|
return iteratee = getIteratee(iteratee, 3), baseForOwn(object, function(value, key, object) {
|
|||
|
baseAssignValue(result, key, iteratee(value, key, object));
|
|||
|
}), result;
|
|||
|
}, lodash.matches = function(source) {
|
|||
|
return baseMatches(baseClone(source, 1));
|
|||
|
}, lodash.matchesProperty = function(path, srcValue) {
|
|||
|
return baseMatchesProperty(path, baseClone(srcValue, 1));
|
|||
|
}, lodash.memoize = memoize, lodash.merge = merge, lodash.mergeWith = mergeWith, lodash.method = method, lodash.methodOf = methodOf, lodash.mixin = mixin, lodash.negate = negate, lodash.nthArg = function(n) {
|
|||
|
return n = toInteger(n), baseRest(function(args) {
|
|||
|
return baseNth(args, n);
|
|||
|
});
|
|||
|
}, lodash.omit = omit, lodash.omitBy = function(object, predicate) {
|
|||
|
return pickBy(object, negate(getIteratee(predicate)));
|
|||
|
}, lodash.once = function(func) {
|
|||
|
return before(2, func);
|
|||
|
}, lodash.orderBy = function(collection, iteratees, orders, guard) {
|
|||
|
return null == collection ? [] : (isArray(iteratees) || (iteratees = null == iteratees ? [] : [
|
|||
|
iteratees
|
|||
|
]), orders = guard ? undefined : orders, isArray(orders) || (orders = null == orders ? [] : [
|
|||
|
orders
|
|||
|
]), baseOrderBy(collection, iteratees, orders));
|
|||
|
}, lodash.over = over, lodash.overArgs = overArgs, lodash.overEvery = overEvery, lodash.overSome = overSome, lodash.partial = partial, lodash.partialRight = partialRight, lodash.partition = partition, lodash.pick = pick, lodash.pickBy = pickBy, lodash.property = property, lodash.propertyOf = function(object) {
|
|||
|
return function(path) {
|
|||
|
return null == object ? undefined : baseGet(object, path);
|
|||
|
};
|
|||
|
}, lodash.pull = pull, lodash.pullAll = pullAll, lodash.pullAllBy = function(array, values, iteratee) {
|
|||
|
return array && array.length && values && values.length ? basePullAll(array, values, getIteratee(iteratee, 2)) : array;
|
|||
|
}, lodash.pullAllWith = function(array, values, comparator) {
|
|||
|
return array && array.length && values && values.length ? basePullAll(array, values, undefined, comparator) : array;
|
|||
|
}, lodash.pullAt = pullAt, lodash.range = range, lodash.rangeRight = rangeRight, lodash.rearg = rearg, lodash.reject = function(collection, predicate) {
|
|||
|
return (isArray(collection) ? arrayFilter : baseFilter)(collection, negate(getIteratee(predicate, 3)));
|
|||
|
}, lodash.remove = function(array, predicate) {
|
|||
|
var result = [];
|
|||
|
if (!(array && array.length)) return result;
|
|||
|
var index = -1, indexes = [], length = array.length;
|
|||
|
for(predicate = getIteratee(predicate, 3); ++index < length;){
|
|||
|
var value = array[index];
|
|||
|
predicate(value, index, array) && (result.push(value), indexes.push(index));
|
|||
|
}
|
|||
|
return basePullAt(array, indexes), result;
|
|||
|
}, lodash.rest = function(func, start) {
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return start = start === undefined ? start : toInteger(start), baseRest(func, start);
|
|||
|
}, lodash.reverse = reverse, lodash.sampleSize = function(collection, n, guard) {
|
|||
|
return n = (guard ? isIterateeCall(collection, n, guard) : n === undefined) ? 1 : toInteger(n), (isArray(collection) ? arraySampleSize : baseSampleSize)(collection, n);
|
|||
|
}, lodash.set = function(object, path, value) {
|
|||
|
return null == object ? object : baseSet(object, path, value);
|
|||
|
}, lodash.setWith = function(object, path, value, customizer) {
|
|||
|
return customizer = 'function' == typeof customizer ? customizer : undefined, null == object ? object : baseSet(object, path, value, customizer);
|
|||
|
}, lodash.shuffle = function(collection) {
|
|||
|
return (isArray(collection) ? arrayShuffle : baseShuffle)(collection);
|
|||
|
}, lodash.slice = function(array, start, end) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? (end && 'number' != typeof end && isIterateeCall(array, start, end) ? (start = 0, end = length) : (start = null == start ? 0 : toInteger(start), end = end === undefined ? length : toInteger(end)), baseSlice(array, start, end)) : [];
|
|||
|
}, lodash.sortBy = sortBy, lodash.sortedUniq = function(array) {
|
|||
|
return array && array.length ? baseSortedUniq(array) : [];
|
|||
|
}, lodash.sortedUniqBy = function(array, iteratee) {
|
|||
|
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : [];
|
|||
|
}, lodash.split = function(string, separator, limit) {
|
|||
|
return (limit && 'number' != typeof limit && isIterateeCall(string, separator, limit) && (separator = limit = undefined), limit = limit === undefined ? 4294967295 : limit >>> 0) ? (string = toString(string)) && ('string' == typeof separator || null != separator && !isRegExp(separator)) && !(separator = baseToString(separator)) && hasUnicode(string) ? castSlice(stringToArray(string), 0, limit) : string.split(separator, limit) : [];
|
|||
|
}, lodash.spread = function(func, start) {
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return start = null == start ? 0 : nativeMax(toInteger(start), 0), baseRest(function(args) {
|
|||
|
var array = args[start], otherArgs = castSlice(args, 0, start);
|
|||
|
return array && arrayPush(otherArgs, array), apply(func, this, otherArgs);
|
|||
|
});
|
|||
|
}, lodash.tail = function(array) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? baseSlice(array, 1, length) : [];
|
|||
|
}, lodash.take = function(array, n, guard) {
|
|||
|
return array && array.length ? (n = guard || n === undefined ? 1 : toInteger(n), baseSlice(array, 0, n < 0 ? 0 : n)) : [];
|
|||
|
}, lodash.takeRight = function(array, n, guard) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
return length ? (n = guard || n === undefined ? 1 : toInteger(n), baseSlice(array, (n = length - n) < 0 ? 0 : n, length)) : [];
|
|||
|
}, lodash.takeRightWhile = function(array, predicate) {
|
|||
|
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), !1, !0) : [];
|
|||
|
}, lodash.takeWhile = function(array, predicate) {
|
|||
|
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
|
|||
|
}, lodash.tap = tap, lodash.throttle = function(func, wait, options) {
|
|||
|
var leading = !0, trailing = !0;
|
|||
|
if ('function' != typeof func) throw new TypeError(FUNC_ERROR_TEXT);
|
|||
|
return isObject(options) && (leading = 'leading' in options ? !!options.leading : leading, trailing = 'trailing' in options ? !!options.trailing : trailing), debounce(func, wait, {
|
|||
|
leading: leading,
|
|||
|
maxWait: wait,
|
|||
|
trailing: trailing
|
|||
|
});
|
|||
|
}, lodash.thru = thru, lodash.toArray = toArray, lodash.toPairs = toPairs, lodash.toPairsIn = toPairsIn, lodash.toPath = function(value) {
|
|||
|
return isArray(value) ? arrayMap(value, toKey) : isSymbol(value) ? [
|
|||
|
value
|
|||
|
] : copyArray(stringToPath(toString(value)));
|
|||
|
}, lodash.toPlainObject = toPlainObject, lodash.transform = function(object, iteratee, accumulator) {
|
|||
|
var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|||
|
if (iteratee = getIteratee(iteratee, 4), null == accumulator) {
|
|||
|
var Ctor = object && object.constructor;
|
|||
|
accumulator = isArrLike ? isArr ? new Ctor : [] : isObject(object) && isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|||
|
}
|
|||
|
return (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
|
|||
|
return iteratee(accumulator, value, index, object);
|
|||
|
}), accumulator;
|
|||
|
}, lodash.unary = function(func) {
|
|||
|
return ary(func, 1);
|
|||
|
}, lodash.union = union, lodash.unionBy = unionBy, lodash.unionWith = unionWith, lodash.uniq = function(array) {
|
|||
|
return array && array.length ? baseUniq(array) : [];
|
|||
|
}, lodash.uniqBy = function(array, iteratee) {
|
|||
|
return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : [];
|
|||
|
}, lodash.uniqWith = function(array, comparator) {
|
|||
|
return comparator = 'function' == typeof comparator ? comparator : undefined, array && array.length ? baseUniq(array, undefined, comparator) : [];
|
|||
|
}, lodash.unset = function(object, path) {
|
|||
|
return null == object || baseUnset(object, path);
|
|||
|
}, lodash.unzip = unzip, lodash.unzipWith = unzipWith, lodash.update = function(object, path, updater) {
|
|||
|
return null == object ? object : baseUpdate(object, path, castFunction(updater));
|
|||
|
}, lodash.updateWith = function(object, path, updater, customizer) {
|
|||
|
return customizer = 'function' == typeof customizer ? customizer : undefined, null == object ? object : baseUpdate(object, path, castFunction(updater), customizer);
|
|||
|
}, lodash.values = values, lodash.valuesIn = function(object) {
|
|||
|
return null == object ? [] : baseValues(object, keysIn(object));
|
|||
|
}, lodash.without = without, lodash.words = words, lodash.wrap = function(value, wrapper) {
|
|||
|
return partial(castFunction(wrapper), value);
|
|||
|
}, lodash.xor = xor, lodash.xorBy = xorBy, lodash.xorWith = xorWith, lodash.zip = zip, lodash.zipObject = function(props, values) {
|
|||
|
return baseZipObject(props || [], values || [], assignValue);
|
|||
|
}, lodash.zipObjectDeep = function(props, values) {
|
|||
|
return baseZipObject(props || [], values || [], baseSet);
|
|||
|
}, lodash.zipWith = zipWith, lodash.entries = toPairs, lodash.entriesIn = toPairsIn, lodash.extend = assignIn, lodash.extendWith = assignInWith, mixin(lodash, lodash), lodash.add = add, lodash.attempt = attempt, lodash.camelCase = camelCase, lodash.capitalize = capitalize, lodash.ceil = ceil, lodash.clamp = function(number, lower, upper) {
|
|||
|
return upper === undefined && (upper = lower, lower = undefined), upper !== undefined && (upper = (upper = toNumber(upper)) == upper ? upper : 0), lower !== undefined && (lower = (lower = toNumber(lower)) == lower ? lower : 0), baseClamp(toNumber(number), lower, upper);
|
|||
|
}, lodash.clone = function(value) {
|
|||
|
return baseClone(value, 4);
|
|||
|
}, lodash.cloneDeep = function(value) {
|
|||
|
return baseClone(value, 5);
|
|||
|
}, lodash.cloneDeepWith = function(value, customizer) {
|
|||
|
return customizer = 'function' == typeof customizer ? customizer : undefined, baseClone(value, 5, customizer);
|
|||
|
}, lodash.cloneWith = function(value, customizer) {
|
|||
|
return customizer = 'function' == typeof customizer ? customizer : undefined, baseClone(value, 4, customizer);
|
|||
|
}, lodash.conformsTo = function(object, source) {
|
|||
|
return null == source || baseConformsTo(object, source, keys(source));
|
|||
|
}, lodash.deburr = deburr, lodash.defaultTo = function(value, defaultValue) {
|
|||
|
return null == value || value != value ? defaultValue : value;
|
|||
|
}, lodash.divide = divide, lodash.endsWith = function(string, target, position) {
|
|||
|
string = toString(string), target = baseToString(target);
|
|||
|
var length = string.length, end = position = position === undefined ? length : baseClamp(toInteger(position), 0, length);
|
|||
|
return (position -= target.length) >= 0 && string.slice(position, end) == target;
|
|||
|
}, lodash.eq = eq, lodash.escape = function(string) {
|
|||
|
return (string = toString(string)) && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
|
|||
|
}, lodash.escapeRegExp = function(string) {
|
|||
|
return (string = toString(string)) && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
|
|||
|
}, lodash.every = function(collection, predicate, guard) {
|
|||
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
|||
|
return guard && isIterateeCall(collection, predicate, guard) && (predicate = undefined), func(collection, getIteratee(predicate, 3));
|
|||
|
}, lodash.find = find, lodash.findIndex = findIndex, lodash.findKey = function(object, predicate) {
|
|||
|
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
|
|||
|
}, lodash.findLast = findLast, lodash.findLastIndex = findLastIndex, lodash.findLastKey = function(object, predicate) {
|
|||
|
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
|
|||
|
}, lodash.floor = floor, lodash.forEach = forEach, lodash.forEachRight = forEachRight, lodash.forIn = function(object, iteratee) {
|
|||
|
return null == object ? object : baseFor(object, getIteratee(iteratee, 3), keysIn);
|
|||
|
}, lodash.forInRight = function(object, iteratee) {
|
|||
|
return null == object ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn);
|
|||
|
}, lodash.forOwn = function(object, iteratee) {
|
|||
|
return object && baseForOwn(object, getIteratee(iteratee, 3));
|
|||
|
}, lodash.forOwnRight = function(object, iteratee) {
|
|||
|
return object && baseForOwnRight(object, getIteratee(iteratee, 3));
|
|||
|
}, lodash.get = get, lodash.gt = gt, lodash.gte = gte, lodash.has = function(object, path) {
|
|||
|
return null != object && hasPath(object, path, baseHas);
|
|||
|
}, lodash.hasIn = hasIn, lodash.head = head, lodash.identity = identity, lodash.includes = function(collection, value, fromIndex, guard) {
|
|||
|
collection = isArrayLike(collection) ? collection : values(collection), fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
|
|||
|
var length = collection.length;
|
|||
|
return fromIndex < 0 && (fromIndex = nativeMax(length + fromIndex, 0)), isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|||
|
}, lodash.indexOf = function(array, value, fromIndex) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (!length) return -1;
|
|||
|
var index = null == fromIndex ? 0 : toInteger(fromIndex);
|
|||
|
return index < 0 && (index = nativeMax(length + index, 0)), baseIndexOf(array, value, index);
|
|||
|
}, lodash.inRange = function(number, start, end) {
|
|||
|
var number1, start1, end1;
|
|||
|
return start = toFinite(start), end === undefined ? (end = start, start = 0) : end = toFinite(end), number1 = number = toNumber(number), start1 = start, end1 = end, number1 >= nativeMin(start1, end1) && number1 < nativeMax(start1, end1);
|
|||
|
}, lodash.invoke = invoke, lodash.isArguments = isArguments, lodash.isArray = isArray, lodash.isArrayBuffer = isArrayBuffer, lodash.isArrayLike = isArrayLike, lodash.isArrayLikeObject = isArrayLikeObject, lodash.isBoolean = function(value) {
|
|||
|
return !0 === value || !1 === value || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|||
|
}, lodash.isBuffer = isBuffer, lodash.isDate = isDate, lodash.isElement = function(value) {
|
|||
|
return isObjectLike(value) && 1 === value.nodeType && !isPlainObject(value);
|
|||
|
}, lodash.isEmpty = function(value) {
|
|||
|
if (null == value) return !0;
|
|||
|
if (isArrayLike(value) && (isArray(value) || 'string' == typeof value || 'function' == typeof value.splice || isBuffer(value) || isTypedArray(value) || isArguments(value))) return !value.length;
|
|||
|
var tag = getTag(value);
|
|||
|
if (tag == mapTag || tag == setTag) return !value.size;
|
|||
|
if (isPrototype(value)) return !baseKeys(value).length;
|
|||
|
for(var key in value)if (hasOwnProperty.call(value, key)) return !1;
|
|||
|
return !0;
|
|||
|
}, lodash.isEqual = isEqual, lodash.isEqualWith = function(value, other, customizer) {
|
|||
|
var result = (customizer = 'function' == typeof customizer ? customizer : undefined) ? customizer(value, other) : undefined;
|
|||
|
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
|
|||
|
}, lodash.isError = isError, lodash.isFinite = function(value) {
|
|||
|
return 'number' == typeof value && nativeIsFinite(value);
|
|||
|
}, lodash.isFunction = isFunction, lodash.isInteger = isInteger, lodash.isLength = isLength, lodash.isMap = isMap, lodash.isMatch = function(object, source) {
|
|||
|
return object === source || baseIsMatch(object, source, getMatchData(source));
|
|||
|
}, lodash.isMatchWith = function(object, source, customizer) {
|
|||
|
return customizer = 'function' == typeof customizer ? customizer : undefined, baseIsMatch(object, source, getMatchData(source), customizer);
|
|||
|
}, lodash.isNaN = function(value) {
|
|||
|
return isNumber(value) && value != +value;
|
|||
|
}, lodash.isNative = function(value) {
|
|||
|
if (isMaskable(value)) throw new Error('Unsupported core-js use. Try https://npms.io/search?q=ponyfill.');
|
|||
|
return baseIsNative(value);
|
|||
|
}, lodash.isNil = function(value) {
|
|||
|
return null == value;
|
|||
|
}, lodash.isNull = function(value) {
|
|||
|
return null === value;
|
|||
|
}, lodash.isNumber = isNumber, lodash.isObject = isObject, lodash.isObjectLike = isObjectLike, lodash.isPlainObject = isPlainObject, lodash.isRegExp = isRegExp, lodash.isSafeInteger = function(value) {
|
|||
|
return isInteger(value) && value >= -9007199254740991 && value <= 9007199254740991;
|
|||
|
}, lodash.isSet = isSet, lodash.isString = isString, lodash.isSymbol = isSymbol, lodash.isTypedArray = isTypedArray, lodash.isUndefined = function(value) {
|
|||
|
return value === undefined;
|
|||
|
}, lodash.isWeakMap = function(value) {
|
|||
|
return isObjectLike(value) && getTag(value) == weakMapTag;
|
|||
|
}, lodash.isWeakSet = function(value) {
|
|||
|
return isObjectLike(value) && '[object WeakSet]' == baseGetTag(value);
|
|||
|
}, lodash.join = function(array, separator) {
|
|||
|
return null == array ? '' : nativeJoin.call(array, separator);
|
|||
|
}, lodash.kebabCase = kebabCase, lodash.last = last, lodash.lastIndexOf = function(array, value, fromIndex) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (!length) return -1;
|
|||
|
var index = length;
|
|||
|
return fromIndex !== undefined && (index = (index = toInteger(fromIndex)) < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1)), value == value ? function(array, value, fromIndex) {
|
|||
|
for(var index = fromIndex + 1; index-- && array[index] !== value;);
|
|||
|
return index;
|
|||
|
}(array, value, index) : baseFindIndex(array, baseIsNaN, index, !0);
|
|||
|
}, lodash.lowerCase = lowerCase, lodash.lowerFirst = lowerFirst, lodash.lt = lt, lodash.lte = lte, lodash.max = function(array) {
|
|||
|
return array && array.length ? baseExtremum(array, identity, baseGt) : undefined;
|
|||
|
}, lodash.maxBy = function(array, iteratee) {
|
|||
|
return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined;
|
|||
|
}, lodash.mean = function(array) {
|
|||
|
return baseMean(array, identity);
|
|||
|
}, lodash.meanBy = function(array, iteratee) {
|
|||
|
return baseMean(array, getIteratee(iteratee, 2));
|
|||
|
}, lodash.min = function(array) {
|
|||
|
return array && array.length ? baseExtremum(array, identity, baseLt) : undefined;
|
|||
|
}, lodash.minBy = function(array, iteratee) {
|
|||
|
return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined;
|
|||
|
}, lodash.stubArray = stubArray, lodash.stubFalse = stubFalse, lodash.stubObject = stubObject, lodash.stubString = stubString, lodash.stubTrue = stubTrue, lodash.multiply = multiply, lodash.nth = function(array, n) {
|
|||
|
return array && array.length ? baseNth(array, toInteger(n)) : undefined;
|
|||
|
}, lodash.noConflict = function() {
|
|||
|
return root._ === this && (root._ = oldDash), this;
|
|||
|
}, lodash.noop = noop, lodash.now = now, lodash.pad = function(string, length, chars) {
|
|||
|
string = toString(string);
|
|||
|
var strLength = (length = toInteger(length)) ? stringSize(string) : 0;
|
|||
|
if (!length || strLength >= length) return string;
|
|||
|
var mid = (length - strLength) / 2;
|
|||
|
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
|
|||
|
}, lodash.padEnd = function(string, length, chars) {
|
|||
|
string = toString(string);
|
|||
|
var strLength = (length = toInteger(length)) ? stringSize(string) : 0;
|
|||
|
return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
|
|||
|
}, lodash.padStart = function(string, length, chars) {
|
|||
|
string = toString(string);
|
|||
|
var strLength = (length = toInteger(length)) ? stringSize(string) : 0;
|
|||
|
return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
|
|||
|
}, lodash.parseInt = function(string, radix, guard) {
|
|||
|
return guard || null == radix ? radix = 0 : radix && (radix = +radix), nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
|
|||
|
}, lodash.random = function(lower, upper, floating) {
|
|||
|
if (floating && 'boolean' != typeof floating && isIterateeCall(lower, upper, floating) && (upper = floating = undefined), floating === undefined && ('boolean' == typeof upper ? (floating = upper, upper = undefined) : 'boolean' == typeof lower && (floating = lower, lower = undefined)), lower === undefined && upper === undefined ? (lower = 0, upper = 1) : (lower = toFinite(lower), upper === undefined ? (upper = lower, lower = 0) : upper = toFinite(upper)), lower > upper) {
|
|||
|
var temp = lower;
|
|||
|
lower = upper, upper = temp;
|
|||
|
}
|
|||
|
if (floating || lower % 1 || upper % 1) {
|
|||
|
var rand = nativeRandom();
|
|||
|
return nativeMin(lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), upper);
|
|||
|
}
|
|||
|
return baseRandom(lower, upper);
|
|||
|
}, lodash.reduce = function(collection, iteratee, accumulator) {
|
|||
|
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|||
|
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
|||
|
}, lodash.reduceRight = function(collection, iteratee, accumulator) {
|
|||
|
var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
|
|||
|
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
|
|||
|
}, lodash.repeat = function(string, n, guard) {
|
|||
|
return n = (guard ? isIterateeCall(string, n, guard) : n === undefined) ? 1 : toInteger(n), baseRepeat(toString(string), n);
|
|||
|
}, lodash.replace = function() {
|
|||
|
var args = arguments, string = toString(args[0]);
|
|||
|
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|||
|
}, lodash.result = function(object, path, defaultValue) {
|
|||
|
path = castPath(path, object);
|
|||
|
var index = -1, length = path.length;
|
|||
|
for(length || (length = 1, object = undefined); ++index < length;){
|
|||
|
var value = null == object ? undefined : object[toKey(path[index])];
|
|||
|
value === undefined && (index = length, value = defaultValue), object = isFunction(value) ? value.call(object) : value;
|
|||
|
}
|
|||
|
return object;
|
|||
|
}, lodash.round = round, lodash.runInContext = runInContext, lodash.sample = function(collection) {
|
|||
|
return (isArray(collection) ? arraySample : baseSample)(collection);
|
|||
|
}, lodash.size = function(collection) {
|
|||
|
if (null == collection) return 0;
|
|||
|
if (isArrayLike(collection)) return isString(collection) ? stringSize(collection) : collection.length;
|
|||
|
var tag = getTag(collection);
|
|||
|
return tag == mapTag || tag == setTag ? collection.size : baseKeys(collection).length;
|
|||
|
}, lodash.snakeCase = snakeCase, lodash.some = function(collection, predicate, guard) {
|
|||
|
var func = isArray(collection) ? arraySome : baseSome;
|
|||
|
return guard && isIterateeCall(collection, predicate, guard) && (predicate = undefined), func(collection, getIteratee(predicate, 3));
|
|||
|
}, lodash.sortedIndex = sortedIndex, lodash.sortedIndexBy = function(array, value, iteratee) {
|
|||
|
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
|
|||
|
}, lodash.sortedIndexOf = function(array, value) {
|
|||
|
var length = null == array ? 0 : array.length;
|
|||
|
if (length) {
|
|||
|
var index = baseSortedIndex(array, value);
|
|||
|
if (index < length && eq(array[index], value)) return index;
|
|||
|
}
|
|||
|
return -1;
|
|||
|
}, lodash.sortedLastIndex = function(array, value) {
|
|||
|
return baseSortedIndex(array, value, !0);
|
|||
|
}, lodash.sortedLastIndexBy = function(array, value, iteratee) {
|
|||
|
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), !0);
|
|||
|
}, lodash.sortedLastIndexOf = function(array, value) {
|
|||
|
if (null == array ? 0 : array.length) {
|
|||
|
var index = baseSortedIndex(array, value, !0) - 1;
|
|||
|
if (eq(array[index], value)) return index;
|
|||
|
}
|
|||
|
return -1;
|
|||
|
}, lodash.startCase = startCase, lodash.startsWith = function(string, target, position) {
|
|||
|
return string = toString(string), position = null == position ? 0 : baseClamp(toInteger(position), 0, string.length), target = baseToString(target), string.slice(position, position + target.length) == target;
|
|||
|
}, lodash.subtract = subtract, lodash.sum = function(array) {
|
|||
|
return array && array.length ? baseSum(array, identity) : 0;
|
|||
|
}, lodash.sumBy = function(array, iteratee) {
|
|||
|
return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0;
|
|||
|
}, lodash.template = function(string, options, guard) {
|
|||
|
var settings = lodash.templateSettings;
|
|||
|
guard && isIterateeCall(string, options, guard) && (options = undefined), string = toString(string), options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|||
|
var isEscaping, isEvaluating, imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys), index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '", reDelimiters = RegExp1((options.escape || reNoMatch).source + '|' + interpolate.source + '|' + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + (options.evaluate || reNoMatch).source + '|$', 'g'), sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') ? (options.sourceURL + '').replace(/\s/g, ' ') : 'lodash.templateSources[' + ++templateCounter + ']') + '\n';
|
|||
|
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|||
|
return interpolateValue || (interpolateValue = esTemplateValue), source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar), escapeValue && (isEscaping = !0, source += "' +\n__e(" + escapeValue + ") +\n'"), evaluateValue && (isEvaluating = !0, source += "';\n" + evaluateValue + ";\n__p += '"), interpolateValue && (source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"), index = offset + match.length, match;
|
|||
|
}), source += "';\n";
|
|||
|
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
|
|||
|
if (variable) {
|
|||
|
if (reForbiddenIdentifierChars.test(variable)) throw new Error('Invalid `variable` option passed into `_.template`');
|
|||
|
} else source = 'with (obj) {\n' + source + '\n}\n';
|
|||
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source).replace(reEmptyStringMiddle, '$1').replace(reEmptyStringTrailing, '$1;'), source = 'function(' + (variable || 'obj') + ') {\n' + (variable ? '' : 'obj || (obj = {});\n') + "var __t, __p = ''" + (isEscaping ? ', __e = _.escape' : '') + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ';\n') + source + 'return __p\n}';
|
|||
|
var result = attempt(function() {
|
|||
|
return Function1(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
|
|||
|
});
|
|||
|
if (result.source = source, isError(result)) throw result;
|
|||
|
return result;
|
|||
|
}, lodash.times = function(n, iteratee) {
|
|||
|
if ((n = toInteger(n)) < 1 || n > 9007199254740991) return [];
|
|||
|
var index = 4294967295, length = nativeMin(n, 4294967295);
|
|||
|
iteratee = getIteratee(iteratee), n -= 4294967295;
|
|||
|
for(var result = baseTimes(length, iteratee); ++index < n;)iteratee(index);
|
|||
|
return result;
|
|||
|
}, lodash.toFinite = toFinite, lodash.toInteger = toInteger, lodash.toLength = toLength, lodash.toLower = function(value) {
|
|||
|
return toString(value).toLowerCase();
|
|||
|
}, lodash.toNumber = toNumber, lodash.toSafeInteger = function(value) {
|
|||
|
return value ? baseClamp(toInteger(value), -9007199254740991, 9007199254740991) : 0 === value ? value : 0;
|
|||
|
}, lodash.toString = toString, lodash.toUpper = function(value) {
|
|||
|
return toString(value).toUpperCase();
|
|||
|
}, lodash.trim = function(string, chars, guard) {
|
|||
|
if ((string = toString(string)) && (guard || chars === undefined)) return baseTrim(string);
|
|||
|
if (!string || !(chars = baseToString(chars))) return string;
|
|||
|
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
|||
|
return castSlice(strSymbols, start, end).join('');
|
|||
|
}, lodash.trimEnd = function(string, chars, guard) {
|
|||
|
if ((string = toString(string)) && (guard || chars === undefined)) return string.slice(0, trimmedEndIndex(string) + 1);
|
|||
|
if (!string || !(chars = baseToString(chars))) return string;
|
|||
|
var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
|
|||
|
return castSlice(strSymbols, 0, end).join('');
|
|||
|
}, lodash.trimStart = function(string, chars, guard) {
|
|||
|
if ((string = toString(string)) && (guard || chars === undefined)) return string.replace(reTrimStart, '');
|
|||
|
if (!string || !(chars = baseToString(chars))) return string;
|
|||
|
var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
|
|||
|
return castSlice(strSymbols, start).join('');
|
|||
|
}, lodash.truncate = function(string, options) {
|
|||
|
var length = 30, omission = '...';
|
|||
|
if (isObject(options)) {
|
|||
|
var separator = 'separator' in options ? options.separator : separator;
|
|||
|
length = 'length' in options ? toInteger(options.length) : length, omission = 'omission' in options ? baseToString(options.omission) : omission;
|
|||
|
}
|
|||
|
var strLength = (string = toString(string)).length;
|
|||
|
if (hasUnicode(string)) {
|
|||
|
var strSymbols = stringToArray(string);
|
|||
|
strLength = strSymbols.length;
|
|||
|
}
|
|||
|
if (length >= strLength) return string;
|
|||
|
var end = length - stringSize(omission);
|
|||
|
if (end < 1) return omission;
|
|||
|
var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end);
|
|||
|
if (separator === undefined) return result + omission;
|
|||
|
if (strSymbols && (end += result.length - end), isRegExp(separator)) {
|
|||
|
if (string.slice(end).search(separator)) {
|
|||
|
var match, substring = result;
|
|||
|
for(separator.global || (separator = RegExp1(separator.source, toString(reFlags.exec(separator)) + 'g')), separator.lastIndex = 0; match = separator.exec(substring);)var newEnd = match.index;
|
|||
|
result = result.slice(0, newEnd === undefined ? end : newEnd);
|
|||
|
}
|
|||
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|||
|
var index = result.lastIndexOf(separator);
|
|||
|
index > -1 && (result = result.slice(0, index));
|
|||
|
}
|
|||
|
return result + omission;
|
|||
|
}, lodash.unescape = function(string) {
|
|||
|
return (string = toString(string)) && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|||
|
}, lodash.uniqueId = function(prefix) {
|
|||
|
var id = ++idCounter;
|
|||
|
return toString(prefix) + id;
|
|||
|
}, lodash.upperCase = upperCase, lodash.upperFirst = upperFirst, lodash.each = forEach, lodash.eachRight = forEachRight, lodash.first = head, mixin(lodash, (source = {}, baseForOwn(lodash, function(func, methodName) {
|
|||
|
hasOwnProperty.call(lodash.prototype, methodName) || (source[methodName] = func);
|
|||
|
}), source), {
|
|||
|
chain: !1
|
|||
|
}), lodash.VERSION = '4.17.21', arrayEach([
|
|||
|
'bind',
|
|||
|
'bindKey',
|
|||
|
'curry',
|
|||
|
'curryRight',
|
|||
|
'partial',
|
|||
|
'partialRight'
|
|||
|
], function(methodName) {
|
|||
|
lodash[methodName].placeholder = lodash;
|
|||
|
}), arrayEach([
|
|||
|
'drop',
|
|||
|
'take'
|
|||
|
], function(methodName, index) {
|
|||
|
LazyWrapper.prototype[methodName] = function(n) {
|
|||
|
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
|
|||
|
var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|||
|
return result.__filtered__ ? result.__takeCount__ = nativeMin(n, result.__takeCount__) : result.__views__.push({
|
|||
|
size: nativeMin(n, 4294967295),
|
|||
|
type: methodName + (result.__dir__ < 0 ? 'Right' : '')
|
|||
|
}), result;
|
|||
|
}, LazyWrapper.prototype[methodName + 'Right'] = function(n) {
|
|||
|
return this.reverse()[methodName](n).reverse();
|
|||
|
};
|
|||
|
}), arrayEach([
|
|||
|
'filter',
|
|||
|
'map',
|
|||
|
'takeWhile'
|
|||
|
], function(methodName, index) {
|
|||
|
var type = index + 1, isFilter = 1 == type || 3 == type;
|
|||
|
LazyWrapper.prototype[methodName] = function(iteratee) {
|
|||
|
var result = this.clone();
|
|||
|
return result.__iteratees__.push({
|
|||
|
iteratee: getIteratee(iteratee, 3),
|
|||
|
type: type
|
|||
|
}), result.__filtered__ = result.__filtered__ || isFilter, result;
|
|||
|
};
|
|||
|
}), arrayEach([
|
|||
|
'head',
|
|||
|
'last'
|
|||
|
], function(methodName, index) {
|
|||
|
var takeName = 'take' + (index ? 'Right' : '');
|
|||
|
LazyWrapper.prototype[methodName] = function() {
|
|||
|
return this[takeName](1).value()[0];
|
|||
|
};
|
|||
|
}), arrayEach([
|
|||
|
'initial',
|
|||
|
'tail'
|
|||
|
], function(methodName, index) {
|
|||
|
var dropName = 'drop' + (index ? '' : 'Right');
|
|||
|
LazyWrapper.prototype[methodName] = function() {
|
|||
|
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|||
|
};
|
|||
|
}), LazyWrapper.prototype.compact = function() {
|
|||
|
return this.filter(identity);
|
|||
|
}, LazyWrapper.prototype.find = function(predicate) {
|
|||
|
return this.filter(predicate).head();
|
|||
|
}, LazyWrapper.prototype.findLast = function(predicate) {
|
|||
|
return this.reverse().find(predicate);
|
|||
|
}, LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
|
|||
|
return 'function' == typeof path ? new LazyWrapper(this) : this.map(function(value) {
|
|||
|
return baseInvoke(value, path, args);
|
|||
|
});
|
|||
|
}), LazyWrapper.prototype.reject = function(predicate) {
|
|||
|
return this.filter(negate(getIteratee(predicate)));
|
|||
|
}, LazyWrapper.prototype.slice = function(start, end) {
|
|||
|
start = toInteger(start);
|
|||
|
var result = this;
|
|||
|
return result.__filtered__ && (start > 0 || end < 0) ? new LazyWrapper(result) : (start < 0 ? result = result.takeRight(-start) : start && (result = result.drop(start)), end !== undefined && (result = (end = toInteger(end)) < 0 ? result.dropRight(-end) : result.take(end - start)), result);
|
|||
|
}, LazyWrapper.prototype.takeRightWhile = function(predicate) {
|
|||
|
return this.reverse().takeWhile(predicate).reverse();
|
|||
|
}, LazyWrapper.prototype.toArray = function() {
|
|||
|
return this.take(4294967295);
|
|||
|
}, baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|||
|
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? 'take' + ('last' == methodName ? 'Right' : '') : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
|
|||
|
lodashFunc && (lodash.prototype[methodName] = function() {
|
|||
|
var value = this.__wrapped__, args = isTaker ? [
|
|||
|
1
|
|||
|
] : arguments, isLazy = value instanceof LazyWrapper, iteratee = args[0], useLazy = isLazy || isArray(value), interceptor = function(value) {
|
|||
|
var result = lodashFunc.apply(lodash, arrayPush([
|
|||
|
value
|
|||
|
], args));
|
|||
|
return isTaker && chainAll ? result[0] : result;
|
|||
|
};
|
|||
|
useLazy && checkIteratee && 'function' == typeof iteratee && 1 != iteratee.length && (isLazy = useLazy = !1);
|
|||
|
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
|
|||
|
if (!retUnwrapped && useLazy) {
|
|||
|
value = onlyLazy ? value : new LazyWrapper(this);
|
|||
|
var result = func.apply(value, args);
|
|||
|
return result.__actions__.push({
|
|||
|
func: thru,
|
|||
|
args: [
|
|||
|
interceptor
|
|||
|
],
|
|||
|
thisArg: undefined
|
|||
|
}), new LodashWrapper(result, chainAll);
|
|||
|
}
|
|||
|
return isUnwrapped && onlyLazy ? func.apply(this, args) : (result = this.thru(interceptor), isUnwrapped ? isTaker ? result.value()[0] : result.value() : result);
|
|||
|
});
|
|||
|
}), arrayEach([
|
|||
|
'pop',
|
|||
|
'push',
|
|||
|
'shift',
|
|||
|
'sort',
|
|||
|
'splice',
|
|||
|
'unshift'
|
|||
|
], function(methodName) {
|
|||
|
var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', retUnwrapped = /^(?:pop|shift)$/.test(methodName);
|
|||
|
lodash.prototype[methodName] = function() {
|
|||
|
var args = arguments;
|
|||
|
if (retUnwrapped && !this.__chain__) {
|
|||
|
var value = this.value();
|
|||
|
return func.apply(isArray(value) ? value : [], args);
|
|||
|
}
|
|||
|
return this[chainName](function(value) {
|
|||
|
return func.apply(isArray(value) ? value : [], args);
|
|||
|
});
|
|||
|
};
|
|||
|
}), baseForOwn(LazyWrapper.prototype, function(func, methodName) {
|
|||
|
var lodashFunc = lodash[methodName];
|
|||
|
if (lodashFunc) {
|
|||
|
var key = lodashFunc.name + '';
|
|||
|
hasOwnProperty.call(realNames, key) || (realNames[key] = []), realNames[key].push({
|
|||
|
name: methodName,
|
|||
|
func: lodashFunc
|
|||
|
});
|
|||
|
}
|
|||
|
}), realNames[createHybrid(undefined, 2).name] = [
|
|||
|
{
|
|||
|
name: 'wrapper',
|
|||
|
func: undefined
|
|||
|
}
|
|||
|
], LazyWrapper.prototype.clone = function() {
|
|||
|
var result = new LazyWrapper(this.__wrapped__);
|
|||
|
return result.__actions__ = copyArray(this.__actions__), result.__dir__ = this.__dir__, result.__filtered__ = this.__filtered__, result.__iteratees__ = copyArray(this.__iteratees__), result.__takeCount__ = this.__takeCount__, result.__views__ = copyArray(this.__views__), result;
|
|||
|
}, LazyWrapper.prototype.reverse = function() {
|
|||
|
if (this.__filtered__) {
|
|||
|
var result = new LazyWrapper(this);
|
|||
|
result.__dir__ = -1, result.__filtered__ = !0;
|
|||
|
} else result = this.clone(), result.__dir__ *= -1;
|
|||
|
return result;
|
|||
|
}, LazyWrapper.prototype.value = function() {
|
|||
|
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = function(start, end, transforms) {
|
|||
|
for(var index = -1, length = transforms.length; ++index < length;){
|
|||
|
var data = transforms[index], size = data.size;
|
|||
|
switch(data.type){
|
|||
|
case 'drop':
|
|||
|
start += size;
|
|||
|
break;
|
|||
|
case 'dropRight':
|
|||
|
end -= size;
|
|||
|
break;
|
|||
|
case 'take':
|
|||
|
end = nativeMin(end, start + size);
|
|||
|
break;
|
|||
|
case 'takeRight':
|
|||
|
start = nativeMax(start, end - size);
|
|||
|
}
|
|||
|
}
|
|||
|
return {
|
|||
|
start: start,
|
|||
|
end: end
|
|||
|
};
|
|||
|
}(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
|||
|
if (!isArr || !isRight && arrLength == length && takeCount == length) return baseWrapperValue(array, this.__actions__);
|
|||
|
var result = [];
|
|||
|
outer: for(; length-- && resIndex < takeCount;){
|
|||
|
for(var iterIndex = -1, value = array[index += dir]; ++iterIndex < iterLength;){
|
|||
|
var data = iteratees[iterIndex], iteratee = data.iteratee, type = data.type, computed = iteratee(value);
|
|||
|
if (2 == type) value = computed;
|
|||
|
else if (!computed) {
|
|||
|
if (1 == type) continue outer;
|
|||
|
break outer;
|
|||
|
}
|
|||
|
}
|
|||
|
result[resIndex++] = value;
|
|||
|
}
|
|||
|
return result;
|
|||
|
}, lodash.prototype.at = wrapperAt, lodash.prototype.chain = function() {
|
|||
|
return chain(this);
|
|||
|
}, lodash.prototype.commit = function() {
|
|||
|
return new LodashWrapper(this.value(), this.__chain__);
|
|||
|
}, lodash.prototype.next = function() {
|
|||
|
undefined === this.__values__ && (this.__values__ = toArray(this.value()));
|
|||
|
var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++];
|
|||
|
return {
|
|||
|
done: done,
|
|||
|
value: value
|
|||
|
};
|
|||
|
}, lodash.prototype.plant = function(value) {
|
|||
|
for(var result, parent = this; parent instanceof baseLodash;){
|
|||
|
var clone = wrapperClone(parent);
|
|||
|
clone.__index__ = 0, clone.__values__ = undefined, result ? previous.__wrapped__ = clone : result = clone;
|
|||
|
var previous = clone;
|
|||
|
parent = parent.__wrapped__;
|
|||
|
}
|
|||
|
return previous.__wrapped__ = value, result;
|
|||
|
}, lodash.prototype.reverse = function() {
|
|||
|
var value = this.__wrapped__;
|
|||
|
if (value instanceof LazyWrapper) {
|
|||
|
var wrapped = value;
|
|||
|
return this.__actions__.length && (wrapped = new LazyWrapper(this)), (wrapped = wrapped.reverse()).__actions__.push({
|
|||
|
func: thru,
|
|||
|
args: [
|
|||
|
reverse
|
|||
|
],
|
|||
|
thisArg: undefined
|
|||
|
}), new LodashWrapper(wrapped, this.__chain__);
|
|||
|
}
|
|||
|
return this.thru(reverse);
|
|||
|
}, lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = function() {
|
|||
|
return baseWrapperValue(this.__wrapped__, this.__actions__);
|
|||
|
}, lodash.prototype.first = lodash.prototype.head, symIterator && (lodash.prototype[symIterator] = function() {
|
|||
|
return this;
|
|||
|
}), lodash;
|
|||
|
}();
|
|||
|
'function' == typeof define && 'object' == typeof define.amd && define.amd ? (root._ = _, define(function() {
|
|||
|
return _;
|
|||
|
})) : freeModule ? ((freeModule.exports = _)._ = _, freeExports._ = _) : root._ = _;
|
|||
|
}).call(this);
|