diff options
author | Rich Trott <rtrott@gmail.com> | 2016-07-07 15:44:32 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-07-11 13:47:20 -0700 |
commit | e8a7003e940928e2d1684c12881dd2a39af2d7cc (patch) | |
tree | 92264eb4c317b287366e7774f6d4e15000856e06 /tools/eslint/node_modules/lodash | |
parent | fcae5e2d9187b4a9c16cbce843c10e2087990946 (diff) | |
download | node-new-e8a7003e940928e2d1684c12881dd2a39af2d7cc.tar.gz |
tools: update ESLint, fix unused vars bug
Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars`
such that it finds a few instances in our code base that it did not find
previously (fixed in previous commits readying this for landing).
PR-URL: https://github.com/nodejs/node/pull/7601
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools/eslint/node_modules/lodash')
278 files changed, 3168 insertions, 2404 deletions
diff --git a/tools/eslint/node_modules/lodash/README.md b/tools/eslint/node_modules/lodash/README.md index 5990a7059c..59cc860c80 100644 --- a/tools/eslint/node_modules/lodash/README.md +++ b/tools/eslint/node_modules/lodash/README.md @@ -1,4 +1,4 @@ -# lodash v4.11.1 +# lodash v4.13.1 The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules. @@ -28,13 +28,13 @@ var chunk = require('lodash/chunk'); var extend = require('lodash/fp/extend'); ``` -See the [package source](https://github.com/lodash/lodash/tree/4.11.1-npm) for more details. +See the [package source](https://github.com/lodash/lodash/tree/4.13.1-npm) for more details. **Note:**<br> -Donāt assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br> +Donāt assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` in the Node.js < 6 REPL.<br> Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes `lodash` by default. ## Support -Tested in Chrome 48-49, Firefox 44-45, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8.<br> +Tested in Chrome 49-50, Firefox 45-46, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10-6, & PhantomJS 1.9.8.<br> Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. diff --git a/tools/eslint/node_modules/lodash/_Hash.js b/tools/eslint/node_modules/lodash/_Hash.js index 7f4c3ba933..667d5ab5ad 100644 --- a/tools/eslint/node_modules/lodash/_Hash.js +++ b/tools/eslint/node_modules/lodash/_Hash.js @@ -1,18 +1,32 @@ -var nativeCreate = require('./_nativeCreate'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var hashClear = require('./_hashClear'), + hashDelete = require('./_hashDelete'), + hashGet = require('./_hashGet'), + hashHas = require('./_hashHas'), + hashSet = require('./_hashSet'); /** * Creates a hash object. * * @private * @constructor - * @returns {Object} Returns the new hash object. + * @param {Array} [entries] The key-value pairs to cache. */ -function Hash() {} +function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -// Avoid inheriting from `Object.prototype` when possible. -Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; module.exports = Hash; diff --git a/tools/eslint/node_modules/lodash/_ListCache.js b/tools/eslint/node_modules/lodash/_ListCache.js new file mode 100644 index 0000000000..73f46450b9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_ListCache.js @@ -0,0 +1,32 @@ +var listCacheClear = require('./_listCacheClear'), + listCacheDelete = require('./_listCacheDelete'), + listCacheGet = require('./_listCacheGet'), + listCacheHas = require('./_listCacheHas'), + listCacheSet = require('./_listCacheSet'); + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +module.exports = ListCache; diff --git a/tools/eslint/node_modules/lodash/_MapCache.js b/tools/eslint/node_modules/lodash/_MapCache.js index 4c6fa99949..69f03a4a4f 100644 --- a/tools/eslint/node_modules/lodash/_MapCache.js +++ b/tools/eslint/node_modules/lodash/_MapCache.js @@ -1,32 +1,32 @@ -var mapClear = require('./_mapClear'), - mapDelete = require('./_mapDelete'), - mapGet = require('./_mapGet'), - mapHas = require('./_mapHas'), - mapSet = require('./_mapSet'); +var mapCacheClear = require('./_mapCacheClear'), + mapCacheDelete = require('./_mapCacheDelete'), + mapCacheGet = require('./_mapCacheGet'), + mapCacheHas = require('./_mapCacheHas'), + mapCacheSet = require('./_mapCacheSet'); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ -function MapCache(values) { +function MapCache(entries) { var index = -1, - length = values ? values.length : 0; + length = entries ? entries.length : 0; this.clear(); while (++index < length) { - var entry = values[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. -MapCache.prototype.clear = mapClear; -MapCache.prototype['delete'] = mapDelete; -MapCache.prototype.get = mapGet; -MapCache.prototype.has = mapHas; -MapCache.prototype.set = mapSet; +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; module.exports = MapCache; diff --git a/tools/eslint/node_modules/lodash/_SetCache.js b/tools/eslint/node_modules/lodash/_SetCache.js index 6fd915bdc1..a80efd5824 100644 --- a/tools/eslint/node_modules/lodash/_SetCache.js +++ b/tools/eslint/node_modules/lodash/_SetCache.js @@ -1,9 +1,10 @@ var MapCache = require('./_MapCache'), - cachePush = require('./_cachePush'); + setCacheAdd = require('./_setCacheAdd'), + setCacheHas = require('./_setCacheHas'); /** * - * Creates a set cache object to store unique values. + * Creates an array cache object to store unique values. * * @private * @constructor @@ -15,11 +16,12 @@ function SetCache(values) { this.__data__ = new MapCache; while (++index < length) { - this.push(values[index]); + this.add(values[index]); } } // Add methods to `SetCache`. -SetCache.prototype.push = cachePush; +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; module.exports = SetCache; diff --git a/tools/eslint/node_modules/lodash/_Stack.js b/tools/eslint/node_modules/lodash/_Stack.js index 414cd5295d..b9ba1af3ed 100644 --- a/tools/eslint/node_modules/lodash/_Stack.js +++ b/tools/eslint/node_modules/lodash/_Stack.js @@ -1,4 +1,5 @@ -var stackClear = require('./_stackClear'), +var ListCache = require('./_ListCache'), + stackClear = require('./_stackClear'), stackDelete = require('./_stackDelete'), stackGet = require('./_stackGet'), stackHas = require('./_stackHas'), @@ -9,17 +10,10 @@ var stackClear = require('./_stackClear'), * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ -function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } +function Stack(entries) { + this.__data__ = new ListCache(entries); } // Add methods to `Stack`. diff --git a/tools/eslint/node_modules/lodash/_arrayAggregator.js b/tools/eslint/node_modules/lodash/_arrayAggregator.js index 562eeb3929..7ca498a865 100644 --- a/tools/eslint/node_modules/lodash/_arrayAggregator.js +++ b/tools/eslint/node_modules/lodash/_arrayAggregator.js @@ -2,7 +2,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -10,7 +10,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { var value = array[index]; diff --git a/tools/eslint/node_modules/lodash/_arrayConcat.js b/tools/eslint/node_modules/lodash/_arrayConcat.js deleted file mode 100644 index 96e77415fd..0000000000 --- a/tools/eslint/node_modules/lodash/_arrayConcat.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ -function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; -} - -module.exports = arrayConcat; diff --git a/tools/eslint/node_modules/lodash/_arrayEach.js b/tools/eslint/node_modules/lodash/_arrayEach.js index c302e63131..5f770bcbe6 100644 --- a/tools/eslint/node_modules/lodash/_arrayEach.js +++ b/tools/eslint/node_modules/lodash/_arrayEach.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (iteratee(array[index], index, array) === false) { diff --git a/tools/eslint/node_modules/lodash/_arrayEachRight.js b/tools/eslint/node_modules/lodash/_arrayEachRight.js index 5318585383..72e780ca07 100644 --- a/tools/eslint/node_modules/lodash/_arrayEachRight.js +++ b/tools/eslint/node_modules/lodash/_arrayEachRight.js @@ -3,12 +3,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array ? array.length : 0; while (length--) { if (iteratee(array[length], length, array) === false) { diff --git a/tools/eslint/node_modules/lodash/_arrayEvery.js b/tools/eslint/node_modules/lodash/_arrayEvery.js index 8d89fb102d..f4fb4254dc 100644 --- a/tools/eslint/node_modules/lodash/_arrayEvery.js +++ b/tools/eslint/node_modules/lodash/_arrayEvery.js @@ -3,14 +3,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (!predicate(array[index], index, array)) { diff --git a/tools/eslint/node_modules/lodash/_arrayFilter.js b/tools/eslint/node_modules/lodash/_arrayFilter.js index 7b61ba6f9e..b904fda628 100644 --- a/tools/eslint/node_modules/lodash/_arrayFilter.js +++ b/tools/eslint/node_modules/lodash/_arrayFilter.js @@ -3,13 +3,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array ? array.length : 0, resIndex = 0, result = []; diff --git a/tools/eslint/node_modules/lodash/_arrayIncludes.js b/tools/eslint/node_modules/lodash/_arrayIncludes.js index 9574f5d1ba..cf9c1f0fc3 100644 --- a/tools/eslint/node_modules/lodash/_arrayIncludes.js +++ b/tools/eslint/node_modules/lodash/_arrayIncludes.js @@ -5,12 +5,13 @@ var baseIndexOf = require('./_baseIndexOf'); * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to search. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; diff --git a/tools/eslint/node_modules/lodash/_arrayIncludesWith.js b/tools/eslint/node_modules/lodash/_arrayIncludesWith.js index 88ea23719b..d08356a86d 100644 --- a/tools/eslint/node_modules/lodash/_arrayIncludesWith.js +++ b/tools/eslint/node_modules/lodash/_arrayIncludesWith.js @@ -2,14 +2,14 @@ * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to search. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (comparator(value, array[index])) { diff --git a/tools/eslint/node_modules/lodash/_arrayMap.js b/tools/eslint/node_modules/lodash/_arrayMap.js index 73b29cfa48..748bdbe6d5 100644 --- a/tools/eslint/node_modules/lodash/_arrayMap.js +++ b/tools/eslint/node_modules/lodash/_arrayMap.js @@ -3,13 +3,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array ? array.length : 0, result = Array(length); while (++index < length) { diff --git a/tools/eslint/node_modules/lodash/_arrayReduce.js b/tools/eslint/node_modules/lodash/_arrayReduce.js index 41bea2cf07..57c8727ab4 100644 --- a/tools/eslint/node_modules/lodash/_arrayReduce.js +++ b/tools/eslint/node_modules/lodash/_arrayReduce.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -12,7 +12,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; diff --git a/tools/eslint/node_modules/lodash/_arrayReduceRight.js b/tools/eslint/node_modules/lodash/_arrayReduceRight.js index 038e0fa789..4c85ee6300 100644 --- a/tools/eslint/node_modules/lodash/_arrayReduceRight.js +++ b/tools/eslint/node_modules/lodash/_arrayReduceRight.js @@ -3,7 +3,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -11,7 +11,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array ? array.length : 0; if (initAccum && length) { accumulator = array[--length]; } diff --git a/tools/eslint/node_modules/lodash/_arraySome.js b/tools/eslint/node_modules/lodash/_arraySome.js index e6e657b8f9..9b6e5d17c0 100644 --- a/tools/eslint/node_modules/lodash/_arraySome.js +++ b/tools/eslint/node_modules/lodash/_arraySome.js @@ -3,14 +3,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (predicate(array[index], index, array)) { diff --git a/tools/eslint/node_modules/lodash/_assocGet.js b/tools/eslint/node_modules/lodash/_assocGet.js deleted file mode 100644 index e53d332e89..0000000000 --- a/tools/eslint/node_modules/lodash/_assocGet.js +++ /dev/null @@ -1,16 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; -} - -module.exports = assocGet; diff --git a/tools/eslint/node_modules/lodash/_assocSet.js b/tools/eslint/node_modules/lodash/_assocSet.js deleted file mode 100644 index 524f3418d8..0000000000 --- a/tools/eslint/node_modules/lodash/_assocSet.js +++ /dev/null @@ -1,20 +0,0 @@ -var assocIndexOf = require('./_assocIndexOf'); - -/** - * Sets the associative array `key` to `value`. - * - * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - */ -function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } -} - -module.exports = assocSet; diff --git a/tools/eslint/node_modules/lodash/_baseAt.js b/tools/eslint/node_modules/lodash/_baseAt.js index a077cb937b..ed67d9bd30 100644 --- a/tools/eslint/node_modules/lodash/_baseAt.js +++ b/tools/eslint/node_modules/lodash/_baseAt.js @@ -6,7 +6,7 @@ var get = require('./get'); * @private * @param {Object} object The object to iterate over. * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, diff --git a/tools/eslint/node_modules/lodash/_baseConforms.js b/tools/eslint/node_modules/lodash/_baseConforms.js index 973aa6d439..396727c42d 100644 --- a/tools/eslint/node_modules/lodash/_baseConforms.js +++ b/tools/eslint/node_modules/lodash/_baseConforms.js @@ -5,7 +5,7 @@ var keys = require('./keys'); * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { var props = keys(source), diff --git a/tools/eslint/node_modules/lodash/_baseDifference.js b/tools/eslint/node_modules/lodash/_baseDifference.js index a49bdffa5a..dcccad3356 100644 --- a/tools/eslint/node_modules/lodash/_baseDifference.js +++ b/tools/eslint/node_modules/lodash/_baseDifference.js @@ -47,6 +47,7 @@ function baseDifference(array, values, iteratee, comparator) { var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { diff --git a/tools/eslint/node_modules/lodash/_baseExtremum.js b/tools/eslint/node_modules/lodash/_baseExtremum.js index c6cb804500..9d6aa77edb 100644 --- a/tools/eslint/node_modules/lodash/_baseExtremum.js +++ b/tools/eslint/node_modules/lodash/_baseExtremum.js @@ -1,3 +1,5 @@ +var isSymbol = require('./isSymbol'); + /** * The base implementation of methods like `_.max` and `_.min` which accepts a * `comparator` to determine the extremum value. @@ -17,7 +19,7 @@ function baseExtremum(array, iteratee, comparator) { current = iteratee(value); if (current != null && (computed === undefined - ? current === current + ? (current === current && !isSymbol(current)) : comparator(current, computed) )) { var computed = current, diff --git a/tools/eslint/node_modules/lodash/_baseFindIndex.js b/tools/eslint/node_modules/lodash/_baseFindIndex.js index 61428f6c49..bfd8259afd 100644 --- a/tools/eslint/node_modules/lodash/_baseFindIndex.js +++ b/tools/eslint/node_modules/lodash/_baseFindIndex.js @@ -5,12 +5,13 @@ * @private * @param {Array} array The array to search. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ -function baseFindIndex(array, predicate, fromRight) { +function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { diff --git a/tools/eslint/node_modules/lodash/_baseFind.js b/tools/eslint/node_modules/lodash/_baseFindKey.js index 338f932c44..afbad85471 100644 --- a/tools/eslint/node_modules/lodash/_baseFind.js +++ b/tools/eslint/node_modules/lodash/_baseFindKey.js @@ -1,25 +1,23 @@ /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. * * @private * @param {Array|Object} collection The collection to search. * @param {Function} predicate The function invoked per iteration. * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. * @returns {*} Returns the found element or its key, else `undefined`. */ -function baseFind(collection, predicate, eachFunc, retKey) { +function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection) { if (predicate(value, key, collection)) { - result = retKey ? key : value; + result = key; return false; } }); return result; } -module.exports = baseFind; +module.exports = baseFindKey; diff --git a/tools/eslint/node_modules/lodash/_baseFunctions.js b/tools/eslint/node_modules/lodash/_baseFunctions.js index 6e1090f9ce..d23bc9b475 100644 --- a/tools/eslint/node_modules/lodash/_baseFunctions.js +++ b/tools/eslint/node_modules/lodash/_baseFunctions.js @@ -8,7 +8,7 @@ var arrayFilter = require('./_arrayFilter'), * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { diff --git a/tools/eslint/node_modules/lodash/_baseGet.js b/tools/eslint/node_modules/lodash/_baseGet.js index 9d58a4c864..886720bb53 100644 --- a/tools/eslint/node_modules/lodash/_baseGet.js +++ b/tools/eslint/node_modules/lodash/_baseGet.js @@ -1,5 +1,6 @@ var castPath = require('./_castPath'), - isKey = require('./_isKey'); + isKey = require('./_isKey'), + toKey = require('./_toKey'); /** * The base implementation of `_.get` without support for default values. @@ -16,7 +17,7 @@ function baseGet(object, path) { length = path.length; while (object != null && index < length) { - object = object[path[index++]]; + object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } diff --git a/tools/eslint/node_modules/lodash/_baseGetAllKeys.js b/tools/eslint/node_modules/lodash/_baseGetAllKeys.js index 7f8b38bd4c..8ad204ea41 100644 --- a/tools/eslint/node_modules/lodash/_baseGetAllKeys.js +++ b/tools/eslint/node_modules/lodash/_baseGetAllKeys.js @@ -14,9 +14,7 @@ var arrayPush = require('./_arrayPush'), */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; diff --git a/tools/eslint/node_modules/lodash/_baseGt.js b/tools/eslint/node_modules/lodash/_baseGt.js new file mode 100644 index 0000000000..813238b97a --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseGt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; diff --git a/tools/eslint/node_modules/lodash/_baseHas.js b/tools/eslint/node_modules/lodash/_baseHas.js index 1de5d841c2..3d2e7bf74a 100644 --- a/tools/eslint/node_modules/lodash/_baseHas.js +++ b/tools/eslint/node_modules/lodash/_baseHas.js @@ -10,7 +10,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ @@ -18,8 +18,9 @@ function baseHas(object, key) { // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && + (hasOwnProperty.call(object, key) || + (typeof object == 'object' && key in object && getPrototype(object) === null)); } module.exports = baseHas; diff --git a/tools/eslint/node_modules/lodash/_baseHasIn.js b/tools/eslint/node_modules/lodash/_baseHasIn.js index 4a36558694..2e0d04269f 100644 --- a/tools/eslint/node_modules/lodash/_baseHasIn.js +++ b/tools/eslint/node_modules/lodash/_baseHasIn.js @@ -2,12 +2,12 @@ * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } module.exports = baseHasIn; diff --git a/tools/eslint/node_modules/lodash/_baseIntersection.js b/tools/eslint/node_modules/lodash/_baseIntersection.js index 7d129267ed..c1d250c2aa 100644 --- a/tools/eslint/node_modules/lodash/_baseIntersection.js +++ b/tools/eslint/node_modules/lodash/_baseIntersection.js @@ -47,6 +47,7 @@ function baseIntersection(arrays, iteratee, comparator) { var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) diff --git a/tools/eslint/node_modules/lodash/_baseInvoke.js b/tools/eslint/node_modules/lodash/_baseInvoke.js index 9b32021410..3d6bca5db0 100644 --- a/tools/eslint/node_modules/lodash/_baseInvoke.js +++ b/tools/eslint/node_modules/lodash/_baseInvoke.js @@ -2,7 +2,8 @@ var apply = require('./_apply'), castPath = require('./_castPath'), isKey = require('./_isKey'), last = require('./last'), - parent = require('./_parent'); + parent = require('./_parent'), + toKey = require('./_toKey'); /** * The base implementation of `_.invoke` without support for individual @@ -20,7 +21,7 @@ function baseInvoke(object, path, args) { object = parent(object, path); path = last(path); } - var func = object == null ? object : object[path]; + var func = object == null ? object : object[toKey(path)]; return func == null ? undefined : apply(func, object, args); } diff --git a/tools/eslint/node_modules/lodash/_baseIsNative.js b/tools/eslint/node_modules/lodash/_baseIsNative.js new file mode 100644 index 0000000000..4d7dd0773b --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseIsNative.js @@ -0,0 +1,47 @@ +var isFunction = require('./isFunction'), + isHostObject = require('./_isHostObject'), + isMasked = require('./_isMasked'), + isObject = require('./isObject'), + toSource = require('./_toSource'); + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = Function.prototype.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +module.exports = baseIsNative; diff --git a/tools/eslint/node_modules/lodash/_baseLt.js b/tools/eslint/node_modules/lodash/_baseLt.js new file mode 100644 index 0000000000..aa05efacfc --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseLt.js @@ -0,0 +1,14 @@ +/** + * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ +function baseLt(value, other) { + return value < other; +} + +module.exports = baseLt; diff --git a/tools/eslint/node_modules/lodash/_baseMatches.js b/tools/eslint/node_modules/lodash/_baseMatches.js index ba9012f946..e56582ad88 100644 --- a/tools/eslint/node_modules/lodash/_baseMatches.js +++ b/tools/eslint/node_modules/lodash/_baseMatches.js @@ -7,7 +7,7 @@ var baseIsMatch = require('./_baseIsMatch'), * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); diff --git a/tools/eslint/node_modules/lodash/_baseMatchesProperty.js b/tools/eslint/node_modules/lodash/_baseMatchesProperty.js index 88afd67e14..3968081bc2 100644 --- a/tools/eslint/node_modules/lodash/_baseMatchesProperty.js +++ b/tools/eslint/node_modules/lodash/_baseMatchesProperty.js @@ -3,7 +3,8 @@ var baseIsEqual = require('./_baseIsEqual'), hasIn = require('./hasIn'), isKey = require('./_isKey'), isStrictComparable = require('./_isStrictComparable'), - matchesStrictComparable = require('./_matchesStrictComparable'); + matchesStrictComparable = require('./_matchesStrictComparable'), + toKey = require('./_toKey'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, @@ -15,11 +16,11 @@ var UNORDERED_COMPARE_FLAG = 1, * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(path, srcValue); + return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); diff --git a/tools/eslint/node_modules/lodash/_baseProperty.js b/tools/eslint/node_modules/lodash/_baseProperty.js index e515941c16..496281ec40 100644 --- a/tools/eslint/node_modules/lodash/_baseProperty.js +++ b/tools/eslint/node_modules/lodash/_baseProperty.js @@ -3,7 +3,7 @@ * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { diff --git a/tools/eslint/node_modules/lodash/_basePropertyDeep.js b/tools/eslint/node_modules/lodash/_basePropertyDeep.js index acc2009d5d..1e5aae50c4 100644 --- a/tools/eslint/node_modules/lodash/_basePropertyDeep.js +++ b/tools/eslint/node_modules/lodash/_basePropertyDeep.js @@ -5,7 +5,7 @@ var baseGet = require('./_baseGet'); * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { diff --git a/tools/eslint/node_modules/lodash/_basePullAll.js b/tools/eslint/node_modules/lodash/_basePullAll.js index 3c07c994cf..305720edea 100644 --- a/tools/eslint/node_modules/lodash/_basePullAll.js +++ b/tools/eslint/node_modules/lodash/_basePullAll.js @@ -1,7 +1,8 @@ var arrayMap = require('./_arrayMap'), baseIndexOf = require('./_baseIndexOf'), baseIndexOfWith = require('./_baseIndexOfWith'), - baseUnary = require('./_baseUnary'); + baseUnary = require('./_baseUnary'), + copyArray = require('./_copyArray'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -26,6 +27,9 @@ function basePullAll(array, values, iteratee, comparator) { length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } diff --git a/tools/eslint/node_modules/lodash/_basePullAt.js b/tools/eslint/node_modules/lodash/_basePullAt.js index fc9130f4ac..0dd1478d71 100644 --- a/tools/eslint/node_modules/lodash/_basePullAt.js +++ b/tools/eslint/node_modules/lodash/_basePullAt.js @@ -2,7 +2,8 @@ var castPath = require('./_castPath'), isIndex = require('./_isIndex'), isKey = require('./_isKey'), last = require('./last'), - parent = require('./_parent'); + parent = require('./_parent'), + toKey = require('./_toKey'); /** Used for built-in method references. */ var arrayProto = Array.prototype; @@ -25,7 +26,7 @@ function basePullAt(array, indexes) { while (length--) { var index = indexes[length]; - if (lastIndex == length || index != previous) { + if (length == lastIndex || index !== previous) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); @@ -35,11 +36,11 @@ function basePullAt(array, indexes) { object = parent(array, path); if (object != null) { - delete object[last(path)]; + delete object[toKey(last(path))]; } } else { - delete array[index]; + delete array[toKey(index)]; } } } diff --git a/tools/eslint/node_modules/lodash/_baseRange.js b/tools/eslint/node_modules/lodash/_baseRange.js index 2b39dd4106..02d4ae25f0 100644 --- a/tools/eslint/node_modules/lodash/_baseRange.js +++ b/tools/eslint/node_modules/lodash/_baseRange.js @@ -11,7 +11,7 @@ var nativeCeil = Math.ceil, * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, diff --git a/tools/eslint/node_modules/lodash/_baseSet.js b/tools/eslint/node_modules/lodash/_baseSet.js index dd53569310..34d63e5682 100644 --- a/tools/eslint/node_modules/lodash/_baseSet.js +++ b/tools/eslint/node_modules/lodash/_baseSet.js @@ -2,7 +2,8 @@ var assignValue = require('./_assignValue'), castPath = require('./_castPath'), isIndex = require('./_isIndex'), isKey = require('./_isKey'), - isObject = require('./isObject'); + isObject = require('./isObject'), + toKey = require('./_toKey'); /** * The base implementation of `_.set`. @@ -23,7 +24,7 @@ function baseSet(object, path, value, customizer) { nested = object; while (nested != null && ++index < length) { - var key = path[index]; + var key = toKey(path[index]); if (isObject(nested)) { var newValue = value; if (index != lastIndex) { diff --git a/tools/eslint/node_modules/lodash/_baseSortedIndex.js b/tools/eslint/node_modules/lodash/_baseSortedIndex.js index 3961063623..0e82dc7d9b 100644 --- a/tools/eslint/node_modules/lodash/_baseSortedIndex.js +++ b/tools/eslint/node_modules/lodash/_baseSortedIndex.js @@ -1,5 +1,6 @@ var baseSortedIndexBy = require('./_baseSortedIndexBy'), - identity = require('./identity'); + identity = require('./identity'), + isSymbol = require('./isSymbol'); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295, @@ -26,7 +27,8 @@ function baseSortedIndex(array, value, retHighest) { var mid = (low + high) >>> 1, computed = array[mid]; - if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { low = mid + 1; } else { high = mid; diff --git a/tools/eslint/node_modules/lodash/_baseSortedIndexBy.js b/tools/eslint/node_modules/lodash/_baseSortedIndexBy.js index c0c7d66a2a..fde79285ed 100644 --- a/tools/eslint/node_modules/lodash/_baseSortedIndexBy.js +++ b/tools/eslint/node_modules/lodash/_baseSortedIndexBy.js @@ -1,3 +1,5 @@ +var isSymbol = require('./isSymbol'); + /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1; @@ -26,21 +28,26 @@ function baseSortedIndexBy(array, value, iteratee, retHighest) { high = array ? array.length : 0, valIsNaN = value !== value, valIsNull = value === null, - valIsUndef = value === undefined; + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; while (low < high) { var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), - isDef = computed !== undefined, - isReflexive = computed === computed; + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); if (valIsNaN) { - var setLow = isReflexive || retHighest; + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); } else if (valIsNull) { - setLow = isReflexive && isDef && (retHighest || computed != null); - } else if (valIsUndef) { - setLow = isReflexive && (retHighest || isDef); - } else if (computed == null) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { setLow = false; } else { setLow = retHighest ? (computed <= value) : (computed < value); diff --git a/tools/eslint/node_modules/lodash/_baseSortedUniq.js b/tools/eslint/node_modules/lodash/_baseSortedUniq.js index bf1eb2e24d..802159a3db 100644 --- a/tools/eslint/node_modules/lodash/_baseSortedUniq.js +++ b/tools/eslint/node_modules/lodash/_baseSortedUniq.js @@ -1,14 +1,30 @@ -var baseSortedUniqBy = require('./_baseSortedUniqBy'); +var eq = require('./eq'); /** - * The base implementation of `_.sortedUniq`. + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. */ -function baseSortedUniq(array) { - return baseSortedUniqBy(array); +function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; } module.exports = baseSortedUniq; diff --git a/tools/eslint/node_modules/lodash/_baseSortedUniqBy.js b/tools/eslint/node_modules/lodash/_baseSortedUniqBy.js deleted file mode 100644 index 81e7ae1bc3..0000000000 --- a/tools/eslint/node_modules/lodash/_baseSortedUniqBy.js +++ /dev/null @@ -1,33 +0,0 @@ -var eq = require('./eq'); - -/** - * The base implementation of `_.sortedUniqBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseSortedUniqBy(array, iteratee) { - var index = 0, - length = array.length, - value = array[0], - computed = iteratee ? iteratee(value) : value, - seen = computed, - resIndex = 1, - result = [value]; - - while (++index < length) { - value = array[index], - computed = iteratee ? iteratee(value) : value; - - if (!eq(computed, seen)) { - seen = computed; - result[resIndex++] = value; - } - } - return result; -} - -module.exports = baseSortedUniqBy; diff --git a/tools/eslint/node_modules/lodash/_baseToNumber.js b/tools/eslint/node_modules/lodash/_baseToNumber.js new file mode 100644 index 0000000000..04859f391f --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseToNumber.js @@ -0,0 +1,24 @@ +var isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var NAN = 0 / 0; + +/** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ +function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; +} + +module.exports = baseToNumber; diff --git a/tools/eslint/node_modules/lodash/_baseToPairs.js b/tools/eslint/node_modules/lodash/_baseToPairs.js index d80b4022ce..bff199128f 100644 --- a/tools/eslint/node_modules/lodash/_baseToPairs.js +++ b/tools/eslint/node_modules/lodash/_baseToPairs.js @@ -7,7 +7,7 @@ var arrayMap = require('./_arrayMap'); * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { diff --git a/tools/eslint/node_modules/lodash/_baseToString.js b/tools/eslint/node_modules/lodash/_baseToString.js new file mode 100644 index 0000000000..462e26fd18 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_baseToString.js @@ -0,0 +1,31 @@ +var Symbol = require('./_Symbol'), + isSymbol = require('./isSymbol'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +module.exports = baseToString; diff --git a/tools/eslint/node_modules/lodash/_baseUnary.js b/tools/eslint/node_modules/lodash/_baseUnary.js index e584a99340..4db20e22ee 100644 --- a/tools/eslint/node_modules/lodash/_baseUnary.js +++ b/tools/eslint/node_modules/lodash/_baseUnary.js @@ -3,7 +3,7 @@ * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { diff --git a/tools/eslint/node_modules/lodash/_baseUniq.js b/tools/eslint/node_modules/lodash/_baseUniq.js index ecb6fe44bd..aea459dc71 100644 --- a/tools/eslint/node_modules/lodash/_baseUniq.js +++ b/tools/eslint/node_modules/lodash/_baseUniq.js @@ -46,6 +46,7 @@ function baseUniq(array, iteratee, comparator) { var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { diff --git a/tools/eslint/node_modules/lodash/_baseUnset.js b/tools/eslint/node_modules/lodash/_baseUnset.js index bff4d4c4f0..754eb063cb 100644 --- a/tools/eslint/node_modules/lodash/_baseUnset.js +++ b/tools/eslint/node_modules/lodash/_baseUnset.js @@ -1,8 +1,9 @@ -var castPath = require('./_castPath'), - has = require('./has'), +var baseHas = require('./_baseHas'), + castPath = require('./_castPath'), isKey = require('./_isKey'), last = require('./last'), - parent = require('./_parent'); + parent = require('./_parent'), + toKey = require('./_toKey'); /** * The base implementation of `_.unset`. @@ -15,8 +16,9 @@ var castPath = require('./_castPath'), function baseUnset(object, path) { path = isKey(path, object) ? [path] : castPath(path); object = parent(object, path); - var key = last(path); - return (object != null && has(object, key)) ? delete object[key] : true; + + var key = toKey(last(path)); + return !(object != null && baseHas(object, key)) || delete object[key]; } module.exports = baseUnset; diff --git a/tools/eslint/node_modules/lodash/_cacheHas.js b/tools/eslint/node_modules/lodash/_cacheHas.js index 7f2ac48476..c4c6b65046 100644 --- a/tools/eslint/node_modules/lodash/_cacheHas.js +++ b/tools/eslint/node_modules/lodash/_cacheHas.js @@ -1,25 +1,13 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - /** - * Checks if `value` is in `cache`. + * Checks if a cache value for `key` exists. * * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); +function cacheHas(cache, key) { + return cache.has(key); } module.exports = cacheHas; diff --git a/tools/eslint/node_modules/lodash/_cachePush.js b/tools/eslint/node_modules/lodash/_cachePush.js deleted file mode 100644 index 638383b641..0000000000 --- a/tools/eslint/node_modules/lodash/_cachePush.js +++ /dev/null @@ -1,27 +0,0 @@ -var isKeyable = require('./_isKeyable'); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Adds `value` to the set cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } -} - -module.exports = cachePush; diff --git a/tools/eslint/node_modules/lodash/_compareAscending.js b/tools/eslint/node_modules/lodash/_compareAscending.js index 532866c137..8dc2791088 100644 --- a/tools/eslint/node_modules/lodash/_compareAscending.js +++ b/tools/eslint/node_modules/lodash/_compareAscending.js @@ -1,3 +1,5 @@ +var isSymbol = require('./isSymbol'); + /** * Compares values to sort them in ascending order. * @@ -8,22 +10,28 @@ */ function compareAscending(value, other) { if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { return 1; } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { return -1; } } diff --git a/tools/eslint/node_modules/lodash/_composeArgs.js b/tools/eslint/node_modules/lodash/_composeArgs.js index 07398e7840..1ce40f4f93 100644 --- a/tools/eslint/node_modules/lodash/_composeArgs.js +++ b/tools/eslint/node_modules/lodash/_composeArgs.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/tools/eslint/node_modules/lodash/_composeArgsRight.js b/tools/eslint/node_modules/lodash/_composeArgsRight.js index 18cfae0340..8dc588d0a9 100644 --- a/tools/eslint/node_modules/lodash/_composeArgsRight.js +++ b/tools/eslint/node_modules/lodash/_composeArgsRight.js @@ -6,7 +6,7 @@ var nativeMax = Math.max; * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. diff --git a/tools/eslint/node_modules/lodash/_coreJsData.js b/tools/eslint/node_modules/lodash/_coreJsData.js new file mode 100644 index 0000000000..f8e5b4e349 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_coreJsData.js @@ -0,0 +1,6 @@ +var root = require('./_root'); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; diff --git a/tools/eslint/node_modules/lodash/_createAssigner.js b/tools/eslint/node_modules/lodash/_createAssigner.js index 1e81db9319..e0ba582ff7 100644 --- a/tools/eslint/node_modules/lodash/_createAssigner.js +++ b/tools/eslint/node_modules/lodash/_createAssigner.js @@ -15,7 +15,7 @@ function createAssigner(assigner) { customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; diff --git a/tools/eslint/node_modules/lodash/_createCaseFirst.js b/tools/eslint/node_modules/lodash/_createCaseFirst.js index 9296b1d781..1a20532811 100644 --- a/tools/eslint/node_modules/lodash/_createCaseFirst.js +++ b/tools/eslint/node_modules/lodash/_createCaseFirst.js @@ -8,7 +8,7 @@ var castSlice = require('./_castSlice'), * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { diff --git a/tools/eslint/node_modules/lodash/_createCurryWrapper.js b/tools/eslint/node_modules/lodash/_createCurryWrapper.js index c48ba62402..d765b84d01 100644 --- a/tools/eslint/node_modules/lodash/_createCurryWrapper.js +++ b/tools/eslint/node_modules/lodash/_createCurryWrapper.js @@ -2,7 +2,7 @@ var apply = require('./_apply'), createCtorWrapper = require('./_createCtorWrapper'), createHybridWrapper = require('./_createHybridWrapper'), createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); @@ -23,7 +23,7 @@ function createCurryWrapper(func, bitmask, arity) { var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; diff --git a/tools/eslint/node_modules/lodash/_createFind.js b/tools/eslint/node_modules/lodash/_createFind.js new file mode 100644 index 0000000000..0a84618eb7 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_createFind.js @@ -0,0 +1,30 @@ +var baseIteratee = require('./_baseIteratee'), + isArrayLike = require('./isArrayLike'), + keys = require('./keys'); + +/** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ +function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + predicate = baseIteratee(predicate, 3); + if (!isArrayLike(collection)) { + var props = keys(collection); + } + var index = findIndexFunc(props || collection, function(value, key) { + if (props) { + key = value; + value = iterable[key]; + } + return predicate(value, key, iterable); + }, fromIndex); + return index > -1 ? collection[props ? props[index] : index] : undefined; + }; +} + +module.exports = createFind; diff --git a/tools/eslint/node_modules/lodash/_createHybridWrapper.js b/tools/eslint/node_modules/lodash/_createHybridWrapper.js index 144a90d793..e433640af1 100644 --- a/tools/eslint/node_modules/lodash/_createHybridWrapper.js +++ b/tools/eslint/node_modules/lodash/_createHybridWrapper.js @@ -3,7 +3,7 @@ var composeArgs = require('./_composeArgs'), countHolders = require('./_countHolders'), createCtorWrapper = require('./_createCtorWrapper'), createRecurryWrapper = require('./_createRecurryWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), reorder = require('./_reorder'), replaceHolders = require('./_replaceHolders'), root = require('./_root'); @@ -46,14 +46,14 @@ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partials function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { diff --git a/tools/eslint/node_modules/lodash/_createMathOperation.js b/tools/eslint/node_modules/lodash/_createMathOperation.js index 56a4d447d0..e750e98b1e 100644 --- a/tools/eslint/node_modules/lodash/_createMathOperation.js +++ b/tools/eslint/node_modules/lodash/_createMathOperation.js @@ -1,3 +1,6 @@ +var baseToNumber = require('./_baseToNumber'), + baseToString = require('./_baseToString'); + /** * Creates a function that performs a mathematical operation on two values. * @@ -15,7 +18,17 @@ function createMathOperation(operator) { result = value; } if (other !== undefined) { - result = result === undefined ? other : operator(result, other); + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); } return result; }; diff --git a/tools/eslint/node_modules/lodash/_createOver.js b/tools/eslint/node_modules/lodash/_createOver.js index 0d42c2716c..e5f9b8b914 100644 --- a/tools/eslint/node_modules/lodash/_createOver.js +++ b/tools/eslint/node_modules/lodash/_createOver.js @@ -12,7 +12,7 @@ var apply = require('./_apply'), * * @private * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. + * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { return rest(function(iteratees) { diff --git a/tools/eslint/node_modules/lodash/_createPadding.js b/tools/eslint/node_modules/lodash/_createPadding.js index c30f6ff072..cfc62256d2 100644 --- a/tools/eslint/node_modules/lodash/_createPadding.js +++ b/tools/eslint/node_modules/lodash/_createPadding.js @@ -1,4 +1,5 @@ var baseRepeat = require('./_baseRepeat'), + baseToString = require('./_baseToString'), castSlice = require('./_castSlice'), reHasComplexSymbol = require('./_reHasComplexSymbol'), stringSize = require('./_stringSize'), @@ -17,7 +18,7 @@ var nativeCeil = Math.ceil; * @returns {string} Returns the padding for `string`. */ function createPadding(length, chars) { - chars = chars === undefined ? ' ' : (chars + ''); + chars = chars === undefined ? ' ' : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { diff --git a/tools/eslint/node_modules/lodash/_createRelationalOperation.js b/tools/eslint/node_modules/lodash/_createRelationalOperation.js new file mode 100644 index 0000000000..a17c6b5e72 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_createRelationalOperation.js @@ -0,0 +1,20 @@ +var toNumber = require('./toNumber'); + +/** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ +function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; +} + +module.exports = createRelationalOperation; diff --git a/tools/eslint/node_modules/lodash/_createRound.js b/tools/eslint/node_modules/lodash/_createRound.js index cb42ba2466..74b20d4081 100644 --- a/tools/eslint/node_modules/lodash/_createRound.js +++ b/tools/eslint/node_modules/lodash/_createRound.js @@ -2,6 +2,9 @@ var toInteger = require('./toInteger'), toNumber = require('./toNumber'), toString = require('./toString'); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + /** * Creates a function like `_.round`. * @@ -13,7 +16,7 @@ function createRound(methodName) { var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. diff --git a/tools/eslint/node_modules/lodash/_createSet.js b/tools/eslint/node_modules/lodash/_createSet.js index c67128f24d..ae24d05939 100644 --- a/tools/eslint/node_modules/lodash/_createSet.js +++ b/tools/eslint/node_modules/lodash/_createSet.js @@ -1,5 +1,9 @@ var Set = require('./_Set'), - noop = require('./noop'); + noop = require('./noop'), + setToArray = require('./_setToArray'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** * Creates a set of `values`. @@ -8,7 +12,7 @@ var Set = require('./_Set'), * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ -var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) { +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; diff --git a/tools/eslint/node_modules/lodash/_createToPairs.js b/tools/eslint/node_modules/lodash/_createToPairs.js new file mode 100644 index 0000000000..568417afda --- /dev/null +++ b/tools/eslint/node_modules/lodash/_createToPairs.js @@ -0,0 +1,30 @@ +var baseToPairs = require('./_baseToPairs'), + getTag = require('./_getTag'), + mapToArray = require('./_mapToArray'), + setToPairs = require('./_setToPairs'); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ +function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; +} + +module.exports = createToPairs; diff --git a/tools/eslint/node_modules/lodash/_createWrapper.js b/tools/eslint/node_modules/lodash/_createWrapper.js index 7b573b2f13..c77e763952 100644 --- a/tools/eslint/node_modules/lodash/_createWrapper.js +++ b/tools/eslint/node_modules/lodash/_createWrapper.js @@ -39,6 +39,7 @@ var nativeMax = Math.max; * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. diff --git a/tools/eslint/node_modules/lodash/_equalArrays.js b/tools/eslint/node_modules/lodash/_equalArrays.js index 323c67cc8d..17ef31312d 100644 --- a/tools/eslint/node_modules/lodash/_equalArrays.js +++ b/tools/eslint/node_modules/lodash/_equalArrays.js @@ -1,4 +1,5 @@ -var arraySome = require('./_arraySome'); +var SetCache = require('./_SetCache'), + arraySome = require('./_arraySome'); /** Used to compose bitmasks for comparison styles. */ var UNORDERED_COMPARE_FLAG = 1, @@ -19,9 +20,7 @@ var UNORDERED_COMPARE_FLAG = 1, * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; @@ -33,7 +32,10 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { if (stacked) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; + stack.set(array, other); // Ignore non-index properties. @@ -54,10 +56,12 @@ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!seen.has(othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.add(othIndex); + } })) { result = false; break; diff --git a/tools/eslint/node_modules/lodash/_getPlaceholder.js b/tools/eslint/node_modules/lodash/_getHolder.js index 4bbcda25ec..65e94b5c24 100644 --- a/tools/eslint/node_modules/lodash/_getPlaceholder.js +++ b/tools/eslint/node_modules/lodash/_getHolder.js @@ -5,9 +5,9 @@ * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ -function getPlaceholder(func) { +function getHolder(func) { var object = func; return object.placeholder; } -module.exports = getPlaceholder; +module.exports = getHolder; diff --git a/tools/eslint/node_modules/lodash/_getMapData.js b/tools/eslint/node_modules/lodash/_getMapData.js new file mode 100644 index 0000000000..17f63032e1 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_getMapData.js @@ -0,0 +1,18 @@ +var isKeyable = require('./_isKeyable'); + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +module.exports = getMapData; diff --git a/tools/eslint/node_modules/lodash/_getMatchData.js b/tools/eslint/node_modules/lodash/_getMatchData.js index a1456d2401..2cc70f917f 100644 --- a/tools/eslint/node_modules/lodash/_getMatchData.js +++ b/tools/eslint/node_modules/lodash/_getMatchData.js @@ -1,5 +1,5 @@ var isStrictComparable = require('./_isStrictComparable'), - toPairs = require('./toPairs'); + keys = require('./keys'); /** * Gets the property names, values, and compare flags of `object`. @@ -9,11 +9,14 @@ var isStrictComparable = require('./_isStrictComparable'), * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } diff --git a/tools/eslint/node_modules/lodash/_getNative.js b/tools/eslint/node_modules/lodash/_getNative.js index f6ff7f19b9..97a622b83a 100644 --- a/tools/eslint/node_modules/lodash/_getNative.js +++ b/tools/eslint/node_modules/lodash/_getNative.js @@ -1,4 +1,5 @@ -var isNative = require('./isNative'); +var baseIsNative = require('./_baseIsNative'), + getValue = require('./_getValue'); /** * Gets the native function at `key` of `object`. @@ -9,8 +10,8 @@ var isNative = require('./isNative'); * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } module.exports = getNative; diff --git a/tools/eslint/node_modules/lodash/_getSymbols.js b/tools/eslint/node_modules/lodash/_getSymbols.js index 63df71742d..1a76917336 100644 --- a/tools/eslint/node_modules/lodash/_getSymbols.js +++ b/tools/eslint/node_modules/lodash/_getSymbols.js @@ -1,3 +1,5 @@ +var stubArray = require('./stubArray'); + /** Built-in value references. */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; @@ -16,9 +18,7 @@ function getSymbols(object) { // Fallback for IE < 11. if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; + getSymbols = stubArray; } module.exports = getSymbols; diff --git a/tools/eslint/node_modules/lodash/_getValue.js b/tools/eslint/node_modules/lodash/_getValue.js new file mode 100644 index 0000000000..5f7d773673 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_getValue.js @@ -0,0 +1,13 @@ +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +module.exports = getValue; diff --git a/tools/eslint/node_modules/lodash/_hasPath.js b/tools/eslint/node_modules/lodash/_hasPath.js index a399429759..4533c608db 100644 --- a/tools/eslint/node_modules/lodash/_hasPath.js +++ b/tools/eslint/node_modules/lodash/_hasPath.js @@ -4,7 +4,8 @@ var castPath = require('./_castPath'), isIndex = require('./_isIndex'), isKey = require('./_isKey'), isLength = require('./isLength'), - isString = require('./isString'); + isString = require('./isString'), + toKey = require('./_toKey'); /** * Checks if `path` exists on `object`. @@ -23,7 +24,7 @@ function hasPath(object, path, hasFunc) { length = path.length; while (++index < length) { - var key = path[index]; + var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } diff --git a/tools/eslint/node_modules/lodash/_hashClear.js b/tools/eslint/node_modules/lodash/_hashClear.js new file mode 100644 index 0000000000..14c159176c --- /dev/null +++ b/tools/eslint/node_modules/lodash/_hashClear.js @@ -0,0 +1,14 @@ +var nativeCreate = require('./_nativeCreate'); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; +} + +module.exports = hashClear; diff --git a/tools/eslint/node_modules/lodash/_hashDelete.js b/tools/eslint/node_modules/lodash/_hashDelete.js index b562317c00..45b39fb00d 100644 --- a/tools/eslint/node_modules/lodash/_hashDelete.js +++ b/tools/eslint/node_modules/lodash/_hashDelete.js @@ -1,15 +1,15 @@ -var hashHas = require('./_hashHas'); - /** * Removes `key` and its value from the hash. * * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; +function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; } module.exports = hashDelete; diff --git a/tools/eslint/node_modules/lodash/_hashGet.js b/tools/eslint/node_modules/lodash/_hashGet.js index ba509b6f70..1fc2f34b10 100644 --- a/tools/eslint/node_modules/lodash/_hashGet.js +++ b/tools/eslint/node_modules/lodash/_hashGet.js @@ -13,16 +13,18 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ -function hashGet(hash, key) { +function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; diff --git a/tools/eslint/node_modules/lodash/_hashHas.js b/tools/eslint/node_modules/lodash/_hashHas.js index 3bbff48430..f30aac384f 100644 --- a/tools/eslint/node_modules/lodash/_hashHas.js +++ b/tools/eslint/node_modules/lodash/_hashHas.js @@ -10,12 +10,14 @@ var hasOwnProperty = objectProto.hasOwnProperty; * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } module.exports = hashHas; diff --git a/tools/eslint/node_modules/lodash/_hashSet.js b/tools/eslint/node_modules/lodash/_hashSet.js index f7c3307399..56fec1eb2f 100644 --- a/tools/eslint/node_modules/lodash/_hashSet.js +++ b/tools/eslint/node_modules/lodash/_hashSet.js @@ -7,12 +7,16 @@ var HASH_UNDEFINED = '__lodash_hash_undefined__'; * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ -function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; +function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } module.exports = hashSet; diff --git a/tools/eslint/node_modules/lodash/_indexOfNaN.js b/tools/eslint/node_modules/lodash/_indexOfNaN.js index 05b8207d7c..49a42bb826 100644 --- a/tools/eslint/node_modules/lodash/_indexOfNaN.js +++ b/tools/eslint/node_modules/lodash/_indexOfNaN.js @@ -9,7 +9,7 @@ */ function indexOfNaN(array, fromIndex, fromRight) { var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { var other = array[index]; diff --git a/tools/eslint/node_modules/lodash/_isFlattenable.js b/tools/eslint/node_modules/lodash/_isFlattenable.js index 847ad1fa0e..1764fef6b8 100644 --- a/tools/eslint/node_modules/lodash/_isFlattenable.js +++ b/tools/eslint/node_modules/lodash/_isFlattenable.js @@ -1,6 +1,5 @@ var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLikeObject = require('./isArrayLikeObject'); + isArray = require('./isArray'); /** * Checks if `value` is a flattenable `arguments` object or array. @@ -10,7 +9,7 @@ var isArguments = require('./isArguments'), * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + return isArray(value) || isArguments(value); } module.exports = isFlattenable; diff --git a/tools/eslint/node_modules/lodash/_isIndex.js b/tools/eslint/node_modules/lodash/_isIndex.js index c7ff6079a9..e123dde8bc 100644 --- a/tools/eslint/node_modules/lodash/_isIndex.js +++ b/tools/eslint/node_modules/lodash/_isIndex.js @@ -13,9 +13,10 @@ var reIsUint = /^(?:0|[1-9]\d*)$/; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; diff --git a/tools/eslint/node_modules/lodash/_isKey.js b/tools/eslint/node_modules/lodash/_isKey.js index a907950add..ff08b06808 100644 --- a/tools/eslint/node_modules/lodash/_isKey.js +++ b/tools/eslint/node_modules/lodash/_isKey.js @@ -14,13 +14,16 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { + if (isArray(value)) { + return false; + } var type = typeof value; - if (type == 'number' || type == 'symbol') { + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { return true; } - return !isArray(value) && - (isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object))); + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } module.exports = isKey; diff --git a/tools/eslint/node_modules/lodash/_isKeyable.js b/tools/eslint/node_modules/lodash/_isKeyable.js index 5df83c0e97..39f1828d4a 100644 --- a/tools/eslint/node_modules/lodash/_isKeyable.js +++ b/tools/eslint/node_modules/lodash/_isKeyable.js @@ -7,8 +7,9 @@ */ function isKeyable(value) { var type = typeof value; - return type == 'number' || type == 'boolean' || - (type == 'string' && value != '__proto__') || value == null; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } module.exports = isKeyable; diff --git a/tools/eslint/node_modules/lodash/_isMaskable.js b/tools/eslint/node_modules/lodash/_isMaskable.js new file mode 100644 index 0000000000..eb98d09f31 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_isMaskable.js @@ -0,0 +1,14 @@ +var coreJsData = require('./_coreJsData'), + isFunction = require('./isFunction'), + stubFalse = require('./stubFalse'); + +/** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ +var isMaskable = coreJsData ? isFunction : stubFalse; + +module.exports = isMaskable; diff --git a/tools/eslint/node_modules/lodash/_isMasked.js b/tools/eslint/node_modules/lodash/_isMasked.js new file mode 100644 index 0000000000..4b0f21ba89 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_isMasked.js @@ -0,0 +1,20 @@ +var coreJsData = require('./_coreJsData'); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +module.exports = isMasked; diff --git a/tools/eslint/node_modules/lodash/_listCacheClear.js b/tools/eslint/node_modules/lodash/_listCacheClear.js new file mode 100644 index 0000000000..e4e1325813 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_listCacheClear.js @@ -0,0 +1,12 @@ +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; +} + +module.exports = listCacheClear; diff --git a/tools/eslint/node_modules/lodash/_assocDelete.js b/tools/eslint/node_modules/lodash/_listCacheDelete.js index 49f61e830f..2f3232836a 100644 --- a/tools/eslint/node_modules/lodash/_assocDelete.js +++ b/tools/eslint/node_modules/lodash/_listCacheDelete.js @@ -7,25 +7,28 @@ var arrayProto = Array.prototype; var splice = arrayProto.splice; /** - * Removes `key` and its value from the associative array. + * Removes `key` and its value from the list cache. * * @private - * @param {Array} array The array to modify. + * @name delete + * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ -function assocDelete(array, key) { - var index = assocIndexOf(array, key); +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + if (index < 0) { return false; } - var lastIndex = array.length - 1; + var lastIndex = data.length - 1; if (index == lastIndex) { - array.pop(); + data.pop(); } else { - splice.call(array, index, 1); + splice.call(data, index, 1); } return true; } -module.exports = assocDelete; +module.exports = listCacheDelete; diff --git a/tools/eslint/node_modules/lodash/_listCacheGet.js b/tools/eslint/node_modules/lodash/_listCacheGet.js new file mode 100644 index 0000000000..f8192fc384 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_listCacheGet.js @@ -0,0 +1,19 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; diff --git a/tools/eslint/node_modules/lodash/_assocHas.js b/tools/eslint/node_modules/lodash/_listCacheHas.js index a74bd39973..2adf67146f 100644 --- a/tools/eslint/node_modules/lodash/_assocHas.js +++ b/tools/eslint/node_modules/lodash/_listCacheHas.js @@ -1,15 +1,16 @@ var assocIndexOf = require('./_assocIndexOf'); /** - * Checks if an associative array value for `key` exists. + * Checks if a list cache value for `key` exists. * * @private - * @param {Array} array The array to query. + * @name has + * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ -function assocHas(array, key) { - return assocIndexOf(array, key) > -1; +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } -module.exports = assocHas; +module.exports = listCacheHas; diff --git a/tools/eslint/node_modules/lodash/_listCacheSet.js b/tools/eslint/node_modules/lodash/_listCacheSet.js new file mode 100644 index 0000000000..e2f13b6be8 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_listCacheSet.js @@ -0,0 +1,25 @@ +var assocIndexOf = require('./_assocIndexOf'); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +module.exports = listCacheSet; diff --git a/tools/eslint/node_modules/lodash/_mapClear.js b/tools/eslint/node_modules/lodash/_mapCacheClear.js index 296f41794d..edb42b5f54 100644 --- a/tools/eslint/node_modules/lodash/_mapClear.js +++ b/tools/eslint/node_modules/lodash/_mapCacheClear.js @@ -1,4 +1,5 @@ var Hash = require('./_Hash'), + ListCache = require('./_ListCache'), Map = require('./_Map'); /** @@ -8,12 +9,12 @@ var Hash = require('./_Hash'), * @name clear * @memberOf MapCache */ -function mapClear() { +function mapCacheClear() { this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } -module.exports = mapClear; +module.exports = mapCacheClear; diff --git a/tools/eslint/node_modules/lodash/_mapCacheDelete.js b/tools/eslint/node_modules/lodash/_mapCacheDelete.js new file mode 100644 index 0000000000..08f1c2efee --- /dev/null +++ b/tools/eslint/node_modules/lodash/_mapCacheDelete.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); +} + +module.exports = mapCacheDelete; diff --git a/tools/eslint/node_modules/lodash/_mapCacheGet.js b/tools/eslint/node_modules/lodash/_mapCacheGet.js new file mode 100644 index 0000000000..f29f55cfdd --- /dev/null +++ b/tools/eslint/node_modules/lodash/_mapCacheGet.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; diff --git a/tools/eslint/node_modules/lodash/_mapCacheHas.js b/tools/eslint/node_modules/lodash/_mapCacheHas.js new file mode 100644 index 0000000000..a1214c028b --- /dev/null +++ b/tools/eslint/node_modules/lodash/_mapCacheHas.js @@ -0,0 +1,16 @@ +var getMapData = require('./_getMapData'); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; diff --git a/tools/eslint/node_modules/lodash/_mapCacheSet.js b/tools/eslint/node_modules/lodash/_mapCacheSet.js new file mode 100644 index 0000000000..0ef1eafd87 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_mapCacheSet.js @@ -0,0 +1,18 @@ +var getMapData = require('./_getMapData'); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; +} + +module.exports = mapCacheSet; diff --git a/tools/eslint/node_modules/lodash/_mapDelete.js b/tools/eslint/node_modules/lodash/_mapDelete.js deleted file mode 100644 index 640eb0a191..0000000000 --- a/tools/eslint/node_modules/lodash/_mapDelete.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocDelete = require('./_assocDelete'), - hashDelete = require('./_hashDelete'), - isKeyable = require('./_isKeyable'); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); -} - -module.exports = mapDelete; diff --git a/tools/eslint/node_modules/lodash/_mapGet.js b/tools/eslint/node_modules/lodash/_mapGet.js deleted file mode 100644 index 8f33854a58..0000000000 --- a/tools/eslint/node_modules/lodash/_mapGet.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocGet = require('./_assocGet'), - hashGet = require('./_hashGet'), - isKeyable = require('./_isKeyable'); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); -} - -module.exports = mapGet; diff --git a/tools/eslint/node_modules/lodash/_mapHas.js b/tools/eslint/node_modules/lodash/_mapHas.js deleted file mode 100644 index 9225537b98..0000000000 --- a/tools/eslint/node_modules/lodash/_mapHas.js +++ /dev/null @@ -1,23 +0,0 @@ -var Map = require('./_Map'), - assocHas = require('./_assocHas'), - hashHas = require('./_hashHas'), - isKeyable = require('./_isKeyable'); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); -} - -module.exports = mapHas; diff --git a/tools/eslint/node_modules/lodash/_mapSet.js b/tools/eslint/node_modules/lodash/_mapSet.js deleted file mode 100644 index 23b075fc6e..0000000000 --- a/tools/eslint/node_modules/lodash/_mapSet.js +++ /dev/null @@ -1,28 +0,0 @@ -var Map = require('./_Map'), - assocSet = require('./_assocSet'), - hashSet = require('./_hashSet'), - isKeyable = require('./_isKeyable'); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } - return this; -} - -module.exports = mapSet; diff --git a/tools/eslint/node_modules/lodash/_mapToArray.js b/tools/eslint/node_modules/lodash/_mapToArray.js index e2e8a245a8..fe3dd531a3 100644 --- a/tools/eslint/node_modules/lodash/_mapToArray.js +++ b/tools/eslint/node_modules/lodash/_mapToArray.js @@ -1,9 +1,9 @@ /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, diff --git a/tools/eslint/node_modules/lodash/_matchesStrictComparable.js b/tools/eslint/node_modules/lodash/_matchesStrictComparable.js index 70375e0e5d..f608af9ec4 100644 --- a/tools/eslint/node_modules/lodash/_matchesStrictComparable.js +++ b/tools/eslint/node_modules/lodash/_matchesStrictComparable.js @@ -5,7 +5,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { diff --git a/tools/eslint/node_modules/lodash/_root.js b/tools/eslint/node_modules/lodash/_root.js index d2cfd31149..c46a71af97 100644 --- a/tools/eslint/node_modules/lodash/_root.js +++ b/tools/eslint/node_modules/lodash/_root.js @@ -1,41 +1,15 @@ var checkGlobal = require('./_checkGlobal'); -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - /** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); +var freeGlobal = checkGlobal(typeof global == 'object' && global); /** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); +var freeSelf = checkGlobal(typeof self == 'object' && self); /** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); +var thisGlobal = checkGlobal(typeof this == 'object' && this); -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); module.exports = root; diff --git a/tools/eslint/node_modules/lodash/_setCacheAdd.js b/tools/eslint/node_modules/lodash/_setCacheAdd.js new file mode 100644 index 0000000000..1081a74426 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_setCacheAdd.js @@ -0,0 +1,19 @@ +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} + +module.exports = setCacheAdd; diff --git a/tools/eslint/node_modules/lodash/_setCacheHas.js b/tools/eslint/node_modules/lodash/_setCacheHas.js new file mode 100644 index 0000000000..9a492556e0 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_setCacheHas.js @@ -0,0 +1,14 @@ +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} + +module.exports = setCacheHas; diff --git a/tools/eslint/node_modules/lodash/_setToArray.js b/tools/eslint/node_modules/lodash/_setToArray.js index 6b24f304de..b87f07418c 100644 --- a/tools/eslint/node_modules/lodash/_setToArray.js +++ b/tools/eslint/node_modules/lodash/_setToArray.js @@ -1,9 +1,9 @@ /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, diff --git a/tools/eslint/node_modules/lodash/_setToPairs.js b/tools/eslint/node_modules/lodash/_setToPairs.js new file mode 100644 index 0000000000..36ad37a058 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_setToPairs.js @@ -0,0 +1,18 @@ +/** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ +function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; +} + +module.exports = setToPairs; diff --git a/tools/eslint/node_modules/lodash/_stackClear.js b/tools/eslint/node_modules/lodash/_stackClear.js index 8255536f27..498482c4c7 100644 --- a/tools/eslint/node_modules/lodash/_stackClear.js +++ b/tools/eslint/node_modules/lodash/_stackClear.js @@ -1,3 +1,5 @@ +var ListCache = require('./_ListCache'); + /** * Removes all key-value entries from the stack. * @@ -6,7 +8,7 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; } module.exports = stackClear; diff --git a/tools/eslint/node_modules/lodash/_stackDelete.js b/tools/eslint/node_modules/lodash/_stackDelete.js index 7e38a13777..8c60260c73 100644 --- a/tools/eslint/node_modules/lodash/_stackDelete.js +++ b/tools/eslint/node_modules/lodash/_stackDelete.js @@ -1,5 +1,3 @@ -var assocDelete = require('./_assocDelete'); - /** * Removes `key` and its value from the stack. * @@ -10,10 +8,7 @@ var assocDelete = require('./_assocDelete'); * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { - var data = this.__data__, - array = data.array; - - return array ? assocDelete(array, key) : data.map['delete'](key); + return this.__data__['delete'](key); } module.exports = stackDelete; diff --git a/tools/eslint/node_modules/lodash/_stackGet.js b/tools/eslint/node_modules/lodash/_stackGet.js index 20b9d9afa2..1cdf004091 100644 --- a/tools/eslint/node_modules/lodash/_stackGet.js +++ b/tools/eslint/node_modules/lodash/_stackGet.js @@ -1,5 +1,3 @@ -var assocGet = require('./_assocGet'); - /** * Gets the stack value for `key`. * @@ -10,10 +8,7 @@ var assocGet = require('./_assocGet'); * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } module.exports = stackGet; diff --git a/tools/eslint/node_modules/lodash/_stackHas.js b/tools/eslint/node_modules/lodash/_stackHas.js index 7a3b0b9487..16a3ad11b9 100644 --- a/tools/eslint/node_modules/lodash/_stackHas.js +++ b/tools/eslint/node_modules/lodash/_stackHas.js @@ -1,5 +1,3 @@ -var assocHas = require('./_assocHas'); - /** * Checks if a stack value for `key` exists. * @@ -10,10 +8,7 @@ var assocHas = require('./_assocHas'); * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } module.exports = stackHas; diff --git a/tools/eslint/node_modules/lodash/_stackSet.js b/tools/eslint/node_modules/lodash/_stackSet.js index 76ca89a8df..0380ee54c0 100644 --- a/tools/eslint/node_modules/lodash/_stackSet.js +++ b/tools/eslint/node_modules/lodash/_stackSet.js @@ -1,5 +1,5 @@ -var MapCache = require('./_MapCache'), - assocSet = require('./_assocSet'); +var ListCache = require('./_ListCache'), + MapCache = require('./_MapCache'); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -15,21 +15,11 @@ var LARGE_ARRAY_SIZE = 200; * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); - } - } - var map = data.map; - if (map) { - map.set(key, value); + var cache = this.__data__; + if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) { + cache = this.__data__ = new MapCache(cache.__data__); } + cache.set(key, value); return this; } diff --git a/tools/eslint/node_modules/lodash/_stringToPath.js b/tools/eslint/node_modules/lodash/_stringToPath.js index b6a1fc28ac..8b884b92ac 100644 --- a/tools/eslint/node_modules/lodash/_stringToPath.js +++ b/tools/eslint/node_modules/lodash/_stringToPath.js @@ -2,7 +2,7 @@ var memoize = require('./memoize'), toString = require('./toString'); /** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; diff --git a/tools/eslint/node_modules/lodash/_toKey.js b/tools/eslint/node_modules/lodash/_toKey.js index b2fbc90a25..c6d645c4d0 100644 --- a/tools/eslint/node_modules/lodash/_toKey.js +++ b/tools/eslint/node_modules/lodash/_toKey.js @@ -1,5 +1,8 @@ var isSymbol = require('./isSymbol'); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + /** * Converts `value` to a string key if it's not a string or symbol. * @@ -7,8 +10,12 @@ var isSymbol = require('./isSymbol'); * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ -function toKey(key) { - return (typeof key == 'string' || isSymbol(key)) ? key : (key + ''); +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; diff --git a/tools/eslint/node_modules/lodash/array.js b/tools/eslint/node_modules/lodash/array.js index 06eda29344..af688d3ee6 100644 --- a/tools/eslint/node_modules/lodash/array.js +++ b/tools/eslint/node_modules/lodash/array.js @@ -12,6 +12,7 @@ module.exports = { 'fill': require('./fill'), 'findIndex': require('./findIndex'), 'findLastIndex': require('./findLastIndex'), + 'first': require('./first'), 'flatten': require('./flatten'), 'flattenDeep': require('./flattenDeep'), 'flattenDepth': require('./flattenDepth'), diff --git a/tools/eslint/node_modules/lodash/ary.js b/tools/eslint/node_modules/lodash/ary.js index e901f1b9db..91ce37969b 100644 --- a/tools/eslint/node_modules/lodash/ary.js +++ b/tools/eslint/node_modules/lodash/ary.js @@ -14,7 +14,7 @@ var ARY_FLAG = 128; * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); diff --git a/tools/eslint/node_modules/lodash/assign.js b/tools/eslint/node_modules/lodash/assign.js index 281e8acf14..2a60ff2c59 100644 --- a/tools/eslint/node_modules/lodash/assign.js +++ b/tools/eslint/node_modules/lodash/assign.js @@ -32,6 +32,7 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assignIn * @example * * function Foo() { diff --git a/tools/eslint/node_modules/lodash/assignIn.js b/tools/eslint/node_modules/lodash/assignIn.js index f48e92558f..b001c492a0 100644 --- a/tools/eslint/node_modules/lodash/assignIn.js +++ b/tools/eslint/node_modules/lodash/assignIn.js @@ -28,6 +28,7 @@ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assign * @example * * function Foo() { diff --git a/tools/eslint/node_modules/lodash/assignInWith.js b/tools/eslint/node_modules/lodash/assignInWith.js index 2b68c82ffb..68fcc0b03a 100644 --- a/tools/eslint/node_modules/lodash/assignInWith.js +++ b/tools/eslint/node_modules/lodash/assignInWith.js @@ -19,6 +19,7 @@ var copyObject = require('./_copyObject'), * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. + * @see _.assignWith * @example * * function customizer(objValue, srcValue) { diff --git a/tools/eslint/node_modules/lodash/assignWith.js b/tools/eslint/node_modules/lodash/assignWith.js index d5c8f0070d..7dc6c761b8 100644 --- a/tools/eslint/node_modules/lodash/assignWith.js +++ b/tools/eslint/node_modules/lodash/assignWith.js @@ -18,6 +18,7 @@ var copyObject = require('./_copyObject'), * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. + * @see _.assignInWith * @example * * function customizer(objValue, srcValue) { diff --git a/tools/eslint/node_modules/lodash/at.js b/tools/eslint/node_modules/lodash/at.js index 59b197c5f2..3f2ec0c004 100644 --- a/tools/eslint/node_modules/lodash/at.js +++ b/tools/eslint/node_modules/lodash/at.js @@ -11,16 +11,13 @@ var baseAt = require('./_baseAt'), * @category Object * @param {Object} object The object to iterate over. * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ var at = rest(function(object, paths) { return baseAt(object, baseFlatten(paths, 1)); diff --git a/tools/eslint/node_modules/lodash/bind.js b/tools/eslint/node_modules/lodash/bind.js index a41b94619c..893932a1da 100644 --- a/tools/eslint/node_modules/lodash/bind.js +++ b/tools/eslint/node_modules/lodash/bind.js @@ -1,5 +1,5 @@ var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), rest = require('./rest'); @@ -14,7 +14,7 @@ var BIND_FLAG = 1, * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -45,7 +45,7 @@ var BIND_FLAG = 1, var bind = rest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); + var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } return createWrapper(func, bitmask, thisArg, partials, holders); diff --git a/tools/eslint/node_modules/lodash/bindAll.js b/tools/eslint/node_modules/lodash/bindAll.js index 55f3b21683..7d1e9bac45 100644 --- a/tools/eslint/node_modules/lodash/bindAll.js +++ b/tools/eslint/node_modules/lodash/bindAll.js @@ -1,7 +1,8 @@ var arrayEach = require('./_arrayEach'), baseFlatten = require('./_baseFlatten'), bind = require('./bind'), - rest = require('./rest'); + rest = require('./rest'), + toKey = require('./_toKey'); /** * Binds methods of an object to the object itself, overwriting the existing @@ -25,12 +26,13 @@ var arrayEach = require('./_arrayEach'), * } * }; * - * _.bindAll(view, 'onClick'); + * _.bindAll(view, ['onClick']); * jQuery(element).on('click', view.onClick); * // => Logs 'clicked docs' when clicked. */ var bindAll = rest(function(object, methodNames) { arrayEach(baseFlatten(methodNames, 1), function(key) { + key = toKey(key); object[key] = bind(object[key], object); }); return object; diff --git a/tools/eslint/node_modules/lodash/bindKey.js b/tools/eslint/node_modules/lodash/bindKey.js index 364dd69812..1ed754be85 100644 --- a/tools/eslint/node_modules/lodash/bindKey.js +++ b/tools/eslint/node_modules/lodash/bindKey.js @@ -1,5 +1,5 @@ var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), rest = require('./rest'); @@ -56,7 +56,7 @@ var BIND_FLAG = 1, var bindKey = rest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); + var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } return createWrapper(key, bitmask, object, partials, holders); diff --git a/tools/eslint/node_modules/lodash/chunk.js b/tools/eslint/node_modules/lodash/chunk.js index f209474370..356510f539 100644 --- a/tools/eslint/node_modules/lodash/chunk.js +++ b/tools/eslint/node_modules/lodash/chunk.js @@ -18,7 +18,7 @@ var nativeCeil = Math.ceil, * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); diff --git a/tools/eslint/node_modules/lodash/clone.js b/tools/eslint/node_modules/lodash/clone.js index d33799250a..d02395ea42 100644 --- a/tools/eslint/node_modules/lodash/clone.js +++ b/tools/eslint/node_modules/lodash/clone.js @@ -17,6 +17,7 @@ var baseClone = require('./_baseClone'); * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; diff --git a/tools/eslint/node_modules/lodash/cloneDeep.js b/tools/eslint/node_modules/lodash/cloneDeep.js index 037002eef5..94efce1233 100644 --- a/tools/eslint/node_modules/lodash/cloneDeep.js +++ b/tools/eslint/node_modules/lodash/cloneDeep.js @@ -9,6 +9,7 @@ var baseClone = require('./_baseClone'); * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. + * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; diff --git a/tools/eslint/node_modules/lodash/cloneDeepWith.js b/tools/eslint/node_modules/lodash/cloneDeepWith.js index 581ab9fa83..4a345fb2d3 100644 --- a/tools/eslint/node_modules/lodash/cloneDeepWith.js +++ b/tools/eslint/node_modules/lodash/cloneDeepWith.js @@ -10,6 +10,7 @@ var baseClone = require('./_baseClone'); * @param {*} value The value to recursively clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the deep cloned value. + * @see _.cloneWith * @example * * function customizer(value) { diff --git a/tools/eslint/node_modules/lodash/cloneWith.js b/tools/eslint/node_modules/lodash/cloneWith.js index df731c7af6..c85f573f18 100644 --- a/tools/eslint/node_modules/lodash/cloneWith.js +++ b/tools/eslint/node_modules/lodash/cloneWith.js @@ -13,6 +13,7 @@ var baseClone = require('./_baseClone'); * @param {*} value The value to clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith * @example * * function customizer(value) { diff --git a/tools/eslint/node_modules/lodash/concat.js b/tools/eslint/node_modules/lodash/concat.js index de9270b482..506306c653 100644 --- a/tools/eslint/node_modules/lodash/concat.js +++ b/tools/eslint/node_modules/lodash/concat.js @@ -1,7 +1,7 @@ -var arrayConcat = require('./_arrayConcat'), +var arrayPush = require('./_arrayPush'), baseFlatten = require('./_baseFlatten'), - castArray = require('./castArray'), - copyArray = require('./_copyArray'); + copyArray = require('./_copyArray'), + isArray = require('./isArray'); /** * Creates a new array concatenating `array` with any additional arrays @@ -27,16 +27,16 @@ var arrayConcat = require('./_arrayConcat'), */ function concat() { var length = arguments.length, - array = castArray(arguments[0]); + args = Array(length ? length - 1 : 0), + array = arguments[0], + index = length; - if (length < 2) { - return length ? copyArray(array) : []; + while (index--) { + args[index - 1] = arguments[index]; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; - } - return arrayConcat(array, baseFlatten(args, 1)); + return length + ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) + : []; } module.exports = concat; diff --git a/tools/eslint/node_modules/lodash/cond.js b/tools/eslint/node_modules/lodash/cond.js index 0ba36de21b..cdebd12a1c 100644 --- a/tools/eslint/node_modules/lodash/cond.js +++ b/tools/eslint/node_modules/lodash/cond.js @@ -17,7 +17,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ diff --git a/tools/eslint/node_modules/lodash/conforms.js b/tools/eslint/node_modules/lodash/conforms.js index 6ec590f30b..2a3915436a 100644 --- a/tools/eslint/node_modules/lodash/conforms.js +++ b/tools/eslint/node_modules/lodash/conforms.js @@ -11,7 +11,7 @@ var baseClone = require('./_baseClone'), * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ @@ -19,7 +19,7 @@ var baseClone = require('./_baseClone'), * { 'user': 'fred', 'age': 40 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); + * _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } })); * // => [{ 'user': 'fred', 'age': 40 }] */ function conforms(source) { diff --git a/tools/eslint/node_modules/lodash/constant.js b/tools/eslint/node_modules/lodash/constant.js index 59bcb42026..655ece3fb3 100644 --- a/tools/eslint/node_modules/lodash/constant.js +++ b/tools/eslint/node_modules/lodash/constant.js @@ -6,13 +6,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { diff --git a/tools/eslint/node_modules/lodash/core.js b/tools/eslint/node_modules/lodash/core.js index 27b87a17ae..9b6092dd9c 100644 --- a/tools/eslint/node_modules/lodash/core.js +++ b/tools/eslint/node_modules/lodash/core.js @@ -1,6 +1,6 @@ /** * @license - * lodash 4.11.1 (Custom Build) <https://lodash.com/> + * lodash (Custom Build) <https://lodash.com/> * Build: `lodash core -o ./dist/lodash.core.js` * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> @@ -13,7 +13,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.1'; + var VERSION = '4.13.1'; /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -47,9 +47,6 @@ var reUnescapedHtml = /[&<>"'`]/g, reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; - /** Used to map characters to HTML entities. */ var htmlEscapes = { '&': '&', @@ -60,64 +57,27 @@ '`': '`' }; - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true - }; - /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; + var freeExports = typeof exports == 'object' && exports; /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; + var freeModule = freeExports && typeof module == 'object' && module; /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = checkGlobal(typeof global == 'object' && global); /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); - - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + var freeSelf = checkGlobal(typeof self == 'object' && self); /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + var thisGlobal = checkGlobal(typeof this == 'object' && this); - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); /*--------------------------------------------------------------------------*/ /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - return arrayPush(copyArray(array), values); - } - - /** * Appends the elements of `values` to `array`. * * @private @@ -131,56 +91,26 @@ } /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); - if (current != null && (computed === undefined - ? current === current - : comparator(current, computed) - )) { - var computed = current, - result = value; + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; } } - return result; - } - - /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; + return -1; } /** @@ -206,25 +136,6 @@ } /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - - /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. @@ -252,38 +163,6 @@ } /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; - - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; - - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; - } - - /** * Used by `_.escape` to convert characters to HTML entities. * * @private @@ -301,47 +180,8 @@ * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; - } - - /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; - } - - /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ - function iteratorToArray(iterator) { - var data, - result = []; - - while (!(data = iterator.next()).done) { - result.push(data.value); - } - return result; + function isHostObject() { + return false; } /*--------------------------------------------------------------------------*/ @@ -367,11 +207,7 @@ var oldDash = root._; /** Built-in value references. */ - var Reflect = root.Reflect, - Symbol = root.Symbol, - Uint8Array = root.Uint8Array, - enumerate = Reflect ? Reflect.enumerate : undefined, - objectCreate = Object.create, + var objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -379,9 +215,6 @@ nativeKeys = Object.keys, nativeMax = Math.max; - /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ - var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); - /*------------------------------------------------------------------------*/ /** @@ -456,22 +289,24 @@ * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, + * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, + * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, + * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -617,6 +452,35 @@ } /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !false) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private @@ -700,7 +564,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return baseFilter(props, function(key) { @@ -709,6 +573,19 @@ } /** + * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * @@ -775,7 +652,7 @@ } stack.push([object, other]); if (isSameTag && !objIsObj) { - var result = (objIsArr || isTypedArray(object)) + var result = (objIsArr) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); stack.pop(); @@ -849,11 +726,17 @@ return result; } - // Fallback for IE < 9 with es6-shim. - if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) { - baseKeysIn = function(object) { - return iteratorToArray(enumerate(object)); - }; + /** + * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; } /** @@ -879,7 +762,7 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var props = keys(source); @@ -925,7 +808,7 @@ * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -1012,6 +895,44 @@ } /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = false; + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = false; + + 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; + } + + /** * Copies properties of `source` to `object`. * * @private @@ -1052,7 +973,7 @@ length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -1144,6 +1065,31 @@ } /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + predicate = baseIteratee(predicate, 3); + if (!isArrayLike(collection)) { + var props = keys(collection); + } + var index = findIndexFunc(props || collection, function(value, key) { + if (props) { + key = value; + value = iterable[key]; + } + return predicate(value, key, iterable); + }, fromIndex); + return index > -1 ? collection[props ? props[index] : index] : undefined; + }; + } + + /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * @@ -1197,16 +1143,16 @@ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? [] : undefined; // Ignore non-index properties. while (++index < arrLength) { @@ -1222,10 +1168,12 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!baseSome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!baseSome(other, function(othValue, othIndex) { + if (!indexOf(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.push(othIndex); + } })) { result = false; break; @@ -1366,23 +1314,6 @@ var getLength = baseProperty('length'); /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. - * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. - */ - function indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; - } - - /** * Checks if `value` is a flattenable `arguments` object or array. * * @private @@ -1390,22 +1321,17 @@ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + return isArray(value) || isArguments(value); } /** - * Checks if `value` is likely a prototype object. + * Converts `value` to a string key if it's not a string or symbol. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; - } + var toKey = String; /*------------------------------------------------------------------------*/ @@ -1452,16 +1378,64 @@ */ function concat() { var length = arguments.length, - array = castArray(arguments[0]); + args = Array(length ? length - 1 : 0), + array = arguments[0], + index = length; - if (length < 2) { - return length ? copyArray(array) : []; + while (index--) { + args[index - 1] = arguments[index]; } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + return length + ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) + : []; + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to search. + * @param {Array|Function|Object|string} [predicate=_.identity] + * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return arrayConcat(array, baseFlatten(args, 1)); + return baseFindIndex(array, baseIteratee(predicate, 3), index); } /** @@ -1806,6 +1780,7 @@ * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * * var users = [ @@ -1844,6 +1819,7 @@ * @param {Array|Object} collection The collection to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -1868,9 +1844,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - return baseFind(collection, baseIteratee(predicate), baseEach); - } + var find = createFind(findIndex); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. @@ -1889,6 +1863,7 @@ * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * * _([1, 2]).forEach(function(value) { @@ -1975,6 +1950,7 @@ * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. + * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { @@ -2151,7 +2127,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -2238,7 +2214,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -2331,47 +2307,6 @@ /*------------------------------------------------------------------------*/ /** - * Casts `value` as an array if it's not one. - * - * @static - * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. - * @example - * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] - * - * _.castArray(null); - * // => [null] - * - * _.castArray(undefined); - * // => [undefined] - * - * _.castArray(); - * // => [] - * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true - */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; - } - - /** * Creates a shallow clone of `value`. * * **Note:** This method is loosely based on the @@ -2388,6 +2323,7 @@ * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; @@ -2440,32 +2376,6 @@ } /** - * Checks if `value` is greater than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @example - * - * _.gt(3, 1); - * // => true - * - * _.gt(3, 3); - * // => false - * - * _.gt(1, 3); - * // => false - */ - function gt(value, other) { - return value > other; - } - - /** * Checks if `value` is likely an `arguments` object. * * @static @@ -2658,12 +2568,7 @@ isFunction(value.splice) || isArguments(value))) { return !value.length; } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return !(nonEnumShadows && keys(value).length); + return !keys(value).length; } /** @@ -2717,14 +2622,14 @@ * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -3001,32 +2906,6 @@ } /** - * Checks if `value` is less than `other`. - * - * @static - * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @example - * - * _.lt(1, 3); - * // => true - * - * _.lt(3, 3); - * // => false - * - * _.lt(3, 1); - * // => false - */ - function lt(value, other) { - return value < other; - } - - /** * Converts `value` to an array. * * @static @@ -3059,7 +2938,7 @@ /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on + * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). * * @static @@ -3070,7 +2949,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -3079,7 +2958,7 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ var toInteger = Number; @@ -3095,8 +2974,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -3104,8 +2983,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ var toNumber = Number; @@ -3154,6 +3033,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assignIn * @example * * function Foo() { @@ -3188,6 +3068,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assign * @example * * function Foo() { @@ -3225,6 +3106,7 @@ * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. + * @see _.assignWith * @example * * function customizer(objValue, srcValue) { @@ -3294,6 +3176,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.defaultsDeep * @example * * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); @@ -3363,25 +3246,7 @@ * _.keys('hi'); * // => ['0', '1'] */ - function keys(object) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - for (var key in object) { - if (hasOwnProperty.call(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; - } + var keys = baseKeys; /** * Creates an array of the own and inherited enumerable property names of `object`. @@ -3406,25 +3271,7 @@ * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ - function keysIn(object) { - var index = -1, - isProto = isPrototype(object), - props = baseKeysIn(object), - propsLength = props.length, - indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; - - while (++index < propsLength) { - var key = props[index]; - if (!(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; - } + var keysIn = baseKeysIn; /** * Creates an object composed of the picked `object` properties. @@ -3444,7 +3291,7 @@ * // => { 'a': 1, 'c': 3 } */ var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseFlatten(props, 1)); + return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey)); }); /** @@ -3572,7 +3419,7 @@ * * var object = { 'user': 'fred' }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -3636,7 +3483,7 @@ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ @@ -3744,8 +3591,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * A method that returns `undefined`. * * @static * @memberOf _ @@ -3753,10 +3599,8 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. @@ -3806,7 +3650,7 @@ */ function max(array) { return (array && array.length) - ? baseExtremum(array, identity, gt) + ? baseExtremum(array, identity, baseGt) : undefined; } @@ -3830,7 +3674,7 @@ */ function min(array) { return (array && array.length) - ? baseExtremum(array, identity, lt) + ? baseExtremum(array, identity, baseLt) : undefined; } @@ -3957,10 +3801,12 @@ /*--------------------------------------------------------------------------*/ - // Expose lodash on the free variable `window` or `self` when available. This - // prevents errors in cases where lodash is loaded by a script tag in the presence - // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch for more details. - (freeWindow || freeSelf || {})._ = lodash; + // Expose Lodash on the free variable `window` or `self` when available so it's + // globally accessible, even when bundled with Browserify, Webpack, etc. This + // also prevents errors in cases where Lodash is loaded by a script tag in the + // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch + // for more details. Use `_.noConflict` to remove Lodash from the global object. + (freeSelf || {})._ = lodash; // Some AMD build optimizers like r.js check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { @@ -3971,11 +3817,9 @@ }); } // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = lodash)._ = lodash; - } + (freeModule.exports = lodash)._ = lodash; // Export for CommonJS support. freeExports._ = lodash; } diff --git a/tools/eslint/node_modules/lodash/core.min.js b/tools/eslint/node_modules/lodash/core.min.js index 5f6cbf43dd..96f15c2125 100644 --- a/tools/eslint/node_modules/lodash/core.min.js +++ b/tools/eslint/node_modules/lodash/core.min.js @@ -1,30 +1,28 @@ /** * @license - * lodash 4.11.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE + * lodash (Custom Build) /license | Underscore.js 1.8.3 underscorejs.org/LICENSE * Build: `lodash core -o ./dist/lodash.core.js` */ -;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===pn?i===i:r(i,c)))var c=i,f=o}return f}function r(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return w(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return gn[n]}function c(n){var t=false;if(null!=n&&typeof n.toString!="function")try{ -t=!!(n+"")}catch(r){}return t}function f(n,t){return n=typeof n=="number"||yn.test(n)?+n:-1,n>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function a(n){return n instanceof l?n:new l(n)}function l(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function p(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function s(n){return Z(n)?Bn(n):{}}function h(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){ -n.apply(pn,r)},t)}function v(n,t){var r=true;return Cn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function y(n,t){var r=[];return Cn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function g(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=C),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?g(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function b(n,t){return n&&Gn(n,t,on)}function _(n,t){return y(t,function(t){return X(n[t])})}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!Z(n)&&!nn(t)?n!==n&&t!==t:d(n,t,j,r,e,u); -}function d(n,t,r,e,u,o){var i=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";i||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!c(n),f="[object Object]"==l&&!c(t),l=a==l;o||(o=[]);var s=M(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=i||isTypedArray(n)?I(n,t,r,e,u,o):$(n,t,a),o.pop(),r):2&u||(i=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!i&&!a)?l?(r=q(n,t,r,e,u,o), -o.pop(),r):false:(i=i?n.value():n,t=a?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?x:E)(n)}function O(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function w(n,t){var r=-1,e=W(n)?Array(n.length):[];return Cn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function x(n){var t=on(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&j(n[u],r[u],pn,3)))return false}return true}}function A(n,t){ -return n=Object(n),U(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function E(n){return function(t){return null==t?pn:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return Cn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function T(t,r){return U(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function F(n,t,r,e){r||(r={}); -for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];kn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==pn||i in f)||(f[i]=c)}return r}function R(n){return H(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function B(n){return function(){var t=arguments,r=s(n.prototype),t=n.apply(r,t);return Z(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==xn&&this instanceof e?u:n;++c<f;)a[c]=r[c]; -for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=B(n);return e}function I(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==pn){a=false;break}if(c){if(!S(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function $(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]": -return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function q(n,t,r,e,u,o){var i=2&u,c=on(n),f=c.length,a=on(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:kn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==pn||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)), -a}function z(n){var t=n?n.length:pn;if(Y(t)&&(Vn(n)||rn(n)||Q(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function C(n){return nn(n)&&W(n)&&(Vn(n)||Q(n))}function G(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function J(n){return n&&n.length?n[0]:pn}function M(n,t){return r(n,m(t),Cn)}function P(n,t){return Cn(n,m(t))}function U(n,t,r){return e(n,m(t),r,3>arguments.length,Cn)}function V(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function"); -return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function H(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function K(){if(!arguments.length)return[];var n=arguments[0];return Vn(n)?n:[n]}function L(n,t){return n>t}function Q(n){return nn(n)&&W(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n)); -}function W(n){return null!=n&&Y(Jn(n))&&!X(n)}function X(n){return n=Z(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function Y(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function Z(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function nn(n){return!!n&&typeof n=="object"}function tn(n){return typeof n=="number"||nn(n)&&"[object Number]"==Sn.call(n)}function rn(n){return typeof n=="string"||!Vn(n)&&nn(n)&&"[object String]"==Sn.call(n)}function en(n,t){ -return t>n}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=G(n);if(!t&&!W(n))return $n(Object(n));var r,e=z(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||f(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=G(n),e=O(n),u=e.length,o=z(n),i=!!o,o=o||[],c=o.length;++t<u;){var a=e[t];i&&("length"==a||f(a,c))||"constructor"==a&&(r||!kn.call(n,a))||o.push(a)}return o}function fn(n){return n?u(n,on(n)):[]}function an(n){return n; -}function ln(t,r,e){var u=on(r),o=_(r,u);null!=e||Z(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=_(r,on(r)));var i=!(Z(e)&&"chain"in e&&!e.chain),c=X(t);return Cn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var pn,sn=1/0,hn=/[&<>"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={ -"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,jn=bn[typeof module]&&module&&!module.nodeType?module:pn,dn=jn&&jn.exports===_n?_n:pn,mn=o(bn[typeof self]&&self),On=o(bn[typeof window]&&window),wn=o(bn[typeof this]&&this),xn=o(_n&&jn&&typeof global=="object"&&global)||On!==(wn&&wn.window)&&On||mn||wn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=xn._,Fn=xn.Reflect,Rn=Fn?Fn.f:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=xn.isFinite,$n=Object.keys,qn=Math.max,zn=!Dn.call({ -valueOf:1},"valueOf");l.prototype=s(a.prototype),l.prototype.constructor=l;var Cn=function(n,t){return function(r,e){if(null==r)return r;if(!W(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),Gn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Rn&&!Dn.call({valueOf:1},"valueOf")&&(O=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value); -return r});var Jn=E("length"),Mn=H(function(n,t,r){return D(n,t,r)}),Pn=H(function(n,t){return h(n,1,t)}),Un=H(function(n,t,r){return h(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=R(function(n,t){F(t,on(t),n)}),Qn=R(function(n,t){F(t,cn(t),n)}),Wn=R(function(n,t,r,e){F(t,cn(t),n,e)}),Xn=H(function(n){return n.push(pn,p),Wn.apply(pn,n)}),Yn=H(function(n,t){return null==n?{}:A(n,g(t,1))}),Zn=m;a.assignIn=Qn,a.before=V,a.bind=Mn,a.chain=function(n){return n=a(n),n.__chain__=true,n},a.compact=function(n){ -return y(n,Boolean)},a.concat=function(){var t=arguments.length,r=K(arguments[0]);if(2>t)return t?N(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return g(e,1),n(N(r),fn)},a.create=function(n,t){var r=s(n);return t?Ln(r,t):r},a.defaults=Xn,a.defer=Pn,a.delay=Un,a.filter=function(n,t){return y(n,m(t))},a.flatten=function(n){return n&&n.length?g(n,1):[]},a.flattenDeep=function(n){return n&&n.length?g(n,sn):[]},a.iteratee=Zn,a.keys=on,a.map=function(n,t){return w(n,m(t))},a.matches=function(n){ -return x(Ln({},n))},a.mixin=ln,a.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},a.once=function(n){return V(2,n)},a.pick=Yn,a.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?k(n,null==t?0:+t,r):[]},a.sortBy=function(n,t){var r=0;return t=m(t),w(w(n,function(n,e,u){return{c:n,b:r++,a:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.a;var e=t.a;if(r!==e){var u=null===r,o=r===pn,i=r===r,c=null===e,f=e===pn,a=e===e; -if(r>e&&!c||!i||u&&!f&&a||o&&a){r=1;break n}if(e>r&&!u||!a||c&&!o&&i||f&&i){r=-1;break n}}r=0}return r||n.b-t.b}),E("c"))},a.tap=function(n,t){return t(n),n},a.thru=function(n,t){return t(n)},a.toArray=function(n){return W(n)?n.length?N(n):[]:fn(n)},a.values=fn,a.extend=Qn,ln(a,a),a.clone=function(n){return Z(n)?Vn(n)?N(n):F(n,on(n)):n},a.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,i):n},a.every=function(n,t,r){return t=r?pn:t,v(n,m(t))},a.find=M,a.forEach=P,a.has=function(n,t){return null!=n&&kn.call(n,t); -},a.head=J,a.identity=an,a.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},a.isArguments=Q,a.isArray=Vn,a.isBoolean=function(n){return true===n||false===n||nn(n)&&"[object Boolean]"==Sn.call(n)},a.isDate=function(n){return nn(n)&&"[object Date]"==Sn.call(n)},a.isEmpty=function(n){if(W(n)&&(Vn(n)||rn(n)||X(n.splice)||Q(n)))return!n.length;for(var t in n)if(kn.call(n,t))return false;return!(zn&&on(n).length); -},a.isEqual=function(n,t){return j(n,t)},a.isFinite=function(n){return typeof n=="number"&&In(n)},a.isFunction=X,a.isNaN=function(n){return tn(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tn,a.isObject=Z,a.isRegExp=function(n){return Z(n)&&"[object RegExp]"==Sn.call(n)},a.isString=rn,a.isUndefined=function(n){return n===pn},a.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},a.max=function(n){return n&&n.length?t(n,an,L):pn},a.min=function(n){return n&&n.length?t(n,an,en):pn}, -a.noConflict=function(){return xn._===this&&(xn._=Tn),this},a.noop=function(){},a.reduce=U,a.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),X(t)?t.call(n):t},a.size=function(n){return null==n?0:(n=W(n)?n:on(n),n.length)},a.some=function(n,t,r){return t=r?pn:t,S(n,m(t))},a.uniqueId=function(n){var t=++Nn;return un(n)+t},a.each=P,a.first=J,ln(a,function(){var n={};return b(a,function(t,r){kn.call(a.prototype,r)||(n[r]=t)}),n}(),{chain:false}),a.VERSION="4.11.1",Cn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){ -var t=(/^(?:replace|split)$/.test(n)?String.prototype:An)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);a.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Vn(u)?u:[],n)}return this[r](function(r){return t.apply(Vn(r)?r:[],n)})}}),a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=function(){return T(this.__wrapped__,this.__actions__)},(On||mn||{})._=a,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){ -return a}):_n&&jn?(dn&&((jn.exports=a)._=a),_n._=a):xn._=a}).call(this);
\ No newline at end of file +;(function(){function n(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function t(n){return mn(Object(n))}function r(n,t){return n.push.apply(n,t),n}function e(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function u(n,t){return x(t,function(t){return n[t]})}function o(n){return n&&n.Object===Object?n:null}function i(n){return cn[n]}function c(n){return n instanceof f?n:new f(n)}function f(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){ +var u;return(u=n===rn)||(u=hn[r],u=(n===u||n!==n&&u!==u)&&!vn.call(e,r)),u?t:n}function l(n){return L(n)?_n(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(rn,r)},t)}function s(n,t){var r=true;return xn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===rn?i===i:r(i,c)))var c=i,f=o}return f}function v(n,t){var r=[];return xn(n,function(n,e,u){t(n,e,u)&&r.push(n); +}),r}function y(n,t,e,u,o){var i=-1,c=n.length;for(e||(e=z),o||(o=[]);++i<c;){var f=n[i];t>0&&e(f)?t>1?y(f,t-1,e,u,o):r(o,f):u||(o[o.length]=f)}return o}function b(n,r){return n&&En(n,r,t)}function g(n,t){return v(t,function(t){return K(n[t])})}function _(n,t){return n>t}function j(n,t,r,e,u){return n===t?true:null==n||null==t||!L(n)&&!Q(t)?n!==n&&t!==t:d(n,t,j,r,e,u)}function d(n,t,r,e,u,o){var i=Tn(n),c=Tn(t),f="[object Array]",a="[object Array]";i||(f=bn.call(n),f="[object Arguments]"==f?"[object Object]":f), +c||(a=bn.call(t),a="[object Arguments]"==a?"[object Object]":a);var l="[object Object]"==f&&true,c="[object Object]"==a&&true,a=f==a;o||(o=[]);var p=kn(o,function(t){return t[0]===n});return p&&p[1]?p[1]==t:(o.push([n,t]),a&&!l?(r=i?I(n,t,r,e,u,o):q(n,t,f),o.pop(),r):2&u||(i=l&&vn.call(n,"__wrapped__"),f=c&&vn.call(t,"__wrapped__"),!i&&!f)?a?(r=$(n,t,r,e,u,o),o.pop(),r):false:(i=i?n.value():n,t=f?t.value():t,r=r(i,t,e,u,o),o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?nn:(typeof n=="object"?E:w)(n); +}function O(n,t){return t>n}function x(n,t){var r=-1,e=H(n)?Array(n.length):[];return xn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function E(n){var r=t(n);return function(t){var e=r.length;if(null==t)return!e;for(t=Object(t);e--;){var u=r[e];if(!(u in t&&j(n[u],t[u],rn,3)))return false}return true}}function A(n,t){return n=Object(n),M(t,function(t,r){return r in n&&(t[r]=n[r]),t},{})}function w(n){return function(t){return null==t?rn:t[n]}}function k(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r, +0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function N(n){return k(n,0,n.length)}function S(n,t){var r;return xn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(n,t){return M(t,function(n,t){return t.func.apply(t.thisArg,r([n],t.args))},n)}function T(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];vn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==rn||i in f)||(f[i]=c)}return r}function B(n){return U(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:rn,o=n.length>3&&typeof o=="function"?(u--, +o):rn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function R(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return L(t)?t:r}}function D(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==pn&&this instanceof e?u:n;++c<f;)a[c]=r[c];for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=R(n);return e}function I(n,t,r,e,u,o){var i=n.length,c=t.length; +if(i!=c&&!(2&u&&c>i))return false;for(var c=-1,f=true,a=1&u?[]:rn;++c<i;){var l=n[c],p=t[c];if(void 0!==rn){f=false;break}if(a){if(!S(t,function(n,t){return G(a,t)||l!==n&&!r(l,n,e,u,o)?void 0:a.push(t)})){f=false;break}}else if(l!==p&&!r(l,p,e,u,o)){f=false;break}}return f}function q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""; +}return false}function $(n,r,e,u,o,i){var c=2&o,f=t(n),a=f.length,l=t(r).length;if(a!=l&&!c)return false;for(var p=a;p--;){var s=f[p];if(!(c?s in r:vn.call(r,s)))return false}for(l=true;++p<a;){var s=f[p],h=n[s],v=r[s];if(void 0!==rn||h!==v&&!e(h,v,u,o,i)){l=false;break}c||(c="constructor"==s)}return l&&!c&&(e=n.constructor,u=r.constructor,e!=u&&"constructor"in n&&"constructor"in r&&!(typeof e=="function"&&e instanceof e&&typeof u=="function"&&u instanceof u)&&(l=false)),l}function z(n){return Tn(n)||V(n)}function C(n){ +return n&&n.length?n[0]:rn}function G(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?On(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1}function J(n,t){return xn(n,m(t))}function M(n,t,r){return e(n,m(t),r,3>arguments.length,xn)}function P(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Bn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=rn),r}}function U(n){var t;if(typeof n!="function")throw new TypeError("Expected a function"); +return t=On(t===rn?n.length-1:Bn(t),0),function(){for(var r=arguments,e=-1,u=On(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function V(n){return Q(n)&&H(n)&&vn.call(n,"callee")&&(!jn.call(n,"callee")||"[object Arguments]"==bn.call(n))}function H(n){var t;return(t=null!=n)&&(t=An(n),t=typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t),t&&!K(n)}function K(n){return n=L(n)?bn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n; +}function L(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function Q(n){return!!n&&typeof n=="object"}function W(n){return typeof n=="number"||Q(n)&&"[object Number]"==bn.call(n)}function X(n){return typeof n=="string"||!Tn(n)&&Q(n)&&"[object String]"==bn.call(n)}function Y(n){return typeof n=="string"?n:null==n?"":n+""}function Z(n){return n?u(n,t(n)):[]}function nn(n){return n}function tn(n,e,u){var o=t(e),i=g(e,o);null!=u||L(e)&&(i.length||!o.length)||(u=e,e=n,n=this,i=g(e,t(e)));var c=!(L(u)&&"chain"in u&&!u.chain),f=K(n); +return xn(i,function(t){var u=e[t];n[t]=u,f&&(n.prototype[t]=function(){var t=this.__chain__;if(c||t){var e=n(this.__wrapped__);return(e.__actions__=N(this.__actions__)).push({func:u,args:arguments,thisArg:n}),e.__chain__=t,e}return u.apply(n,r([this.value()],arguments))})}),n}var rn,en=1/0,un=/[&<>"'`]/g,on=RegExp(un.source),cn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},fn=typeof exports=="object"&&exports,an=fn&&typeof module=="object"&&module,ln=o(typeof self=="object"&&self),pn=o(typeof global=="object"&&global)||ln||o(typeof this=="object"&&this)||Function("return this")(),sn=Array.prototype,hn=Object.prototype,vn=hn.hasOwnProperty,yn=0,bn=hn.toString,gn=pn._,_n=Object.create,jn=hn.propertyIsEnumerable,dn=pn.isFinite,mn=Object.keys,On=Math.max; +f.prototype=l(c.prototype),f.prototype.constructor=f;var xn=function(n,t){return function(r,e){if(null==r)return r;if(!H(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(b),En=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}(),An=w("length"),wn=String,kn=function(n){return function(r,e,u){var o=Object(r);if(e=m(e),!H(r))var i=t(r);return u=n(i||r,function(n,t){ +return i&&(t=n,n=o[t]),e(n,t,o)},u),u>-1?r[i?i[u]:u]:rn}}(function(n,t,r){var e=n?n.length:0;if(!e)return-1;r=null==r?0:Bn(r),0>r&&(r=On(e+r,0));n:{for(t=m(t),e=n.length,r+=-1;++r<e;)if(t(n[r],r,n)){n=r;break n}n=-1}return n}),Nn=U(function(n,t,r){return D(n,t,r)}),Sn=U(function(n,t){return p(n,1,t)}),Fn=U(function(n,t,r){return p(n,Rn(t)||0,r)}),Tn=Array.isArray,Bn=Number,Rn=Number,Dn=B(function(n,r){T(r,t(r),n)}),In=B(function(t,r){T(r,n(r),t)}),qn=B(function(t,r,e,u){T(r,n(r),t,u)}),$n=U(function(n){ +return n.push(rn,a),qn.apply(rn,n)}),zn=U(function(n,t){return null==n?{}:A(n,x(y(t,1),wn))});c.assignIn=In,c.before=P,c.bind=Nn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){for(var n=arguments.length,t=Array(n?n-1:0),e=arguments[0],u=n;u--;)t[u-1]=arguments[u];return n?r(Tn(e)?N(e):[e],y(t,1)):[]},c.create=function(n,t){var r=l(n);return t?Dn(r,t):r},c.defaults=$n,c.defer=Sn,c.delay=Fn,c.filter=function(n,t){return v(n,m(t))}, +c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,en):[]},c.iteratee=m,c.keys=t,c.map=function(n,t){return x(n,m(t))},c.matches=function(n){return E(Dn({},n))},c.mixin=tn,c.negate=function(n){if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return P(2,n)},c.pick=zn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===rn?e:+r,e?k(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){ +var r=0;return t=m(t),x(x(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==rn,o=null===r,i=r===r,c=e!==rn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),w("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return H(n)?n.length?N(n):[]:Z(n)},c.values=Z,c.extend=In, +tn(c,c),c.clone=function(n){return L(n)?Tn(n)?N(n):T(n,t(n)):n},c.escape=function(n){return(n=Y(n))&&on.test(n)?n.replace(un,i):n},c.every=function(n,t,r){return t=r?rn:t,s(n,m(t))},c.find=kn,c.forEach=J,c.has=function(n,t){return null!=n&&vn.call(n,t)},c.head=C,c.identity=nn,c.indexOf=G,c.isArguments=V,c.isArray=Tn,c.isBoolean=function(n){return true===n||false===n||Q(n)&&"[object Boolean]"==bn.call(n)},c.isDate=function(n){return Q(n)&&"[object Date]"==bn.call(n)},c.isEmpty=function(n){return H(n)&&(Tn(n)||X(n)||K(n.splice)||V(n))?!n.length:!t(n).length; +},c.isEqual=function(n,t){return j(n,t)},c.isFinite=function(n){return typeof n=="number"&&dn(n)},c.isFunction=K,c.isNaN=function(n){return W(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=W,c.isObject=L,c.isRegExp=function(n){return L(n)&&"[object RegExp]"==bn.call(n)},c.isString=X,c.isUndefined=function(n){return n===rn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:rn},c.max=function(n){return n&&n.length?h(n,nn,_):rn},c.min=function(n){return n&&n.length?h(n,nn,O):rn},c.noConflict=function(){ +return pn._===this&&(pn._=gn),this},c.noop=function(){},c.reduce=M,c.result=function(n,t,r){return t=null==n?rn:n[t],t===rn&&(t=r),K(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=H(n)?n:t(n),n.length)},c.some=function(n,t,r){return t=r?rn:t,S(n,m(t))},c.uniqueId=function(n){var t=++yn;return Y(n)+t},c.each=J,c.first=C,tn(c,function(){var n={};return b(c,function(t,r){vn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.13.1",xn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){ +var t=(/^(?:replace|split)$/.test(n)?String.prototype:sn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Tn(u)?u:[],n)}return this[r](function(r){return t.apply(Tn(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(ln||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){ +return c}):an?((an.exports=c)._=c,fn._=c):pn._=c}).call(this);
\ No newline at end of file diff --git a/tools/eslint/node_modules/lodash/countBy.js b/tools/eslint/node_modules/lodash/countBy.js index d8b0a516b3..9162b9f1cc 100644 --- a/tools/eslint/node_modules/lodash/countBy.js +++ b/tools/eslint/node_modules/lodash/countBy.js @@ -25,6 +25,7 @@ var hasOwnProperty = objectProto.hasOwnProperty; * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ diff --git a/tools/eslint/node_modules/lodash/debounce.js b/tools/eslint/node_modules/lodash/debounce.js index 0fcd6e67ee..a36c8ac065 100644 --- a/tools/eslint/node_modules/lodash/debounce.js +++ b/tools/eslint/node_modules/lodash/debounce.js @@ -65,7 +65,7 @@ function debounce(func, wait, options) { maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -116,7 +116,7 @@ function debounce(func, wait, options) { // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -130,7 +130,6 @@ function debounce(func, wait, options) { } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -143,11 +142,8 @@ function debounce(func, wait, options) { } function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -168,7 +164,6 @@ function debounce(func, wait, options) { } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } diff --git a/tools/eslint/node_modules/lodash/defaults.js b/tools/eslint/node_modules/lodash/defaults.js index f35301abcf..099d2e97d7 100644 --- a/tools/eslint/node_modules/lodash/defaults.js +++ b/tools/eslint/node_modules/lodash/defaults.js @@ -18,6 +18,7 @@ var apply = require('./_apply'), * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.defaultsDeep * @example * * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); diff --git a/tools/eslint/node_modules/lodash/defaultsDeep.js b/tools/eslint/node_modules/lodash/defaultsDeep.js index c12d7293b5..b6447f78c9 100644 --- a/tools/eslint/node_modules/lodash/defaultsDeep.js +++ b/tools/eslint/node_modules/lodash/defaultsDeep.js @@ -16,6 +16,7 @@ var apply = require('./_apply'), * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.defaults * @example * * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); diff --git a/tools/eslint/node_modules/lodash/difference.js b/tools/eslint/node_modules/lodash/difference.js index ae34b208bb..bd52f54eae 100644 --- a/tools/eslint/node_modules/lodash/difference.js +++ b/tools/eslint/node_modules/lodash/difference.js @@ -16,10 +16,11 @@ var baseDifference = require('./_baseDifference'), * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * _.difference([2, 1], [2, 3]); + * // => [1] */ var difference = rest(function(array, values) { return isArrayLikeObject(array) diff --git a/tools/eslint/node_modules/lodash/differenceBy.js b/tools/eslint/node_modules/lodash/differenceBy.js index 7ec2ae8a21..bbafa32726 100644 --- a/tools/eslint/node_modules/lodash/differenceBy.js +++ b/tools/eslint/node_modules/lodash/differenceBy.js @@ -22,8 +22,8 @@ var baseDifference = require('./_baseDifference'), * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); diff --git a/tools/eslint/node_modules/lodash/endsWith.js b/tools/eslint/node_modules/lodash/endsWith.js index 204d61e9d4..bf10f2562b 100644 --- a/tools/eslint/node_modules/lodash/endsWith.js +++ b/tools/eslint/node_modules/lodash/endsWith.js @@ -1,4 +1,5 @@ var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), toInteger = require('./toInteger'), toString = require('./toString'); @@ -11,7 +12,7 @@ var baseClamp = require('./_baseClamp'), * @category String * @param {string} [string=''] The string to search. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -27,7 +28,7 @@ var baseClamp = require('./_baseClamp'), */ function endsWith(string, target, position) { string = toString(string); - target = typeof target == 'string' ? target : (target + ''); + target = baseToString(target); var length = string.length; position = position === undefined diff --git a/tools/eslint/node_modules/lodash/filter.js b/tools/eslint/node_modules/lodash/filter.js index f6a71a58f4..98e3a96407 100644 --- a/tools/eslint/node_modules/lodash/filter.js +++ b/tools/eslint/node_modules/lodash/filter.js @@ -16,6 +16,7 @@ var arrayFilter = require('./_arrayFilter'), * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * * var users = [ diff --git a/tools/eslint/node_modules/lodash/find.js b/tools/eslint/node_modules/lodash/find.js index 83f0dbad0d..3e40bb6d2e 100644 --- a/tools/eslint/node_modules/lodash/find.js +++ b/tools/eslint/node_modules/lodash/find.js @@ -1,8 +1,5 @@ -var baseEach = require('./_baseEach'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); +var createFind = require('./_createFind'), + findIndex = require('./findIndex'); /** * Iterates over elements of `collection`, returning the first element @@ -16,6 +13,7 @@ var baseEach = require('./_baseEach'), * @param {Array|Object} collection The collection to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -40,13 +38,6 @@ var baseEach = require('./_baseEach'), * _.find(users, 'active'); * // => object for 'barney' */ -function find(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); -} +var find = createFind(findIndex); module.exports = find; diff --git a/tools/eslint/node_modules/lodash/findIndex.js b/tools/eslint/node_modules/lodash/findIndex.js index 84acc74642..83af981f51 100644 --- a/tools/eslint/node_modules/lodash/findIndex.js +++ b/tools/eslint/node_modules/lodash/findIndex.js @@ -1,5 +1,9 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first @@ -12,6 +16,7 @@ var baseFindIndex = require('./_baseFindIndex'), * @param {Array} array The array to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +41,16 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findIndex(users, 'active'); * // => 2 */ -function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3)) - : -1; +function findIndex(array, predicate, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; diff --git a/tools/eslint/node_modules/lodash/findKey.js b/tools/eslint/node_modules/lodash/findKey.js index 16a9fd9ae8..26fc234e23 100644 --- a/tools/eslint/node_modules/lodash/findKey.js +++ b/tools/eslint/node_modules/lodash/findKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwn = require('./_baseForOwn'), baseIteratee = require('./_baseIteratee'); @@ -39,7 +39,7 @@ var baseFind = require('./_baseFind'), * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn); } module.exports = findKey; diff --git a/tools/eslint/node_modules/lodash/findLast.js b/tools/eslint/node_modules/lodash/findLast.js index d222a5588f..f8dd4e1d74 100644 --- a/tools/eslint/node_modules/lodash/findLast.js +++ b/tools/eslint/node_modules/lodash/findLast.js @@ -1,8 +1,5 @@ -var baseEachRight = require('./_baseEachRight'), - baseFind = require('./_baseFind'), - baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'), - isArray = require('./isArray'); +var createFind = require('./_createFind'), + findLastIndex = require('./findLastIndex'); /** * This method is like `_.find` except that it iterates over elements of @@ -15,6 +12,7 @@ var baseEachRight = require('./_baseEachRight'), * @param {Array|Object} collection The collection to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -23,13 +21,6 @@ var baseEachRight = require('./_baseEachRight'), * }); * // => 3 */ -function findLast(collection, predicate) { - predicate = baseIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); -} +var findLast = createFind(findLastIndex); module.exports = findLast; diff --git a/tools/eslint/node_modules/lodash/findLastIndex.js b/tools/eslint/node_modules/lodash/findLastIndex.js index bf397d8fff..2caf34aecd 100644 --- a/tools/eslint/node_modules/lodash/findLastIndex.js +++ b/tools/eslint/node_modules/lodash/findLastIndex.js @@ -1,5 +1,10 @@ var baseFindIndex = require('./_baseFindIndex'), - baseIteratee = require('./_baseIteratee'); + baseIteratee = require('./_baseIteratee'), + toInteger = require('./toInteger'); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; /** * This method is like `_.findIndex` except that it iterates over elements @@ -12,6 +17,7 @@ var baseFindIndex = require('./_baseFindIndex'), * @param {Array} array The array to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -36,10 +42,19 @@ var baseFindIndex = require('./_baseFindIndex'), * _.findLastIndex(users, 'active'); * // => 0 */ -function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, baseIteratee(predicate, 3), true) - : -1; +function findLastIndex(array, predicate, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); } module.exports = findLastIndex; diff --git a/tools/eslint/node_modules/lodash/findLastKey.js b/tools/eslint/node_modules/lodash/findLastKey.js index fb915df464..5eedc1d29f 100644 --- a/tools/eslint/node_modules/lodash/findLastKey.js +++ b/tools/eslint/node_modules/lodash/findLastKey.js @@ -1,4 +1,4 @@ -var baseFind = require('./_baseFind'), +var baseFindKey = require('./_baseFindKey'), baseForOwnRight = require('./_baseForOwnRight'), baseIteratee = require('./_baseIteratee'); @@ -39,7 +39,7 @@ var baseFind = require('./_baseFind'), * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, baseIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight); } module.exports = findLastKey; diff --git a/tools/eslint/node_modules/lodash/first.js b/tools/eslint/node_modules/lodash/first.js new file mode 100644 index 0000000000..53f4ad13ee --- /dev/null +++ b/tools/eslint/node_modules/lodash/first.js @@ -0,0 +1 @@ +module.exports = require('./head'); diff --git a/tools/eslint/node_modules/lodash/flip.js b/tools/eslint/node_modules/lodash/flip.js index 82f796c240..574c78088f 100644 --- a/tools/eslint/node_modules/lodash/flip.js +++ b/tools/eslint/node_modules/lodash/flip.js @@ -11,7 +11,7 @@ var FLIP_FLAG = 512; * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { diff --git a/tools/eslint/node_modules/lodash/flow.js b/tools/eslint/node_modules/lodash/flow.js index 004cda01a4..462f2dbdc5 100644 --- a/tools/eslint/node_modules/lodash/flow.js +++ b/tools/eslint/node_modules/lodash/flow.js @@ -10,14 +10,15 @@ var createFlow = require('./_createFlow'); * @since 3.0.0 * @category Util * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. + * @see _.flowRight * @example * * function square(n) { * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ diff --git a/tools/eslint/node_modules/lodash/flowRight.js b/tools/eslint/node_modules/lodash/flowRight.js index f543f252f1..a4eb8b6164 100644 --- a/tools/eslint/node_modules/lodash/flowRight.js +++ b/tools/eslint/node_modules/lodash/flowRight.js @@ -5,18 +5,19 @@ var createFlow = require('./_createFlow'); * invokes the given functions from right to left. * * @static - * @since 0.1.0 + * @since 3.0.0 * @memberOf _ * @category Util * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. + * @see _.flow * @example * * function square(n) { * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ diff --git a/tools/eslint/node_modules/lodash/forEach.js b/tools/eslint/node_modules/lodash/forEach.js index 0c598f6508..143515ffe9 100644 --- a/tools/eslint/node_modules/lodash/forEach.js +++ b/tools/eslint/node_modules/lodash/forEach.js @@ -20,6 +20,7 @@ var arrayEach = require('./_arrayEach'), * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * * _([1, 2]).forEach(function(value) { @@ -33,9 +34,8 @@ var arrayEach = require('./_arrayEach'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, baseIteratee(iteratee, 3)); } module.exports = forEach; diff --git a/tools/eslint/node_modules/lodash/forEachRight.js b/tools/eslint/node_modules/lodash/forEachRight.js index 17a7137cbd..c5d6e06dc1 100644 --- a/tools/eslint/node_modules/lodash/forEachRight.js +++ b/tools/eslint/node_modules/lodash/forEachRight.js @@ -15,6 +15,7 @@ var arrayEachRight = require('./_arrayEachRight'), * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEach * @example * * _.forEachRight([1, 2], function(value) { @@ -23,9 +24,8 @@ var arrayEachRight = require('./_arrayEachRight'), * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, baseIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, baseIteratee(iteratee, 3)); } module.exports = forEachRight; diff --git a/tools/eslint/node_modules/lodash/forIn.js b/tools/eslint/node_modules/lodash/forIn.js index 74a9615065..2e757da449 100644 --- a/tools/eslint/node_modules/lodash/forIn.js +++ b/tools/eslint/node_modules/lodash/forIn.js @@ -15,6 +15,7 @@ var baseFor = require('./_baseFor'), * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forInRight * @example * * function Foo() { @@ -32,7 +33,7 @@ var baseFor = require('./_baseFor'), function forIn(object, iteratee) { return object == null ? object - : baseFor(object, baseIteratee(iteratee), keysIn); + : baseFor(object, baseIteratee(iteratee, 3), keysIn); } module.exports = forIn; diff --git a/tools/eslint/node_modules/lodash/forInRight.js b/tools/eslint/node_modules/lodash/forInRight.js index 00b73a7c1a..a47d6bb43f 100644 --- a/tools/eslint/node_modules/lodash/forInRight.js +++ b/tools/eslint/node_modules/lodash/forInRight.js @@ -13,6 +13,7 @@ var baseForRight = require('./_baseForRight'), * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forIn * @example * * function Foo() { @@ -30,7 +31,7 @@ var baseForRight = require('./_baseForRight'), function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, baseIteratee(iteratee), keysIn); + : baseForRight(object, baseIteratee(iteratee, 3), keysIn); } module.exports = forInRight; diff --git a/tools/eslint/node_modules/lodash/forOwn.js b/tools/eslint/node_modules/lodash/forOwn.js index 126d43f0d3..034c30b125 100644 --- a/tools/eslint/node_modules/lodash/forOwn.js +++ b/tools/eslint/node_modules/lodash/forOwn.js @@ -14,6 +14,7 @@ var baseForOwn = require('./_baseForOwn'), * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forOwnRight * @example * * function Foo() { @@ -29,7 +30,7 @@ var baseForOwn = require('./_baseForOwn'), * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, baseIteratee(iteratee)); + return object && baseForOwn(object, baseIteratee(iteratee, 3)); } module.exports = forOwn; diff --git a/tools/eslint/node_modules/lodash/forOwnRight.js b/tools/eslint/node_modules/lodash/forOwnRight.js index 5605475f48..0f7aab85df 100644 --- a/tools/eslint/node_modules/lodash/forOwnRight.js +++ b/tools/eslint/node_modules/lodash/forOwnRight.js @@ -12,6 +12,7 @@ var baseForOwnRight = require('./_baseForOwnRight'), * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forOwn * @example * * function Foo() { @@ -27,7 +28,7 @@ var baseForOwnRight = require('./_baseForOwnRight'), * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, baseIteratee(iteratee)); + return object && baseForOwnRight(object, baseIteratee(iteratee, 3)); } module.exports = forOwnRight; diff --git a/tools/eslint/node_modules/lodash/fp/_baseConvert.js b/tools/eslint/node_modules/lodash/fp/_baseConvert.js index e7e631ce4b..e177cdd031 100644 --- a/tools/eslint/node_modules/lodash/fp/_baseConvert.js +++ b/tools/eslint/node_modules/lodash/fp/_baseConvert.js @@ -189,25 +189,21 @@ function baseConvert(util, name, func, options) { if (!isFunction(func)) { return mixin(func, Object(source)); } - var methods = [], - methodNames = []; - + var pairs = []; each(keys(source), function(key) { - var value = source[key]; - if (isFunction(value)) { - methodNames.push(key); - methods.push(func.prototype[key]); + if (isFunction(source[key])) { + pairs.push([key, func.prototype[key]]); } }); mixin(func, Object(source)); - each(methodNames, function(methodName, index) { - var method = methods[index]; - if (isFunction(method)) { - func.prototype[methodName] = method; + each(pairs, function(pair) { + var value = pair[1]; + if (isFunction(value)) { + func.prototype[pair[0]] = value; } else { - delete func.prototype[methodName]; + delete func.prototype[pair[0]]; } }); return func; @@ -235,6 +231,7 @@ function baseConvert(util, name, func, options) { var index = -1, length = path.length, + lastIndex = length - 1, result = clone(Object(object)), nested = result; @@ -243,7 +240,7 @@ function baseConvert(util, name, func, options) { value = nested[key]; if (value != null) { - nested[key] = clone(Object(value)); + nested[path[index]] = clone(index == lastIndex ? value : Object(value)); } nested = nested[key]; } diff --git a/tools/eslint/node_modules/lodash/fp/_mapping.js b/tools/eslint/node_modules/lodash/fp/_mapping.js index 18a3196d30..a30c5dee41 100644 --- a/tools/eslint/node_modules/lodash/fp/_mapping.js +++ b/tools/eslint/node_modules/lodash/fp/_mapping.js @@ -64,7 +64,7 @@ exports.aryMethod = { 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN', 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference', 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', - 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast', + 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', @@ -84,12 +84,13 @@ exports.aryMethod = { ], '3': [ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', - 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', - 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith', - 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', - 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice', - 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', - 'update', 'xorBy', 'xorWith', 'zipWith' + 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', + 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', + 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', + 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', + 'padCharsStart', 'pullAllBy', 'pullAllWith', 'reduce', 'reduceRight', 'replace', + 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', + 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith' ], '4': [ 'fill', 'setWith', 'updateWith' @@ -110,10 +111,14 @@ exports.iterateeAry = { 'every': 1, 'filter': 1, 'find': 1, + 'findFrom': 1, 'findIndex': 1, + 'findIndexFrom': 1, 'findKey': 1, 'findLast': 1, + 'findLastFrom': 1, 'findLastIndex': 1, + 'findLastIndexFrom': 1, 'findLastKey': 1, 'flatMap': 1, 'flatMapDeep': 1, @@ -148,7 +153,11 @@ exports.iterateeRearg = { exports.methodRearg = { 'assignInWith': [1, 2, 0], 'assignWith': [1, 2, 0], + 'differenceBy': [1, 2, 0], + 'differenceWith': [1, 2, 0], 'getOr': [2, 1, 0], + 'intersectionBy': [1, 2, 0], + 'intersectionWith': [1, 2, 0], 'isEqualWith': [1, 2, 0], 'isMatchWith': [2, 1, 0], 'mergeWith': [1, 2, 0], @@ -160,7 +169,11 @@ exports.methodRearg = { 'setWith': [3, 1, 2, 0], 'sortedIndexBy': [2, 1, 0], 'sortedLastIndexBy': [2, 1, 0], + 'unionBy': [1, 2, 0], + 'unionWith': [1, 2, 0], 'updateWith': [3, 1, 2, 0], + 'xorBy': [1, 2, 0], + 'xorWith': [1, 2, 0], 'zipWith': [1, 2, 0] }; @@ -235,9 +248,16 @@ exports.realToAlias = (function() { exports.remap = { 'curryN': 'curry', 'curryRightN': 'curryRight', + 'findFrom': 'find', + 'findIndexFrom': 'findIndex', + 'findLastFrom': 'findLast', + 'findLastIndexFrom': 'findLastIndex', 'getOr': 'get', + 'includesFrom': 'includes', + 'indexOfFrom': 'indexOf', 'invokeArgs': 'invoke', 'invokeArgsMap': 'invokeMap', + 'lastIndexOfFrom': 'lastIndexOf', 'padChars': 'pad', 'padCharsEnd': 'padEnd', 'padCharsStart': 'padStart', @@ -284,7 +304,6 @@ exports.skipRearg = { 'range': true, 'rangeRight': true, 'subtract': true, - 'without': true, 'zip': true, 'zipObject': true }; diff --git a/tools/eslint/node_modules/lodash/fp/findFrom.js b/tools/eslint/node_modules/lodash/fp/findFrom.js new file mode 100644 index 0000000000..da8275e840 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/findFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findFrom', require('../find')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/findIndexFrom.js b/tools/eslint/node_modules/lodash/fp/findIndexFrom.js new file mode 100644 index 0000000000..32e98cb953 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/findIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findIndexFrom', require('../findIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/findLastFrom.js b/tools/eslint/node_modules/lodash/fp/findLastFrom.js new file mode 100644 index 0000000000..76c38fbad2 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/findLastFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastFrom', require('../findLast')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/findLastIndexFrom.js b/tools/eslint/node_modules/lodash/fp/findLastIndexFrom.js new file mode 100644 index 0000000000..34c8176cf1 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/findLastIndexFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('findLastIndexFrom', require('../findLastIndex')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/includesFrom.js b/tools/eslint/node_modules/lodash/fp/includesFrom.js new file mode 100644 index 0000000000..683afdb463 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/includesFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('includesFrom', require('../includes')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/indexOfFrom.js b/tools/eslint/node_modules/lodash/fp/indexOfFrom.js new file mode 100644 index 0000000000..d99c822f46 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/indexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('indexOfFrom', require('../indexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/lastIndexOfFrom.js b/tools/eslint/node_modules/lodash/fp/lastIndexOfFrom.js new file mode 100644 index 0000000000..1ff6a0b5ad --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/lastIndexOfFrom.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('lastIndexOfFrom', require('../lastIndexOf')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/stubArray.js b/tools/eslint/node_modules/lodash/fp/stubArray.js new file mode 100644 index 0000000000..cd604cb493 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/stubArray.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubArray', require('../stubArray'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/stubFalse.js b/tools/eslint/node_modules/lodash/fp/stubFalse.js new file mode 100644 index 0000000000..3296664544 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/stubFalse.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubFalse', require('../stubFalse'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/stubObject.js b/tools/eslint/node_modules/lodash/fp/stubObject.js new file mode 100644 index 0000000000..c6c8ec472c --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/stubObject.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubObject', require('../stubObject'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/stubString.js b/tools/eslint/node_modules/lodash/fp/stubString.js new file mode 100644 index 0000000000..701051e8b3 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/stubString.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubString', require('../stubString'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/stubTrue.js b/tools/eslint/node_modules/lodash/fp/stubTrue.js new file mode 100644 index 0000000000..9249082ce9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/stubTrue.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('stubTrue', require('../stubTrue'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/fp/toFinite.js b/tools/eslint/node_modules/lodash/fp/toFinite.js new file mode 100644 index 0000000000..3a47687d6b --- /dev/null +++ b/tools/eslint/node_modules/lodash/fp/toFinite.js @@ -0,0 +1,5 @@ +var convert = require('./convert'), + func = convert('toFinite', require('../toFinite'), require('./_falseOptions')); + +func.placeholder = require('./placeholder'); +module.exports = func; diff --git a/tools/eslint/node_modules/lodash/functions.js b/tools/eslint/node_modules/lodash/functions.js index 36a9cad2ea..9722928f50 100644 --- a/tools/eslint/node_modules/lodash/functions.js +++ b/tools/eslint/node_modules/lodash/functions.js @@ -10,7 +10,8 @@ var baseFunctions = require('./_baseFunctions'), * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. + * @see _.functionsIn * @example * * function Foo() { diff --git a/tools/eslint/node_modules/lodash/functionsIn.js b/tools/eslint/node_modules/lodash/functionsIn.js index 6bd3b57df9..f00345d066 100644 --- a/tools/eslint/node_modules/lodash/functionsIn.js +++ b/tools/eslint/node_modules/lodash/functionsIn.js @@ -10,7 +10,8 @@ var baseFunctions = require('./_baseFunctions'), * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. + * @see _.functions * @example * * function Foo() { diff --git a/tools/eslint/node_modules/lodash/gt.js b/tools/eslint/node_modules/lodash/gt.js index 2fc9a206cc..3a66282880 100644 --- a/tools/eslint/node_modules/lodash/gt.js +++ b/tools/eslint/node_modules/lodash/gt.js @@ -1,3 +1,6 @@ +var baseGt = require('./_baseGt'), + createRelationalOperation = require('./_createRelationalOperation'); + /** * Checks if `value` is greater than `other`. * @@ -9,6 +12,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than `other`, * else `false`. + * @see _.lt * @example * * _.gt(3, 1); @@ -20,8 +24,6 @@ * _.gt(1, 3); * // => false */ -function gt(value, other) { - return value > other; -} +var gt = createRelationalOperation(baseGt); module.exports = gt; diff --git a/tools/eslint/node_modules/lodash/gte.js b/tools/eslint/node_modules/lodash/gte.js index 521be993d2..4180a687d7 100644 --- a/tools/eslint/node_modules/lodash/gte.js +++ b/tools/eslint/node_modules/lodash/gte.js @@ -1,3 +1,5 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + /** * Checks if `value` is greater than or equal to `other`. * @@ -9,6 +11,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than or equal to * `other`, else `false`. + * @see _.lte * @example * * _.gte(3, 1); @@ -20,8 +23,8 @@ * _.gte(1, 3); * // => false */ -function gte(value, other) { +var gte = createRelationalOperation(function(value, other) { return value >= other; -} +}); module.exports = gte; diff --git a/tools/eslint/node_modules/lodash/identity.js b/tools/eslint/node_modules/lodash/identity.js index 3732edb131..058296ffcc 100644 --- a/tools/eslint/node_modules/lodash/identity.js +++ b/tools/eslint/node_modules/lodash/identity.js @@ -11,7 +11,7 @@ * * var object = { 'user': 'fred' }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { diff --git a/tools/eslint/node_modules/lodash/inRange.js b/tools/eslint/node_modules/lodash/inRange.js index d864ca2cf3..bf71a8d77e 100644 --- a/tools/eslint/node_modules/lodash/inRange.js +++ b/tools/eslint/node_modules/lodash/inRange.js @@ -2,7 +2,7 @@ var baseInRange = require('./_baseInRange'), toNumber = require('./toNumber'); /** - * Checks if `n` is between `start` and up to but not including, `end`. If + * Checks if `n` is between `start` and up to, but not including, `end`. If * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. @@ -15,6 +15,7 @@ var baseInRange = require('./_baseInRange'), * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight * @example * * _.inRange(3, 2, 4); diff --git a/tools/eslint/node_modules/lodash/indexOf.js b/tools/eslint/node_modules/lodash/indexOf.js index 65616d4549..657e4b5eb6 100644 --- a/tools/eslint/node_modules/lodash/indexOf.js +++ b/tools/eslint/node_modules/lodash/indexOf.js @@ -32,11 +32,11 @@ function indexOf(array, value, fromIndex) { if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } module.exports = indexOf; diff --git a/tools/eslint/node_modules/lodash/intersection.js b/tools/eslint/node_modules/lodash/intersection.js index 1a7c7706c3..1da06f8f5b 100644 --- a/tools/eslint/node_modules/lodash/intersection.js +++ b/tools/eslint/node_modules/lodash/intersection.js @@ -17,7 +17,7 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = rest(function(arrays) { diff --git a/tools/eslint/node_modules/lodash/intersectionBy.js b/tools/eslint/node_modules/lodash/intersectionBy.js index 6afb79db6c..5b8ffdcc27 100644 --- a/tools/eslint/node_modules/lodash/intersectionBy.js +++ b/tools/eslint/node_modules/lodash/intersectionBy.js @@ -21,7 +21,7 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. diff --git a/tools/eslint/node_modules/lodash/isBuffer.js b/tools/eslint/node_modules/lodash/isBuffer.js index 404c22200c..566c09f778 100644 --- a/tools/eslint/node_modules/lodash/isBuffer.js +++ b/tools/eslint/node_modules/lodash/isBuffer.js @@ -1,26 +1,14 @@ -var constant = require('./constant'), - root = require('./_root'); - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; +var root = require('./_root'), + stubFalse = require('./stubFalse'); /** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; +var freeExports = typeof exports == 'object' && exports; /** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; +var freeModule = freeExports && typeof module == 'object' && module; /** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; +var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; @@ -42,7 +30,7 @@ var Buffer = moduleExports ? root.Buffer : undefined; * _.isBuffer(new Uint8Array(2)); * // => false */ -var isBuffer = !Buffer ? constant(false) : function(value) { +var isBuffer = !Buffer ? stubFalse : function(value) { return value instanceof Buffer; }; diff --git a/tools/eslint/node_modules/lodash/isFinite.js b/tools/eslint/node_modules/lodash/isFinite.js index 744e7a65e1..66af20699b 100644 --- a/tools/eslint/node_modules/lodash/isFinite.js +++ b/tools/eslint/node_modules/lodash/isFinite.js @@ -21,14 +21,14 @@ var nativeIsFinite = root.isFinite; * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); diff --git a/tools/eslint/node_modules/lodash/isNative.js b/tools/eslint/node_modules/lodash/isNative.js index 2d5149ba45..8d9dd0588b 100644 --- a/tools/eslint/node_modules/lodash/isNative.js +++ b/tools/eslint/node_modules/lodash/isNative.js @@ -1,34 +1,16 @@ -var isFunction = require('./isFunction'), - isHostObject = require('./_isHostObject'), - isObject = require('./isObject'), - toSource = require('./_toSource'); +var baseIsNative = require('./_baseIsNative'), + isMaskable = require('./_isMaskable'); /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Checks if `value` is a native function. + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the + * presence of the `core-js` package because `core-js` circumvents this kind + * of detection. Despite multiple requests, the `core-js` maintainer has made + * it clear: any attempt to fix the detection will be obstructed. As a result, + * we're left with little choice but to throw an error. Unfortunately, this + * also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on `core-js`. * * @static * @memberOf _ @@ -46,11 +28,10 @@ var reIsNative = RegExp('^' + * // => false */ function isNative(value) { - if (!isObject(value)) { - return false; + if (isMaskable(value)) { + throw new Error('This method is not supported with `core-js`. Try https://github.com/es-shims.'); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + return baseIsNative(value); } module.exports = isNative; diff --git a/tools/eslint/node_modules/lodash/lang.js b/tools/eslint/node_modules/lodash/lang.js index 665f5c66ce..6340c4b820 100644 --- a/tools/eslint/node_modules/lodash/lang.js +++ b/tools/eslint/node_modules/lodash/lang.js @@ -47,6 +47,7 @@ module.exports = { 'lt': require('./lt'), 'lte': require('./lte'), 'toArray': require('./toArray'), + 'toFinite': require('./toFinite'), 'toInteger': require('./toInteger'), 'toLength': require('./toLength'), 'toNumber': require('./toNumber'), diff --git a/tools/eslint/node_modules/lodash/lastIndexOf.js b/tools/eslint/node_modules/lodash/lastIndexOf.js index 7e9d988e5e..1b8fbbc0ee 100644 --- a/tools/eslint/node_modules/lodash/lastIndexOf.js +++ b/tools/eslint/node_modules/lodash/lastIndexOf.js @@ -41,7 +41,7 @@ function lastIndexOf(array, value, fromIndex) { ) + 1; } if (value !== value) { - return indexOfNaN(array, index, true); + return indexOfNaN(array, index - 1, true); } while (index--) { if (array[index] === value) { diff --git a/tools/eslint/node_modules/lodash/lodash.js b/tools/eslint/node_modules/lodash/lodash.js index 2ad95ab4d1..5b5c703ba0 100644 --- a/tools/eslint/node_modules/lodash/lodash.js +++ b/tools/eslint/node_modules/lodash/lodash.js @@ -1,7 +1,6 @@ /** * @license - * lodash 4.11.1 (Custom Build) <https://lodash.com/> - * Build: `lodash -d -o ./foo/lodash.js` + * lodash <https://lodash.com/> * Copyright jQuery Foundation and other contributors <https://jquery.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> @@ -13,7 +12,7 @@ var undefined; /** Used as the semantic version number. */ - var VERSION = '4.11.1'; + var VERSION = '4.13.1'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -117,7 +116,7 @@ /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g; + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; /** * Used to match `RegExp` @@ -181,11 +180,11 @@ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsQuoteRange = '\\u2018\\u2019\\u201c\\u201d', + rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\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', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsQuoteRange + rsSpaceRange; + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", @@ -250,7 +249,7 @@ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + '_', 'isFinite', 'parseInt', 'setTimeout' ]; /** Used to make template sourceURLs easier to identify. */ @@ -329,12 +328,6 @@ '`': '`' }; - /** Used to determine if values are of the language type `Object`. */ - var objectTypes = { - 'function': true, - 'object': true - }; - /** Used to escape characters for inclusion in compiled string literals. */ var stringEscapes = { '\\': '\\', @@ -350,41 +343,25 @@ freeParseInt = parseInt; /** Detect free variable `exports`. */ - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; + var freeExports = typeof exports == 'object' && exports; /** Detect free variable `module`. */ - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; + var freeModule = freeExports && typeof module == 'object' && module; /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = (freeModule && freeModule.exports === freeExports) - ? freeExports - : undefined; + var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); + var freeGlobal = checkGlobal(typeof global == 'object' && global); /** Detect free variable `self`. */ - var freeSelf = checkGlobal(objectTypes[typeof self] && self); - - /** Detect free variable `window`. */ - var freeWindow = checkGlobal(objectTypes[typeof window] && window); + var freeSelf = checkGlobal(typeof self == 'object' && self); /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); + var thisGlobal = checkGlobal(typeof this == 'object' && this); - /** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ - var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); /*--------------------------------------------------------------------------*/ @@ -440,7 +417,7 @@ * A specialized version of `baseAggregator` for arrays. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. @@ -448,7 +425,7 @@ */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { var value = array[index]; @@ -458,41 +435,17 @@ } /** - * Creates a new array concatenating `array` with `other`. - * - * @private - * @param {Array} array The first array to concatenate. - * @param {Array} other The second array to concatenate. - * @returns {Array} Returns the new concatenated array. - */ - function arrayConcat(array, other) { - var index = -1, - length = array.length, - othIndex = -1, - othLength = other.length, - result = Array(length + othLength); - - while (++index < length) { - result[index] = array[index]; - } - while (++othIndex < othLength) { - result[index++] = other[othIndex]; - } - return result; - } - - /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (iteratee(array[index], index, array) === false) { @@ -507,12 +460,12 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEachRight(array, iteratee) { - var length = array.length; + var length = array ? array.length : 0; while (length--) { if (iteratee(array[length], length, array) === false) { @@ -527,14 +480,14 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if all elements pass the predicate check, * else `false`. */ function arrayEvery(array, predicate) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (!predicate(array[index], index, array)) { @@ -549,13 +502,13 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, - length = array.length, + length = array ? array.length : 0, resIndex = 0, result = []; @@ -573,26 +526,27 @@ * specifying an index to search from. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to search. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { - return !!array.length && baseIndexOf(array, value, 0) > -1; + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; } /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} array The array to search. + * @param {Array} [array] The array to search. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (comparator(value, array[index])) { @@ -607,13 +561,13 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, - length = array.length, + length = array ? array.length : 0, result = Array(length); while (++index < length) { @@ -646,7 +600,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as @@ -655,7 +609,7 @@ */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, - length = array.length; + length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; @@ -671,7 +625,7 @@ * iteratee shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the last element of `array` as @@ -679,7 +633,7 @@ * @returns {*} Returns the accumulated value. */ function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array.length; + var length = array ? array.length : 0; if (initAccum && length) { accumulator = array[--length]; } @@ -694,14 +648,14 @@ * shorthands. * * @private - * @param {Array} array The array to iterate over. + * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, - length = array.length; + length = array ? array.length : 0; while (++index < length) { if (predicate(array[index], index, array)) { @@ -712,52 +666,21 @@ } /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. - */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); - - if (current != null && (computed === undefined - ? current === current - : comparator(current, computed) - )) { - var computed = current, - result = value; - } - } - return result; - } - - /** - * The base implementation of methods like `_.find` and `_.findKey`, without - * support for iteratee shorthands, which iterates over `collection` using - * `eachFunc`. + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. * * @private * @param {Array|Object} collection The collection to search. * @param {Function} predicate The function invoked per iteration. * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. * @returns {*} Returns the found element or its key, else `undefined`. */ - function baseFind(collection, predicate, eachFunc, retKey) { + function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection) { if (predicate(value, key, collection)) { - result = retKey ? key : value; + result = key; return false; } }); @@ -771,12 +694,13 @@ * @private * @param {Array} array The array to search. * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ - function baseFindIndex(array, predicate, fromRight) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, - index = fromRight ? length : -1; + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { @@ -937,7 +861,7 @@ * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. - * @returns {Object} Returns the new array of key-value pairs. + * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { @@ -950,7 +874,7 @@ * * @private * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { @@ -975,6 +899,18 @@ } /** + * Checks if a cache value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } + + /** * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol * that is not found in the character symbols. * @@ -1019,79 +955,6 @@ } /** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ - function compareAscending(value, other) { - if (value !== other) { - var valIsNull = value === null, - valIsUndef = value === undefined, - valIsReflexive = value === value; - - var othIsNull = other === null, - othIsUndef = other === undefined, - othIsReflexive = other === other; - - if ((value > other && !othIsNull) || !valIsReflexive || - (valIsNull && !othIsUndef && othIsReflexive) || - (valIsUndef && othIsReflexive)) { - return 1; - } - if ((value < other && !valIsNull) || !othIsReflexive || - (othIsNull && !valIsUndef && valIsReflexive) || - (othIsUndef && valIsReflexive)) { - return -1; - } - } - return 0; - } - - /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } - } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; - } - - /** * Gets the number of `placeholder` occurrences in `array`. * * @private @@ -1112,29 +975,6 @@ } /** - * Creates a function that performs a mathematical operation on two values. - * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new mathematical operation function. - */ - function createMathOperation(operator) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return 0; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - result = result === undefined ? other : operator(result, other); - } - return result; - }; - } - - /** * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. * * @private @@ -1168,6 +1008,18 @@ } /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** * Gets the index at which the first occurrence of `NaN` is found in `array`. * * @private @@ -1178,7 +1030,7 @@ */ function indexOfNaN(array, fromIndex, fromRight) { var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); + index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { var other = array[index]; @@ -1209,20 +1061,6 @@ } /** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ - function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; - } - - /** * Converts `iterator` to an array. * * @private @@ -1240,11 +1078,11 @@ } /** - * Converts `map` to an array. + * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, @@ -1282,11 +1120,11 @@ } /** - * Converts `set` to an array. + * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. - * @returns {Array} Returns the converted array. + * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, @@ -1299,6 +1137,23 @@ } /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** * Gets the number of symbols in `string`. * * @private @@ -1366,10 +1221,10 @@ * lodash.isFunction(lodash.bar); * // => true * - * // Use `context` to mock `Date#getTime` use in `_.now`. - * var mock = _.runInContext({ + * // Use `context` to stub `Date#getTime` use in `_.now`. + * var stubbed = _.runInContext({ * 'Date': function() { - * return { 'getTime': getTimeMock }; + * return { 'getTime': stubGetTime }; * } * }); * @@ -1391,6 +1246,15 @@ objectProto = context.Object.prototype, stringProto = context.String.prototype; + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + /** Used to resolve the decompiled source of functions. */ var funcToString = context.Function.prototype.toString; @@ -1424,15 +1288,16 @@ Reflect = context.Reflect, Symbol = context.Symbol, Uint8Array = context.Uint8Array, - clearTimeout = context.clearTimeout, enumerate = Reflect ? Reflect.enumerate : undefined, getOwnPropertySymbols = Object.getOwnPropertySymbols, iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined, objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - setTimeout = context.setTimeout, splice = arrayProto.splice; + /** Built-in method references that are mockable. */ + var setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); }; + /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor, @@ -1551,22 +1416,24 @@ * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, + * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, + * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, + * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor @@ -1825,64 +1692,212 @@ * * @private * @constructor - * @returns {Object} Returns the new hash object. + * @param {Array} [entries] The key-value pairs to cache. */ - function Hash() {} + function Hash(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } /** * Removes `key` and its value from the hash. * * @private + * @name delete + * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function hashDelete(hash, key) { - return hashHas(hash, key) && delete hash[key]; + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; } /** * Gets the hash value for `key`. * * @private - * @param {Object} hash The hash to query. + * @name get + * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function hashGet(hash, key) { + function hashGet(key) { + var data = this.__data__; if (nativeCreate) { - var result = hash[key]; + var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } - return hasOwnProperty.call(hash, key) ? hash[key] : undefined; + return hasOwnProperty.call(data, key) ? data[key] : undefined; } /** * Checks if a hash value for `key` exists. * * @private - * @param {Object} hash The hash to query. + * @name has + * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function hashHas(hash, key) { - return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key); + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); } /** * Sets the hash `key` to `value`. * * @private - * @param {Object} hash The hash to modify. + * @name set + * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. */ - function hashSet(hash, key, value) { - hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + function hashSet(key, value) { + var data = this.__data__; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } - // Avoid inheriting from `Object.prototype` when possible. - Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto; + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries ? entries.length : 0; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + } + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; /*------------------------------------------------------------------------*/ @@ -1891,15 +1906,15 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function MapCache(values) { + function MapCache(entries) { var index = -1, - length = values ? values.length : 0; + length = entries ? entries.length : 0; this.clear(); while (++index < length) { - var entry = values[index]; + var entry = entries[index]; this.set(entry[0], entry[1]); } } @@ -1911,10 +1926,10 @@ * @name clear * @memberOf MapCache */ - function mapClear() { + function mapCacheClear() { this.__data__ = { 'hash': new Hash, - 'map': Map ? new Map : [], + 'map': new (Map || ListCache), 'string': new Hash }; } @@ -1928,12 +1943,8 @@ * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapDelete(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashDelete(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map['delete'](key) : assocDelete(data.map, key); + function mapCacheDelete(key) { + return getMapData(this, key)['delete'](key); } /** @@ -1945,12 +1956,8 @@ * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ - function mapGet(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashGet(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.get(key) : assocGet(data.map, key); + function mapCacheGet(key) { + return getMapData(this, key).get(key); } /** @@ -1962,12 +1969,8 @@ * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ - function mapHas(key) { - var data = this.__data__; - if (isKeyable(key)) { - return hashHas(typeof key == 'string' ? data.string : data.hash, key); - } - return Map ? data.map.has(key) : assocHas(data.map, key); + function mapCacheHas(key) { + return getMapData(this, key).has(key); } /** @@ -1980,30 +1983,23 @@ * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ - function mapSet(key, value) { - var data = this.__data__; - if (isKeyable(key)) { - hashSet(typeof key == 'string' ? data.string : data.hash, key, value); - } else if (Map) { - data.map.set(key, value); - } else { - assocSet(data.map, key, value); - } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); return this; } // Add methods to `MapCache`. - MapCache.prototype.clear = mapClear; - MapCache.prototype['delete'] = mapDelete; - MapCache.prototype.get = mapGet; - MapCache.prototype.has = mapHas; - MapCache.prototype.set = mapSet; + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; /*------------------------------------------------------------------------*/ /** * - * Creates a set cache object to store unique values. + * Creates an array cache object to store unique values. * * @private * @constructor @@ -2015,52 +2011,41 @@ this.__data__ = new MapCache; while (++index < length) { - this.push(values[index]); + this.add(values[index]); } } /** - * Checks if `value` is in `cache`. + * Adds `value` to the array cache. * * @private - * @param {Object} cache The set cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ - function cacheHas(cache, value) { - var map = cache.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - return hash[value] === HASH_UNDEFINED; - } - return map.has(value); + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } /** - * Adds `value` to the set cache. + * Checks if `value` is in the array cache. * * @private - * @name push + * @name has * @memberOf SetCache - * @param {*} value The value to cache. + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ - function cachePush(value) { - var map = this.__data__; - if (isKeyable(value)) { - var data = map.__data__, - hash = typeof value == 'string' ? data.string : data.hash; - - hash[value] = HASH_UNDEFINED; - } - else { - map.set(value, HASH_UNDEFINED); - } + function setCacheHas(value) { + return this.__data__.has(value); } // Add methods to `SetCache`. - SetCache.prototype.push = cachePush; + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; /*------------------------------------------------------------------------*/ @@ -2069,17 +2054,10 @@ * * @private * @constructor - * @param {Array} [values] The values to cache. + * @param {Array} [entries] The key-value pairs to cache. */ - function Stack(values) { - var index = -1, - length = values ? values.length : 0; - - this.clear(); - while (++index < length) { - var entry = values[index]; - this.set(entry[0], entry[1]); - } + function Stack(entries) { + this.__data__ = new ListCache(entries); } /** @@ -2090,7 +2068,7 @@ * @memberOf Stack */ function stackClear() { - this.__data__ = { 'array': [], 'map': null }; + this.__data__ = new ListCache; } /** @@ -2103,10 +2081,7 @@ * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { - var data = this.__data__, - array = data.array; - - return array ? assocDelete(array, key) : data.map['delete'](key); + return this.__data__['delete'](key); } /** @@ -2119,10 +2094,7 @@ * @returns {*} Returns the entry value. */ function stackGet(key) { - var data = this.__data__, - array = data.array; - - return array ? assocGet(array, key) : data.map.get(key); + return this.__data__.get(key); } /** @@ -2135,10 +2107,7 @@ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { - var data = this.__data__, - array = data.array; - - return array ? assocHas(array, key) : data.map.has(key); + return this.__data__.has(key); } /** @@ -2152,21 +2121,11 @@ * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var data = this.__data__, - array = data.array; - - if (array) { - if (array.length < (LARGE_ARRAY_SIZE - 1)) { - assocSet(array, key, value); - } else { - data.array = null; - data.map = new MapCache(array); - } - } - var map = data.map; - if (map) { - map.set(key, value); + var cache = this.__data__; + if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) { + cache = this.__data__ = new MapCache(cache.__data__); } + cache.set(key, value); return this; } @@ -2180,90 +2139,6 @@ /*------------------------------------------------------------------------*/ /** - * Removes `key` and its value from the associative array. - * - * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ - function assocDelete(array, key) { - var index = assocIndexOf(array, key); - if (index < 0) { - return false; - } - var lastIndex = array.length - 1; - if (index == lastIndex) { - array.pop(); - } else { - splice.call(array, index, 1); - } - return true; - } - - /** - * Gets the associative array value for `key`. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function assocGet(array, key) { - var index = assocIndexOf(array, key); - return index < 0 ? undefined : array[index][1]; - } - - /** - * Checks if an associative array value for `key` exists. - * - * @private - * @param {Array} array The array to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function assocHas(array, key) { - return assocIndexOf(array, key) > -1; - } - - /** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to search. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } - - /** - * Sets the associative array `key` to `value`. - * - * @private - * @param {Array} array The array to modify. - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - */ - function assocSet(array, key, value) { - var index = assocIndexOf(array, key); - if (index < 0) { - array.push([key, value]); - } else { - array[index][1] = value; - } - } - - /*------------------------------------------------------------------------*/ - - /** * Used by `_.defaults` to customize its `_.assignIn` use. * * @private @@ -2316,6 +2191,24 @@ } /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to search. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** * Aggregates elements of `collection` on `accumulator` with keys transformed * by `iteratee` and values set by `setter`. * @@ -2352,7 +2245,7 @@ * @private * @param {Object} object The object to iterate over. * @param {string[]} paths The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked elements. */ function baseAt(object, paths) { var index = -1, @@ -2467,7 +2360,7 @@ * * @private * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseConforms(source) { var props = keys(source), @@ -2560,6 +2453,7 @@ var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { @@ -2615,6 +2509,35 @@ } /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** * The base implementation of `_.fill` without an iteratee call guard. * * @private @@ -2750,7 +2673,7 @@ * @private * @param {Object} object The object to inspect. * @param {Array} props The property names to filter. - * @returns {Array} Returns the new array of filtered property names. + * @returns {Array} Returns the function names. */ function baseFunctions(object, props) { return arrayFilter(props, function(key) { @@ -2773,7 +2696,7 @@ length = path.length; while (object != null && index < length) { - object = object[path[index++]]; + object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } @@ -2791,16 +2714,27 @@ */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); - return isArray(object) - ? result - : arrayPush(result, symbolsFunc(object)); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; } /** * The base implementation of `_.has` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ @@ -2808,20 +2742,21 @@ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, // that are composed entirely of index properties, return `false` for // `hasOwnProperty` checks of them. - return hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null); + return object != null && + (hasOwnProperty.call(object, key) || + (typeof object == 'object' && key in object && getPrototype(object) === null)); } /** * The base implementation of `_.hasIn` without support for deep paths. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { - return key in Object(object); + return object != null && key in Object(object); } /** @@ -2876,6 +2811,7 @@ var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator) @@ -2933,7 +2869,7 @@ object = parent(object, path); path = last(path); } - var func = object == null ? object : object[path]; + var func = object == null ? object : object[toKey(path)]; return func == null ? undefined : apply(func, object, args); } @@ -3075,6 +3011,22 @@ } /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** * The base implementation of `_.iteratee`. * * @private @@ -3136,6 +3088,19 @@ } /** + * The base implementation of `_.lt` which doesn't coerce arguments to numbers. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private @@ -3158,7 +3123,7 @@ * * @private * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); @@ -3176,11 +3141,11 @@ * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(path, srcValue); + return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); @@ -3391,7 +3356,7 @@ * * @private * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { @@ -3404,7 +3369,7 @@ * * @private * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { @@ -3429,6 +3394,9 @@ length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } if (iteratee) { seen = arrayMap(array, baseUnary(iteratee)); } @@ -3462,7 +3430,7 @@ while (length--) { var index = indexes[length]; - if (lastIndex == length || index != previous) { + if (length == lastIndex || index !== previous) { var previous = index; if (isIndex(index)) { splice.call(array, index, 1); @@ -3472,11 +3440,11 @@ object = parent(array, path); if (object != null) { - delete object[last(path)]; + delete object[toKey(last(path))]; } } else { - delete array[index]; + delete array[toKey(index)]; } } } @@ -3505,7 +3473,7 @@ * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, @@ -3566,7 +3534,7 @@ nested = object; while (nested != null && ++index < length) { - var key = path[index]; + var key = toKey(path[index]); if (isObject(nested)) { var newValue = value; if (index != lastIndex) { @@ -3668,7 +3636,8 @@ var mid = (low + high) >>> 1, computed = array[mid]; - if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { low = mid + 1; } else { high = mid; @@ -3699,21 +3668,26 @@ high = array ? array.length : 0, valIsNaN = value !== value, valIsNull = value === null, - valIsUndef = value === undefined; + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; while (low < high) { var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), - isDef = computed !== undefined, - isReflexive = computed === computed; + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); if (valIsNaN) { - var setLow = isReflexive || retHighest; + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); } else if (valIsNull) { - setLow = isReflexive && isDef && (retHighest || computed != null); - } else if (valIsUndef) { - setLow = isReflexive && (retHighest || isDef); - } else if (computed == null) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { setLow = false; } else { setLow = retHighest ? (computed <= value) : (computed < value); @@ -3728,47 +3702,71 @@ } /** - * The base implementation of `_.sortedUniq`. - * - * @private - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - */ - function baseSortedUniq(array) { - return baseSortedUniqBy(array); - } - - /** - * The base implementation of `_.sortedUniqBy` without support for iteratee - * shorthands. + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @returns {Array} Returns the new duplicate free array. */ - function baseSortedUniqBy(array, iteratee) { - var index = 0, + function baseSortedUniq(array, iteratee) { + var index = -1, length = array.length, - value = array[0], - computed = iteratee ? iteratee(value) : value, - seen = computed, - resIndex = 1, - result = [value]; + resIndex = 0, + result = []; while (++index < length) { - value = array[index], - computed = iteratee ? iteratee(value) : value; + var value = array[index], + computed = iteratee ? iteratee(value) : value; - if (!eq(computed, seen)) { - seen = computed; - result[resIndex++] = value; + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; } } return result; } /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private @@ -3806,6 +3804,7 @@ var value = array[index], computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { @@ -3839,8 +3838,9 @@ function baseUnset(object, path) { path = isKey(path, object) ? [path] : castPath(path); object = parent(object, path); - var key = last(path); - return (object != null && has(object, key)) ? delete object[key] : true; + + var key = toKey(last(path)); + return !(object != null && baseHas(object, key)) || delete object[key]; } /** @@ -4104,11 +4104,90 @@ } /** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + 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; + } + + /** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4143,7 +4222,7 @@ * is tailored for `_.partialRight`. * * @private - * @param {Array|Object} args The provided arguments. + * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. @@ -4265,7 +4344,7 @@ customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; - customizer = typeof customizer == 'function' + customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; @@ -4364,7 +4443,7 @@ * * @private * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { @@ -4449,7 +4528,7 @@ var length = arguments.length, args = Array(length), index = length, - placeholder = getPlaceholder(wrapper); + placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; @@ -4471,6 +4550,31 @@ } /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + predicate = getIteratee(predicate, 3); + if (!isArrayLike(collection)) { + var props = keys(collection); + } + var index = findIndexFunc(props || collection, function(value, key) { + if (props) { + key = value; + value = iterable[key]; + } + return predicate(value, key, iterable); + }, fromIndex); + return index > -1 ? collection[props ? props[index] : index] : undefined; + }; + } + + /** * Creates a `_.flow` or `_.flowRight` function. * * @private @@ -4564,14 +4668,14 @@ function wrapper() { var length = arguments.length, - index = length, - args = Array(length); + args = Array(length), + index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { - var placeholder = getPlaceholder(wrapper), + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { @@ -4623,11 +4727,44 @@ } /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return 0; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** * Creates a function like `_.over`. * * @private * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new invoker function. + * @returns {Function} Returns the new over function. */ function createOver(arrayFunc) { return rest(function(iteratees) { @@ -4654,7 +4791,7 @@ * @returns {string} Returns the padding for `string`. */ function createPadding(length, chars) { - chars = chars === undefined ? ' ' : (chars + ''); + chars = chars === undefined ? ' ' : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { @@ -4729,6 +4866,23 @@ } /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** * Creates a function that wraps `func` to continue currying. * * @private @@ -4783,7 +4937,7 @@ var func = Math[methodName]; return function(number, precision) { number = toNumber(number); - precision = toInteger(precision); + precision = nativeMin(toInteger(precision), 292); if (precision) { // Shift with exponential notation to avoid floating-point issues. // See [MDN](https://mdn.io/round#Examples) for more details. @@ -4804,11 +4958,31 @@ * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ - var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) { + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * @@ -4825,6 +4999,7 @@ * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` + * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. @@ -4903,9 +5078,7 @@ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var index = -1, - isPartial = bitmask & PARTIAL_COMPARE_FLAG, - isUnordered = bitmask & UNORDERED_COMPARE_FLAG, + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; @@ -4917,7 +5090,10 @@ if (stacked) { return stacked == other; } - var result = true; + var index = -1, + result = true, + seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; + stack.set(array, other); // Ignore non-index properties. @@ -4938,10 +5114,12 @@ break; } // Recursively compare arrays (susceptible to call stack limits). - if (isUnordered) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack); + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!seen.has(othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + return seen.add(othIndex); + } })) { result = false; break; @@ -5176,6 +5354,18 @@ } /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, * this function returns the custom method, otherwise it returns `baseIteratee`. * If arguments are provided, the chosen function is invoked with them and @@ -5206,6 +5396,21 @@ var getLength = baseProperty('length'); /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** * Gets the property names, values, and compare flags of `object`. * * @private @@ -5213,11 +5418,14 @@ * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { - var result = toPairs(object), + var result = keys(object), length = result.length; while (length--) { - result[length][2] = isStrictComparable(result[length][1]); + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } @@ -5231,20 +5439,8 @@ * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { - var value = object[key]; - return isNative(value) ? value : undefined; - } - - /** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getPlaceholder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** @@ -5273,9 +5469,7 @@ // Fallback for IE < 11. if (!getOwnPropertySymbols) { - getSymbols = function() { - return []; - }; + getSymbols = stubArray; } /** @@ -5376,7 +5570,7 @@ length = path.length; while (++index < length) { - var key = path[index]; + var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } @@ -5496,7 +5690,7 @@ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { - return isArrayLikeObject(value) && (isArray(value) || isArguments(value)); + return isArray(value) || isArguments(value); } /** @@ -5512,6 +5706,21 @@ } /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** * Checks if the given arguments are from an iteratee call. * * @private @@ -5544,13 +5753,16 @@ * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { + if (isArray(value)) { + return false; + } var type = typeof value; - if (type == 'number' || type == 'symbol') { + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { return true; } - return !isArray(value) && - (isSymbol(value) || reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object))); + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } /** @@ -5562,8 +5774,9 @@ */ function isKeyable(value) { var type = typeof value; - return type == 'number' || type == 'boolean' || - (type == 'string' && value != '__proto__') || value == null; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } /** @@ -5589,6 +5802,26 @@ } /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** * Checks if `value` is likely a prototype object. * * @private @@ -5621,7 +5854,7 @@ * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { @@ -5814,8 +6047,12 @@ * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ - function toKey(key) { - return (typeof key == 'string' || isSymbol(key)) ? key : (key + ''); + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** @@ -5869,7 +6106,7 @@ * @param {Array} array The array to process. * @param {number} [size=1] The length of each chunk * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array containing chunks. + * @returns {Array} Returns the new array of chunks. * @example * * _.chunk(['a', 'b', 'c', 'd'], 2); @@ -5952,16 +6189,16 @@ */ function concat() { var length = arguments.length, - array = castArray(arguments[0]); + args = Array(length ? length - 1 : 0), + array = arguments[0], + index = length; - if (length < 2) { - return length ? copyArray(array) : []; - } - var args = Array(length - 1); - while (length--) { - args[length - 1] = arguments[length]; + while (index--) { + args[index - 1] = arguments[index]; } - return arrayConcat(array, baseFlatten(args, 1)); + return length + ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)) + : []; } /** @@ -5977,10 +6214,11 @@ * @param {Array} array The array to inspect. * @param {...Array} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor * @example * - * _.difference([3, 2, 1], [4, 2]); - * // => [3, 1] + * _.difference([2, 1], [2, 3]); + * // => [1] */ var difference = rest(function(array, values) { return isArrayLikeObject(array) @@ -6005,8 +6243,8 @@ * @returns {Array} Returns the new array of filtered values. * @example * - * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor); - * // => [3.1, 1.3] + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] * * // The `_.property` iteratee shorthand. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); @@ -6258,6 +6496,7 @@ * @param {Array} array The array to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6282,10 +6521,16 @@ * _.findIndex(users, 'active'); * // => 2 */ - function findIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3)) - : -1; + function findIndex(array, predicate, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); } /** @@ -6299,6 +6544,7 @@ * @param {Array} array The array to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * @@ -6323,10 +6569,19 @@ * _.findLastIndex(users, 'active'); * // => 0 */ - function findLastIndex(array, predicate) { - return (array && array.length) - ? baseFindIndex(array, getIteratee(predicate, 3), true) - : -1; + function findLastIndex(array, predicate, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); } /** @@ -6473,11 +6728,11 @@ if (!length) { return -1; } - fromIndex = toInteger(fromIndex); - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); } - return baseIndexOf(array, value, fromIndex); + return baseIndexOf(array, value, index); } /** @@ -6512,7 +6767,7 @@ * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersection([2, 1], [4, 2], [1, 2]); + * _.intersection([2, 1], [2, 3]); * // => [2] */ var intersection = rest(function(arrays) { @@ -6538,7 +6793,7 @@ * @returns {Array} Returns the new array of intersecting values. * @example * - * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor); + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); * // => [2.1] * * // The `_.property` iteratee shorthand. @@ -6668,7 +6923,7 @@ ) + 1; } if (value !== value) { - return indexOfNaN(array, index, true); + return indexOfNaN(array, index - 1, true); } while (index--) { if (array[index] === value) { @@ -6679,8 +6934,8 @@ } /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ @@ -6720,11 +6975,11 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ var pull = rest(pullAll); @@ -6742,11 +6997,11 @@ * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) @@ -6828,20 +7083,25 @@ * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ var pullAt = rest(function(array, indexes) { - indexes = arrayMap(baseFlatten(indexes, 1), String); + indexes = baseFlatten(indexes, 1); + + var length = array ? array.length : 0, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); - var result = baseAt(array, indexes); - basePullAt(array, indexes.sort(compareAscending)); return result; }); @@ -6970,9 +7230,6 @@ * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); @@ -6995,13 +7252,13 @@ * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { @@ -7021,8 +7278,8 @@ * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { var length = array ? array.length : 0; @@ -7050,8 +7307,8 @@ * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); @@ -7074,8 +7331,13 @@ * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { @@ -7095,7 +7357,7 @@ * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { @@ -7148,7 +7410,7 @@ */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniqBy(array, getIteratee(iteratee)) + ? baseSortedUniq(array, getIteratee(iteratee)) : []; } @@ -7335,8 +7597,8 @@ * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ var union = rest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); @@ -7358,8 +7620,8 @@ * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); @@ -7466,7 +7728,7 @@ * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] @@ -7555,12 +7817,13 @@ * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ var without = rest(function(array, values) { @@ -7580,11 +7843,12 @@ * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ var xor = rest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); @@ -7603,11 +7867,11 @@ * @param {...Array} [arrays] The arrays to inspect. * @param {Array|Function|Object|string} [iteratee=_.identity] * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); @@ -7632,7 +7896,7 @@ * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; @@ -7840,9 +8104,6 @@ * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ var wrapperAt = rest(function(paths) { paths = baseFlatten(paths, 1); @@ -8105,6 +8366,7 @@ * _.countBy([6.1, 4.2, 6.3], Math.floor); * // => { '4': 1, '6': 2 } * + * // The `_.property` iteratee shorthand. * _.countBy(['one', 'two', 'three'], 'length'); * // => { '3': 2, '5': 1 } */ @@ -8170,6 +8432,7 @@ * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * * var users = [ @@ -8209,6 +8472,7 @@ * @param {Array|Object} collection The collection to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8233,14 +8497,7 @@ * _.find(users, 'active'); * // => object for 'barney' */ - function find(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEach); - } + var find = createFind(findIndex); /** * This method is like `_.find` except that it iterates over elements of @@ -8253,6 +8510,7 @@ * @param {Array|Object} collection The collection to search. * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * @@ -8261,14 +8519,7 @@ * }); * // => 3 */ - function findLast(collection, predicate) { - predicate = getIteratee(predicate, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, true); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, baseEachRight); - } + var findLast = createFind(findLastIndex); /** * Creates a flattened array of values by running each element in `collection` @@ -8365,6 +8616,7 @@ * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * * _([1, 2]).forEach(function(value) { @@ -8378,9 +8630,8 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEach(collection, iteratee) - : baseEach(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8395,6 +8646,7 @@ * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. + * @see _.forEach * @example * * _.forEachRight([1, 2], function(value) { @@ -8403,9 +8655,8 @@ * // => Logs `2` then `1`. */ function forEachRight(collection, iteratee) { - return (typeof iteratee == 'function' && isArray(collection)) - ? arrayEachRight(collection, iteratee) - : baseEachRight(collection, getIteratee(iteratee)); + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } /** @@ -8707,6 +8958,7 @@ * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. + * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { @@ -8739,6 +8991,7 @@ * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. + * @see _.reduce * @example * * var array = [[0, 1], [2, 3], [4, 5]]; @@ -8767,6 +9020,7 @@ * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. + * @see _.filter * @example * * var users = [ @@ -9022,7 +9276,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -9030,9 +9283,11 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ - var now = Date.now; + function now() { + return Date.now(); + } /*------------------------------------------------------------------------*/ @@ -9083,7 +9338,7 @@ * @param {Function} func The function to cap arguments for. * @param {number} [n=func.length] The arity cap. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.ary(parseInt, 1)); @@ -9136,7 +9391,7 @@ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for partially applied arguments. * - * **Note:** Unlike native `Function#bind` this method doesn't set the "length" + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" * property of bound functions. * * @static @@ -9167,7 +9422,7 @@ var bind = rest(function(func, thisArg, partials) { var bitmask = BIND_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bind)); + var holders = replaceHolders(partials, getHolder(bind)); bitmask |= PARTIAL_FLAG; } return createWrapper(func, bitmask, thisArg, partials, holders); @@ -9221,7 +9476,7 @@ var bindKey = rest(function(object, key, partials) { var bitmask = BIND_FLAG | BIND_KEY_FLAG; if (partials.length) { - var holders = replaceHolders(partials, getPlaceholder(bindKey)); + var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= PARTIAL_FLAG; } return createWrapper(key, bitmask, object, partials, holders); @@ -9376,7 +9631,7 @@ maxWait, result, timerId, - lastCallTime = 0, + lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, @@ -9427,7 +9682,7 @@ // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. - return (!lastCallTime || (timeSinceLastCall >= wait) || + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } @@ -9441,7 +9696,6 @@ } function trailingEdge(time) { - clearTimeout(timerId); timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been @@ -9454,11 +9708,8 @@ } function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastCallTime = lastInvokeTime = 0; - lastArgs = lastThis = timerId = undefined; + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { @@ -9479,7 +9730,6 @@ } if (maxing) { // Handle invocations in a tight loop. - clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } @@ -9547,7 +9797,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new flipped function. * @example * * var flipped = _.flip(function() { @@ -9580,7 +9830,7 @@ * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; @@ -9638,7 +9888,7 @@ * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { @@ -9703,7 +9953,7 @@ * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] @@ -9762,7 +10012,7 @@ * // => 'hi fred' */ var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); + var holders = replaceHolders(partials, getHolder(partial)); return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); }); @@ -9799,7 +10049,7 @@ * // => 'hello fred' */ var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); + var holders = replaceHolders(partials, getHolder(partialRight)); return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); @@ -9820,7 +10070,7 @@ * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] @@ -10001,7 +10251,7 @@ * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); @@ -10098,6 +10348,7 @@ * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; @@ -10123,6 +10374,7 @@ * @param {*} value The value to clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith * @example * * function customizer(value) { @@ -10153,6 +10405,7 @@ * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. + * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; @@ -10175,6 +10428,7 @@ * @param {*} value The value to recursively clone. * @param {Function} [customizer] The function to customize cloning. * @returns {*} Returns the deep cloned value. + * @see _.cloneWith * @example * * function customizer(value) { @@ -10243,6 +10497,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than `other`, * else `false`. + * @see _.lt * @example * * _.gt(3, 1); @@ -10254,9 +10509,7 @@ * _.gt(1, 3); * // => false */ - function gt(value, other) { - return value > other; - } + var gt = createRelationalOperation(baseGt); /** * Checks if `value` is greater than or equal to `other`. @@ -10269,6 +10522,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than or equal to * `other`, else `false`. + * @see _.lte * @example * * _.gte(3, 1); @@ -10280,9 +10534,9 @@ * _.gte(1, 3); * // => false */ - function gte(value, other) { + var gte = createRelationalOperation(function(value, other) { return value >= other; - } + }); /** * Checks if `value` is likely an `arguments` object. @@ -10455,7 +10709,7 @@ * _.isBuffer(new Uint8Array(2)); * // => false */ - var isBuffer = !Buffer ? constant(false) : function(value) { + var isBuffer = !Buffer ? stubFalse : function(value) { return value instanceof Buffer; }; @@ -10673,14 +10927,14 @@ * _.isFinite(3); * // => true * - * _.isFinite(Number.MAX_VALUE); - * // => true - * - * _.isFinite(3.14); + * _.isFinite(Number.MIN_VALUE); * // => true * * _.isFinite(Infinity); * // => false + * + * _.isFinite('3'); + * // => false */ function isFinite(value) { return typeof value == 'number' && nativeIsFinite(value); @@ -10955,7 +11209,15 @@ } /** - * Checks if `value` is a native function. + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the + * presence of the `core-js` package because `core-js` circumvents this kind + * of detection. Despite multiple requests, the `core-js` maintainer has made + * it clear: any attempt to fix the detection will be obstructed. As a result, + * we're left with little choice but to throw an error. Unfortunately, this + * also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on `core-js`. * * @static * @memberOf _ @@ -10973,11 +11235,10 @@ * // => false */ function isNative(value) { - if (!isObject(value)) { - return false; + if (isMaskable(value)) { + throw new Error('This method is not supported with `core-js`. Try https://github.com/es-shims.'); } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + return baseIsNative(value); } /** @@ -11321,6 +11582,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. + * @see _.gt * @example * * _.lt(1, 3); @@ -11332,9 +11594,7 @@ * _.lt(3, 1); * // => false */ - function lt(value, other) { - return value < other; - } + var lt = createRelationalOperation(baseLt); /** * Checks if `value` is less than or equal to `other`. @@ -11347,6 +11607,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than or equal to * `other`, else `false`. + * @see _.gte * @example * * _.lte(1, 3); @@ -11358,9 +11619,9 @@ * _.lte(3, 1); * // => false */ - function lte(value, other) { + var lte = createRelationalOperation(function(value, other) { return value <= other; - } + }); /** * Converts `value` to an array. @@ -11402,9 +11663,44 @@ } /** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + + /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on + * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). * * @static @@ -11415,7 +11711,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -11424,20 +11720,14 @@ * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } /** @@ -11455,7 +11745,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -11464,7 +11754,7 @@ * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { @@ -11482,8 +11772,8 @@ * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -11491,8 +11781,8 @@ * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { @@ -11555,7 +11845,7 @@ * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -11564,7 +11854,7 @@ * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { @@ -11593,18 +11883,7 @@ * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } /*------------------------------------------------------------------------*/ @@ -11624,6 +11903,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assignIn * @example * * function Foo() { @@ -11666,6 +11946,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.assign * @example * * function Foo() { @@ -11709,6 +11990,7 @@ * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. + * @see _.assignWith * @example * * function customizer(objValue, srcValue) { @@ -11740,6 +12022,7 @@ * @param {...Object} sources The source objects. * @param {Function} [customizer] The function to customize assigned values. * @returns {Object} Returns `object`. + * @see _.assignInWith * @example * * function customizer(objValue, srcValue) { @@ -11764,16 +12047,13 @@ * @category Object * @param {Object} object The object to iterate over. * @param {...(string|string[])} [paths] The property paths of elements to pick. - * @returns {Array} Returns the new array of picked elements. + * @returns {Array} Returns the picked values. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * * _.at(object, ['a[0].b.c', 'a[1]']); * // => [3, 4] - * - * _.at(['a', 'b', 'c'], 0, 2); - * // => ['a', 'c'] */ var at = rest(function(object, paths) { return baseAt(object, baseFlatten(paths, 1)); @@ -11833,6 +12113,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.defaultsDeep * @example * * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); @@ -11856,6 +12137,7 @@ * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. + * @see _.defaults * @example * * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); @@ -11904,7 +12186,7 @@ * // => 'barney' */ function findKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwn, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } /** @@ -11944,7 +12226,7 @@ * // => 'pebbles' */ function findLastKey(object, predicate) { - return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true); + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } /** @@ -11960,6 +12242,7 @@ * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forInRight * @example * * function Foo() { @@ -11977,7 +12260,7 @@ function forIn(object, iteratee) { return object == null ? object - : baseFor(object, getIteratee(iteratee), keysIn); + : baseFor(object, getIteratee(iteratee, 3), keysIn); } /** @@ -11991,6 +12274,7 @@ * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forIn * @example * * function Foo() { @@ -12008,7 +12292,7 @@ function forInRight(object, iteratee) { return object == null ? object - : baseForRight(object, getIteratee(iteratee), keysIn); + : baseForRight(object, getIteratee(iteratee, 3), keysIn); } /** @@ -12024,6 +12308,7 @@ * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forOwnRight * @example * * function Foo() { @@ -12039,7 +12324,7 @@ * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee)); + return object && baseForOwn(object, getIteratee(iteratee, 3)); } /** @@ -12053,6 +12338,7 @@ * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. + * @see _.forOwn * @example * * function Foo() { @@ -12068,7 +12354,7 @@ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee)); + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); } /** @@ -12080,7 +12366,8 @@ * @memberOf _ * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. + * @see _.functionsIn * @example * * function Foo() { @@ -12106,7 +12393,8 @@ * @since 4.0.0 * @category Object * @param {Object} object The object to inspect. - * @returns {Array} Returns the new array of property names. + * @returns {Array} Returns the function names. + * @see _.functions * @example * * function Foo() { @@ -12396,6 +12684,7 @@ * @param {Array|Function|Object|string} [iteratee=_.identity] * The function invoked per iteration. * @returns {Object} Returns the new mapped object. + * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { @@ -12427,6 +12716,7 @@ * @param {Array|Function|Object|string} [iteratee=_.identity] * The function invoked per iteration. * @returns {Object} Returns the new mapped object. + * @see _.mapKeys * @example * * var users = { @@ -12456,7 +12746,7 @@ * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * @@ -12601,7 +12891,7 @@ * // => { 'a': 1, 'c': 3 } */ var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseFlatten(props, 1)); + return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); }); /** @@ -12668,7 +12958,7 @@ length = 1; } while (++index < length) { - var value = object == null ? undefined : object[path[index]]; + var value = object == null ? undefined : object[toKey(path[index])]; if (value === undefined) { index = length; value = defaultValue; @@ -12741,7 +13031,8 @@ /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -12749,7 +13040,7 @@ * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12762,13 +13053,12 @@ * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ - function toPairs(object) { - return baseToPairs(object, keys(object)); - } + var toPairs = createToPairs(keys); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -12776,7 +13066,7 @@ * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -12787,25 +13077,24 @@ * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ - function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); - } + var toPairsIn = createToPairs(keysIn); /** * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. @@ -13031,7 +13320,7 @@ } /** - * Checks if `n` is between `start` and up to but not including, `end`. If + * Checks if `n` is between `start` and up to, but not including, `end`. If * `end` is not specified, it's set to `start` with `start` then set to `0`. * If `start` is greater than `end` the params are swapped to support * negative ranges. @@ -13044,6 +13333,7 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight * @example * * _.inRange(3, 2, 4); @@ -13226,7 +13516,7 @@ * @category String * @param {string} [string=''] The string to search. * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search from. + * @param {number} [position=string.length] The position to search up to. * @returns {boolean} Returns `true` if `string` ends with `target`, * else `false`. * @example @@ -13242,7 +13532,7 @@ */ function endsWith(string, target, position) { string = toString(string); - target = typeof target == 'string' ? target : (target + ''); + target = baseToString(target); var length = string.length; position = position === undefined @@ -13620,7 +13910,7 @@ * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -13639,7 +13929,7 @@ typeof separator == 'string' || (separator != null && !isRegExp(separator)) )) { - separator += ''; + separator = baseToString(separator); if (separator == '' && reHasComplexSymbol.test(string)) { return castSlice(stringToArray(string), 0, limit); } @@ -13698,7 +13988,7 @@ function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(target, position) == position; + return string.lastIndexOf(baseToString(target), position) == position; } /** @@ -13765,12 +14055,6 @@ * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -13796,9 +14080,15 @@ * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ @@ -13986,13 +14276,10 @@ */ function trim(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrim, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), @@ -14024,13 +14311,10 @@ */ function trimEnd(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrimEnd, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), @@ -14060,13 +14344,10 @@ */ function trimStart(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrimStart, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), @@ -14119,7 +14400,7 @@ if (isObject(options)) { var separator = 'separator' in options ? options.separator : separator; length = 'length' in options ? toInteger(options.length) : length; - omission = 'omission' in options ? toString(options.omission) : omission; + omission = 'omission' in options ? baseToString(options.omission) : omission; } string = toString(string); @@ -14159,7 +14440,7 @@ } result = result.slice(0, newEnd === undefined ? end : newEnd); } - } else if (string.indexOf(separator, end) != end) { + } else if (string.indexOf(baseToString(separator), end) != end) { var index = result.lastIndexOf(separator); if (index > -1) { result = result.slice(0, index); @@ -14320,12 +14601,13 @@ * } * }; * - * _.bindAll(view, 'onClick'); + * _.bindAll(view, ['onClick']); * jQuery(element).on('click', view.onClick); * // => Logs 'clicked docs' when clicked. */ var bindAll = rest(function(object, methodNames) { arrayEach(baseFlatten(methodNames, 1), function(key) { + key = toKey(key); object[key] = bind(object[key], object); }); return object; @@ -14342,7 +14624,7 @@ * @since 4.0.0 * @category Util * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. * @example * * var func = _.cond([ @@ -14392,7 +14674,7 @@ * @since 4.0.0 * @category Util * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ @@ -14400,7 +14682,7 @@ * { 'user': 'fred', 'age': 40 } * ]; * - * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) })); + * _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } })); * // => [{ 'user': 'fred', 'age': 40 }] */ function conforms(source) { @@ -14415,13 +14697,15 @@ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new constant function. * @example * - * var object = { 'user': 'fred' }; - * var getter = _.constant(object); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * getter() === object; + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { @@ -14440,14 +14724,15 @@ * @since 3.0.0 * @category Util * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. + * @see _.flowRight * @example * * function square(n) { * return n * n; * } * - * var addSquare = _.flow(_.add, square); + * var addSquare = _.flow([_.add, square]); * addSquare(1, 2); * // => 9 */ @@ -14458,18 +14743,19 @@ * invokes the given functions from right to left. * * @static - * @since 0.1.0 + * @since 3.0.0 * @memberOf _ * @category Util * @param {...(Function|Function[])} [funcs] Functions to invoke. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new composite function. + * @see _.flow * @example * * function square(n) { * return n * n; * } * - * var addSquare = _.flowRight(square, _.add); + * var addSquare = _.flowRight([square, _.add]); * addSquare(1, 2); * // => 9 */ @@ -14488,7 +14774,7 @@ * * var object = { 'user': 'fred' }; * - * _.identity(object) === object; + * console.log(_.identity(object) === object); * // => true */ function identity(value) { @@ -14554,7 +14840,7 @@ * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ @@ -14582,7 +14868,7 @@ * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ @@ -14607,7 +14893,7 @@ * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ @@ -14638,7 +14924,7 @@ * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), @@ -14749,8 +15035,7 @@ } /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * A method that returns `undefined`. * * @static * @memberOf _ @@ -14758,17 +15043,15 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. } /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -14776,7 +15059,7 @@ * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); @@ -14807,7 +15090,7 @@ * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] @@ -14827,7 +15110,7 @@ * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true @@ -14853,7 +15136,7 @@ * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true @@ -14874,7 +15157,7 @@ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ @@ -14889,7 +15172,7 @@ * // => [1, 2] */ function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } /** @@ -14901,7 +15184,7 @@ * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], @@ -14935,7 +15218,8 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight * @example * * _.range(4); @@ -14972,7 +15256,8 @@ * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range * @example * * _.rangeRight(4); @@ -14999,6 +15284,101 @@ var rangeRight = createRange(true); /** + * A method that returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ + function stubArray() { + return []; + } + + /** + * A method that returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ + function stubFalse() { + return false; + } + + /** + * A method that returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ + function stubObject() { + return {}; + } + + /** + * A method that returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ + function stubString() { + return ''; + } + + /** + * A method that returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ + function stubTrue() { + return true; + } + + /** * Invokes the iteratee `n` times, returning an array of the results of * each invocation. The iteratee is invoked with one argument; (index). * @@ -15014,8 +15394,8 @@ * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); @@ -15051,15 +15431,6 @@ * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { @@ -15196,7 +15567,7 @@ */ function max(array) { return (array && array.length) - ? baseExtremum(array, identity, gt) + ? baseExtremum(array, identity, baseGt) : undefined; } @@ -15226,7 +15597,7 @@ */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), gt) + ? baseExtremum(array, getIteratee(iteratee), baseGt) : undefined; } @@ -15296,7 +15667,7 @@ */ function min(array) { return (array && array.length) - ? baseExtremum(array, identity, lt) + ? baseExtremum(array, identity, baseLt) : undefined; } @@ -15326,7 +15697,7 @@ */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee), lt) + ? baseExtremum(array, getIteratee(iteratee), baseLt) : undefined; } @@ -15698,6 +16069,11 @@ lodash.meanBy = meanBy; lodash.min = min; lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; lodash.multiply = multiply; lodash.nth = nth; lodash.noConflict = noConflict; @@ -15732,6 +16108,7 @@ lodash.sumBy = sumBy; lodash.template = template; lodash.times = times; + lodash.toFinite = toFinite; lodash.toInteger = toInteger; lodash.toLength = toLength; lodash.toLower = toLower; @@ -15998,10 +16375,12 @@ // Export lodash. var _ = runInContext(); - // Expose lodash on the free variable `window` or `self` when available. This - // prevents errors in cases where lodash is loaded by a script tag in the presence - // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch for more details. - (freeWindow || freeSelf || {})._ = _; + // Expose Lodash on the free variable `window` or `self` when available so it's + // globally accessible, even when bundled with Browserify, Webpack, etc. This + // also prevents errors in cases where Lodash is loaded by a script tag in the + // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch + // for more details. Use `_.noConflict` to remove Lodash from the global object. + (freeSelf || {})._ = _; // Some AMD build optimizers like r.js check for condition patterns like the following: if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { @@ -16012,11 +16391,9 @@ }); } // Check for `exports` after `define` in case a build optimizer adds an `exports` object. - else if (freeExports && freeModule) { + else if (freeModule) { // Export for Node.js. - if (moduleExports) { - (freeModule.exports = _)._ = _; - } + (freeModule.exports = _)._ = _; // Export for CommonJS support. freeExports._ = _; } diff --git a/tools/eslint/node_modules/lodash/lodash.min.js b/tools/eslint/node_modules/lodash/lodash.min.js index 8b4cdf1e2c..018b6a7668 100644 --- a/tools/eslint/node_modules/lodash/lodash.min.js +++ b/tools/eslint/node_modules/lodash/lodash.min.js @@ -1,125 +1,127 @@ /** * @license - * lodash 4.11.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE - * Build: `lodash -o ./dist/lodash.js` + * lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE */ -;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false; -return true}function i(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function f(t,n){return!!t.length&&-1<d(t,n,0)}function c(t,n,r){for(var e=-1,u=t.length;++e<u;)if(r(n,t[e]))return true;return false}function a(t,n){for(var r=-1,e=t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function l(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function s(t,n,r,e){var u=-1,o=t.length;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function h(t,n,r,e){ -var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function p(t,n){for(var r=-1,e=t.length;++r<e;)if(n(t[r],r,t))return true;return false}function _(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===q?i===i:r(i,f)))var f=i,c=o}return c}function v(t,n,r,e){var u;return r(t,function(t,r,o){return n(t,r,o)?(u=e?r:t,false):void 0}),u}function g(t,n,r){for(var e=t.length,u=r?e:-1;r?u--:++u<e;)if(n(t[u],u,t))return u;return-1}function d(t,n,r){if(n!==n)return M(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r; -return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?m(t,n)/r:K}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function m(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==q&&(r=r===q?o:r+o)}return r}function w(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return a(n,function(n){return[n,t[n]]; -})}function O(t){return function(n){return t(n)}}function k(t,n){return a(n,function(n){return t[n]})}function E(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function S(t){return t&&t.Object===Object?t:null}function R(t,n){if(t!==n){var r=null===t,e=t===q,u=t===t,o=null===n,i=n===q,f=n===n;if(t>n&&!o||!u||r&&!i&&f||e&&f)return 1;if(n>t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function W(t){return function(n,r){var e; -return n===q&&r===q?0:(n!==q&&(e=n),r!==q&&(e=e===q?r:t(e,r)),e)}}function B(t){return Ut[t]}function L(t){return Dt[t]}function C(t){return"\\"+Nt[t]}function M(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1}function z(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function U(t,n){return t=typeof t=="number"||jt.test(t)?+t:-1,t>-1&&0==t%1&&(null==n?9007199254740991:n)>t}function D(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value); -return r}function $(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function F(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function N(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function P(t){if(!t||!Bt.test(t))return t.length;for(var n=Rt.lastIndex=0;Rt.test(t);)n++;return n}function Z(t){return $t[t]}function T(S){function jt(t){if(Le(t)&&!oi(t)&&!(t instanceof Et)){ -if(t instanceof kt)return t;if(xu.call(t,"__wrapped__"))return Xr(t)}return new kt(t)}function Ot(){}function kt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=q}function Et(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ut(){}function Dt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function $t(t){var n=-1,r=t?t.length:0; -for(this.__data__=new Dt;++n<r;)this.push(t[n])}function Ft(t,n){var r=t.__data__;return qr(n)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof n=="string"?r.string:r.hash)[n]):r.has(n)}function Nt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Tt(t,n){var r=Kt(t,n);return 0>r?false:(r==t.length-1?t.pop():Uu.call(t,r,1),true)}function qt(t,n){var r=Kt(t,n);return 0>r?q:t[r][1]}function Kt(t,n){for(var r=t.length;r--;)if(we(t[r][0],n))return r;return-1}function Gt(t,n,r){ -var e=Kt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Jt(t,n,r,e){return t===q||we(t,du[r])&&!xu.call(e,r)?n:t}function Qt(t,n,r){(r===q||we(t[n],r))&&(typeof n!="number"||r!==q||n in t)||(t[n]=r)}function Xt(t,n,r){var e=t[n];xu.call(t,n)&&we(e,r)&&(r!==q||n in t)||(t[n]=r)}function tn(t,n,r,e){return _o(t,function(t,u,o){n(e,t,r(t),o)}),e}function nn(t,n){return t&&ir(n,He(n),t)}function rn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?q:Ge(t,n[r]);return o}function en(t,n,r){return t===t&&(r!==q&&(t=t>r?r:t), -n!==q&&(t=n>t?n:t)),t}function un(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==q)return c;if(!Be(t))return t;if(o=oi(t)){if(c=Ur(t),!n)return or(t,c)}else{var a=Mr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(ii(t))return nr(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(z(t))return i?t:{};if(c=Dr(l?{}:t),!n)return fr(t,nn(c,t))}else{if(!zt[a])return i?t:{};c=$r(t,a,un,n)}}if(f||(f=new Nt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?dn(t,He,Cr):He(t);return u(s||t,function(u,o){ -s&&(o=u,u=t[o]),Xt(c,o,un(u,n,r,e,o,t,f))}),c}function on(t){var n=He(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===q&&!(o in Object(e))||!i(f))return false}return true}}function fn(t){return Be(t)?Cu(t):{}}function cn(t,n,r){if(typeof t!="function")throw new vu("Expected a function");return zu(function(){t.apply(q,r)},n)}function an(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,O(r))),e?(o=c,i=false):n.length>=200&&(o=Ft, -i=false,n=new $t(n));t:for(;++u<l;){var p=t[u],_=r?r(p):p;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function ln(t,n){var r=true;return _o(t,function(t,e,u){return r=!!n(t,e,u)}),r}function sn(t,n){var r=[];return _o(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function hn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Nr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?hn(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function pn(t,n){return t&&go(t,n,He)}function _n(t,n){ -return t&&yo(t,n,He)}function vn(t,n){return i(n,function(n){return Se(t[n])})}function gn(t,n){n=Tr(n,t)?[n]:Xn(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[n[r++]];return r&&r==e?t:q}function dn(t,n,r){return n=n(t),oi(t)?n:l(n,r(t))}function yn(t,n){return xu.call(t,n)||typeof t=="object"&&n in t&&null===Fu(Object(t))}function bn(t,n){return n in Object(t)}function xn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,O(n))),s=qu(p.length,s), -l[i]=r||!n&&(120>u||120>p.length)?q:new $t(i&&p)}var p=t[0],_=-1,v=l[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g;if(v?!Ft(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!Ft(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function jn(t,n,r){var e={};return pn(t,function(t,u,o){n(e,r(t),u,o)}),e}function mn(t,n,e){return Tr(n,t)||(n=Xn(n),t=Yr(t,n),n=ee(n)),n=null==t?t:t[n],null==n?q:r(n,t,e)}function wn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Be(t)&&!Le(n))n=t!==t&&n!==n;else t:{ -var o=oi(t),i=oi(n),f="[object Array]",c="[object Array]";o||(f=Mr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=Mr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!z(t),i="[object Object]"==c&&!z(n);if((c=f==c)&&!a)u||(u=new Nt),n=o||Fe(t)?Er(t,n,wn,r,e,u):Ir(t,n,f,wn,r,e,u);else{if(!(2&e)&&(o=a&&xu.call(t,"__wrapped__"),f=i&&xu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Nt),n=wn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Nt),o=2&e, -f=He(t),i=f.length,c=He(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:yn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===q?h!==p&&!wn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false; -}}return n}function An(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===q&&!(c in t))return false}else{if(f=new Nt,e)var s=e(a,l,c,t,n,f);if(s===q?!wn(l,a,e,3,f):!s)return false}}return true}function On(t){return typeof t=="function"?t:null==t?iu:typeof t=="object"?oi(t)?Sn(t[0],t[1]):In(t):lu(t)}function kn(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n); -return r}function En(t,n){var r=-1,e=ke(t)?Array(t.length):[];return _o(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function In(t){var n=Wr(t);return 1==n.length&&n[0][2]?Gr(n[0][0],n[0][1]):function(r){return r===t||An(r,t,n)}}function Sn(t,n){return Tr(t)&&n===n&&!Be(n)?Gr(t,n):function(r){var e=Ge(r,t);return e===q&&e===n?Ye(r,t):wn(n,e,q,3)}}function Rn(t,n,r,e,o){if(t!==n){if(!oi(n)&&!Fe(n))var i=Qe(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Be(u)){o||(o=new Nt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s); -if(h)Qt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):q,p=h===q;p&&(h=s,oi(s)||Fe(s)?oi(l)?h=l:Ee(l)?h=or(l):(p=false,h=un(s,true)):ze(s)||Oe(s)?Oe(l)?h=Ve(l):!Be(l)||r&&Se(l)?(p=false,h=un(s,true)):h=l:p=false),a.set(s,h),p&&Rn(h,s,r,e,a),a["delete"](s),Qt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):q,c===q&&(c=u),Qt(t,f,c)})}}function Wn(t,n){var r=t.length;return r?(n+=0>n?r:0,U(n,r)?t[n]:q):void 0}function Bn(t,n,r){var e=-1;return n=a(n.length?n:[iu],O(Rr())),t=En(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e, -c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){var c=R(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break t}}e=t.b-n.b}return e})}function Ln(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Cn(t,n){for(var r=-1,e=dn(t,Qe,wo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Mn(t){return function(n){return null==n?q:n[t]}}function zn(t){return function(n){return gn(n,t)}}function Un(t,n,r,e){ -var u=e?y:d,o=-1,i=n.length,f=t;for(r&&(f=a(t,O(r)));++o<i;)for(var c=0,l=n[o],l=r?r(l):l;-1<(c=u(f,l,c,e));)f!==t&&Uu.call(f,c,1),Uu.call(t,c,1);return t}function Dn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(e==r||u!=o){var o=u;if(U(u))Uu.call(t,u,1);else if(Tr(u,t))delete t[u];else{var u=Xn(u),i=Yr(t,u);null!=i&&delete i[ee(u)]}}}}function $n(t,n){return t+$u(Ku()*(n-t+1))}function Fn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=$u(n/2))&&(t+=t);while(n);return r; -}function Nn(t,n,r,e){n=Tr(n,t)?[n]:Xn(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=n[u];if(Be(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):q;a===q&&(a=null==l?U(n[u+1])?[]:{}:l)}Xt(f,c,a)}f=f[c]}return t}function Pn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function Zn(t,n){var r;return _o(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Tn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){ -for(;u>e;){var o=e+u>>>1,i=t[o];(r?n>=i:n>i)&&null!==i?e=o+1:u=o}return u}return qn(t,n,iu,r)}function qn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=n===q;o>u;){var a=$u((u+o)/2),l=r(t[a]),s=l!==q,h=l===l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null==l?0:e?n>=l:n>l)?u=a+1:o=a}return qu(o,4294967294)}function Vn(t,n){for(var r=0,e=t.length,u=t[0],o=n?n(u):u,i=o,f=1,c=[u];++r<e;)u=t[r],o=n?n(u):u,we(o,i)||(i=o,c[f++]=u);return c}function Kn(t,n,r){var e=-1,u=f,o=t.length,i=true,a=[],l=a; -if(r)i=false,u=c;else if(o<200)l=n?[]:a;else{if(u=n?null:xo(t))return N(u);i=false,u=Ft,l=new $t}t:for(;++e<o;){var s=t[e],h=n?n(s):s;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Gn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Pn(t,e?0:o,e?o+1:u):Pn(t,e?o+1:0,e?u:o)}function Jn(t,n){var r=t;return r instanceof Et&&(r=r.value()),s(n,function(t,n){return n.func.apply(n.thisArg,l([t],n.args)); -},r)}function Yn(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?l(an(o,t[e],n,r),an(t[e],o,n,r)):t[e];return o&&o.length?Kn(o,n,r):[]}function Hn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:q);return i}function Qn(t){return Ee(t)?t:[]}function Xn(t){return oi(t)?t:Oo(t)}function tr(t,n,r){var e=t.length;return r=r===q?e:r,n||e>r?Pn(t,n,r):t}function nr(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function rr(t){var n=new t.constructor(t.byteLength); -return new Su(n).set(new Su(t)),n}function er(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Tu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function ur(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Tu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function or(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n; -}function ir(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Xt(r,i,f)}return r}function fr(t,n){return ir(t,Cr(t),n)}function cr(t,n){return function(r,u){var o=oi(r)?e:tn,i=n?n():{};return o(r,t,Rr(u),i)}}function ar(t){return je(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:q,i=u>2?r[2]:q,o=typeof o=="function"?(u--,o):q;for(i&&Zr(r[0],r[1],i)&&(o=3>u?q:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function lr(t,n){return function(r,e){if(null==r)return r; -if(!ke(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function sr(t){return function(n,r,e){var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function hr(t,n,r){function e(){return(this&&this!==Yt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=vr(t);return e}function pr(t){return function(n){n=Ke(n);var r=Bt.test(n)?n.match(Rt):q,e=r?r[0]:n.charAt(0);return n=r?tr(r,1).join(""):n.slice(1), -e[t]()+n}}function _r(t){return function(n){return s(uu(eu(n).replace(It,"")),t,"")}}function vr(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=fn(t.prototype),n=t.apply(r,n);return Be(n)?n:r; -}}function gr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Lr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:F(f,a),i-=c.length,e>i?Ar(t,n,yr,u.placeholder,q,f,c,q,q,e-i):r(this&&this!==Yt&&this instanceof u?o:t,this,f)}var o=vr(t);return u}function dr(t){return je(function(n){n=hn(n,1);var r=n.length,e=r,u=kt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new vu("Expected a function");if(u&&!i&&"wrapper"==Sr(o))var i=new kt([],true); -}for(e=i?e:r;++e<r;)var o=n[e],u=Sr(o),f="wrapper"==u?jo(o):q,i=f&&Vr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Sr(f[0])].apply(i,f[3]):1==o.length&&Vr(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&oi(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function yr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,j=Lr(l),y=b.length;for(x=0;y--;)b[y]===j&&x++; -}if(e&&(b=er(b,e,u,_)),o&&(b=ur(b,o,i,_)),d-=x,_&&a>d)return j=F(b,j),Ar(t,n,yr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=qu(f.length,x),w=or(b);m--;){var A=f[m];b[m]=U(A,x)?w[A]:q}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Yt&&this instanceof l&&(y=g||vr(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?q:vr(t);return l}function br(t,n){return function(r,e){return jn(r,t,n(e))}}function xr(t){return je(function(n){return n=1==n.length&&oi(n[0])?a(n[0],O(Rr())):a(hn(n,1,Pr),O(Rr())), -je(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function jr(t,n){n=n===q?" ":n+"";var r=n.length;return 2>r?r?Fn(n,t):n:(r=Fn(n,Du(t/P(n))),Bt.test(n)?tr(r.match(Rt),0,t).join(""):r.slice(0,t))}function mr(t,n,e,u){function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Yt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=vr(t);return o}function wr(t){return function(n,r,e){e&&typeof e!="number"&&Zr(n,r,e)&&(r=e=q), -n=qe(n),n=n===n?n:0,r===q?(r=n,n=0):r=qe(r)||0,e=e===q?r>n?1:-1:qe(e)||0;var u=-1;r=Tu(Du((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Ar(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:q;i=l?q:i;var h=l?o:q;return o=l?q:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(q,n),Vr(t)&&Ao(r,n),r.placeholder=e,r}function Or(t){var n=pu[t];return function(t,r){if(t=qe(t),r=Ze(r)){var e=(Ke(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(Ke(e)+"e").split("e"); -return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function kr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new vu("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=q),i=i===q?i:Tu(Ze(i),0),f=f===q?f:Ze(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=q}var h=c?q:jo(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?er(e,r,h[4]):r,o[4]=e?F(o[3],"__lodash_placeholder__"):h[4]), -(r=h[5])&&(e=o[5],o[5]=e?ur(e,r,h[6]):r,o[6]=e?F(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:qu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Tu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?bo:Ao)(n&&1!=n?8==n||16==n?gr(t,n,f):32!=n&&33!=n||u.length?yr.apply(q,o):mr(t,n,r,e):hr(t,n,r),o)}function Er(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(!(a==l||f&&l>a))return false;if(l=o.get(t))return l==n; -for(l=true,o.set(t,n);++i<a;){var s=t[i],h=n[i];if(e)var _=f?e(h,s,i,n,t,o):e(s,h,i,t,n,o);if(_!==q){if(_)continue;l=false;break}if(c){if(!p(n,function(t){return s===t||r(s,t,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](t),l}function Ir(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Su(t),new Su(n)))break;return true; -case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=$;case"[object Set]":if(f||(f=N),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),Er(f(t),f(n),e,u,o,i));case"[object Symbol]":if(ho)return ho.call(t)==ho.call(n)}return false}function Sr(t){for(var n=t.name+"",r=oo[n],e=xu.call(oo,n)?r.length:0;e--;){ -var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Rr(){var t=jt.iteratee||fu,t=t===fu?On:t;return arguments.length?t(arguments[0],arguments[1]):t}function Wr(t){t=Xe(t);for(var n=t.length;n--;){var r=t[n][1];t[n][2]=r===r&&!Be(r)}return t}function Br(t,n){var r=t[n];return Ce(r)?r:q}function Lr(t){return(xu.call(jt,"placeholder")?jt:t).placeholder}function Cr(t){return Bu(Object(t))}function Mr(t){return wu.call(t)}function zr(t,n,r){n=Tr(n,t)?[n]:Xn(n);for(var e,u=-1,o=n.length;++u<o;){ -var i=n[u];if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&We(o)&&U(i,o)&&(oi(t)||De(t)||Oe(t)))}function Ur(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&xu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Dr(t){return typeof t.constructor!="function"||Kr(t)?{}:fn(Fu(Object(t)))}function $r(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return rr(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]": -return e=o?rr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=o?rr(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u($(r),true):$(r),s(e,t,new r.constructor);case"[object Number]":case"[object String]": -return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,vt.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(N(r),true):N(r),s(e,n,new r.constructor);case"[object Symbol]":return ho?Object(ho.call(r)):{}}}function Fr(t){var n=t?t.length:q;return We(n)&&(oi(t)||De(t)||Oe(t))?w(n,String):null}function Nr(t){return Ee(t)&&(oi(t)||Oe(t))}function Pr(t){return oi(t)&&!(2==t.length&&!Se(t[0]))}function Zr(t,n,r){if(!Be(r))return false;var e=typeof n;return("number"==e?ke(r)&&U(n,r.length):"string"==e&&n in r)?we(r[n],t):false; -}function Tr(t,n){var r=typeof t;return"number"==r||"symbol"==r?true:!oi(t)&&($e(t)||ot.test(t)||!ut.test(t)||null!=n&&t in Object(n))}function qr(t){var n=typeof t;return"number"==n||"boolean"==n||"string"==n&&"__proto__"!=t||null==t}function Vr(t){var n=Sr(t),r=jt[n];return typeof r=="function"&&n in Et.prototype?t===r?true:(n=jo(r),!!n&&t===n[0]):false}function Kr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||du)}function Gr(t,n){return function(r){return null==r?false:r[t]===n&&(n!==q||t in Object(r)); -}}function Jr(t,n,r,e,u,o){return Be(t)&&Be(n)&&Rn(t,n,q,Jr,o.set(n,t)),t}function Yr(t,n){return 1==n.length?t:gn(t,Pn(n,0,-1))}function Hr(t){return typeof t=="string"||$e(t)?t:t+""}function Qr(t){if(null!=t){try{return bu.call(t)}catch(n){}return t+""}return""}function Xr(t){if(t instanceof Et)return t.clone();var n=new kt(t.__wrapped__,t.__chain__);return n.__actions__=or(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function te(t,n,r){var e=t?t.length:0;return e?(n=r||n===q?1:Ze(n), -Pn(t,0>n?0:n,e)):[]}function ne(t,n,r){var e=t?t.length:0;return e?(n=r||n===q?1:Ze(n),n=e-n,Pn(t,0,0>n?0:n)):[]}function re(t){return t&&t.length?t[0]:q}function ee(t){var n=t?t.length:0;return n?t[n-1]:q}function ue(t,n){return t&&t.length&&n&&n.length?Un(t,n):t}function oe(t){return t?Ju.call(t):t}function ie(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return Ee(t)?(n=Tu(t.length,n),true):void 0}),w(n,function(n){return a(t,Mn(n))})}function fe(t,n){if(!t||!t.length)return[];var e=ie(t); -return null==n?e:a(e,function(t){return r(n,q,t)})}function ce(t){return t=jt(t),t.__chain__=true,t}function ae(t,n){return n(t)}function le(){return this}function se(t,n){return typeof n=="function"&&oi(t)?u(t,n):_o(t,Rr(n))}function he(t,n){var r;if(typeof n=="function"&&oi(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=vo(t,Rr(n));return r}function pe(t,n){return(oi(t)?a:En)(t,Rr(n,3))}function _e(t,n,r){var e=-1,u=Pe(t),o=u.length,i=o-1;for(n=(r?Zr(t,n,r):n===q)?1:en(Ze(n),0,o);++e<n;)t=$n(e,i), -r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function ve(t,n,r){return n=r?q:n,n=t&&null==n?t.length:n,kr(t,128,q,q,q,q,n)}function ge(t,n){var r;if(typeof n!="function")throw new vu("Expected a function");return t=Ze(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=q),r}}function de(t,n,r){return n=r?q:n,t=kr(t,8,q,q,q,q,q,n),t.placeholder=de.placeholder,t}function ye(t,n,r){return n=r?q:n,t=kr(t,16,q,q,q,q,q,n),t.placeholder=ye.placeholder,t}function be(t,n,r){function e(n){var r=c,e=a; -return c=a=q,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,!p||r>=n||0>r||g&&t>=l}function o(){var t=Yo();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?qu(t,l-r):t,h=zu(o,r)}function i(t){return Ru(h),h=q,d&&c?e(t):(c=a=q,s)}function f(){var t=Yo(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===q)return _=t=p,h=zu(o,n),v?e(t):s;if(g)return Ru(h),h=zu(o,n),e(p)}return h===q&&(h=zu(o,n)),s}var c,a,l,s,h,p=0,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new vu("Expected a function");return n=qe(n)||0, -Be(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Tu(qe(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==q&&Ru(h),p=_=0,c=a=h=q},f.flush=function(){return h===q?s:i(Yo())},f}function xe(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new vu("Expected a function");return r.cache=new(xe.Cache||Dt),r}function je(t,n){if(typeof t!="function")throw new vu("Expected a function"); -return n=Tu(n===q?t.length-1:Ze(n),0),function(){for(var e=arguments,u=-1,o=Tu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function me(){if(!arguments.length)return[];var t=arguments[0];return oi(t)?t:[t]}function we(t,n){return t===n||t!==t&&n!==n}function Ae(t,n){return t>n}function Oe(t){return Ee(t)&&xu.call(t,"callee")&&(!Mu.call(t,"callee")||"[object Arguments]"==wu.call(t)); -}function ke(t){return null!=t&&We(mo(t))&&!Se(t)}function Ee(t){return Le(t)&&ke(t)}function Ie(t){return Le(t)?"[object Error]"==wu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Se(t){return t=Be(t)?wu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Re(t){return typeof t=="number"&&t==Ze(t)}function We(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Be(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Le(t){ -return!!t&&typeof t=="object"}function Ce(t){return Be(t)?(Se(t)||z(t)?Ou:bt).test(Qr(t)):false}function Me(t){return typeof t=="number"||Le(t)&&"[object Number]"==wu.call(t)}function ze(t){return!Le(t)||"[object Object]"!=wu.call(t)||z(t)?false:(t=Fu(Object(t)),null===t?true:(t=xu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&bu.call(t)==mu))}function Ue(t){return Be(t)&&"[object RegExp]"==wu.call(t)}function De(t){return typeof t=="string"||!oi(t)&&Le(t)&&"[object String]"==wu.call(t); -}function $e(t){return typeof t=="symbol"||Le(t)&&"[object Symbol]"==wu.call(t)}function Fe(t){return Le(t)&&We(t.length)&&!!Mt[wu.call(t)]}function Ne(t,n){return n>t}function Pe(t){if(!t)return[];if(ke(t))return De(t)?t.match(Rt):or(t);if(Lu&&t[Lu])return D(t[Lu]());var n=Mr(t);return("[object Map]"==n?$:"[object Set]"==n?N:nu)(t)}function Ze(t){if(!t)return 0===t?t:0;if(t=qe(t),t===V||t===-V)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;return t===t?n?t-n:t:0}function Te(t){return t?en(Ze(t),0,4294967295):0; -}function qe(t){if(typeof t=="number")return t;if($e(t))return K;if(Be(t)&&(t=Se(t.valueOf)?t.valueOf():t,t=Be(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(at,"");var n=yt.test(t);return n||xt.test(t)?Zt(t.slice(2),n?2:8):dt.test(t)?K:+t}function Ve(t){return ir(t,Qe(t))}function Ke(t){if(typeof t=="string")return t;if(null==t)return"";if($e(t))return po?po.call(t):"";var n=t+"";return"0"==n&&1/t==-V?"-0":n}function Ge(t,n,r){return t=null==t?q:gn(t,n),t===q?r:t}function Je(t,n){return null!=t&&zr(t,n,yn); -}function Ye(t,n){return null!=t&&zr(t,n,bn)}function He(t){var n=Kr(t);if(!n&&!ke(t))return Zu(Object(t));var r,e=Fr(t),u=!!e,e=e||[],o=e.length;for(r in t)!yn(t,r)||u&&("length"==r||U(r,o))||n&&"constructor"==r||e.push(r);return e}function Qe(t){for(var n=-1,r=Kr(t),e=kn(t),u=e.length,o=Fr(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||U(c,f))||"constructor"==c&&(r||!xu.call(t,c))||o.push(c)}return o}function Xe(t){return A(t,He(t))}function tu(t){return A(t,Qe(t))}function nu(t){ -return t?k(t,He(t)):[]}function ru(t){return Ii(Ke(t).toLowerCase())}function eu(t){return(t=Ke(t))&&t.replace(mt,B).replace(St,"")}function uu(t,n,r){return t=Ke(t),n=r?q:n,n===q&&(n=Lt.test(t)?Wt:ht),t.match(n)||[]}function ou(t){return function(){return t}}function iu(t){return t}function fu(t){return On(typeof t=="function"?t:un(t,true))}function cu(t,n,r){var e=He(n),o=vn(n,e);null!=r||Be(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=vn(n,He(n)));var i=!(Be(r)&&"chain"in r&&!r.chain),f=Se(t);return u(o,function(r){ -var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=or(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,l([this.value()],arguments))})}),t}function au(){}function lu(t){return Tr(t)?Mn(t):zn(t)}S=S?Ht.defaults({},S,Ht.pick(Yt,Ct)):Yt;var su=S.Date,hu=S.Error,pu=S.Math,_u=S.RegExp,vu=S.TypeError,gu=S.Array.prototype,du=S.Object.prototype,yu=S.String.prototype,bu=S.Function.prototype.toString,xu=du.hasOwnProperty,ju=0,mu=bu.call(Object),wu=du.toString,Au=Yt._,Ou=_u("^"+bu.call(xu).replace(ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ku=Vt?S.Buffer:q,Eu=S.Reflect,Iu=S.Symbol,Su=S.Uint8Array,Ru=S.clearTimeout,Wu=Eu?Eu.f:q,Bu=Object.getOwnPropertySymbols,Lu=typeof(Lu=Iu&&Iu.iterator)=="symbol"?Lu:q,Cu=Object.create,Mu=du.propertyIsEnumerable,zu=S.setTimeout,Uu=gu.splice,Du=pu.ceil,$u=pu.floor,Fu=Object.getPrototypeOf,Nu=S.isFinite,Pu=gu.join,Zu=Object.keys,Tu=pu.max,qu=pu.min,Vu=S.parseInt,Ku=pu.random,Gu=yu.replace,Ju=gu.reverse,Yu=yu.split,Hu=Br(S,"DataView"),Qu=Br(S,"Map"),Xu=Br(S,"Promise"),to=Br(S,"Set"),no=Br(S,"WeakMap"),ro=Br(Object,"create"),eo=no&&new no,uo=!Mu.call({ -valueOf:1},"valueOf"),oo={},io=Qr(Hu),fo=Qr(Qu),co=Qr(Xu),ao=Qr(to),lo=Qr(no),so=Iu?Iu.prototype:q,ho=so?so.valueOf:q,po=so?so.toString:q;jt.templateSettings={escape:nt,evaluate:rt,interpolate:et,variable:"",imports:{_:jt}},jt.prototype=Ot.prototype,jt.prototype.constructor=jt,kt.prototype=fn(Ot.prototype),kt.prototype.constructor=kt,Et.prototype=fn(Ot.prototype),Et.prototype.constructor=Et,Ut.prototype=ro?ro(null):du,Dt.prototype.clear=function(){this.__data__={hash:new Ut,map:Qu?new Qu:[],string:new Ut -}},Dt.prototype["delete"]=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,t=(ro?n[t]!==q:xu.call(n,t))&&delete n[t]):t=Qu?n.map["delete"](t):Tt(n.map,t),t},Dt.prototype.get=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,ro?(t=n[t],t="__lodash_hash_undefined__"===t?q:t):t=xu.call(n,t)?n[t]:q):t=Qu?n.map.get(t):qt(n.map,t),t},Dt.prototype.has=function(t){var n=this.__data__;return qr(t)?(n=typeof t=="string"?n.string:n.hash,t=ro?n[t]!==q:xu.call(n,t)):t=Qu?n.map.has(t):-1<Kt(n.map,t), -t},Dt.prototype.set=function(t,n){var r=this.__data__;return qr(t)?(typeof t=="string"?r.string:r.hash)[t]=ro&&n===q?"__lodash_hash_undefined__":n:Qu?r.map.set(t,n):Gt(r.map,t,n),this},$t.prototype.push=function(t){var n=this.__data__;qr(t)?(n=n.__data__,(typeof t=="string"?n.string:n.hash)[t]="__lodash_hash_undefined__"):n.set(t,"__lodash_hash_undefined__")},Nt.prototype.clear=function(){this.__data__={array:[],map:null}},Nt.prototype["delete"]=function(t){var n=this.__data__,r=n.array;return r?Tt(r,t):n.map["delete"](t); -},Nt.prototype.get=function(t){var n=this.__data__,r=n.array;return r?qt(r,t):n.map.get(t)},Nt.prototype.has=function(t){var n=this.__data__,r=n.array;return r?-1<Kt(r,t):n.map.has(t)},Nt.prototype.set=function(t,n){var r=this.__data__,e=r.array;return e&&(199>e.length?Gt(e,t,n):(r.array=null,r.map=new Dt(e))),(r=r.map)&&r.set(t,n),this};var _o=lr(pn),vo=lr(_n,true),go=sr(),yo=sr(true);Wu&&!Mu.call({valueOf:1},"valueOf")&&(kn=function(t){return D(Wu(t))});var bo=eo?function(t,n){return eo.set(t,n),t}:iu,xo=to&&2===new to([1,2]).size?function(t){ -return new to(t)}:au,jo=eo?function(t){return eo.get(t)}:au,mo=Mn("length");Bu||(Cr=function(){return[]});var wo=Bu?function(t){for(var n=[];t;)l(n,Cr(t)),t=Fu(Object(t));return n}:Cr;(Hu&&"[object DataView]"!=Mr(new Hu(new ArrayBuffer(1)))||Qu&&"[object Map]"!=Mr(new Qu)||Xu&&"[object Promise]"!=Mr(Xu.resolve())||to&&"[object Set]"!=Mr(new to)||no&&"[object WeakMap]"!=Mr(new no))&&(Mr=function(t){var n=wu.call(t);if(t=(t="[object Object]"==n?t.constructor:q)?Qr(t):q)switch(t){case io:return"[object DataView]"; -case fo:return"[object Map]";case co:return"[object Promise]";case ao:return"[object Set]";case lo:return"[object WeakMap]"}return n});var Ao=function(){var t=0,n=0;return function(r,e){var u=Yo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return bo(r,e)}}(),Oo=xe(function(t){var n=[];return Ke(t).replace(it,function(t,r,e,u){n.push(e?u.replace(pt,"$1"):r||t)}),n}),ko=je(function(t,n){return Ee(t)?an(t,hn(n,1,Ee,true)):[]}),Eo=je(function(t,n){var r=ee(n);return Ee(r)&&(r=q),Ee(t)?an(t,hn(n,1,Ee,true),Rr(r)):[]; -}),Io=je(function(t,n){var r=ee(n);return Ee(r)&&(r=q),Ee(t)?an(t,hn(n,1,Ee,true),q,r):[]}),So=je(function(t){var n=a(t,Qn);return n.length&&n[0]===t[0]?xn(n):[]}),Ro=je(function(t){var n=ee(t),r=a(t,Qn);return n===ee(r)?n=q:r.pop(),r.length&&r[0]===t[0]?xn(r,Rr(n)):[]}),Wo=je(function(t){var n=ee(t),r=a(t,Qn);return n===ee(r)?n=q:r.pop(),r.length&&r[0]===t[0]?xn(r,q,n):[]}),Bo=je(ue),Lo=je(function(t,n){n=a(hn(n,1),String);var r=rn(t,n);return Dn(t,n.sort(R)),r}),Co=je(function(t){return Kn(hn(t,1,Ee,true)); -}),Mo=je(function(t){var n=ee(t);return Ee(n)&&(n=q),Kn(hn(t,1,Ee,true),Rr(n))}),zo=je(function(t){var n=ee(t);return Ee(n)&&(n=q),Kn(hn(t,1,Ee,true),q,n)}),Uo=je(function(t,n){return Ee(t)?an(t,n):[]}),Do=je(function(t){return Yn(i(t,Ee))}),$o=je(function(t){var n=ee(t);return Ee(n)&&(n=q),Yn(i(t,Ee),Rr(n))}),Fo=je(function(t){var n=ee(t);return Ee(n)&&(n=q),Yn(i(t,Ee),q,n)}),No=je(ie),Po=je(function(t){var n=t.length,n=n>1?t[n-1]:q,n=typeof n=="function"?(t.pop(),n):q;return fe(t,n)}),Zo=je(function(t){ -function n(n){return rn(n,t)}t=hn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof Et&&U(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ae,args:[n],thisArg:q}),new kt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(q),t})):this.thru(n)}),To=cr(function(t,n,r){xu.call(t,r)?++t[r]:t[r]=1}),qo=cr(function(t,n,r){xu.call(t,r)?t[r].push(n):t[r]=[n]}),Vo=je(function(t,n,e){var u=-1,o=typeof n=="function",i=Tr(n),f=ke(t)?Array(t.length):[]; -return _o(t,function(t){var c=o?n:i&&null!=t?t[n]:q;f[++u]=c?r(c,t,e):mn(t,n,e)}),f}),Ko=cr(function(t,n,r){t[r]=n}),Go=cr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Jo=je(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Zr(t,n[0],n[1])?n=[]:r>2&&Zr(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&oi(n[0])?n[0]:hn(n,1,Pr),Bn(t,n,[])}),Yo=su.now,Ho=je(function(t,n,r){var e=1;if(r.length)var u=F(r,Lr(Ho)),e=32|e;return kr(t,e,n,r,u)}),Qo=je(function(t,n,r){var e=3;if(r.length)var u=F(r,Lr(Qo)),e=32|e; -return kr(n,e,t,r,u)}),Xo=je(function(t,n){return cn(t,1,n)}),ti=je(function(t,n,r){return cn(t,qe(n)||0,r)});xe.Cache=Dt;var ni=je(function(t,n){n=1==n.length&&oi(n[0])?a(n[0],O(Rr())):a(hn(n,1,Pr),O(Rr()));var e=n.length;return je(function(u){for(var o=-1,i=qu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),ri=je(function(t,n){var r=F(n,Lr(ri));return kr(t,32,q,n,r)}),ei=je(function(t,n){var r=F(n,Lr(ei));return kr(t,64,q,n,r)}),ui=je(function(t,n){return kr(t,256,q,q,q,hn(n,1)); -}),oi=Array.isArray,ii=ku?function(t){return t instanceof ku}:ou(false),fi=ar(function(t,n){if(uo||Kr(n)||ke(n))ir(n,He(n),t);else for(var r in n)xu.call(n,r)&&Xt(t,r,n[r])}),ci=ar(function(t,n){if(uo||Kr(n)||ke(n))ir(n,Qe(n),t);else for(var r in n)Xt(t,r,n[r])}),ai=ar(function(t,n,r,e){ir(n,Qe(n),t,e)}),li=ar(function(t,n,r,e){ir(n,He(n),t,e)}),si=je(function(t,n){return rn(t,hn(n,1))}),hi=je(function(t){return t.push(q,Jt),r(ai,q,t)}),pi=je(function(t){return t.push(q,Jr),r(yi,q,t)}),_i=br(function(t,n,r){ -t[n]=r},ou(iu)),vi=br(function(t,n,r){xu.call(t,n)?t[n].push(r):t[n]=[r]},Rr),gi=je(mn),di=ar(function(t,n,r){Rn(t,n,r)}),yi=ar(function(t,n,r,e){Rn(t,n,r,e)}),bi=je(function(t,n){return null==t?{}:(n=a(hn(n,1),Hr),Ln(t,an(dn(t,Qe,wo),n)))}),xi=je(function(t,n){return null==t?{}:Ln(t,hn(n,1))}),ji=_r(function(t,n,r){return n=n.toLowerCase(),t+(r?ru(n):n)}),mi=_r(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),wi=_r(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Ai=pr("toLowerCase"),Oi=_r(function(t,n,r){ -return t+(r?"_":"")+n.toLowerCase()}),ki=_r(function(t,n,r){return t+(r?" ":"")+Ii(n)}),Ei=_r(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Ii=pr("toUpperCase"),Si=je(function(t,n){try{return r(t,q,n)}catch(e){return Ie(e)?e:new hu(e)}}),Ri=je(function(t,n){return u(hn(n,1),function(n){t[n]=Ho(t[n],t)}),t}),Wi=dr(),Bi=dr(true),Li=je(function(t,n){return function(r){return mn(r,t,n)}}),Ci=je(function(t,n){return function(r){return mn(t,r,n)}}),Mi=xr(a),zi=xr(o),Ui=xr(p),Di=wr(),$i=wr(true),Fi=W(function(t,n){ -return t+n}),Ni=Or("ceil"),Pi=W(function(t,n){return t/n}),Zi=Or("floor"),Ti=W(function(t,n){return t*n}),qi=Or("round"),Vi=W(function(t,n){return t-n});return jt.after=function(t,n){if(typeof n!="function")throw new vu("Expected a function");return t=Ze(t),function(){return 1>--t?n.apply(this,arguments):void 0}},jt.ary=ve,jt.assign=fi,jt.assignIn=ci,jt.assignInWith=ai,jt.assignWith=li,jt.at=si,jt.before=ge,jt.bind=Ho,jt.bindAll=Ri,jt.bindKey=Qo,jt.castArray=me,jt.chain=ce,jt.chunk=function(t,n,r){ -if(n=(r?Zr(t,n,r):n===q)?1:Tu(Ze(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Du(r/n));r>e;)o[u++]=Pn(t,e,e+=n);return o},jt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},jt.concat=function(){var t=arguments.length,n=me(arguments[0]);if(2>t)return t?or(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];for(var t=hn(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++r<e;)i[r]=n[r];for(;++u<o;)i[r++]=t[u];return i},jt.cond=function(t){ -var n=t?t.length:0,e=Rr();return t=n?a(t,function(t){if("function"!=typeof t[1])throw new vu("Expected a function");return[e(t[0]),t[1]]}):[],je(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},jt.conforms=function(t){return on(un(t,true))},jt.constant=ou,jt.countBy=To,jt.create=function(t,n){var r=fn(t);return n?nn(r,n):r},jt.curry=de,jt.curryRight=ye,jt.debounce=be,jt.defaults=hi,jt.defaultsDeep=pi,jt.defer=Xo,jt.delay=ti,jt.difference=ko,jt.differenceBy=Eo, -jt.differenceWith=Io,jt.drop=te,jt.dropRight=ne,jt.dropRightWhile=function(t,n){return t&&t.length?Gn(t,Rr(n,3),true,true):[]},jt.dropWhile=function(t,n){return t&&t.length?Gn(t,Rr(n,3),true):[]},jt.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Zr(t,n,r)&&(r=0,e=u),u=t.length,r=Ze(r),0>r&&(r=-r>u?0:u+r),e=e===q||e>u?u:Ze(e),0>e&&(e+=u),e=r>e?0:Te(e);e>r;)t[r++]=n;return t},jt.filter=function(t,n){return(oi(t)?i:sn)(t,Rr(n,3))},jt.flatMap=function(t,n){return hn(pe(t,n),1); -},jt.flatMapDeep=function(t,n){return hn(pe(t,n),V)},jt.flatMapDepth=function(t,n,r){return r=r===q?1:Ze(r),hn(pe(t,n),r)},jt.flatten=function(t){return t&&t.length?hn(t,1):[]},jt.flattenDeep=function(t){return t&&t.length?hn(t,V):[]},jt.flattenDepth=function(t,n){return t&&t.length?(n=n===q?1:Ze(n),hn(t,n)):[]},jt.flip=function(t){return kr(t,512)},jt.flow=Wi,jt.flowRight=Bi,jt.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},jt.functions=function(t){ -return null==t?[]:vn(t,He(t))},jt.functionsIn=function(t){return null==t?[]:vn(t,Qe(t))},jt.groupBy=qo,jt.initial=function(t){return ne(t,1)},jt.intersection=So,jt.intersectionBy=Ro,jt.intersectionWith=Wo,jt.invert=_i,jt.invertBy=vi,jt.invokeMap=Vo,jt.iteratee=fu,jt.keyBy=Ko,jt.keys=He,jt.keysIn=Qe,jt.map=pe,jt.mapKeys=function(t,n){var r={};return n=Rr(n,3),pn(t,function(t,e,u){r[n(t,e,u)]=t}),r},jt.mapValues=function(t,n){var r={};return n=Rr(n,3),pn(t,function(t,e,u){r[e]=n(t,e,u)}),r},jt.matches=function(t){ -return In(un(t,true))},jt.matchesProperty=function(t,n){return Sn(t,un(n,true))},jt.memoize=xe,jt.merge=di,jt.mergeWith=yi,jt.method=Li,jt.methodOf=Ci,jt.mixin=cu,jt.negate=function(t){if(typeof t!="function")throw new vu("Expected a function");return function(){return!t.apply(this,arguments)}},jt.nthArg=function(t){return t=Ze(t),je(function(n){return Wn(n,t)})},jt.omit=bi,jt.omitBy=function(t,n){return n=Rr(n),Cn(t,function(t,r){return!n(t,r)})},jt.once=function(t){return ge(2,t)},jt.orderBy=function(t,n,r,e){ -return null==t?[]:(oi(n)||(n=null==n?[]:[n]),r=e?q:r,oi(r)||(r=null==r?[]:[r]),Bn(t,n,r))},jt.over=Mi,jt.overArgs=ni,jt.overEvery=zi,jt.overSome=Ui,jt.partial=ri,jt.partialRight=ei,jt.partition=Go,jt.pick=xi,jt.pickBy=function(t,n){return null==t?{}:Cn(t,Rr(n))},jt.property=lu,jt.propertyOf=function(t){return function(n){return null==t?q:gn(t,n)}},jt.pull=Bo,jt.pullAll=ue,jt.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,Rr(r)):t},jt.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Un(t,n,q,r):t; -},jt.pullAt=Lo,jt.range=Di,jt.rangeRight=$i,jt.rearg=ui,jt.reject=function(t,n){var r=oi(t)?i:sn;return n=Rr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},jt.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Rr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return Dn(t,u),r},jt.rest=je,jt.reverse=oe,jt.sampleSize=_e,jt.set=function(t,n,r){return null==t?t:Nn(t,n,r)},jt.setWith=function(t,n,r,e){return e=typeof e=="function"?e:q,null==t?t:Nn(t,n,r,e)},jt.shuffle=function(t){ -return _e(t,4294967295)},jt.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&Zr(t,n,r)?(n=0,r=e):(n=null==n?0:Ze(n),r=r===q?e:Ze(r)),Pn(t,n,r)):[]},jt.sortBy=Jo,jt.sortedUniq=function(t){return t&&t.length?Vn(t):[]},jt.sortedUniqBy=function(t,n){return t&&t.length?Vn(t,Rr(n)):[]},jt.split=function(t,n,r){return r&&typeof r!="number"&&Zr(t,n,r)&&(n=r=q),r=r===q?4294967295:r>>>0,r?(t=Ke(t))&&(typeof n=="string"||null!=n&&!Ue(n))&&(n+="",""==n&&Bt.test(t))?tr(t.match(Rt),0,r):Yu.call(t,n,r):[]; -},jt.spread=function(t,n){if(typeof t!="function")throw new vu("Expected a function");return n=n===q?0:Tu(Ze(n),0),je(function(e){var u=e[n];return e=tr(e,0,n),u&&l(e,u),r(t,this,e)})},jt.tail=function(t){return te(t,1)},jt.take=function(t,n,r){return t&&t.length?(n=r||n===q?1:Ze(n),Pn(t,0,0>n?0:n)):[]},jt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===q?1:Ze(n),n=e-n,Pn(t,0>n?0:n,e)):[]},jt.takeRightWhile=function(t,n){return t&&t.length?Gn(t,Rr(n,3),false,true):[]},jt.takeWhile=function(t,n){ -return t&&t.length?Gn(t,Rr(n,3)):[]},jt.tap=function(t,n){return n(t),t},jt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new vu("Expected a function");return Be(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),be(t,n,{leading:e,maxWait:n,trailing:u})},jt.thru=ae,jt.toArray=Pe,jt.toPairs=Xe,jt.toPairsIn=tu,jt.toPath=function(t){return oi(t)?a(t,Hr):$e(t)?[t]:or(Oo(t))},jt.toPlainObject=Ve,jt.transform=function(t,n,r){var e=oi(t)||Fe(t);if(n=Rr(n,4),null==r)if(e||Be(t)){ -var o=t.constructor;r=e?oi(t)?new o:[]:Se(o)?fn(Fu(Object(t))):{}}else r={};return(e?u:pn)(t,function(t,e,u){return n(r,t,e,u)}),r},jt.unary=function(t){return ve(t,1)},jt.union=Co,jt.unionBy=Mo,jt.unionWith=zo,jt.uniq=function(t){return t&&t.length?Kn(t):[]},jt.uniqBy=function(t,n){return t&&t.length?Kn(t,Rr(n)):[]},jt.uniqWith=function(t,n){return t&&t.length?Kn(t,q,n):[]},jt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Tr(e,r)?[e]:Xn(e);r=Yr(r,e),e=ee(e),r=null!=r&&Je(r,e)?delete r[e]:true; -}return r},jt.unzip=ie,jt.unzipWith=fe,jt.update=function(t,n,r){return null==t?t:Nn(t,n,(typeof r=="function"?r:iu)(gn(t,n)),void 0)},jt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:q,null!=t&&(t=Nn(t,n,(typeof r=="function"?r:iu)(gn(t,n)),e)),t},jt.values=nu,jt.valuesIn=function(t){return null==t?[]:k(t,Qe(t))},jt.without=Uo,jt.words=uu,jt.wrap=function(t,n){return n=null==n?iu:n,ri(n,t)},jt.xor=Do,jt.xorBy=$o,jt.xorWith=Fo,jt.zip=No,jt.zipObject=function(t,n){return Hn(t||[],n||[],Xt); -},jt.zipObjectDeep=function(t,n){return Hn(t||[],n||[],Nn)},jt.zipWith=Po,jt.entries=Xe,jt.entriesIn=tu,jt.extend=ci,jt.extendWith=ai,cu(jt,jt),jt.add=Fi,jt.attempt=Si,jt.camelCase=ji,jt.capitalize=ru,jt.ceil=Ni,jt.clamp=function(t,n,r){return r===q&&(r=n,n=q),r!==q&&(r=qe(r),r=r===r?r:0),n!==q&&(n=qe(n),n=n===n?n:0),en(qe(t),n,r)},jt.clone=function(t){return un(t,false,true)},jt.cloneDeep=function(t){return un(t,true,true)},jt.cloneDeepWith=function(t,n){return un(t,true,true,n)},jt.cloneWith=function(t,n){return un(t,false,true,n); -},jt.deburr=eu,jt.divide=Pi,jt.endsWith=function(t,n,r){t=Ke(t),n=typeof n=="string"?n:n+"";var e=t.length;return r=r===q?e:en(Ze(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},jt.eq=we,jt.escape=function(t){return(t=Ke(t))&&tt.test(t)?t.replace(Q,L):t},jt.escapeRegExp=function(t){return(t=Ke(t))&&ct.test(t)?t.replace(ft,"\\$&"):t},jt.every=function(t,n,r){var e=oi(t)?o:ln;return r&&Zr(t,n,r)&&(n=q),e(t,Rr(n,3))},jt.find=function(t,n){if(n=Rr(n,3),oi(t)){var r=g(t,n);return r>-1?t[r]:q}return v(t,n,_o); -},jt.findIndex=function(t,n){return t&&t.length?g(t,Rr(n,3)):-1},jt.findKey=function(t,n){return v(t,Rr(n,3),pn,true)},jt.findLast=function(t,n){if(n=Rr(n,3),oi(t)){var r=g(t,n,true);return r>-1?t[r]:q}return v(t,n,vo)},jt.findLastIndex=function(t,n){return t&&t.length?g(t,Rr(n,3),true):-1},jt.findLastKey=function(t,n){return v(t,Rr(n,3),_n,true)},jt.floor=Zi,jt.forEach=se,jt.forEachRight=he,jt.forIn=function(t,n){return null==t?t:go(t,Rr(n),Qe)},jt.forInRight=function(t,n){return null==t?t:yo(t,Rr(n),Qe); -},jt.forOwn=function(t,n){return t&&pn(t,Rr(n))},jt.forOwnRight=function(t,n){return t&&_n(t,Rr(n))},jt.get=Ge,jt.gt=Ae,jt.gte=function(t,n){return t>=n},jt.has=Je,jt.hasIn=Ye,jt.head=re,jt.identity=iu,jt.includes=function(t,n,r,e){return t=ke(t)?t:nu(t),r=r&&!e?Ze(r):0,e=t.length,0>r&&(r=Tu(e+r,0)),De(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},jt.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=Ze(r),0>r&&(r=Tu(e+r,0)),d(t,n,r)):-1},jt.inRange=function(t,n,r){return n=qe(n)||0,r===q?(r=n, -n=0):r=qe(r)||0,t=qe(t),t>=qu(n,r)&&t<Tu(n,r)},jt.invoke=gi,jt.isArguments=Oe,jt.isArray=oi,jt.isArrayBuffer=function(t){return Le(t)&&"[object ArrayBuffer]"==wu.call(t)},jt.isArrayLike=ke,jt.isArrayLikeObject=Ee,jt.isBoolean=function(t){return true===t||false===t||Le(t)&&"[object Boolean]"==wu.call(t)},jt.isBuffer=ii,jt.isDate=function(t){return Le(t)&&"[object Date]"==wu.call(t)},jt.isElement=function(t){return!!t&&1===t.nodeType&&Le(t)&&!ze(t)},jt.isEmpty=function(t){if(ke(t)&&(oi(t)||De(t)||Se(t.splice)||Oe(t)||ii(t)))return!t.length; -if(Le(t)){var n=Mr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(xu.call(t,r))return false;return!(uo&&He(t).length)},jt.isEqual=function(t,n){return wn(t,n)},jt.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:q)?r(t,n):q;return e===q?wn(t,n,r):!!e},jt.isError=Ie,jt.isFinite=function(t){return typeof t=="number"&&Nu(t)},jt.isFunction=Se,jt.isInteger=Re,jt.isLength=We,jt.isMap=function(t){return Le(t)&&"[object Map]"==Mr(t)},jt.isMatch=function(t,n){return t===n||An(t,n,Wr(n)); -},jt.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:q,An(t,n,Wr(n),r)},jt.isNaN=function(t){return Me(t)&&t!=+t},jt.isNative=Ce,jt.isNil=function(t){return null==t},jt.isNull=function(t){return null===t},jt.isNumber=Me,jt.isObject=Be,jt.isObjectLike=Le,jt.isPlainObject=ze,jt.isRegExp=Ue,jt.isSafeInteger=function(t){return Re(t)&&t>=-9007199254740991&&9007199254740991>=t},jt.isSet=function(t){return Le(t)&&"[object Set]"==Mr(t)},jt.isString=De,jt.isSymbol=$e,jt.isTypedArray=Fe,jt.isUndefined=function(t){ -return t===q},jt.isWeakMap=function(t){return Le(t)&&"[object WeakMap]"==Mr(t)},jt.isWeakSet=function(t){return Le(t)&&"[object WeakSet]"==wu.call(t)},jt.join=function(t,n){return t?Pu.call(t,n):""},jt.kebabCase=mi,jt.last=ee,jt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==q&&(u=Ze(r),u=(0>u?Tu(e+u,0):qu(u,e-1))+1),n!==n)return M(t,u,true);for(;u--;)if(t[u]===n)return u;return-1},jt.lowerCase=wi,jt.lowerFirst=Ai,jt.lt=Ne,jt.lte=function(t,n){return n>=t},jt.max=function(t){ -return t&&t.length?_(t,iu,Ae):q},jt.maxBy=function(t,n){return t&&t.length?_(t,Rr(n),Ae):q},jt.mean=function(t){return b(t,iu)},jt.meanBy=function(t,n){return b(t,Rr(n))},jt.min=function(t){return t&&t.length?_(t,iu,Ne):q},jt.minBy=function(t,n){return t&&t.length?_(t,Rr(n),Ne):q},jt.multiply=Ti,jt.nth=function(t,n){return t&&t.length?Wn(t,Ze(n)):q},jt.noConflict=function(){return Yt._===this&&(Yt._=Au),this},jt.noop=au,jt.now=Yo,jt.pad=function(t,n,r){t=Ke(t);var e=(n=Ze(n))?P(t):0;return n&&n>e?(n=(n-e)/2, -jr($u(n),r)+t+jr(Du(n),r)):t},jt.padEnd=function(t,n,r){t=Ke(t);var e=(n=Ze(n))?P(t):0;return n&&n>e?t+jr(n-e,r):t},jt.padStart=function(t,n,r){t=Ke(t);var e=(n=Ze(n))?P(t):0;return n&&n>e?jr(n-e,r)+t:t},jt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=Ke(t).replace(at,""),Vu(t,n||(gt.test(t)?16:10))},jt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Zr(t,n,r)&&(n=r=q),r===q&&(typeof n=="boolean"?(r=n,n=q):typeof t=="boolean"&&(r=t,t=q)),t===q&&n===q?(t=0,n=1):(t=qe(t)||0,n===q?(n=t, -t=0):n=qe(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Ku(),qu(t+r*(n-t+Pt("1e-"+((r+"").length-1))),n)):$n(t,n)},jt.reduce=function(t,n,r){var e=oi(t)?s:x,u=3>arguments.length;return e(t,Rr(n,4),r,u,_o)},jt.reduceRight=function(t,n,r){var e=oi(t)?h:x,u=3>arguments.length;return e(t,Rr(n,4),r,u,vo)},jt.repeat=function(t,n,r){return n=(r?Zr(t,n,r):n===q)?1:Ze(n),Fn(Ke(t),n)},jt.replace=function(){var t=arguments,n=Ke(t[0]);return 3>t.length?n:Gu.call(n,t[1],t[2])},jt.result=function(t,n,r){n=Tr(n,t)?[n]:Xn(n); -var e=-1,u=n.length;for(u||(t=q,u=1);++e<u;){var o=null==t?q:t[n[e]];o===q&&(e=u,o=r),t=Se(o)?o.call(t):o}return t},jt.round=qi,jt.runInContext=T,jt.sample=function(t){t=ke(t)?t:nu(t);var n=t.length;return n>0?t[$n(0,n-1)]:q},jt.size=function(t){if(null==t)return 0;if(ke(t)){var n=t.length;return n&&De(t)?P(t):n}return Le(t)&&(n=Mr(t),"[object Map]"==n||"[object Set]"==n)?t.size:He(t).length},jt.snakeCase=Oi,jt.some=function(t,n,r){var e=oi(t)?p:Zn;return r&&Zr(t,n,r)&&(n=q),e(t,Rr(n,3))},jt.sortedIndex=function(t,n){ -return Tn(t,n)},jt.sortedIndexBy=function(t,n,r){return qn(t,n,Rr(r))},jt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&we(t[e],n))return e}return-1},jt.sortedLastIndex=function(t,n){return Tn(t,n,true)},jt.sortedLastIndexBy=function(t,n,r){return qn(t,n,Rr(r),true)},jt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(we(t[r],n))return r}return-1},jt.startCase=ki,jt.startsWith=function(t,n,r){return t=Ke(t),r=en(Ze(r),0,t.length),t.lastIndexOf(n,r)==r; -},jt.subtract=Vi,jt.sum=function(t){return t&&t.length?m(t,iu):0},jt.sumBy=function(t,n){return t&&t.length?m(t,Rr(n)):0},jt.template=function(t,n,r){var e=jt.templateSettings;r&&Zr(t,n,r)&&(n=q),t=Ke(t),n=ai({},n,e,Jt),r=ai({},n.imports,e.imports,Jt);var u,o,i=He(r),f=k(r,i),c=0;r=n.interpolate||wt;var a="__p+='";r=_u((n.escape||wt).source+"|"+r.source+"|"+(r===et?_t:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){ -return e||(e=i),a+=t.slice(c,l).replace(At,C),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(G,""):a).replace(J,"$1").replace(Y,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Si(function(){return Function(i,l+"return "+a).apply(q,f); -}),n.source=a,Ie(n))throw n;return n},jt.times=function(t,n){if(t=Ze(t),1>t||t>9007199254740991)return[];var r=4294967295,e=qu(t,4294967295);for(n=Rr(n),t-=4294967295,e=w(e,n);++r<t;)n(r);return e},jt.toInteger=Ze,jt.toLength=Te,jt.toLower=function(t){return Ke(t).toLowerCase()},jt.toNumber=qe,jt.toSafeInteger=function(t){return en(Ze(t),-9007199254740991,9007199254740991)},jt.toString=Ke,jt.toUpper=function(t){return Ke(t).toUpperCase()},jt.trim=function(t,n,r){return(t=Ke(t))?r||n===q?t.replace(at,""):(n+="")?(t=t.match(Rt), -n=n.match(Rt),tr(t,E(t,n),I(t,n)+1).join("")):t:t},jt.trimEnd=function(t,n,r){return(t=Ke(t))?r||n===q?t.replace(st,""):(n+="")?(t=t.match(Rt),n=I(t,n.match(Rt))+1,tr(t,0,n).join("")):t:t},jt.trimStart=function(t,n,r){return(t=Ke(t))?r||n===q?t.replace(lt,""):(n+="")?(t=t.match(Rt),n=E(t,n.match(Rt)),tr(t,n).join("")):t:t},jt.truncate=function(t,n){var r=30,e="...";if(Be(n))var u="separator"in n?n.separator:u,r="length"in n?Ze(n.length):r,e="omission"in n?Ke(n.omission):e;t=Ke(t);var o=t.length;if(Bt.test(t))var i=t.match(Rt),o=i.length; -if(r>=o)return t;if(o=r-P(e),1>o)return e;if(r=i?tr(i,0,o).join(""):t.slice(0,o),u===q)return r+e;if(i&&(o+=r.length-o),Ue(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=_u(u.source,Ke(vt.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===q?o:c)}}else t.indexOf(u,o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},jt.unescape=function(t){return(t=Ke(t))&&X.test(t)?t.replace(H,Z):t},jt.uniqueId=function(t){var n=++ju;return Ke(t)+n},jt.upperCase=Ei,jt.upperFirst=Ii, -jt.each=se,jt.eachRight=he,jt.first=re,cu(jt,function(){var t={};return pn(jt,function(n,r){xu.call(jt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),jt.VERSION="4.11.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){jt[t].placeholder=jt}),u(["drop","take"],function(t,n){Et.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Et(this);r=r===q?1:Tu(Ze(r),0);var u=this.clone();return e?u.__takeCount__=qu(r,u.__takeCount__):u.__views__.push({size:qu(r,4294967295), -type:t+(0>u.__dir__?"Right":"")}),u},Et.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Et.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Rr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Et.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right"); -Et.prototype[t]=function(){return this.__filtered__?new Et(this):this[r](1)}}),Et.prototype.compact=function(){return this.filter(iu)},Et.prototype.find=function(t){return this.filter(t).head()},Et.prototype.findLast=function(t){return this.reverse().find(t)},Et.prototype.invokeMap=je(function(t,n){return typeof t=="function"?new Et(this):this.map(function(r){return mn(r,t,n)})}),Et.prototype.reject=function(t){return t=Rr(t,3),this.filter(function(n){return!t(n)})},Et.prototype.slice=function(t,n){ -t=Ze(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Et(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==q&&(n=Ze(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Et.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Et.prototype.toArray=function(){return this.take(4294967295)},pn(Et.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=jt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(jt.prototype[n]=function(){ -function n(t){return t=u.apply(jt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Et,a=f[0],s=c||oi(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new Et(this),i=t.apply(i,f),i.__actions__.push({func:ae,args:[n],thisArg:q}),new kt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=gu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t); -jt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(oi(u)?u:[],t)}return this[r](function(r){return n.apply(oi(r)?r:[],t)})}}),pn(Et.prototype,function(t,n){var r=jt[n];if(r){var e=r.name+"";(oo[e]||(oo[e]=[])).push({name:n,func:r})}}),oo[yr(q,2).name]=[{name:"wrapper",func:q}],Et.prototype.clone=function(){var t=new Et(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__), -t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},Et.prototype.reverse=function(){if(this.__filtered__){var t=new Et(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Et.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=oi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=qu(t,f+s);break;case"takeRight": -f=Tu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=qu(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Jn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},jt.prototype.at=Zo,jt.prototype.chain=function(){return ce(this)},jt.prototype.commit=function(){return new kt(this.value(),this.__chain__)},jt.prototype.next=function(){ -this.__values__===q&&(this.__values__=Pe(this.value()));var t=this.__index__>=this.__values__.length,n=t?q:this.__values__[this.__index__++];return{done:t,value:n}},jt.prototype.plant=function(t){for(var n,r=this;r instanceof Ot;){var e=Xr(r);e.__index__=0,e.__values__=q,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},jt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Et?(this.__actions__.length&&(t=new Et(this)),t=t.reverse(),t.__actions__.push({func:ae, -args:[oe],thisArg:q}),new kt(t,this.__chain__)):this.thru(oe)},jt.prototype.toJSON=jt.prototype.valueOf=jt.prototype.value=function(){return Jn(this.__wrapped__,this.__actions__)},Lu&&(jt.prototype[Lu]=le),jt}var q,V=1/0,K=NaN,G=/\b__p\+='';/g,J=/\b(__p\+=)''\+/g,Y=/(__e\(.*?\)|\b__t\))\+'';/g,H=/&(?:amp|lt|gt|quot|#39|#96);/g,Q=/[&<>"'`]/g,X=RegExp(H.source),tt=RegExp(Q.source),nt=/<%-([\s\S]+?)%>/g,rt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ot=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ft=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ft.source),at=/^\s+|\s+$/g,lt=/^\s+/,st=/\s+$/,ht=/[a-zA-Z0-9]+/g,pt=/\\(\\)?/g,_t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,gt=/^0x/i,dt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,xt=/^0o[0-7]+$/i,jt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,Ot="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",kt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+Ot,Et="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",It=RegExp("['\u2019]","g"),St=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),Rt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Et+Ot,"g"),Wt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",kt].join("|"),"g"),Bt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Lt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ct="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Mt={}; +;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t?t.length:0;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t?t.length:0;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=t?t.length:0;r--&&false!==n(t[r],r,t);); +return t}function i(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(!n(t[r],r,t))return false;return true}function f(t,n){for(var r=-1,e=t?t.length:0,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function c(t,n){return!(!t||!t.length)&&-1<d(t,n,0)}function a(t,n,r){for(var e=-1,u=t?t.length:0;++e<u;)if(r(n,t[e]))return true;return false}function l(t,n){for(var r=-1,e=t?t.length:0,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function s(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function h(t,n,r,e){ +var u=-1,o=t?t.length:0;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function p(t,n,r,e){var u=t?t.length:0;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function _(t,n){for(var r=-1,e=t?t.length:0;++r<e;)if(n(t[r],r,t))return true;return false}function v(t,n,r){var e;return r(t,function(t,r,u){return n(t,r,u)?(e=r,false):void 0}),e}function g(t,n,r,e){var u=t.length;for(r+=e?1:-1;e?r--:++r<u;)if(n(t[r],r,t))return r;return-1}function d(t,n,r){if(n!==n)return M(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r; +return-1}function y(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;return-1}function b(t,n){var r=t?t.length:0;return r?w(t,n)/r:V}function x(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function j(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function w(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==T&&(r=r===T?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function A(t,n){return l(n,function(n){return[n,t[n]]; +})}function O(t){return function(n){return t(n)}}function k(t,n){return l(n,function(n){return t[n]})}function E(t,n){return t.has(n)}function S(t,n){for(var r=-1,e=t.length;++r<e&&-1<d(n,t[r],0););return r}function I(t,n){for(var r=t.length;r--&&-1<d(n,t[r],0););return r}function R(t){return t&&t.Object===Object?t:null}function W(t){return zt[t]}function B(t){return Ut[t]}function L(t){return"\\"+Dt[t]}function M(t,n,r){var e=t.length;for(n+=r?1:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1; +}function C(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function z(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r}function U(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function $(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function D(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function F(t){ +var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=[t,t]}),r}function N(t){if(!t||!Wt.test(t))return t.length;for(var n=It.lastIndex=0;It.test(t);)n++;return n}function P(t){return $t[t]}function Z(R){function At(t,n){return R.setTimeout.call(Kt,t,n)}function Ot(t){if(Te(t)&&!yi(t)&&!(t instanceof Ut)){if(t instanceof zt)return t;if(Wu.call(t,"__wrapped__"))return ae(t)}return new zt(t)}function kt(){}function zt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0, +this.__values__=T}function Ut(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function $t(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Dt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Pt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Zt(t){var n=-1,r=t?t.length:0; +for(this.__data__=new Pt;++n<r;)this.add(t[n])}function qt(t){this.__data__=new Dt(t)}function Vt(t,n,r,e){return t===T||Ce(t,ku[r])&&!Wu.call(e,r)?n:t}function Jt(t,n,r){(r===T||Ce(t[n],r))&&(typeof n!="number"||r!==T||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];Wu.call(t,n)&&Ce(e,r)&&(r!==T||n in t)||(t[n]=r)}function Ht(t,n){for(var r=t.length;r--;)if(Ce(t[r][0],n))return r;return-1}function Qt(t,n,r,e){return Ao(t,function(t,u,o){n(e,t,r(t),o)}),e}function Xt(t,n){return t&&sr(n,iu(n),t)} +function tn(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?T:uu(t,n[r]);return o}function nn(t,n,r){return t===t&&(r!==T&&(t=r>=t?t:r),n!==T&&(t=t>=n?t:n)),t}function rn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==T)return c;if(!Ze(t))return t;if(o=yi(t)){if(c=Kr(t),!n)return lr(t,c)}else{var a=qr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(bi(t))return or(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(C(t))return i?t:{};if(c=Gr(l?{}:t), +!n)return hr(t,Xt(c,t))}else{if(!Ct[a])return i?t:{};c=Jr(t,a,rn,n)}}if(f||(f=new qt),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?gn(t,iu,Tr):iu(t);return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,rn(u,n,r,e,o,t,f))}),c}function en(t){var n=iu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===T&&!(o in Object(e))||!i(f))return false}return true}}function un(t){return Ze(t)?Tu(t):{}}function on(t,n,r){if(typeof t!="function")throw new Au("Expected a function"); +return At(function(){t.apply(T,r)},n)}function fn(t,n,r,e){var u=-1,o=c,i=true,f=t.length,s=[],h=n.length;if(!f)return s;r&&(n=l(n,O(r))),e?(o=a,i=false):n.length>=200&&(o=E,i=false,n=new Zt(n));t:for(;++u<f;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function cn(t,n){var r=true;return Ao(t,function(t,e,u){return r=!!n(t,e,u)}),r}function an(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===T?i===i&&!Je(i):r(i,f)))var f=i,c=o; +}return c}function ln(t,n){var r=[];return Ao(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function sn(t,n,r,e,u){var o=-1,i=t.length;for(r||(r=Hr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?sn(f,n-1,r,e,u):s(u,f):e||(u[u.length]=f)}return u}function hn(t,n){return t&&ko(t,n,iu)}function pn(t,n){return t&&Eo(t,n,iu)}function _n(t,n){return f(n,function(n){return Fe(t[n])})}function vn(t,n){n=ne(n,t)?[n]:er(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[fe(n[r++])];return r&&r==e?t:T}function gn(t,n,r){ +return n=n(t),yi(t)?n:s(n,r(t))}function dn(t,n){return t>n}function yn(t,n){return null!=t&&(Wu.call(t,n)||typeof t=="object"&&n in t&&null===Ju(Object(t)))}function bn(t,n){return null!=t&&n in Object(t)}function xn(t,n,r){for(var e=r?a:c,u=t[0].length,o=t.length,i=o,f=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=l(p,O(n))),s=to(p.length,s),f[i]=!r&&(n||u>=120&&p.length>=120)?new Zt(i&&p):T}var p=t[0],_=-1,v=f[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!E(v,d):!e(h,d,r)){ +for(i=o;--i;){var y=f[i];if(y?!E(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function jn(t,n,r){var e={};return hn(t,function(t,u,o){n(e,r(t),u,o)}),e}function wn(t,n,e){return ne(n,t)||(n=er(n),t=ie(t,n),n=ve(n)),n=null==t?t:t[fe(n)],null==n?T:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!Ze(t)&&!Te(n))n=t!==t&&n!==n;else t:{var o=yi(t),i=yi(n),f="[object Array]",c="[object Array]";o||(f=qr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=qr(n), +c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!C(t),i="[object Object]"==c&&!C(n);if((c=f==c)&&!a)u||(u=new qt),n=o||Ye(t)?zr(t,n,mn,r,e,u):Ur(t,n,f,mn,r,e,u);else{if(!(2&e)&&(o=a&&Wu.call(t,"__wrapped__"),f=i&&Wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new qt),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new qt),o=2&e,f=iu(t),i=f.length,c=iu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:yn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{ +c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===T?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false}}return n}function An(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false; +}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===T&&!(c in t))return false}else{if(f=new qt,e)var s=e(a,l,c,t,n,f);if(s===T?!mn(l,a,e,3,f):!s)return false}}return true}function On(t){return!Ze(t)||Iu&&Iu in t?false:(Fe(t)||C(t)?zu:yt).test(ce(t))}function kn(t){return typeof t=="function"?t:null==t?pu:typeof t=="object"?yi(t)?Wn(t[0],t[1]):Rn(t):du(t)}function En(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function Sn(t,n){return n>t}function In(t,n){var r=-1,e=Ue(t)?Array(t.length):[]; +return Ao(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function Rn(t){var n=Pr(t);return 1==n.length&&n[0][2]?ue(n[0][0],n[0][1]):function(r){return r===t||An(r,t,n)}}function Wn(t,n){return ne(t)&&n===n&&!Ze(n)?ue(fe(t),n):function(r){var e=uu(r,t);return e===T&&e===n?ou(r,t):mn(n,e,T,3)}}function Bn(t,n,r,e,o){if(t!==n){if(!yi(n)&&!Ye(n))var i=fu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),Ze(u)){o||(o=new qt);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):T,p=h===T;p&&(h=s, +yi(s)||Ye(s)?yi(l)?h=l:$e(l)?h=lr(l):(p=false,h=rn(s,true)):Ve(s)||ze(s)?ze(l)?h=ru(l):!Ze(l)||r&&Fe(l)?(p=false,h=rn(s,true)):h=l:p=false),a.set(s,h),p&&Bn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):T,c===T&&(c=u),Jt(t,f,c)})}}function Ln(t,n){var r=t.length;return r?(n+=0>n?r:0,Xr(n,r)?t[n]:T):void 0}function Mn(t,n,r){var e=-1;return n=l(n.length?n:[pu],O(Fr())),t=In(t,function(t){return{a:l(n,function(n){return n(t)}),b:++e,c:t}}),j(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){ +var c=fr(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Cn(t,n){return t=Object(t),h(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function zn(t,n){for(var r=-1,e=gn(t,fu,Bo),u=e.length,o={};++r<u;){var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Un(t){return function(n){return null==n?T:n[t]}}function $n(t){return function(n){return vn(n,t)}}function Dn(t,n,r,e){var u=e?y:d,o=-1,i=n.length,f=t;for(t===n&&(n=lr(n)),r&&(f=l(t,O(r)));++o<i;)for(var c=0,a=n[o],a=r?r(a):a;-1<(c=u(f,a,c,e));)f!==t&&Vu.call(f,c,1), +Vu.call(t,c,1);return t}function Fn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(Xr(u))Vu.call(t,u,1);else if(ne(u,t))delete t[fe(u)];else{var u=er(u),i=ie(t,u);null!=i&&delete i[fe(ve(u))]}}}}function Nn(t,n){return t+Gu(ro()*(n-t+1))}function Pn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Gu(n/2))&&(t+=t);while(n);return r}function Zn(t,n,r,e){n=ne(n,t)?[n]:er(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=fe(n[u]);if(Ze(f)){ +var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):T;a===T&&(a=null==l?Xr(n[u+1])?[]:{}:l)}Yt(f,c,a)}f=f[c]}return t}function Tn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];return r}function qn(t,n){var r;return Ao(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Vn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Je(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u} +return Kn(t,n,pu,r)}function Kn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Je(n),a=n===T;o>u;){var l=Gu((u+o)/2),s=r(t[l]),h=s!==T,p=null===s,_=s===s,v=Je(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l}return to(o,4294967294)}function Gn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!Ce(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Jn(t){return typeof t=="number"?t:Je(t)?V:+t}function Yn(t){if(typeof t=="string")return t; +if(Je(t))return mo?mo.call(t):"";var n=t+"";return"0"==n&&1/t==-q?"-0":n}function Hn(t,n,r){var e=-1,u=c,o=t.length,i=true,f=[],l=f;if(r)i=false,u=a;else if(o>=200){if(u=n?null:Io(t))return D(u);i=false,u=E,l=new Zt}else l=n?[]:f;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),f.push(s)}else u(l,h,r)||(l!==f&&l.push(h),f.push(s))}return f}function Qn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Tn(t,e?0:o,e?o+1:u):Tn(t,e?o+1:0,e?u:o); +}function Xn(t,n){var r=t;return r instanceof Ut&&(r=r.value()),h(n,function(t,n){return n.func.apply(n.thisArg,s([t],n.args))},r)}function tr(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?s(fn(o,t[e],n,r),fn(t[e],o,n,r)):t[e];return o&&o.length?Hn(o,n,r):[]}function nr(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:T);return i}function rr(t){return $e(t)?t:[]}function er(t){return yi(t)?t:Co(t)}function ur(t,n,r){var e=t.length;return r=r===T?e:r,!n&&r>=e?t:Tn(t,n,r)}function or(t,n){ +if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ir(t){var n=new t.constructor(t.byteLength);return new Fu(n).set(new Fu(t)),n}function fr(t,n){if(t!==n){var r=t!==T,e=null===t,u=t===t,o=Je(t),i=n!==T,f=null===n,c=n===n,a=Je(n);if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function cr(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Xu(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f]; +for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function ar(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Xu(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);return s}function lr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function sr(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Yt(r,i,f)}return r}function hr(t,n){return sr(t,Tr(t),n); +}function pr(t,n){return function(r,u){var o=yi(r)?e:Qt,i=n?n():{};return o(r,t,Fr(u),i)}}function _r(t){return Me(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:T,i=u>2?r[2]:T,o=t.length>3&&typeof o=="function"?(u--,o):T;for(i&&te(r[0],r[1],i)&&(o=3>u?T:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);return n})}function vr(t,n){return function(r,e){if(null==r)return r;if(!Ue(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function gr(t){return function(n,r,e){ +var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function dr(t,n,r){function e(){return(this&&this!==Kt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=xr(t);return e}function yr(t){return function(n){n=eu(n);var r=Wt.test(n)?n.match(It):T,e=r?r[0]:n.charAt(0);return n=r?ur(r,1).join(""):n.slice(1),e[t]()+n}}function br(t){return function(n){return h(su(lu(n).replace(Et,"")),t,"")}}function xr(t){return function(){var n=arguments; +switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=un(t.prototype),n=t.apply(r,n);return Ze(n)?n:r}}function jr(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Dr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:$(f,a), +i-=c.length,e>i?Br(t,n,Ar,u.placeholder,T,f,c,T,T,e-i):r(this&&this!==Kt&&this instanceof u?o:t,this,f)}var o=xr(t);return u}function wr(t){return function(n,r,e){var u=Object(n);if(r=Fr(r,3),!Ue(n))var o=iu(n);return e=t(o||n,function(t,n){return o&&(n=t,t=u[n]),r(t,n,u)},e),e>-1?n[o?o[e]:e]:T}}function mr(t){return Me(function(n){n=sn(n,1);var r=n.length,e=r,u=zt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new Au("Expected a function");if(u&&!i&&"wrapper"==$r(o))var i=new zt([],true); +}for(e=i?e:r;++e<r;)var o=n[e],u=$r(o),f="wrapper"==u?Ro(o):T,i=f&&re(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[$r(f[0])].apply(i,f[3]):1==o.length&&re(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&yi(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function Ar(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=Array(d),b=d;b--;)y[b]=arguments[b];if(_){var x,j=Dr(l),b=y.length;for(x=0;b--;)y[b]===j&&x++; +}if(e&&(y=cr(y,e,u,_)),o&&(y=ar(y,o,i,_)),d-=x,_&&a>d)return j=$(y,j),Br(t,n,Ar,l.placeholder,r,y,j,f,c,a-d);if(j=h?r:this,b=p?j[t]:t,d=y.length,f){x=y.length;for(var w=to(f.length,x),m=lr(y);w--;){var A=f[w];y[w]=Xr(A,x)?m[A]:T}}else v&&d>1&&y.reverse();return s&&d>c&&(y.length=c),this&&this!==Kt&&this instanceof l&&(b=g||xr(b)),b.apply(j,y)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?T:xr(t);return l}function Or(t,n){return function(r,e){return jn(r,t,n(e))}}function kr(t){return function(n,r){var e; +if(n===T&&r===T)return 0;if(n!==T&&(e=n),r!==T){if(e===T)return r;typeof n=="string"||typeof r=="string"?(n=Yn(n),r=Yn(r)):(n=Jn(n),r=Jn(r)),e=t(n,r)}return e}}function Er(t){return Me(function(n){return n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr())),Me(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Sr(t,n){n=n===T?" ":Yn(n);var r=n.length;return 2>r?r?Pn(n,t):n:(r=Pn(n,Ku(t/N(n))),Wt.test(n)?ur(r.match(It),0,t).join(""):r.slice(0,t))}function Ir(t,n,e,u){ +function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Kt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=xr(t);return o}function Rr(t){return function(n,r,e){e&&typeof e!="number"&&te(n,r,e)&&(r=e=T),n=nu(n),n=n===n?n:0,r===T?(r=n,n=0):r=nu(r)||0,e=e===T?r>n?1:-1:nu(e)||0;var u=-1;r=Xu(Ku((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Wr(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=nu(n), +r=nu(r)),t(n,r)}}function Br(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:T;i=l?T:i;var h=l?o:T;return o=l?T:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(T,n),re(t)&&Mo(r,n),r.placeholder=e,r}function Lr(t){var n=wu[t];return function(t,r){if(t=nu(t),r=to(Xe(r),292)){var e=(eu(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(eu(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Mr(t){return function(n){var r=qr(n);return"[object Map]"==r?U(n):"[object Set]"==r?F(n):A(n,t(n)); +}}function Cr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new Au("Expected a function");var a=e?e.length:0;if(a||(n&=-97,e=u=T),i=i===T?i:Xu(Xe(i),0),f=f===T?f:Xe(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=T}var h=c?T:Ro(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?cr(e,r,h[4]):r,o[4]=e?$(o[3],"__lodash_placeholder__"):h[4]), +(r=h[5])&&(e=o[5],o[5]=e?ar(e,r,h[6]):r,o[6]=e?$(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),128&t&&(o[8]=null==o[8]?h[8]:to(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Xu(o[9]-a,0),!f&&24&n&&(n&=-25),(h?So:Mo)(n&&1!=n?8==n||16==n?jr(t,n,f):32!=n&&33!=n||u.length?Ar.apply(T,o):Ir(t,n,r,e):dr(t,n,r),o)}function zr(t,n,r,e,u,o){var i=2&u,f=t.length,c=n.length;if(f!=c&&!(i&&c>f))return false;if(c=o.get(t))return c==n; +var c=-1,a=true,l=1&u?new Zt:T;for(o.set(t,n);++c<f;){var s=t[c],h=n[c];if(e)var p=i?e(h,s,c,n,t,o):e(s,h,c,t,n,o);if(p!==T){if(p)continue;a=false;break}if(l){if(!_(n,function(t,n){return l.has(n)||s!==t&&!r(s,t,e,u,o)?void 0:l.add(n)})){a=false;break}}else if(s!==h&&!r(s,h,e,u,o)){a=false;break}}return o["delete"](t),a}function Ur(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Fu(t),new Fu(n)))break; +return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=U;case"[object Set]":if(f||(f=D),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),zr(f(t),f(n),e,u,o,i));case"[object Symbol]":if(wo)return wo.call(t)==wo.call(n)}return false}function $r(t){for(var n=t.name+"",r=_o[n],e=Wu.call(_o,n)?r.length:0;e--;){ +var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Dr(t){return(Wu.call(Ot,"placeholder")?Ot:t).placeholder}function Fr(){var t=Ot.iteratee||_u,t=t===_u?kn:t;return arguments.length?t(arguments[0],arguments[1]):t}function Nr(t,n){var r=t.__data__,e=typeof n;return("string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?r[typeof n=="string"?"string":"hash"]:r.map}function Pr(t){for(var n=iu(t),r=n.length;r--;){var e=n[r],u=t[e];n[r]=[e,u,u===u&&!Ze(u)]}return n; +}function Zr(t,n){var r=null==t?T:t[n];return On(r)?r:T}function Tr(t){return Pu(Object(t))}function qr(t){return Mu.call(t)}function Vr(t,n,r){n=ne(n,t)?[n]:er(n);for(var e,u=-1,o=n.length;++u<o;){var i=fe(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Pe(o)&&Xr(i,o)&&(yi(t)||Ge(t)||ze(t)))}function Kr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&Wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gr(t){return typeof t.constructor!="function"||ee(t)?{}:un(Ju(Object(t))); +}function Jr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ir(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]": +return e=o?ir(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(U(r),true):U(r),h(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,_t.exec(r)),e.lastIndex=r.lastIndex,e;case"[object Set]":return e=o?u(D(r),true):D(r),h(e,n,new r.constructor);case"[object Symbol]":return wo?Object(wo.call(r)):{}}}function Yr(t){var n=t?t.length:T;return Pe(n)&&(yi(t)||Ge(t)||ze(t))?m(n,String):null; +}function Hr(t){return yi(t)||ze(t)}function Qr(t){return yi(t)&&!(2==t.length&&!Fe(t[0]))}function Xr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||xt.test(t))&&t>-1&&0==t%1&&n>t}function te(t,n,r){if(!Ze(r))return false;var e=typeof n;return("number"==e?Ue(r)&&Xr(n,r.length):"string"==e&&n in r)?Ce(r[n],t):false}function ne(t,n){if(yi(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Je(t)?true:ut.test(t)||!et.test(t)||null!=n&&t in Object(n)}function re(t){ +var n=$r(t),r=Ot[n];return typeof r=="function"&&n in Ut.prototype?t===r?true:(n=Ro(r),!!n&&t===n[0]):false}function ee(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||ku)}function ue(t,n){return function(r){return null==r?false:r[t]===n&&(n!==T||t in Object(r))}}function oe(t,n,r,e,u,o){return Ze(t)&&Ze(n)&&Bn(t,n,T,oe,o.set(n,t)),t}function ie(t,n){return 1==n.length?t:vn(t,Tn(n,0,-1))}function fe(t){if(typeof t=="string"||Je(t))return t;var n=t+"";return"0"==n&&1/t==-q?"-0":n}function ce(t){ +if(null!=t){try{return Ru.call(t)}catch(n){}return t+""}return""}function ae(t){if(t instanceof Ut)return t.clone();var n=new zt(t.__wrapped__,t.__chain__);return n.__actions__=lr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function le(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),Tn(t,0>n?0:n,e)):[]}function se(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0,0>n?0:n)):[]}function he(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)), +g(t,Fr(n,3),r)):-1}function pe(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e-1;return r!==T&&(u=Xe(r),u=0>r?Xu(e+u,0):to(u,e-1)),g(t,Fr(n,3),u,true)}function _e(t){return t&&t.length?t[0]:T}function ve(t){var n=t?t.length:0;return n?t[n-1]:T}function ge(t,n){return t&&t.length&&n&&n.length?Dn(t,n):t}function de(t){return t?uo.call(t):t}function ye(t){if(!t||!t.length)return[];var n=0;return t=f(t,function(t){return $e(t)?(n=Xu(t.length,n),true):void 0}),m(n,function(n){return l(t,Un(n))})}function be(t,n){ +if(!t||!t.length)return[];var e=ye(t);return null==n?e:l(e,function(t){return r(n,T,t)})}function xe(t){return t=Ot(t),t.__chain__=true,t}function je(t,n){return n(t)}function we(){return this}function me(t,n){return(yi(t)?u:Ao)(t,Fr(n,3))}function Ae(t,n){return(yi(t)?o:Oo)(t,Fr(n,3))}function Oe(t,n){return(yi(t)?l:In)(t,Fr(n,3))}function ke(t,n,r){var e=-1,u=He(t),o=u.length,i=o-1;for(n=(r?te(t,n,r):n===T)?1:nn(Xe(n),0,o);++e<n;)t=Nn(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function Ee(){ +return xu.now()}function Se(t,n,r){return n=r?T:n,n=t&&null==n?t.length:n,Cr(t,128,T,T,T,T,n)}function Ie(t,n){var r;if(typeof n!="function")throw new Au("Expected a function");return t=Xe(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=T),r}}function Re(t,n,r){return n=r?T:n,t=Cr(t,8,T,T,T,T,T,n),t.placeholder=Re.placeholder,t}function We(t,n,r){return n=r?T:n,t=Cr(t,16,T,T,T,T,T,n),t.placeholder=We.placeholder,t}function Be(t,n,r){function e(n){var r=c,e=a;return c=a=T,_=n,s=t.apply(e,r); +}function u(t){var r=t-p;return t-=_,p===T||r>=n||0>r||g&&t>=l}function o(){var t=Ee();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?to(t,l-r):t,h=At(o,r)}function i(t){return h=T,d&&c?e(t):(c=a=T,s)}function f(){var t=Ee(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===T)return _=t=p,h=At(o,n),v?e(t):s;if(g)return h=At(o,n),e(p)}return h===T&&(h=At(o,n)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof t!="function")throw new Au("Expected a function");return n=nu(n)||0,Ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Xu(nu(r.maxWait)||0,n):l, +d="trailing"in r?!!r.trailing:d),f.cancel=function(){_=0,c=p=a=h=T},f.flush=function(){return h===T?s:i(Ee())},f}function Le(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new Au("Expected a function");return r.cache=new(Le.Cache||Pt),r}function Me(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=Xu(n===T?t.length-1:Xe(n),0),function(){ +for(var e=arguments,u=-1,o=Xu(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function Ce(t,n){return t===n||t!==t&&n!==n}function ze(t){return $e(t)&&Wu.call(t,"callee")&&(!qu.call(t,"callee")||"[object Arguments]"==Mu.call(t))}function Ue(t){return null!=t&&Pe(Wo(t))&&!Fe(t)}function $e(t){return Te(t)&&Ue(t)}function De(t){ +return Te(t)?"[object Error]"==Mu.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Fe(t){return t=Ze(t)?Mu.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Ne(t){return typeof t=="number"&&t==Xe(t)}function Pe(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t}function Ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Te(t){return!!t&&typeof t=="object"}function qe(t){return typeof t=="number"||Te(t)&&"[object Number]"==Mu.call(t); +}function Ve(t){return!Te(t)||"[object Object]"!=Mu.call(t)||C(t)?false:(t=Ju(Object(t)),null===t?true:(t=Wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&Ru.call(t)==Lu))}function Ke(t){return Ze(t)&&"[object RegExp]"==Mu.call(t)}function Ge(t){return typeof t=="string"||!yi(t)&&Te(t)&&"[object String]"==Mu.call(t)}function Je(t){return typeof t=="symbol"||Te(t)&&"[object Symbol]"==Mu.call(t)}function Ye(t){return Te(t)&&Pe(t.length)&&!!Mt[Mu.call(t)]}function He(t){if(!t)return[]; +if(Ue(t))return Ge(t)?t.match(It):lr(t);if(Zu&&t[Zu])return z(t[Zu]());var n=qr(t);return("[object Map]"==n?U:"[object Set]"==n?D:cu)(t)}function Qe(t){return t?(t=nu(t),t===q||t===-q?1.7976931348623157e308*(0>t?-1:1):t===t?t:0):0===t?t:0}function Xe(t){t=Qe(t);var n=t%1;return t===t?n?t-n:t:0}function tu(t){return t?nn(Xe(t),0,4294967295):0}function nu(t){if(typeof t=="number")return t;if(Je(t))return V;if(Ze(t)&&(t=Fe(t.valueOf)?t.valueOf():t,t=Ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t; +t=t.replace(ct,"");var n=dt.test(t);return n||bt.test(t)?Nt(t.slice(2),n?2:8):gt.test(t)?V:+t}function ru(t){return sr(t,fu(t))}function eu(t){return null==t?"":Yn(t)}function uu(t,n,r){return t=null==t?T:vn(t,n),t===T?r:t}function ou(t,n){return null!=t&&Vr(t,n,bn)}function iu(t){var n=ee(t);if(!n&&!Ue(t))return Qu(Object(t));var r,e=Yr(t),u=!!e,e=e||[],o=e.length;for(r in t)!yn(t,r)||u&&("length"==r||Xr(r,o))||n&&"constructor"==r||e.push(r);return e}function fu(t){for(var n=-1,r=ee(t),e=En(t),u=e.length,o=Yr(t),i=!!o,o=o||[],f=o.length;++n<u;){ +var c=e[n];i&&("length"==c||Xr(c,f))||"constructor"==c&&(r||!Wu.call(t,c))||o.push(c)}return o}function cu(t){return t?k(t,iu(t)):[]}function au(t){return qi(eu(t).toLowerCase())}function lu(t){return(t=eu(t))&&t.replace(jt,W).replace(St,"")}function su(t,n,r){return t=eu(t),n=r?T:n,n===T&&(n=Bt.test(t)?Rt:st),t.match(n)||[]}function hu(t){return function(){return t}}function pu(t){return t}function _u(t){return kn(typeof t=="function"?t:rn(t,true))}function vu(t,n,r){var e=iu(n),o=_n(n,e);null!=r||Ze(n)&&(o.length||!e.length)||(r=n, +n=t,t=this,o=_n(n,iu(n)));var i=!(Ze(r)&&"chain"in r&&!r.chain),f=Fe(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=lr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,s([this.value()],arguments))})}),t}function gu(){}function du(t){return ne(t)?Un(fe(t)):$n(t)}function yu(){return[]}function bu(){return false}R=R?Gt.defaults({},R,Gt.pick(Kt,Lt)):Kt;var xu=R.Date,ju=R.Error,wu=R.Math,mu=R.RegExp,Au=R.TypeError,Ou=R.Array.prototype,ku=R.Object.prototype,Eu=R.String.prototype,Su=R["__core-js_shared__"],Iu=function(){ +var t=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ru=R.Function.prototype.toString,Wu=ku.hasOwnProperty,Bu=0,Lu=Ru.call(Object),Mu=ku.toString,Cu=Kt._,zu=mu("^"+Ru.call(Wu).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Uu=Tt?R.Buffer:T,$u=R.Reflect,Du=R.Symbol,Fu=R.Uint8Array,Nu=$u?$u.f:T,Pu=Object.getOwnPropertySymbols,Zu=typeof(Zu=Du&&Du.iterator)=="symbol"?Zu:T,Tu=Object.create,qu=ku.propertyIsEnumerable,Vu=Ou.splice,Ku=wu.ceil,Gu=wu.floor,Ju=Object.getPrototypeOf,Yu=R.isFinite,Hu=Ou.join,Qu=Object.keys,Xu=wu.max,to=wu.min,no=R.parseInt,ro=wu.random,eo=Eu.replace,uo=Ou.reverse,oo=Eu.split,io=Zr(R,"DataView"),fo=Zr(R,"Map"),co=Zr(R,"Promise"),ao=Zr(R,"Set"),lo=Zr(R,"WeakMap"),so=Zr(Object,"create"),ho=lo&&new lo,po=!qu.call({ +valueOf:1},"valueOf"),_o={},vo=ce(io),go=ce(fo),yo=ce(co),bo=ce(ao),xo=ce(lo),jo=Du?Du.prototype:T,wo=jo?jo.valueOf:T,mo=jo?jo.toString:T;Ot.templateSettings={escape:tt,evaluate:nt,interpolate:rt,variable:"",imports:{_:Ot}},Ot.prototype=kt.prototype,Ot.prototype.constructor=Ot,zt.prototype=un(kt.prototype),zt.prototype.constructor=zt,Ut.prototype=un(kt.prototype),Ut.prototype.constructor=Ut,$t.prototype.clear=function(){this.__data__=so?so(null):{}},$t.prototype["delete"]=function(t){return this.has(t)&&delete this.__data__[t]; +},$t.prototype.get=function(t){var n=this.__data__;return so?(t=n[t],"__lodash_hash_undefined__"===t?T:t):Wu.call(n,t)?n[t]:T},$t.prototype.has=function(t){var n=this.__data__;return so?n[t]!==T:Wu.call(n,t)},$t.prototype.set=function(t,n){return this.__data__[t]=so&&n===T?"__lodash_hash_undefined__":n,this},Dt.prototype.clear=function(){this.__data__=[]},Dt.prototype["delete"]=function(t){var n=this.__data__;return t=Ht(n,t),0>t?false:(t==n.length-1?n.pop():Vu.call(n,t,1),true)},Dt.prototype.get=function(t){ +var n=this.__data__;return t=Ht(n,t),0>t?T:n[t][1]},Dt.prototype.has=function(t){return-1<Ht(this.__data__,t)},Dt.prototype.set=function(t,n){var r=this.__data__,e=Ht(r,t);return 0>e?r.push([t,n]):r[e][1]=n,this},Pt.prototype.clear=function(){this.__data__={hash:new $t,map:new(fo||Dt),string:new $t}},Pt.prototype["delete"]=function(t){return Nr(this,t)["delete"](t)},Pt.prototype.get=function(t){return Nr(this,t).get(t)},Pt.prototype.has=function(t){return Nr(this,t).has(t)},Pt.prototype.set=function(t,n){ +return Nr(this,t).set(t,n),this},Zt.prototype.add=Zt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Zt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.clear=function(){this.__data__=new Dt},qt.prototype["delete"]=function(t){return this.__data__["delete"](t)},qt.prototype.get=function(t){return this.__data__.get(t)},qt.prototype.has=function(t){return this.__data__.has(t)},qt.prototype.set=function(t,n){var r=this.__data__;return r instanceof Dt&&200==r.__data__.length&&(r=this.__data__=new Pt(r.__data__)), +r.set(t,n),this};var Ao=vr(hn),Oo=vr(pn,true),ko=gr(),Eo=gr(true);Nu&&!qu.call({valueOf:1},"valueOf")&&(En=function(t){return z(Nu(t))});var So=ho?function(t,n){return ho.set(t,n),t}:pu,Io=ao&&1/D(new ao([,-0]))[1]==q?function(t){return new ao(t)}:gu,Ro=ho?function(t){return ho.get(t)}:gu,Wo=Un("length");Pu||(Tr=yu);var Bo=Pu?function(t){for(var n=[];t;)s(n,Tr(t)),t=Ju(Object(t));return n}:Tr;(io&&"[object DataView]"!=qr(new io(new ArrayBuffer(1)))||fo&&"[object Map]"!=qr(new fo)||co&&"[object Promise]"!=qr(co.resolve())||ao&&"[object Set]"!=qr(new ao)||lo&&"[object WeakMap]"!=qr(new lo))&&(qr=function(t){ +var n=Mu.call(t);if(t=(t="[object Object]"==n?t.constructor:T)?ce(t):T)switch(t){case vo:return"[object DataView]";case go:return"[object Map]";case yo:return"[object Promise]";case bo:return"[object Set]";case xo:return"[object WeakMap]"}return n});var Lo=Su?Fe:bu,Mo=function(){var t=0,n=0;return function(r,e){var u=Ee(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return So(r,e)}}(),Co=Le(function(t){var n=[];return eu(t).replace(ot,function(t,r,e,u){n.push(e?u.replace(ht,"$1"):r||t)}), +n}),zo=Me(function(t,n){return $e(t)?fn(t,sn(n,1,$e,true)):[]}),Uo=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),Fr(r)):[]}),$o=Me(function(t,n){var r=ve(n);return $e(r)&&(r=T),$e(t)?fn(t,sn(n,1,$e,true),T,r):[]}),Do=Me(function(t){var n=l(t,rr);return n.length&&n[0]===t[0]?xn(n):[]}),Fo=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,Fr(n)):[]}),No=Me(function(t){var n=ve(t),r=l(t,rr);return n===ve(r)?n=T:r.pop(),r.length&&r[0]===t[0]?xn(r,T,n):[]; +}),Po=Me(ge),Zo=Me(function(t,n){n=sn(n,1);var r=t?t.length:0,e=tn(t,n);return Fn(t,l(n,function(t){return Xr(t,r)?+t:t}).sort(fr)),e}),To=Me(function(t){return Hn(sn(t,1,$e,true))}),qo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),Fr(n))}),Vo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),Hn(sn(t,1,$e,true),T,n)}),Ko=Me(function(t,n){return $e(t)?fn(t,n):[]}),Go=Me(function(t){return tr(f(t,$e))}),Jo=Me(function(t){var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),Fr(n))}),Yo=Me(function(t){ +var n=ve(t);return $e(n)&&(n=T),tr(f(t,$e),T,n)}),Ho=Me(ye),Qo=Me(function(t){var n=t.length,n=n>1?t[n-1]:T,n=typeof n=="function"?(t.pop(),n):T;return be(t,n)}),Xo=Me(function(t){function n(n){return tn(n,t)}t=sn(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Ut&&Xr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:je,args:[n],thisArg:T}),new zt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(T),t})):this.thru(n)}),ti=pr(function(t,n,r){ +Wu.call(t,r)?++t[r]:t[r]=1}),ni=wr(he),ri=wr(pe),ei=pr(function(t,n,r){Wu.call(t,r)?t[r].push(n):t[r]=[n]}),ui=Me(function(t,n,e){var u=-1,o=typeof n=="function",i=ne(n),f=Ue(t)?Array(t.length):[];return Ao(t,function(t){var c=o?n:i&&null!=t?t[n]:T;f[++u]=c?r(c,t,e):wn(t,n,e)}),f}),oi=pr(function(t,n,r){t[r]=n}),ii=pr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),fi=Me(function(t,n){if(null==t)return[];var r=n.length;return r>1&&te(t,n[0],n[1])?n=[]:r>2&&te(n[0],n[1],n[2])&&(n=[n[0]]), +n=1==n.length&&yi(n[0])?n[0]:sn(n,1,Qr),Mn(t,n,[])}),ci=Me(function(t,n,r){var e=1;if(r.length)var u=$(r,Dr(ci)),e=32|e;return Cr(t,e,n,r,u)}),ai=Me(function(t,n,r){var e=3;if(r.length)var u=$(r,Dr(ai)),e=32|e;return Cr(n,e,t,r,u)}),li=Me(function(t,n){return on(t,1,n)}),si=Me(function(t,n,r){return on(t,nu(n)||0,r)});Le.Cache=Pt;var hi=Me(function(t,n){n=1==n.length&&yi(n[0])?l(n[0],O(Fr())):l(sn(n,1,Qr),O(Fr()));var e=n.length;return Me(function(u){for(var o=-1,i=to(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]); +return r(t,this,u)})}),pi=Me(function(t,n){var r=$(n,Dr(pi));return Cr(t,32,T,n,r)}),_i=Me(function(t,n){var r=$(n,Dr(_i));return Cr(t,64,T,n,r)}),vi=Me(function(t,n){return Cr(t,256,T,T,T,sn(n,1))}),gi=Wr(dn),di=Wr(function(t,n){return t>=n}),yi=Array.isArray,bi=Uu?function(t){return t instanceof Uu}:bu,xi=Wr(Sn),ji=Wr(function(t,n){return n>=t}),wi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,iu(n),t);else for(var r in n)Wu.call(n,r)&&Yt(t,r,n[r])}),mi=_r(function(t,n){if(po||ee(n)||Ue(n))sr(n,fu(n),t);else for(var r in n)Yt(t,r,n[r]); +}),Ai=_r(function(t,n,r,e){sr(n,fu(n),t,e)}),Oi=_r(function(t,n,r,e){sr(n,iu(n),t,e)}),ki=Me(function(t,n){return tn(t,sn(n,1))}),Ei=Me(function(t){return t.push(T,Vt),r(Ai,T,t)}),Si=Me(function(t){return t.push(T,oe),r(Li,T,t)}),Ii=Or(function(t,n,r){t[n]=r},hu(pu)),Ri=Or(function(t,n,r){Wu.call(t,n)?t[n].push(r):t[n]=[r]},Fr),Wi=Me(wn),Bi=_r(function(t,n,r){Bn(t,n,r)}),Li=_r(function(t,n,r,e){Bn(t,n,r,e)}),Mi=Me(function(t,n){return null==t?{}:(n=l(sn(n,1),fe),Cn(t,fn(gn(t,fu,Bo),n)))}),Ci=Me(function(t,n){ +return null==t?{}:Cn(t,l(sn(n,1),fe))}),zi=Mr(iu),Ui=Mr(fu),$i=br(function(t,n,r){return n=n.toLowerCase(),t+(r?au(n):n)}),Di=br(function(t,n,r){return t+(r?"-":"")+n.toLowerCase()}),Fi=br(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Ni=yr("toLowerCase"),Pi=br(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Zi=br(function(t,n,r){return t+(r?" ":"")+qi(n)}),Ti=br(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),qi=yr("toUpperCase"),Vi=Me(function(t,n){try{return r(t,T,n)}catch(e){ +return De(e)?e:new ju(e)}}),Ki=Me(function(t,n){return u(sn(n,1),function(n){n=fe(n),t[n]=ci(t[n],t)}),t}),Gi=mr(),Ji=mr(true),Yi=Me(function(t,n){return function(r){return wn(r,t,n)}}),Hi=Me(function(t,n){return function(r){return wn(t,r,n)}}),Qi=Er(l),Xi=Er(i),tf=Er(_),nf=Rr(),rf=Rr(true),ef=kr(function(t,n){return t+n}),uf=Lr("ceil"),of=kr(function(t,n){return t/n}),ff=Lr("floor"),cf=kr(function(t,n){return t*n}),af=Lr("round"),lf=kr(function(t,n){return t-n});return Ot.after=function(t,n){if(typeof n!="function")throw new Au("Expected a function"); +return t=Xe(t),function(){return 1>--t?n.apply(this,arguments):void 0}},Ot.ary=Se,Ot.assign=wi,Ot.assignIn=mi,Ot.assignInWith=Ai,Ot.assignWith=Oi,Ot.at=ki,Ot.before=Ie,Ot.bind=ci,Ot.bindAll=Ki,Ot.bindKey=ai,Ot.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return yi(t)?t:[t]},Ot.chain=xe,Ot.chunk=function(t,n,r){if(n=(r?te(t,n,r):n===T)?1:Xu(Xe(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Ku(r/n));r>e;)o[u++]=Tn(t,e,e+=n);return o},Ot.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){ +var o=t[n];o&&(u[e++]=o)}return u},Ot.concat=function(){for(var t=arguments.length,n=Array(t?t-1:0),r=arguments[0],e=t;e--;)n[e-1]=arguments[e];return t?s(yi(r)?lr(r):[r],sn(n,1)):[]},Ot.cond=function(t){var n=t?t.length:0,e=Fr();return t=n?l(t,function(t){if("function"!=typeof t[1])throw new Au("Expected a function");return[e(t[0]),t[1]]}):[],Me(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},Ot.conforms=function(t){return en(rn(t,true))},Ot.constant=hu,Ot.countBy=ti, +Ot.create=function(t,n){var r=un(t);return n?Xt(r,n):r},Ot.curry=Re,Ot.curryRight=We,Ot.debounce=Be,Ot.defaults=Ei,Ot.defaultsDeep=Si,Ot.defer=li,Ot.delay=si,Ot.difference=zo,Ot.differenceBy=Uo,Ot.differenceWith=$o,Ot.drop=le,Ot.dropRight=se,Ot.dropRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true,true):[]},Ot.dropWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),true):[]},Ot.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&te(t,n,r)&&(r=0,e=u),u=t.length, +r=Xe(r),0>r&&(r=-r>u?0:u+r),e=e===T||e>u?u:Xe(e),0>e&&(e+=u),e=r>e?0:tu(e);e>r;)t[r++]=n;return t},Ot.filter=function(t,n){return(yi(t)?f:ln)(t,Fr(n,3))},Ot.flatMap=function(t,n){return sn(Oe(t,n),1)},Ot.flatMapDeep=function(t,n){return sn(Oe(t,n),q)},Ot.flatMapDepth=function(t,n,r){return r=r===T?1:Xe(r),sn(Oe(t,n),r)},Ot.flatten=function(t){return t&&t.length?sn(t,1):[]},Ot.flattenDeep=function(t){return t&&t.length?sn(t,q):[]},Ot.flattenDepth=function(t,n){return t&&t.length?(n=n===T?1:Xe(n),sn(t,n)):[]; +},Ot.flip=function(t){return Cr(t,512)},Ot.flow=Gi,Ot.flowRight=Ji,Ot.fromPairs=function(t){for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},Ot.functions=function(t){return null==t?[]:_n(t,iu(t))},Ot.functionsIn=function(t){return null==t?[]:_n(t,fu(t))},Ot.groupBy=ei,Ot.initial=function(t){return se(t,1)},Ot.intersection=Do,Ot.intersectionBy=Fo,Ot.intersectionWith=No,Ot.invert=Ii,Ot.invertBy=Ri,Ot.invokeMap=ui,Ot.iteratee=_u,Ot.keyBy=oi,Ot.keys=iu,Ot.keysIn=fu,Ot.map=Oe, +Ot.mapKeys=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[n(t,e,u)]=t}),r},Ot.mapValues=function(t,n){var r={};return n=Fr(n,3),hn(t,function(t,e,u){r[e]=n(t,e,u)}),r},Ot.matches=function(t){return Rn(rn(t,true))},Ot.matchesProperty=function(t,n){return Wn(t,rn(n,true))},Ot.memoize=Le,Ot.merge=Bi,Ot.mergeWith=Li,Ot.method=Yi,Ot.methodOf=Hi,Ot.mixin=vu,Ot.negate=function(t){if(typeof t!="function")throw new Au("Expected a function");return function(){return!t.apply(this,arguments)}},Ot.nthArg=function(t){ +return t=Xe(t),Me(function(n){return Ln(n,t)})},Ot.omit=Mi,Ot.omitBy=function(t,n){return n=Fr(n),zn(t,function(t,r){return!n(t,r)})},Ot.once=function(t){return Ie(2,t)},Ot.orderBy=function(t,n,r,e){return null==t?[]:(yi(n)||(n=null==n?[]:[n]),r=e?T:r,yi(r)||(r=null==r?[]:[r]),Mn(t,n,r))},Ot.over=Qi,Ot.overArgs=hi,Ot.overEvery=Xi,Ot.overSome=tf,Ot.partial=pi,Ot.partialRight=_i,Ot.partition=ii,Ot.pick=Ci,Ot.pickBy=function(t,n){return null==t?{}:zn(t,Fr(n))},Ot.property=du,Ot.propertyOf=function(t){ +return function(n){return null==t?T:vn(t,n)}},Ot.pull=Po,Ot.pullAll=ge,Ot.pullAllBy=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,Fr(r)):t},Ot.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?Dn(t,n,T,r):t},Ot.pullAt=Zo,Ot.range=nf,Ot.rangeRight=rf,Ot.rearg=vi,Ot.reject=function(t,n){var r=yi(t)?f:ln;return n=Fr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},Ot.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Fr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i), +u.push(e))}return Fn(t,u),r},Ot.rest=Me,Ot.reverse=de,Ot.sampleSize=ke,Ot.set=function(t,n,r){return null==t?t:Zn(t,n,r)},Ot.setWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null==t?t:Zn(t,n,r,e)},Ot.shuffle=function(t){return ke(t,4294967295)},Ot.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&te(t,n,r)?(n=0,r=e):(n=null==n?0:Xe(n),r=r===T?e:Xe(r)),Tn(t,n,r)):[]},Ot.sortBy=fi,Ot.sortedUniq=function(t){return t&&t.length?Gn(t):[]},Ot.sortedUniqBy=function(t,n){ +return t&&t.length?Gn(t,Fr(n)):[]},Ot.split=function(t,n,r){return r&&typeof r!="number"&&te(t,n,r)&&(n=r=T),r=r===T?4294967295:r>>>0,r?(t=eu(t))&&(typeof n=="string"||null!=n&&!Ke(n))&&(n=Yn(n),""==n&&Wt.test(t))?ur(t.match(It),0,r):oo.call(t,n,r):[]},Ot.spread=function(t,n){if(typeof t!="function")throw new Au("Expected a function");return n=n===T?0:Xu(Xe(n),0),Me(function(e){var u=e[n];return e=ur(e,0,n),u&&s(e,u),r(t,this,e)})},Ot.tail=function(t){return le(t,1)},Ot.take=function(t,n,r){return t&&t.length?(n=r||n===T?1:Xe(n), +Tn(t,0,0>n?0:n)):[]},Ot.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===T?1:Xe(n),n=e-n,Tn(t,0>n?0:n,e)):[]},Ot.takeRightWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3),false,true):[]},Ot.takeWhile=function(t,n){return t&&t.length?Qn(t,Fr(n,3)):[]},Ot.tap=function(t,n){return n(t),t},Ot.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new Au("Expected a function");return Ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Be(t,n,{leading:e,maxWait:n, +trailing:u})},Ot.thru=je,Ot.toArray=He,Ot.toPairs=zi,Ot.toPairsIn=Ui,Ot.toPath=function(t){return yi(t)?l(t,fe):Je(t)?[t]:lr(Co(t))},Ot.toPlainObject=ru,Ot.transform=function(t,n,r){var e=yi(t)||Ye(t);if(n=Fr(n,4),null==r)if(e||Ze(t)){var o=t.constructor;r=e?yi(t)?new o:[]:Fe(o)?un(Ju(Object(t))):{}}else r={};return(e?u:hn)(t,function(t,e,u){return n(r,t,e,u)}),r},Ot.unary=function(t){return Se(t,1)},Ot.union=To,Ot.unionBy=qo,Ot.unionWith=Vo,Ot.uniq=function(t){return t&&t.length?Hn(t):[]},Ot.uniqBy=function(t,n){ +return t&&t.length?Hn(t,Fr(n)):[]},Ot.uniqWith=function(t,n){return t&&t.length?Hn(t,T,n):[]},Ot.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=ne(e,r)?[e]:er(e);r=ie(r,e),e=fe(ve(e)),r=!(null!=r&&yn(r,e))||delete r[e]}return r},Ot.unzip=ye,Ot.unzipWith=be,Ot.update=function(t,n,r){return null==t?t:Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),void 0)},Ot.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:T,null!=t&&(t=Zn(t,n,(typeof r=="function"?r:pu)(vn(t,n)),e)),t},Ot.values=cu, +Ot.valuesIn=function(t){return null==t?[]:k(t,fu(t))},Ot.without=Ko,Ot.words=su,Ot.wrap=function(t,n){return n=null==n?pu:n,pi(n,t)},Ot.xor=Go,Ot.xorBy=Jo,Ot.xorWith=Yo,Ot.zip=Ho,Ot.zipObject=function(t,n){return nr(t||[],n||[],Yt)},Ot.zipObjectDeep=function(t,n){return nr(t||[],n||[],Zn)},Ot.zipWith=Qo,Ot.entries=zi,Ot.entriesIn=Ui,Ot.extend=mi,Ot.extendWith=Ai,vu(Ot,Ot),Ot.add=ef,Ot.attempt=Vi,Ot.camelCase=$i,Ot.capitalize=au,Ot.ceil=uf,Ot.clamp=function(t,n,r){return r===T&&(r=n,n=T),r!==T&&(r=nu(r), +r=r===r?r:0),n!==T&&(n=nu(n),n=n===n?n:0),nn(nu(t),n,r)},Ot.clone=function(t){return rn(t,false,true)},Ot.cloneDeep=function(t){return rn(t,true,true)},Ot.cloneDeepWith=function(t,n){return rn(t,true,true,n)},Ot.cloneWith=function(t,n){return rn(t,false,true,n)},Ot.deburr=lu,Ot.divide=of,Ot.endsWith=function(t,n,r){t=eu(t),n=Yn(n);var e=t.length;return r=r===T?e:nn(Xe(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},Ot.eq=Ce,Ot.escape=function(t){return(t=eu(t))&&X.test(t)?t.replace(H,B):t},Ot.escapeRegExp=function(t){ +return(t=eu(t))&&ft.test(t)?t.replace(it,"\\$&"):t},Ot.every=function(t,n,r){var e=yi(t)?i:cn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.find=ni,Ot.findIndex=he,Ot.findKey=function(t,n){return v(t,Fr(n,3),hn)},Ot.findLast=ri,Ot.findLastIndex=pe,Ot.findLastKey=function(t,n){return v(t,Fr(n,3),pn)},Ot.floor=ff,Ot.forEach=me,Ot.forEachRight=Ae,Ot.forIn=function(t,n){return null==t?t:ko(t,Fr(n,3),fu)},Ot.forInRight=function(t,n){return null==t?t:Eo(t,Fr(n,3),fu)},Ot.forOwn=function(t,n){return t&&hn(t,Fr(n,3)); +},Ot.forOwnRight=function(t,n){return t&&pn(t,Fr(n,3))},Ot.get=uu,Ot.gt=gi,Ot.gte=di,Ot.has=function(t,n){return null!=t&&Vr(t,n,yn)},Ot.hasIn=ou,Ot.head=_e,Ot.identity=pu,Ot.includes=function(t,n,r,e){return t=Ue(t)?t:cu(t),r=r&&!e?Xe(r):0,e=t.length,0>r&&(r=Xu(e+r,0)),Ge(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<d(t,n,r)},Ot.indexOf=function(t,n,r){var e=t?t.length:0;return e?(r=null==r?0:Xe(r),0>r&&(r=Xu(e+r,0)),d(t,n,r)):-1},Ot.inRange=function(t,n,r){return n=nu(n)||0,r===T?(r=n,n=0):r=nu(r)||0,t=nu(t), +t>=to(n,r)&&t<Xu(n,r)},Ot.invoke=Wi,Ot.isArguments=ze,Ot.isArray=yi,Ot.isArrayBuffer=function(t){return Te(t)&&"[object ArrayBuffer]"==Mu.call(t)},Ot.isArrayLike=Ue,Ot.isArrayLikeObject=$e,Ot.isBoolean=function(t){return true===t||false===t||Te(t)&&"[object Boolean]"==Mu.call(t)},Ot.isBuffer=bi,Ot.isDate=function(t){return Te(t)&&"[object Date]"==Mu.call(t)},Ot.isElement=function(t){return!!t&&1===t.nodeType&&Te(t)&&!Ve(t)},Ot.isEmpty=function(t){if(Ue(t)&&(yi(t)||Ge(t)||Fe(t.splice)||ze(t)||bi(t)))return!t.length; +if(Te(t)){var n=qr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(Wu.call(t,r))return false;return!(po&&iu(t).length)},Ot.isEqual=function(t,n){return mn(t,n)},Ot.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:T)?r(t,n):T;return e===T?mn(t,n,r):!!e},Ot.isError=De,Ot.isFinite=function(t){return typeof t=="number"&&Yu(t)},Ot.isFunction=Fe,Ot.isInteger=Ne,Ot.isLength=Pe,Ot.isMap=function(t){return Te(t)&&"[object Map]"==qr(t)},Ot.isMatch=function(t,n){return t===n||An(t,n,Pr(n)); +},Ot.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:T,An(t,n,Pr(n),r)},Ot.isNaN=function(t){return qe(t)&&t!=+t},Ot.isNative=function(t){if(Lo(t))throw new ju("This method is not supported with `core-js`. Try https://github.com/es-shims.");return On(t)},Ot.isNil=function(t){return null==t},Ot.isNull=function(t){return null===t},Ot.isNumber=qe,Ot.isObject=Ze,Ot.isObjectLike=Te,Ot.isPlainObject=Ve,Ot.isRegExp=Ke,Ot.isSafeInteger=function(t){return Ne(t)&&t>=-9007199254740991&&9007199254740991>=t; +},Ot.isSet=function(t){return Te(t)&&"[object Set]"==qr(t)},Ot.isString=Ge,Ot.isSymbol=Je,Ot.isTypedArray=Ye,Ot.isUndefined=function(t){return t===T},Ot.isWeakMap=function(t){return Te(t)&&"[object WeakMap]"==qr(t)},Ot.isWeakSet=function(t){return Te(t)&&"[object WeakSet]"==Mu.call(t)},Ot.join=function(t,n){return t?Hu.call(t,n):""},Ot.kebabCase=Di,Ot.last=ve,Ot.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==T&&(u=Xe(r),u=(0>u?Xu(e+u,0):to(u,e-1))+1),n!==n)return M(t,u-1,true); +for(;u--;)if(t[u]===n)return u;return-1},Ot.lowerCase=Fi,Ot.lowerFirst=Ni,Ot.lt=xi,Ot.lte=ji,Ot.max=function(t){return t&&t.length?an(t,pu,dn):T},Ot.maxBy=function(t,n){return t&&t.length?an(t,Fr(n),dn):T},Ot.mean=function(t){return b(t,pu)},Ot.meanBy=function(t,n){return b(t,Fr(n))},Ot.min=function(t){return t&&t.length?an(t,pu,Sn):T},Ot.minBy=function(t,n){return t&&t.length?an(t,Fr(n),Sn):T},Ot.stubArray=yu,Ot.stubFalse=bu,Ot.stubObject=function(){return{}},Ot.stubString=function(){return""},Ot.stubTrue=function(){ +return true},Ot.multiply=cf,Ot.nth=function(t,n){return t&&t.length?Ln(t,Xe(n)):T},Ot.noConflict=function(){return Kt._===this&&(Kt._=Cu),this},Ot.noop=gu,Ot.now=Ee,Ot.pad=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return!n||e>=n?t:(n=(n-e)/2,Sr(Gu(n),r)+t+Sr(Ku(n),r))},Ot.padEnd=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?t+Sr(n-e,r):t},Ot.padStart=function(t,n,r){t=eu(t);var e=(n=Xe(n))?N(t):0;return n&&n>e?Sr(n-e,r)+t:t},Ot.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n), +t=eu(t).replace(ct,""),no(t,n||(vt.test(t)?16:10))},Ot.random=function(t,n,r){if(r&&typeof r!="boolean"&&te(t,n,r)&&(n=r=T),r===T&&(typeof n=="boolean"?(r=n,n=T):typeof t=="boolean"&&(r=t,t=T)),t===T&&n===T?(t=0,n=1):(t=nu(t)||0,n===T?(n=t,t=0):n=nu(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=ro(),to(t+r*(n-t+Ft("1e-"+((r+"").length-1))),n)):Nn(t,n)},Ot.reduce=function(t,n,r){var e=yi(t)?h:x,u=3>arguments.length;return e(t,Fr(n,4),r,u,Ao)},Ot.reduceRight=function(t,n,r){var e=yi(t)?p:x,u=3>arguments.length; +return e(t,Fr(n,4),r,u,Oo)},Ot.repeat=function(t,n,r){return n=(r?te(t,n,r):n===T)?1:Xe(n),Pn(eu(t),n)},Ot.replace=function(){var t=arguments,n=eu(t[0]);return 3>t.length?n:eo.call(n,t[1],t[2])},Ot.result=function(t,n,r){n=ne(n,t)?[n]:er(n);var e=-1,u=n.length;for(u||(t=T,u=1);++e<u;){var o=null==t?T:t[fe(n[e])];o===T&&(e=u,o=r),t=Fe(o)?o.call(t):o}return t},Ot.round=af,Ot.runInContext=Z,Ot.sample=function(t){t=Ue(t)?t:cu(t);var n=t.length;return n>0?t[Nn(0,n-1)]:T},Ot.size=function(t){if(null==t)return 0; +if(Ue(t)){var n=t.length;return n&&Ge(t)?N(t):n}return Te(t)&&(n=qr(t),"[object Map]"==n||"[object Set]"==n)?t.size:iu(t).length},Ot.snakeCase=Pi,Ot.some=function(t,n,r){var e=yi(t)?_:qn;return r&&te(t,n,r)&&(n=T),e(t,Fr(n,3))},Ot.sortedIndex=function(t,n){return Vn(t,n)},Ot.sortedIndexBy=function(t,n,r){return Kn(t,n,Fr(r))},Ot.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Vn(t,n);if(r>e&&Ce(t[e],n))return e}return-1},Ot.sortedLastIndex=function(t,n){return Vn(t,n,true)},Ot.sortedLastIndexBy=function(t,n,r){ +return Kn(t,n,Fr(r),true)},Ot.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Vn(t,n,true)-1;if(Ce(t[r],n))return r}return-1},Ot.startCase=Zi,Ot.startsWith=function(t,n,r){return t=eu(t),r=nn(Xe(r),0,t.length),t.lastIndexOf(Yn(n),r)==r},Ot.subtract=lf,Ot.sum=function(t){return t&&t.length?w(t,pu):0},Ot.sumBy=function(t,n){return t&&t.length?w(t,Fr(n)):0},Ot.template=function(t,n,r){var e=Ot.templateSettings;r&&te(t,n,r)&&(n=T),t=eu(t),n=Ai({},n,e,Vt),r=Ai({},n.imports,e.imports,Vt);var u,o,i=iu(r),f=k(r,i),c=0; +r=n.interpolate||wt;var a="__p+='";r=mu((n.escape||wt).source+"|"+r.source+"|"+(r===rt?pt:wt).source+"|"+(n.evaluate||wt).source+"|$","g");var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(mt,L),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(K,""):a).replace(G,"$1").replace(J,"$1;"), +a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",n=Vi(function(){return Function(i,l+"return "+a).apply(T,f)}),n.source=a,De(n))throw n;return n},Ot.times=function(t,n){if(t=Xe(t),1>t||t>9007199254740991)return[];var r=4294967295,e=to(t,4294967295);for(n=Fr(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},Ot.toFinite=Qe,Ot.toInteger=Xe,Ot.toLength=tu,Ot.toLower=function(t){ +return eu(t).toLowerCase()},Ot.toNumber=nu,Ot.toSafeInteger=function(t){return nn(Xe(t),-9007199254740991,9007199254740991)},Ot.toString=eu,Ot.toUpper=function(t){return eu(t).toUpperCase()},Ot.trim=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(ct,""):t&&(n=Yn(n))?(t=t.match(It),n=n.match(It),ur(t,S(t,n),I(t,n)+1).join("")):t},Ot.trimEnd=function(t,n,r){return(t=eu(t))&&(r||n===T)?t.replace(lt,""):t&&(n=Yn(n))?(t=t.match(It),n=I(t,n.match(It))+1,ur(t,0,n).join("")):t},Ot.trimStart=function(t,n,r){ +return(t=eu(t))&&(r||n===T)?t.replace(at,""):t&&(n=Yn(n))?(t=t.match(It),n=S(t,n.match(It)),ur(t,n).join("")):t},Ot.truncate=function(t,n){var r=30,e="...";if(Ze(n))var u="separator"in n?n.separator:u,r="length"in n?Xe(n.length):r,e="omission"in n?Yn(n.omission):e;t=eu(t);var o=t.length;if(Wt.test(t))var i=t.match(It),o=i.length;if(r>=o)return t;if(o=r-N(e),1>o)return e;if(r=i?ur(i,0,o).join(""):t.slice(0,o),u===T)return r+e;if(i&&(o+=r.length-o),Ke(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=mu(u.source,eu(_t.exec(u))+"g")), +u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===T?o:c)}}else t.indexOf(Yn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},Ot.unescape=function(t){return(t=eu(t))&&Q.test(t)?t.replace(Y,P):t},Ot.uniqueId=function(t){var n=++Bu;return eu(t)+n},Ot.upperCase=Ti,Ot.upperFirst=qi,Ot.each=me,Ot.eachRight=Ae,Ot.first=_e,vu(Ot,function(){var t={};return hn(Ot,function(n,r){Wu.call(Ot.prototype,r)||(t[r]=n)}),t}(),{chain:false}),Ot.VERSION="4.13.1",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){ +Ot[t].placeholder=Ot}),u(["drop","take"],function(t,n){Ut.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Ut(this);r=r===T?1:Xu(Xe(r),0);var u=this.clone();return e?u.__takeCount__=to(r,u.__takeCount__):u.__views__.push({size:to(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Ut.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Ut.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({ +iteratee:Fr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Ut.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");Ut.prototype[t]=function(){return this.__filtered__?new Ut(this):this[r](1)}}),Ut.prototype.compact=function(){return this.filter(pu)},Ut.prototype.find=function(t){return this.filter(t).head()},Ut.prototype.findLast=function(t){return this.reverse().find(t); +},Ut.prototype.invokeMap=Me(function(t,n){return typeof t=="function"?new Ut(this):this.map(function(r){return wn(r,t,n)})}),Ut.prototype.reject=function(t){return t=Fr(t,3),this.filter(function(n){return!t(n)})},Ut.prototype.slice=function(t,n){t=Xe(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Ut(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==T&&(n=Xe(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Ut.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ut.prototype.toArray=function(){ +return this.take(4294967295)},hn(Ut.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=Ot[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(Ot.prototype[n]=function(){function n(t){return t=u.apply(Ot,s([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Ut,a=f[0],l=c||yi(i);l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&l?(i=c?i:new Ut(this), +i=t.apply(i,f),i.__actions__.push({func:je,args:[n],thisArg:T}),new zt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=Ou[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);Ot.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(yi(u)?u:[],t)}return this[r](function(r){return n.apply(yi(r)?r:[],t)})}}),hn(Ut.prototype,function(t,n){ +var r=Ot[n];if(r){var e=r.name+"";(_o[e]||(_o[e]=[])).push({name:n,func:r})}}),_o[Ar(T,2).name]=[{name:"wrapper",func:T}],Ut.prototype.clone=function(){var t=new Ut(this.__wrapped__);return t.__actions__=lr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=lr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=lr(this.__views__),t},Ut.prototype.reverse=function(){if(this.__filtered__){var t=new Ut(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(), +t.__dir__*=-1;return t},Ut.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=yi(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=to(t,f+s);break;case"takeRight":f=Xu(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=to(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Xn(n,this.__actions__);e=[]; +t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},Ot.prototype.at=Xo,Ot.prototype.chain=function(){return xe(this)},Ot.prototype.commit=function(){return new zt(this.value(),this.__chain__)},Ot.prototype.next=function(){this.__values__===T&&(this.__values__=He(this.value()));var t=this.__index__>=this.__values__.length,n=t?T:this.__values__[this.__index__++];return{done:t,value:n}},Ot.prototype.plant=function(t){ +for(var n,r=this;r instanceof kt;){var e=ae(r);e.__index__=0,e.__values__=T,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},Ot.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Ut?(this.__actions__.length&&(t=new Ut(this)),t=t.reverse(),t.__actions__.push({func:je,args:[de],thisArg:T}),new zt(t,this.__chain__)):this.thru(de)},Ot.prototype.toJSON=Ot.prototype.valueOf=Ot.prototype.value=function(){return Xn(this.__wrapped__,this.__actions__)},Zu&&(Ot.prototype[Zu]=we), +Ot}var T,q=1/0,V=NaN,K=/\b__p\+='';/g,G=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,Y=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,Q=RegExp(Y.source),X=RegExp(H.source),tt=/<%-([\s\S]+?)%>/g,nt=/<%([\s\S]+?)%>/g,rt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ut=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ft=RegExp(it.source),ct=/^\s+|\s+$/g,at=/^\s+/,lt=/\s+$/,st=/[a-zA-Z0-9]+/g,ht=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_t=/\w*$/,vt=/^0x/i,gt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,jt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,wt=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,At="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",Ot="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+At,kt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",Et=RegExp("['\u2019]","g"),St=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),It=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+kt+At,"g"),Rt=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\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]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",Ot].join("|"),"g"),Wt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),Bt=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ isFinite parseInt setTimeout".split(" "),Mt={}; Mt["[object Float32Array]"]=Mt["[object Float64Array]"]=Mt["[object Int8Array]"]=Mt["[object Int16Array]"]=Mt["[object Int32Array]"]=Mt["[object Uint8Array]"]=Mt["[object Uint8ClampedArray]"]=Mt["[object Uint16Array]"]=Mt["[object Uint32Array]"]=true,Mt["[object Arguments]"]=Mt["[object Array]"]=Mt["[object ArrayBuffer]"]=Mt["[object Boolean]"]=Mt["[object DataView]"]=Mt["[object Date]"]=Mt["[object Error]"]=Mt["[object Function]"]=Mt["[object Map]"]=Mt["[object Number]"]=Mt["[object Object]"]=Mt["[object RegExp]"]=Mt["[object Set]"]=Mt["[object String]"]=Mt["[object WeakMap]"]=false; -var zt={};zt["[object Arguments]"]=zt["[object Array]"]=zt["[object ArrayBuffer]"]=zt["[object DataView]"]=zt["[object Boolean]"]=zt["[object Date]"]=zt["[object Float32Array]"]=zt["[object Float64Array]"]=zt["[object Int8Array]"]=zt["[object Int16Array]"]=zt["[object Int32Array]"]=zt["[object Map]"]=zt["[object Number]"]=zt["[object Object]"]=zt["[object RegExp]"]=zt["[object Set]"]=zt["[object String]"]=zt["[object Symbol]"]=zt["[object Uint8Array]"]=zt["[object Uint8ClampedArray]"]=zt["[object Uint16Array]"]=zt["[object Uint32Array]"]=true, -zt["[object Error]"]=zt["[object Function]"]=zt["[object WeakMap]"]=false;var Ut={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", -"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Dt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ft={"function":true,object:true},Nt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029" -},Pt=parseFloat,Zt=parseInt,Tt=Ft[typeof exports]&&exports&&!exports.nodeType?exports:q,qt=Ft[typeof module]&&module&&!module.nodeType?module:q,Vt=qt&&qt.exports===Tt?Tt:q,Kt=S(Ft[typeof self]&&self),Gt=S(Ft[typeof window]&&window),Jt=S(Ft[typeof this]&&this),Yt=S(Tt&&qt&&typeof global=="object"&&global)||Gt!==(Jt&&Jt.window)&&Gt||Kt||Jt||Function("return this")(),Ht=T();(Gt||Kt||{})._=Ht,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Ht}):Tt&&qt?(Vt&&((qt.exports=Ht)._=Ht), -Tt._=Ht):Yt._=Ht}).call(this);
\ No newline at end of file +var Ct={};Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object DataView]"]=Ct["[object Boolean]"]=Ct["[object Date]"]=Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object Symbol]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=true, +Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object WeakMap]"]=false;var zt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O", +"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ut={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},$t={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ft=parseFloat,Nt=parseInt,Pt=typeof exports=="object"&&exports,Zt=Pt&&typeof module=="object"&&module,Tt=Zt&&Zt.exports===Pt,qt=R(typeof self=="object"&&self),Vt=R(typeof this=="object"&&this),Kt=R(typeof global=="object"&&global)||qt||Vt||Function("return this")(),Gt=Z(); +(qt||{})._=Gt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Gt}):Zt?((Zt.exports=Gt)._=Gt,Pt._=Gt):Kt._=Gt}).call(this);
\ No newline at end of file diff --git a/tools/eslint/node_modules/lodash/lt.js b/tools/eslint/node_modules/lodash/lt.js index 4e06fdd028..813866e4a0 100644 --- a/tools/eslint/node_modules/lodash/lt.js +++ b/tools/eslint/node_modules/lodash/lt.js @@ -1,3 +1,6 @@ +var baseLt = require('./_baseLt'), + createRelationalOperation = require('./_createRelationalOperation'); + /** * Checks if `value` is less than `other`. * @@ -9,6 +12,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. + * @see _.gt * @example * * _.lt(1, 3); @@ -20,8 +24,6 @@ * _.lt(3, 1); * // => false */ -function lt(value, other) { - return value < other; -} +var lt = createRelationalOperation(baseLt); module.exports = lt; diff --git a/tools/eslint/node_modules/lodash/lte.js b/tools/eslint/node_modules/lodash/lte.js index 76e8607fdb..382f6610d2 100644 --- a/tools/eslint/node_modules/lodash/lte.js +++ b/tools/eslint/node_modules/lodash/lte.js @@ -1,3 +1,5 @@ +var createRelationalOperation = require('./_createRelationalOperation'); + /** * Checks if `value` is less than or equal to `other`. * @@ -9,6 +11,7 @@ * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than or equal to * `other`, else `false`. + * @see _.gte * @example * * _.lte(1, 3); @@ -20,8 +23,8 @@ * _.lte(3, 1); * // => false */ -function lte(value, other) { +var lte = createRelationalOperation(function(value, other) { return value <= other; -} +}); module.exports = lte; diff --git a/tools/eslint/node_modules/lodash/mapKeys.js b/tools/eslint/node_modules/lodash/mapKeys.js index 0850afd396..8af3ac5b42 100644 --- a/tools/eslint/node_modules/lodash/mapKeys.js +++ b/tools/eslint/node_modules/lodash/mapKeys.js @@ -15,6 +15,7 @@ var baseForOwn = require('./_baseForOwn'), * @param {Array|Function|Object|string} [iteratee=_.identity] * The function invoked per iteration. * @returns {Object} Returns the new mapped object. + * @see _.mapValues * @example * * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { diff --git a/tools/eslint/node_modules/lodash/mapValues.js b/tools/eslint/node_modules/lodash/mapValues.js index c3af35e823..610f45810a 100644 --- a/tools/eslint/node_modules/lodash/mapValues.js +++ b/tools/eslint/node_modules/lodash/mapValues.js @@ -15,6 +15,7 @@ var baseForOwn = require('./_baseForOwn'), * @param {Array|Function|Object|string} [iteratee=_.identity] * The function invoked per iteration. * @returns {Object} Returns the new mapped object. + * @see _.mapKeys * @example * * var users = { diff --git a/tools/eslint/node_modules/lodash/matches.js b/tools/eslint/node_modules/lodash/matches.js index 16fe16d47e..9e97961f0d 100644 --- a/tools/eslint/node_modules/lodash/matches.js +++ b/tools/eslint/node_modules/lodash/matches.js @@ -14,7 +14,7 @@ var baseClone = require('./_baseClone'), * @since 3.0.0 * @category Util * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ diff --git a/tools/eslint/node_modules/lodash/matchesProperty.js b/tools/eslint/node_modules/lodash/matchesProperty.js index 3dd59d5a14..13dbdd03a0 100644 --- a/tools/eslint/node_modules/lodash/matchesProperty.js +++ b/tools/eslint/node_modules/lodash/matchesProperty.js @@ -14,7 +14,7 @@ var baseClone = require('./_baseClone'), * @category Util * @param {Array|string} path The path of the property to get. * @param {*} srcValue The value to match. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new spec function. * @example * * var users = [ diff --git a/tools/eslint/node_modules/lodash/max.js b/tools/eslint/node_modules/lodash/max.js index f563459b8a..142ad8cfb1 100644 --- a/tools/eslint/node_modules/lodash/max.js +++ b/tools/eslint/node_modules/lodash/max.js @@ -1,5 +1,5 @@ var baseExtremum = require('./_baseExtremum'), - gt = require('./gt'), + baseGt = require('./_baseGt'), identity = require('./identity'); /** @@ -22,7 +22,7 @@ var baseExtremum = require('./_baseExtremum'), */ function max(array) { return (array && array.length) - ? baseExtremum(array, identity, gt) + ? baseExtremum(array, identity, baseGt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/maxBy.js b/tools/eslint/node_modules/lodash/maxBy.js index a58dd01637..4627bac3ef 100644 --- a/tools/eslint/node_modules/lodash/maxBy.js +++ b/tools/eslint/node_modules/lodash/maxBy.js @@ -1,6 +1,6 @@ var baseExtremum = require('./_baseExtremum'), - baseIteratee = require('./_baseIteratee'), - gt = require('./gt'); + baseGt = require('./_baseGt'), + baseIteratee = require('./_baseIteratee'); /** * This method is like `_.max` except that it accepts `iteratee` which is @@ -28,7 +28,7 @@ var baseExtremum = require('./_baseExtremum'), */ function maxBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), gt) + ? baseExtremum(array, baseIteratee(iteratee), baseGt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/memoize.js b/tools/eslint/node_modules/lodash/memoize.js index b657bbe41e..54e461400f 100644 --- a/tools/eslint/node_modules/lodash/memoize.js +++ b/tools/eslint/node_modules/lodash/memoize.js @@ -22,7 +22,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoizing function. + * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; diff --git a/tools/eslint/node_modules/lodash/merge.js b/tools/eslint/node_modules/lodash/merge.js index 61c6e01561..d5aac9ee54 100644 --- a/tools/eslint/node_modules/lodash/merge.js +++ b/tools/eslint/node_modules/lodash/merge.js @@ -6,7 +6,7 @@ var baseMerge = require('./_baseMerge'), * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties - * are merged recursively.Other objects and value types are overridden by + * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * diff --git a/tools/eslint/node_modules/lodash/method.js b/tools/eslint/node_modules/lodash/method.js index 12bc4bf59e..a4da99bdf1 100644 --- a/tools/eslint/node_modules/lodash/method.js +++ b/tools/eslint/node_modules/lodash/method.js @@ -11,7 +11,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var objects = [ diff --git a/tools/eslint/node_modules/lodash/methodOf.js b/tools/eslint/node_modules/lodash/methodOf.js index edac32f4cd..62b049787a 100644 --- a/tools/eslint/node_modules/lodash/methodOf.js +++ b/tools/eslint/node_modules/lodash/methodOf.js @@ -12,7 +12,7 @@ var baseInvoke = require('./_baseInvoke'), * @category Util * @param {Object} object The object to query. * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new invoker function. * @example * * var array = _.times(3, _.constant), diff --git a/tools/eslint/node_modules/lodash/min.js b/tools/eslint/node_modules/lodash/min.js index 0852b5dbb0..428f571d74 100644 --- a/tools/eslint/node_modules/lodash/min.js +++ b/tools/eslint/node_modules/lodash/min.js @@ -1,6 +1,6 @@ var baseExtremum = require('./_baseExtremum'), - identity = require('./identity'), - lt = require('./lt'); + baseLt = require('./_baseLt'), + identity = require('./identity'); /** * Computes the minimum value of `array`. If `array` is empty or falsey, @@ -22,7 +22,7 @@ var baseExtremum = require('./_baseExtremum'), */ function min(array) { return (array && array.length) - ? baseExtremum(array, identity, lt) + ? baseExtremum(array, identity, baseLt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/minBy.js b/tools/eslint/node_modules/lodash/minBy.js index 3a4e21205a..d58084659a 100644 --- a/tools/eslint/node_modules/lodash/minBy.js +++ b/tools/eslint/node_modules/lodash/minBy.js @@ -1,6 +1,6 @@ var baseExtremum = require('./_baseExtremum'), baseIteratee = require('./_baseIteratee'), - lt = require('./lt'); + baseLt = require('./_baseLt'); /** * This method is like `_.min` except that it accepts `iteratee` which is @@ -28,7 +28,7 @@ var baseExtremum = require('./_baseExtremum'), */ function minBy(array, iteratee) { return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee), lt) + ? baseExtremum(array, baseIteratee(iteratee), baseLt) : undefined; } diff --git a/tools/eslint/node_modules/lodash/negate.js b/tools/eslint/node_modules/lodash/negate.js index 2ad58d6a2d..f0049c6b74 100644 --- a/tools/eslint/node_modules/lodash/negate.js +++ b/tools/eslint/node_modules/lodash/negate.js @@ -11,7 +11,7 @@ var FUNC_ERROR_TEXT = 'Expected a function'; * @since 3.0.0 * @category Function * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new negated function. * @example * * function isEven(n) { diff --git a/tools/eslint/node_modules/lodash/noop.js b/tools/eslint/node_modules/lodash/noop.js index 26e19c3172..a682a44653 100644 --- a/tools/eslint/node_modules/lodash/noop.js +++ b/tools/eslint/node_modules/lodash/noop.js @@ -1,6 +1,5 @@ /** - * A no-operation function that returns `undefined` regardless of the - * arguments it receives. + * A method that returns `undefined`. * * @static * @memberOf _ @@ -8,10 +7,8 @@ * @category Util * @example * - * var object = { 'user': 'fred' }; - * - * _.noop(object) === undefined; - * // => true + * _.times(2, _.noop); + * // => [undefined, undefined] */ function noop() { // No operation performed. diff --git a/tools/eslint/node_modules/lodash/now.js b/tools/eslint/node_modules/lodash/now.js index c0656728c9..5ad305033b 100644 --- a/tools/eslint/node_modules/lodash/now.js +++ b/tools/eslint/node_modules/lodash/now.js @@ -5,7 +5,6 @@ * @static * @memberOf _ * @since 2.4.0 - * @type {Function} * @category Date * @returns {number} Returns the timestamp. * @example @@ -13,8 +12,10 @@ * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred function to be invoked. + * // => Logs the number of milliseconds it took for the deferred invocation. */ -var now = Date.now; +function now() { + return Date.now(); +} module.exports = now; diff --git a/tools/eslint/node_modules/lodash/nth.js b/tools/eslint/node_modules/lodash/nth.js index eed69e2c5d..8a344dee56 100644 --- a/tools/eslint/node_modules/lodash/nth.js +++ b/tools/eslint/node_modules/lodash/nth.js @@ -2,8 +2,8 @@ var baseNth = require('./_baseNth'), toInteger = require('./toInteger'); /** - * Gets the nth element of `array`. If `n` is negative, the nth element - * from the end is returned. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * * @static * @memberOf _ diff --git a/tools/eslint/node_modules/lodash/nthArg.js b/tools/eslint/node_modules/lodash/nthArg.js index 533747af3f..7557653aee 100644 --- a/tools/eslint/node_modules/lodash/nthArg.js +++ b/tools/eslint/node_modules/lodash/nthArg.js @@ -3,7 +3,7 @@ var baseNth = require('./_baseNth'), toInteger = require('./toInteger'); /** - * Creates a function that returns its nth argument. If `n` is negative, + * Creates a function that gets the argument at index `n`. If `n` is negative, * the nth argument from the end is returned. * * @static @@ -11,7 +11,7 @@ var baseNth = require('./_baseNth'), * @since 4.0.0 * @category Util * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new pass-thru function. * @example * * var func = _.nthArg(1); diff --git a/tools/eslint/node_modules/lodash/over.js b/tools/eslint/node_modules/lodash/over.js index 2275bf70d0..5301d57f78 100644 --- a/tools/eslint/node_modules/lodash/over.js +++ b/tools/eslint/node_modules/lodash/over.js @@ -14,7 +14,7 @@ var arrayMap = require('./_arrayMap'), * @returns {Function} Returns the new function. * @example * - * var func = _.over(Math.max, Math.min); + * var func = _.over([Math.max, Math.min]); * * func(1, 2, 3, 4); * // => [4, 1] diff --git a/tools/eslint/node_modules/lodash/overArgs.js b/tools/eslint/node_modules/lodash/overArgs.js index d6a7467179..94f586b53f 100644 --- a/tools/eslint/node_modules/lodash/overArgs.js +++ b/tools/eslint/node_modules/lodash/overArgs.js @@ -34,7 +34,7 @@ var nativeMin = Math.min; * * var func = _.overArgs(function(x, y) { * return [x, y]; - * }, square, doubled); + * }, [square, doubled]); * * func(9, 3); * // => [81, 6] diff --git a/tools/eslint/node_modules/lodash/overEvery.js b/tools/eslint/node_modules/lodash/overEvery.js index 4ea596a7bf..1af6b7398e 100644 --- a/tools/eslint/node_modules/lodash/overEvery.js +++ b/tools/eslint/node_modules/lodash/overEvery.js @@ -14,7 +14,7 @@ var arrayEvery = require('./_arrayEvery'), * @returns {Function} Returns the new function. * @example * - * var func = _.overEvery(Boolean, isFinite); + * var func = _.overEvery([Boolean, isFinite]); * * func('1'); * // => true diff --git a/tools/eslint/node_modules/lodash/overSome.js b/tools/eslint/node_modules/lodash/overSome.js index 55ff733f7e..9e3fe95c65 100644 --- a/tools/eslint/node_modules/lodash/overSome.js +++ b/tools/eslint/node_modules/lodash/overSome.js @@ -14,7 +14,7 @@ var arraySome = require('./_arraySome'), * @returns {Function} Returns the new function. * @example * - * var func = _.overSome(Boolean, isFinite); + * var func = _.overSome([Boolean, isFinite]); * * func('1'); * // => true diff --git a/tools/eslint/node_modules/lodash/package.json b/tools/eslint/node_modules/lodash/package.json index 55a4de95cc..a814bf2120 100644 --- a/tools/eslint/node_modules/lodash/package.json +++ b/tools/eslint/node_modules/lodash/package.json @@ -6,20 +6,20 @@ ] ], "_from": "lodash@>=4.0.0 <5.0.0", - "_id": "lodash@4.11.1", + "_id": "lodash@4.13.1", "_inCache": true, "_installable": true, "_location": "/lodash", - "_nodeVersion": "5.5.0", + "_nodeVersion": "4.2.4", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", - "tmp": "tmp/lodash-4.11.1.tgz_1460618480099_0.40750555554404855" + "tmp": "tmp/lodash-4.13.1.tgz_1464019142054_0.5244540225248784" }, "_npmUser": { "email": "john.david.dalton@gmail.com", "name": "jdalton" }, - "_npmVersion": "2.15.3", + "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { "name": "lodash", @@ -34,8 +34,8 @@ "/inquirer", "/table" ], - "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.11.1.tgz", - "_shasum": "a32106eb8e2ec8e82c241611414773c9df15f8bc", + "_resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz", + "_shasum": "83e4b10913f48496d4d16fec4a560af2ee744b68", "_shrinkwrap": null, "_spec": "lodash@^4.0.0", "_where": "/Users/trott/io.js/tools/node_modules/eslint", @@ -69,8 +69,8 @@ "devDependencies": {}, "directories": {}, "dist": { - "shasum": "a32106eb8e2ec8e82c241611414773c9df15f8bc", - "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.11.1.tgz" + "shasum": "83e4b10913f48496d4d16fec4a560af2ee744b68", + "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz" }, "homepage": "https://lodash.com/", "icon": "https://lodash.com/icon.svg", @@ -87,10 +87,6 @@ "name": "jdalton" }, { - "email": "justin+npm@ridgewell.name", - "name": "jridgewell" - }, - { "email": "mathias@qiwi.be", "name": "mathias" }, @@ -109,5 +105,5 @@ "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, - "version": "4.11.1" + "version": "4.13.1" } diff --git a/tools/eslint/node_modules/lodash/partial.js b/tools/eslint/node_modules/lodash/partial.js index 149060e5a7..916075d84c 100644 --- a/tools/eslint/node_modules/lodash/partial.js +++ b/tools/eslint/node_modules/lodash/partial.js @@ -1,5 +1,5 @@ var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), rest = require('./rest'); @@ -40,7 +40,7 @@ var PARTIAL_FLAG = 32; * // => 'hi fred' */ var partial = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partial)); + var holders = replaceHolders(partials, getHolder(partial)); return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders); }); diff --git a/tools/eslint/node_modules/lodash/partialRight.js b/tools/eslint/node_modules/lodash/partialRight.js index 02d14b9a05..a80a34ab00 100644 --- a/tools/eslint/node_modules/lodash/partialRight.js +++ b/tools/eslint/node_modules/lodash/partialRight.js @@ -1,5 +1,5 @@ var createWrapper = require('./_createWrapper'), - getPlaceholder = require('./_getPlaceholder'), + getHolder = require('./_getHolder'), replaceHolders = require('./_replaceHolders'), rest = require('./rest'); @@ -39,7 +39,7 @@ var PARTIAL_RIGHT_FLAG = 64; * // => 'hello fred' */ var partialRight = rest(function(func, partials) { - var holders = replaceHolders(partials, getPlaceholder(partialRight)); + var holders = replaceHolders(partials, getHolder(partialRight)); return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); diff --git a/tools/eslint/node_modules/lodash/pick.js b/tools/eslint/node_modules/lodash/pick.js index f85ac4d9fd..28125865c2 100644 --- a/tools/eslint/node_modules/lodash/pick.js +++ b/tools/eslint/node_modules/lodash/pick.js @@ -1,6 +1,8 @@ -var baseFlatten = require('./_baseFlatten'), +var arrayMap = require('./_arrayMap'), + baseFlatten = require('./_baseFlatten'), basePick = require('./_basePick'), - rest = require('./rest'); + rest = require('./rest'), + toKey = require('./_toKey'); /** * Creates an object composed of the picked `object` properties. @@ -20,7 +22,7 @@ var baseFlatten = require('./_baseFlatten'), * // => { 'a': 1, 'c': 3 } */ var pick = rest(function(object, props) { - return object == null ? {} : basePick(object, baseFlatten(props, 1)); + return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey)); }); module.exports = pick; diff --git a/tools/eslint/node_modules/lodash/property.js b/tools/eslint/node_modules/lodash/property.js index 0abbe380dc..ca8202ff45 100644 --- a/tools/eslint/node_modules/lodash/property.js +++ b/tools/eslint/node_modules/lodash/property.js @@ -1,6 +1,7 @@ var baseProperty = require('./_baseProperty'), basePropertyDeep = require('./_basePropertyDeep'), - isKey = require('./_isKey'); + isKey = require('./_isKey'), + toKey = require('./_toKey'); /** * Creates a function that returns the value at `path` of a given object. @@ -10,7 +11,7 @@ var baseProperty = require('./_baseProperty'), * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var objects = [ @@ -25,7 +26,7 @@ var baseProperty = require('./_baseProperty'), * // => [1, 2] */ function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; diff --git a/tools/eslint/node_modules/lodash/propertyOf.js b/tools/eslint/node_modules/lodash/propertyOf.js index 13bdbbb7bb..384044d3f0 100644 --- a/tools/eslint/node_modules/lodash/propertyOf.js +++ b/tools/eslint/node_modules/lodash/propertyOf.js @@ -9,7 +9,7 @@ var baseGet = require('./_baseGet'); * @since 3.0.0 * @category Util * @param {Object} object The object to query. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new accessor function. * @example * * var array = [0, 1, 2], diff --git a/tools/eslint/node_modules/lodash/pull.js b/tools/eslint/node_modules/lodash/pull.js index f5846fbc19..74b2771da1 100644 --- a/tools/eslint/node_modules/lodash/pull.js +++ b/tools/eslint/node_modules/lodash/pull.js @@ -18,11 +18,11 @@ var pullAll = require('./pullAll'), * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pull(array, 2, 3); + * _.pull(array, 'a', 'c'); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ var pull = rest(pullAll); diff --git a/tools/eslint/node_modules/lodash/pullAll.js b/tools/eslint/node_modules/lodash/pullAll.js index d6ce1bf80e..f4605c212e 100644 --- a/tools/eslint/node_modules/lodash/pullAll.js +++ b/tools/eslint/node_modules/lodash/pullAll.js @@ -14,11 +14,11 @@ var basePullAll = require('./_basePullAll'); * @returns {Array} Returns `array`. * @example * - * var array = [1, 2, 3, 1, 2, 3]; + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; * - * _.pullAll(array, [2, 3]); + * _.pullAll(array, ['a', 'c']); * console.log(array); - * // => [1, 1] + * // => ['b', 'b'] */ function pullAll(array, values) { return (array && array.length && values && values.length) diff --git a/tools/eslint/node_modules/lodash/pullAt.js b/tools/eslint/node_modules/lodash/pullAt.js index c312aa1bb9..01e566e625 100644 --- a/tools/eslint/node_modules/lodash/pullAt.js +++ b/tools/eslint/node_modules/lodash/pullAt.js @@ -3,6 +3,7 @@ var arrayMap = require('./_arrayMap'), baseFlatten = require('./_baseFlatten'), basePullAt = require('./_basePullAt'), compareAscending = require('./_compareAscending'), + isIndex = require('./_isIndex'), rest = require('./rest'); /** @@ -20,20 +21,25 @@ var arrayMap = require('./_arrayMap'), * @returns {Array} Returns the new array of removed elements. * @example * - * var array = [5, 10, 15, 20]; - * var evens = _.pullAt(array, 1, 3); + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); * * console.log(array); - * // => [5, 15] + * // => ['a', 'c'] * - * console.log(evens); - * // => [10, 20] + * console.log(pulled); + * // => ['b', 'd'] */ var pullAt = rest(function(array, indexes) { - indexes = arrayMap(baseFlatten(indexes, 1), String); + indexes = baseFlatten(indexes, 1); + + var length = array ? array.length : 0, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); - var result = baseAt(array, indexes); - basePullAt(array, indexes.sort(compareAscending)); return result; }); diff --git a/tools/eslint/node_modules/lodash/range.js b/tools/eslint/node_modules/lodash/range.js index 0b1907964c..fa63b09180 100644 --- a/tools/eslint/node_modules/lodash/range.js +++ b/tools/eslint/node_modules/lodash/range.js @@ -16,7 +16,8 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight * @example * * _.range(4); diff --git a/tools/eslint/node_modules/lodash/rangeRight.js b/tools/eslint/node_modules/lodash/rangeRight.js index fc580da4f6..271fafc982 100644 --- a/tools/eslint/node_modules/lodash/rangeRight.js +++ b/tools/eslint/node_modules/lodash/rangeRight.js @@ -11,7 +11,8 @@ var createRange = require('./_createRange'); * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the new array of numbers. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range * @example * * _.rangeRight(4); diff --git a/tools/eslint/node_modules/lodash/rearg.js b/tools/eslint/node_modules/lodash/rearg.js index 6648ec834e..b098d80d38 100644 --- a/tools/eslint/node_modules/lodash/rearg.js +++ b/tools/eslint/node_modules/lodash/rearg.js @@ -22,7 +22,7 @@ var REARG_FLAG = 256; * * var rearged = _.rearg(function(a, b, c) { * return [a, b, c]; - * }, 2, 0, 1); + * }, [2, 0, 1]); * * rearged('b', 'c', 'a') * // => ['a', 'b', 'c'] diff --git a/tools/eslint/node_modules/lodash/reduce.js b/tools/eslint/node_modules/lodash/reduce.js index 3fdfd04ecb..5a1df4d041 100644 --- a/tools/eslint/node_modules/lodash/reduce.js +++ b/tools/eslint/node_modules/lodash/reduce.js @@ -27,6 +27,7 @@ var arrayReduce = require('./_arrayReduce'), * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. + * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { diff --git a/tools/eslint/node_modules/lodash/reduceRight.js b/tools/eslint/node_modules/lodash/reduceRight.js index 992b661eb3..e06a7cb7b0 100644 --- a/tools/eslint/node_modules/lodash/reduceRight.js +++ b/tools/eslint/node_modules/lodash/reduceRight.js @@ -16,6 +16,7 @@ var arrayReduceRight = require('./_arrayReduceRight'), * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. + * @see _.reduce * @example * * var array = [[0, 1], [2, 3], [4, 5]]; diff --git a/tools/eslint/node_modules/lodash/reject.js b/tools/eslint/node_modules/lodash/reject.js index 92165abb9b..4ed47b3837 100644 --- a/tools/eslint/node_modules/lodash/reject.js +++ b/tools/eslint/node_modules/lodash/reject.js @@ -15,6 +15,7 @@ var arrayFilter = require('./_arrayFilter'), * @param {Array|Function|Object|string} [predicate=_.identity] * The function invoked per iteration. * @returns {Array} Returns the new filtered array. + * @see _.filter * @example * * var users = [ diff --git a/tools/eslint/node_modules/lodash/result.js b/tools/eslint/node_modules/lodash/result.js index 6a4c9d941c..146eb57ee8 100644 --- a/tools/eslint/node_modules/lodash/result.js +++ b/tools/eslint/node_modules/lodash/result.js @@ -1,6 +1,7 @@ var castPath = require('./_castPath'), isFunction = require('./isFunction'), - isKey = require('./_isKey'); + isKey = require('./_isKey'), + toKey = require('./_toKey'); /** * This method is like `_.get` except that if the resolved value is a @@ -43,7 +44,7 @@ function result(object, path, defaultValue) { length = 1; } while (++index < length) { - var value = object == null ? undefined : object[path[index]]; + var value = object == null ? undefined : object[toKey(path[index])]; if (value === undefined) { index = length; value = defaultValue; diff --git a/tools/eslint/node_modules/lodash/sortedIndex.js b/tools/eslint/node_modules/lodash/sortedIndex.js index 044a57e563..e763473ac4 100644 --- a/tools/eslint/node_modules/lodash/sortedIndex.js +++ b/tools/eslint/node_modules/lodash/sortedIndex.js @@ -16,9 +16,6 @@ var baseSortedIndex = require('./_baseSortedIndex'); * * _.sortedIndex([30, 50], 40); * // => 1 - * - * _.sortedIndex([4, 5], 4); - * // => 0 */ function sortedIndex(array, value) { return baseSortedIndex(array, value); diff --git a/tools/eslint/node_modules/lodash/sortedIndexBy.js b/tools/eslint/node_modules/lodash/sortedIndexBy.js index df05972a3f..0326eb77fb 100644 --- a/tools/eslint/node_modules/lodash/sortedIndexBy.js +++ b/tools/eslint/node_modules/lodash/sortedIndexBy.js @@ -18,13 +18,13 @@ var baseIteratee = require('./_baseIteratee'), * into `array`. * @example * - * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 }; + * var objects = [{ 'x': 4 }, { 'x': 5 }]; * - * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict)); - * // => 1 + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 * * // The `_.property` iteratee shorthand. - * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); * // => 0 */ function sortedIndexBy(array, value, iteratee) { diff --git a/tools/eslint/node_modules/lodash/sortedIndexOf.js b/tools/eslint/node_modules/lodash/sortedIndexOf.js index 2c534d324e..72d65d8aab 100644 --- a/tools/eslint/node_modules/lodash/sortedIndexOf.js +++ b/tools/eslint/node_modules/lodash/sortedIndexOf.js @@ -14,8 +14,8 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedIndexOf([1, 1, 2, 2], 2); - * // => 2 + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ function sortedIndexOf(array, value) { var length = array ? array.length : 0; diff --git a/tools/eslint/node_modules/lodash/sortedLastIndex.js b/tools/eslint/node_modules/lodash/sortedLastIndex.js index 919089f4a5..9380cb9cbc 100644 --- a/tools/eslint/node_modules/lodash/sortedLastIndex.js +++ b/tools/eslint/node_modules/lodash/sortedLastIndex.js @@ -15,8 +15,8 @@ var baseSortedIndex = require('./_baseSortedIndex'); * into `array`. * @example * - * _.sortedLastIndex([4, 5], 4); - * // => 1 + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); diff --git a/tools/eslint/node_modules/lodash/sortedLastIndexBy.js b/tools/eslint/node_modules/lodash/sortedLastIndexBy.js index 74e8d7acbf..f2ba954a31 100644 --- a/tools/eslint/node_modules/lodash/sortedLastIndexBy.js +++ b/tools/eslint/node_modules/lodash/sortedLastIndexBy.js @@ -18,8 +18,13 @@ var baseIteratee = require('./_baseIteratee'), * into `array`. * @example * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); * // => 1 */ function sortedLastIndexBy(array, value, iteratee) { diff --git a/tools/eslint/node_modules/lodash/sortedLastIndexOf.js b/tools/eslint/node_modules/lodash/sortedLastIndexOf.js index 80234de2d0..5ff351d688 100644 --- a/tools/eslint/node_modules/lodash/sortedLastIndexOf.js +++ b/tools/eslint/node_modules/lodash/sortedLastIndexOf.js @@ -14,7 +14,7 @@ var baseSortedIndex = require('./_baseSortedIndex'), * @returns {number} Returns the index of the matched value, else `-1`. * @example * - * _.sortedLastIndexOf([1, 1, 2, 2], 2); + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); * // => 3 */ function sortedLastIndexOf(array, value) { diff --git a/tools/eslint/node_modules/lodash/sortedUniqBy.js b/tools/eslint/node_modules/lodash/sortedUniqBy.js index b710592270..1cbdeafb47 100644 --- a/tools/eslint/node_modules/lodash/sortedUniqBy.js +++ b/tools/eslint/node_modules/lodash/sortedUniqBy.js @@ -1,5 +1,5 @@ var baseIteratee = require('./_baseIteratee'), - baseSortedUniqBy = require('./_baseSortedUniqBy'); + baseSortedUniq = require('./_baseSortedUniq'); /** * This method is like `_.uniqBy` except that it's designed and optimized @@ -19,7 +19,7 @@ var baseIteratee = require('./_baseIteratee'), */ function sortedUniqBy(array, iteratee) { return (array && array.length) - ? baseSortedUniqBy(array, baseIteratee(iteratee)) + ? baseSortedUniq(array, baseIteratee(iteratee)) : []; } diff --git a/tools/eslint/node_modules/lodash/split.js b/tools/eslint/node_modules/lodash/split.js index 0718e3fb62..a789e01de2 100644 --- a/tools/eslint/node_modules/lodash/split.js +++ b/tools/eslint/node_modules/lodash/split.js @@ -1,4 +1,5 @@ -var castSlice = require('./_castSlice'), +var baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), isIterateeCall = require('./_isIterateeCall'), isRegExp = require('./isRegExp'), reHasComplexSymbol = require('./_reHasComplexSymbol'), @@ -27,7 +28,7 @@ var nativeSplit = stringProto.split; * @param {string} [string=''] The string to split. * @param {RegExp|string} separator The separator pattern to split by. * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the new array of string segments. + * @returns {Array} Returns the string segments. * @example * * _.split('a-b-c', '-', 2); @@ -46,7 +47,7 @@ function split(string, separator, limit) { typeof separator == 'string' || (separator != null && !isRegExp(separator)) )) { - separator += ''; + separator = baseToString(separator); if (separator == '' && reHasComplexSymbol.test(string)) { return castSlice(stringToArray(string), 0, limit); } diff --git a/tools/eslint/node_modules/lodash/startsWith.js b/tools/eslint/node_modules/lodash/startsWith.js index 367fbecae2..888185524b 100644 --- a/tools/eslint/node_modules/lodash/startsWith.js +++ b/tools/eslint/node_modules/lodash/startsWith.js @@ -1,4 +1,5 @@ var baseClamp = require('./_baseClamp'), + baseToString = require('./_baseToString'), toInteger = require('./toInteger'), toString = require('./toString'); @@ -28,7 +29,7 @@ var baseClamp = require('./_baseClamp'), function startsWith(string, target, position) { string = toString(string); position = baseClamp(toInteger(position), 0, string.length); - return string.lastIndexOf(target, position) == position; + return string.lastIndexOf(baseToString(target), position) == position; } module.exports = startsWith; diff --git a/tools/eslint/node_modules/lodash/stubArray.js b/tools/eslint/node_modules/lodash/stubArray.js new file mode 100644 index 0000000000..16cbf99567 --- /dev/null +++ b/tools/eslint/node_modules/lodash/stubArray.js @@ -0,0 +1,23 @@ +/** + * A method that returns a new empty array. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. + * @example + * + * var arrays = _.times(2, _.stubArray); + * + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; diff --git a/tools/eslint/node_modules/lodash/stubFalse.js b/tools/eslint/node_modules/lodash/stubFalse.js new file mode 100644 index 0000000000..4498027b31 --- /dev/null +++ b/tools/eslint/node_modules/lodash/stubFalse.js @@ -0,0 +1,18 @@ +/** + * A method that returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = stubFalse; diff --git a/tools/eslint/node_modules/lodash/stubObject.js b/tools/eslint/node_modules/lodash/stubObject.js new file mode 100644 index 0000000000..9da12c209b --- /dev/null +++ b/tools/eslint/node_modules/lodash/stubObject.js @@ -0,0 +1,23 @@ +/** + * A method that returns a new empty object. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. + * @example + * + * var objects = _.times(2, _.stubObject); + * + * console.log(objects); + * // => [{}, {}] + * + * console.log(objects[0] === objects[1]); + * // => false + */ +function stubObject() { + return {}; +} + +module.exports = stubObject; diff --git a/tools/eslint/node_modules/lodash/stubString.js b/tools/eslint/node_modules/lodash/stubString.js new file mode 100644 index 0000000000..2f14bcf5c9 --- /dev/null +++ b/tools/eslint/node_modules/lodash/stubString.js @@ -0,0 +1,18 @@ +/** + * A method that returns an empty string. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. + * @example + * + * _.times(2, _.stubString); + * // => ['', ''] + */ +function stubString() { + return ''; +} + +module.exports = stubString; diff --git a/tools/eslint/node_modules/lodash/stubTrue.js b/tools/eslint/node_modules/lodash/stubTrue.js new file mode 100644 index 0000000000..c166806e16 --- /dev/null +++ b/tools/eslint/node_modules/lodash/stubTrue.js @@ -0,0 +1,18 @@ +/** + * A method that returns `true`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. + * @example + * + * _.times(2, _.stubTrue); + * // => [true, true] + */ +function stubTrue() { + return true; +} + +module.exports = stubTrue; diff --git a/tools/eslint/node_modules/lodash/template.js b/tools/eslint/node_modules/lodash/template.js index 304d287259..03d20e591a 100644 --- a/tools/eslint/node_modules/lodash/template.js +++ b/tools/eslint/node_modules/lodash/template.js @@ -91,12 +91,6 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * compiled({ 'user': 'pebbles' }); * // => 'hello pebbles!' * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * * // Use backslashes to treat delimiters as plain text. * var compiled = _.template('<%= "\\<%- value %\\>" %>'); * compiled({ 'value': 'ignored' }); @@ -122,9 +116,15 @@ var reUnescapedString = /['\n\r\u2028\u2029\\]/g; * // return __p; * // } * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * * // Use the `source` property to inline compiled templates for meaningful * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ * var JST = {\ * "main": ' + _.template(mainText).source + '\ * };\ diff --git a/tools/eslint/node_modules/lodash/times.js b/tools/eslint/node_modules/lodash/times.js index d0bff577ab..607838fb48 100644 --- a/tools/eslint/node_modules/lodash/times.js +++ b/tools/eslint/node_modules/lodash/times.js @@ -27,8 +27,8 @@ var nativeMin = Math.min; * _.times(3, String); * // => ['0', '1', '2'] * - * _.times(4, _.constant(true)); - * // => [true, true, true, true] + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ function times(n, iteratee) { n = toInteger(n); diff --git a/tools/eslint/node_modules/lodash/toFinite.js b/tools/eslint/node_modules/lodash/toFinite.js new file mode 100644 index 0000000000..3b5bba6b4e --- /dev/null +++ b/tools/eslint/node_modules/lodash/toFinite.js @@ -0,0 +1,42 @@ +var toNumber = require('./toNumber'); + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0, + MAX_INTEGER = 1.7976931348623157e+308; + +/** + * Converts `value` to a finite number. + * + * @static + * @memberOf _ + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. + * @example + * + * _.toFinite(3.2); + * // => 3.2 + * + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toFinite('3.2'); + * // => 3.2 + */ +function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; + } + return value === value ? value : 0; +} + +module.exports = toFinite; diff --git a/tools/eslint/node_modules/lodash/toInteger.js b/tools/eslint/node_modules/lodash/toInteger.js index 459f0c3710..49fd28dc71 100644 --- a/tools/eslint/node_modules/lodash/toInteger.js +++ b/tools/eslint/node_modules/lodash/toInteger.js @@ -1,13 +1,9 @@ -var toNumber = require('./toNumber'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; +var toFinite = require('./toFinite'); /** * Converts `value` to an integer. * - * **Note:** This function is loosely based on + * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). * * @static @@ -18,7 +14,7 @@ var INFINITY = 1 / 0, * @returns {number} Returns the converted integer. * @example * - * _.toInteger(3); + * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); @@ -27,20 +23,14 @@ var INFINITY = 1 / 0, * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * - * _.toInteger('3'); + * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; diff --git a/tools/eslint/node_modules/lodash/toLength.js b/tools/eslint/node_modules/lodash/toLength.js index 9d41514501..9aac9f6d5f 100644 --- a/tools/eslint/node_modules/lodash/toLength.js +++ b/tools/eslint/node_modules/lodash/toLength.js @@ -19,7 +19,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * @returns {number} Returns the converted integer. * @example * - * _.toLength(3); + * _.toLength(3.2); * // => 3 * * _.toLength(Number.MIN_VALUE); @@ -28,7 +28,7 @@ var MAX_ARRAY_LENGTH = 4294967295; * _.toLength(Infinity); * // => 4294967295 * - * _.toLength('3'); + * _.toLength('3.2'); * // => 3 */ function toLength(value) { diff --git a/tools/eslint/node_modules/lodash/toNumber.js b/tools/eslint/node_modules/lodash/toNumber.js index 9baba70592..d95821170b 100644 --- a/tools/eslint/node_modules/lodash/toNumber.js +++ b/tools/eslint/node_modules/lodash/toNumber.js @@ -31,8 +31,8 @@ var freeParseInt = parseInt; * @returns {number} Returns the number. * @example * - * _.toNumber(3); - * // => 3 + * _.toNumber(3.2); + * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 @@ -40,8 +40,8 @@ var freeParseInt = parseInt; * _.toNumber(Infinity); * // => Infinity * - * _.toNumber('3'); - * // => 3 + * _.toNumber('3.2'); + * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { diff --git a/tools/eslint/node_modules/lodash/toPairs.js b/tools/eslint/node_modules/lodash/toPairs.js index 417ac8ce9c..c4f52ae00e 100644 --- a/tools/eslint/node_modules/lodash/toPairs.js +++ b/tools/eslint/node_modules/lodash/toPairs.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keys = require('./keys'); /** * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entries * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -24,8 +25,6 @@ var baseToPairs = require('./_baseToPairs'), * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ -function toPairs(object) { - return baseToPairs(object, keys(object)); -} +var toPairs = createToPairs(keys); module.exports = toPairs; diff --git a/tools/eslint/node_modules/lodash/toPairsIn.js b/tools/eslint/node_modules/lodash/toPairsIn.js index b84ef7e946..32c562ca7c 100644 --- a/tools/eslint/node_modules/lodash/toPairsIn.js +++ b/tools/eslint/node_modules/lodash/toPairsIn.js @@ -1,9 +1,10 @@ -var baseToPairs = require('./_baseToPairs'), +var createToPairs = require('./_createToPairs'), keysIn = require('./keysIn'); /** * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ @@ -11,7 +12,7 @@ var baseToPairs = require('./_baseToPairs'), * @alias entriesIn * @category Object * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. + * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { @@ -22,10 +23,8 @@ var baseToPairs = require('./_baseToPairs'), * Foo.prototype.c = 3; * * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed) + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ -function toPairsIn(object) { - return baseToPairs(object, keysIn(object)); -} +var toPairsIn = createToPairs(keysIn); module.exports = toPairsIn; diff --git a/tools/eslint/node_modules/lodash/toPath.js b/tools/eslint/node_modules/lodash/toPath.js index e2dc7ae7ef..c9e8e4b2bb 100644 --- a/tools/eslint/node_modules/lodash/toPath.js +++ b/tools/eslint/node_modules/lodash/toPath.js @@ -21,15 +21,6 @@ var arrayMap = require('./_arrayMap'), * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] - * - * var path = ['a', 'b', 'c'], - * newPath = _.toPath(path); - * - * console.log(newPath); - * // => ['a', 'b', 'c'] - * - * console.log(path === newPath); - * // => false */ function toPath(value) { if (isArray(value)) { diff --git a/tools/eslint/node_modules/lodash/toSafeInteger.js b/tools/eslint/node_modules/lodash/toSafeInteger.js index 475874fbff..885c5fb751 100644 --- a/tools/eslint/node_modules/lodash/toSafeInteger.js +++ b/tools/eslint/node_modules/lodash/toSafeInteger.js @@ -16,7 +16,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * @returns {number} Returns the converted integer. * @example * - * _.toSafeInteger(3); + * _.toSafeInteger(3.2); * // => 3 * * _.toSafeInteger(Number.MIN_VALUE); @@ -25,7 +25,7 @@ var MAX_SAFE_INTEGER = 9007199254740991; * _.toSafeInteger(Infinity); * // => 9007199254740991 * - * _.toSafeInteger('3'); + * _.toSafeInteger('3.2'); * // => 3 */ function toSafeInteger(value) { diff --git a/tools/eslint/node_modules/lodash/toString.js b/tools/eslint/node_modules/lodash/toString.js index 2b29ab18f4..f20d65a597 100644 --- a/tools/eslint/node_modules/lodash/toString.js +++ b/tools/eslint/node_modules/lodash/toString.js @@ -1,12 +1,4 @@ -var Symbol = require('./_Symbol'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +var baseToString = require('./_baseToString'); /** * Converts `value` to a string. An empty string is returned for `null` @@ -30,18 +22,7 @@ var symbolProto = Symbol ? Symbol.prototype : undefined, * // => '1,2,3' */ function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return value == null ? '' : baseToString(value); } module.exports = toString; diff --git a/tools/eslint/node_modules/lodash/transform.js b/tools/eslint/node_modules/lodash/transform.js index 3013a83cb2..f438ed8fed 100644 --- a/tools/eslint/node_modules/lodash/transform.js +++ b/tools/eslint/node_modules/lodash/transform.js @@ -12,15 +12,16 @@ var arrayEach = require('./_arrayEach'), * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. The iteratee is invoked - * with four arguments: (accumulator, value, key, object). Iteratee functions - * may exit iteration early by explicitly returning `false`. + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object - * @param {Array|Object} object The object to iterate over. + * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. diff --git a/tools/eslint/node_modules/lodash/trim.js b/tools/eslint/node_modules/lodash/trim.js index ed086523d7..5e38c8ef6e 100644 --- a/tools/eslint/node_modules/lodash/trim.js +++ b/tools/eslint/node_modules/lodash/trim.js @@ -1,4 +1,5 @@ -var castSlice = require('./_castSlice'), +var baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), charsEndIndex = require('./_charsEndIndex'), charsStartIndex = require('./_charsStartIndex'), stringToArray = require('./_stringToArray'), @@ -31,13 +32,10 @@ var reTrim = /^\s+|\s+$/g; */ function trim(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrim, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), diff --git a/tools/eslint/node_modules/lodash/trimEnd.js b/tools/eslint/node_modules/lodash/trimEnd.js index c86302c49d..82c54a9867 100644 --- a/tools/eslint/node_modules/lodash/trimEnd.js +++ b/tools/eslint/node_modules/lodash/trimEnd.js @@ -1,4 +1,5 @@ -var castSlice = require('./_castSlice'), +var baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), charsEndIndex = require('./_charsEndIndex'), stringToArray = require('./_stringToArray'), toString = require('./toString'); @@ -27,13 +28,10 @@ var reTrimEnd = /\s+$/; */ function trimEnd(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrimEnd, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), diff --git a/tools/eslint/node_modules/lodash/trimStart.js b/tools/eslint/node_modules/lodash/trimStart.js index bf7111a587..30f4f47a2d 100644 --- a/tools/eslint/node_modules/lodash/trimStart.js +++ b/tools/eslint/node_modules/lodash/trimStart.js @@ -1,4 +1,5 @@ -var castSlice = require('./_castSlice'), +var baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), charsStartIndex = require('./_charsStartIndex'), stringToArray = require('./_stringToArray'), toString = require('./toString'); @@ -27,13 +28,10 @@ var reTrimStart = /^\s+/; */ function trimStart(string, chars, guard) { string = toString(string); - if (!string) { - return string; - } - if (guard || chars === undefined) { + if (string && (guard || chars === undefined)) { return string.replace(reTrimStart, ''); } - if (!(chars += '')) { + if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), diff --git a/tools/eslint/node_modules/lodash/truncate.js b/tools/eslint/node_modules/lodash/truncate.js index 473cacbeb3..4290315483 100644 --- a/tools/eslint/node_modules/lodash/truncate.js +++ b/tools/eslint/node_modules/lodash/truncate.js @@ -1,4 +1,5 @@ -var castSlice = require('./_castSlice'), +var baseToString = require('./_baseToString'), + castSlice = require('./_castSlice'), isObject = require('./isObject'), isRegExp = require('./isRegExp'), reHasComplexSymbol = require('./_reHasComplexSymbol'), @@ -58,7 +59,7 @@ function truncate(string, options) { if (isObject(options)) { var separator = 'separator' in options ? options.separator : separator; length = 'length' in options ? toInteger(options.length) : length; - omission = 'omission' in options ? toString(options.omission) : omission; + omission = 'omission' in options ? baseToString(options.omission) : omission; } string = toString(string); @@ -98,7 +99,7 @@ function truncate(string, options) { } result = result.slice(0, newEnd === undefined ? end : newEnd); } - } else if (string.indexOf(separator, end) != end) { + } else if (string.indexOf(baseToString(separator), end) != end) { var index = result.lastIndexOf(separator); if (index > -1) { result = result.slice(0, index); diff --git a/tools/eslint/node_modules/lodash/unary.js b/tools/eslint/node_modules/lodash/unary.js index 34c144c5da..76f48f6e35 100644 --- a/tools/eslint/node_modules/lodash/unary.js +++ b/tools/eslint/node_modules/lodash/unary.js @@ -9,7 +9,7 @@ var ary = require('./ary'); * @since 4.0.0 * @category Function * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new function. + * @returns {Function} Returns the new capped function. * @example * * _.map(['6', '8', '10'], _.unary(parseInt)); diff --git a/tools/eslint/node_modules/lodash/union.js b/tools/eslint/node_modules/lodash/union.js index 1276c886a2..80e64b5eb5 100644 --- a/tools/eslint/node_modules/lodash/union.js +++ b/tools/eslint/node_modules/lodash/union.js @@ -16,8 +16,8 @@ var baseFlatten = require('./_baseFlatten'), * @returns {Array} Returns the new array of combined values. * @example * - * _.union([2, 1], [4, 2], [1, 2]); - * // => [2, 1, 4] + * _.union([2], [1, 2]); + * // => [2, 1] */ var union = rest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); diff --git a/tools/eslint/node_modules/lodash/unionBy.js b/tools/eslint/node_modules/lodash/unionBy.js index f44340cb07..6d6fe2b03d 100644 --- a/tools/eslint/node_modules/lodash/unionBy.js +++ b/tools/eslint/node_modules/lodash/unionBy.js @@ -21,8 +21,8 @@ var baseFlatten = require('./_baseFlatten'), * @returns {Array} Returns the new array of combined values. * @example * - * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [2.1, 1.2, 4.3] + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] * * // The `_.property` iteratee shorthand. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); diff --git a/tools/eslint/node_modules/lodash/uniqWith.js b/tools/eslint/node_modules/lodash/uniqWith.js index 957c17d6a9..e09b1729e6 100644 --- a/tools/eslint/node_modules/lodash/uniqWith.js +++ b/tools/eslint/node_modules/lodash/uniqWith.js @@ -14,7 +14,7 @@ var baseUniq = require('./_baseUniq'); * @returns {Array} Returns the new duplicate free array. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * * _.uniqWith(objects, _.isEqual); * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] diff --git a/tools/eslint/node_modules/lodash/util.js b/tools/eslint/node_modules/lodash/util.js index 11b03723e8..156972273b 100644 --- a/tools/eslint/node_modules/lodash/util.js +++ b/tools/eslint/node_modules/lodash/util.js @@ -22,6 +22,11 @@ module.exports = { 'propertyOf': require('./propertyOf'), 'range': require('./range'), 'rangeRight': require('./rangeRight'), + 'stubArray': require('./stubArray'), + 'stubFalse': require('./stubFalse'), + 'stubObject': require('./stubObject'), + 'stubString': require('./stubString'), + 'stubTrue': require('./stubTrue'), 'times': require('./times'), 'toPath': require('./toPath'), 'uniqueId': require('./uniqueId') diff --git a/tools/eslint/node_modules/lodash/without.js b/tools/eslint/node_modules/lodash/without.js index 0900f232ff..6198490a3b 100644 --- a/tools/eslint/node_modules/lodash/without.js +++ b/tools/eslint/node_modules/lodash/without.js @@ -11,12 +11,13 @@ var baseDifference = require('./_baseDifference'), * @memberOf _ * @since 0.1.0 * @category Array - * @param {Array} array The array to filter. + * @param {Array} array The array to inspect. * @param {...*} [values] The values to exclude. * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor * @example * - * _.without([1, 2, 1, 3], 1, 2); + * _.without([2, 1, 2, 3], 1, 2); * // => [3] */ var without = rest(function(array, values) { diff --git a/tools/eslint/node_modules/lodash/words.js b/tools/eslint/node_modules/lodash/words.js index 9f4b55b392..786d14d039 100644 --- a/tools/eslint/node_modules/lodash/words.js +++ b/tools/eslint/node_modules/lodash/words.js @@ -11,11 +11,11 @@ var rsAstralRange = '\\ud800-\\udfff', rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsQuoteRange = '\\u2018\\u2019\\u201c\\u201d', + rsPunctuationRange = '\\u2000-\\u206f', rsSpaceRange = ' \\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', rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsQuoteRange + rsSpaceRange; + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; /** Used to compose unicode capture groups. */ var rsApos = "['\u2019]", diff --git a/tools/eslint/node_modules/lodash/wrapperAt.js b/tools/eslint/node_modules/lodash/wrapperAt.js index 119089453c..4a3eacc35c 100644 --- a/tools/eslint/node_modules/lodash/wrapperAt.js +++ b/tools/eslint/node_modules/lodash/wrapperAt.js @@ -21,9 +21,6 @@ var LazyWrapper = require('./_LazyWrapper'), * * _(object).at(['a[0].b.c', 'a[1]']).value(); * // => [3, 4] - * - * _(['a', 'b', 'c']).at(0, 2).value(); - * // => ['a', 'c'] */ var wrapperAt = rest(function(paths) { paths = baseFlatten(paths, 1); diff --git a/tools/eslint/node_modules/lodash/wrapperLodash.js b/tools/eslint/node_modules/lodash/wrapperLodash.js index 717ff8e3ef..ef84f25192 100644 --- a/tools/eslint/node_modules/lodash/wrapperLodash.js +++ b/tools/eslint/node_modules/lodash/wrapperLodash.js @@ -83,22 +83,24 @@ var hasOwnProperty = objectProto.hasOwnProperty; * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`, * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`, - * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`, - * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`, - * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`, - * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`, - * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`, - * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`, - * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`, - * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`, - * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`, - * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, - * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, - * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`, - * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`, - * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`, - * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words` + * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, + * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, + * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, + * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` * * @name _ * @constructor diff --git a/tools/eslint/node_modules/lodash/xor.js b/tools/eslint/node_modules/lodash/xor.js index 7ec0c295af..ad63b6254c 100644 --- a/tools/eslint/node_modules/lodash/xor.js +++ b/tools/eslint/node_modules/lodash/xor.js @@ -14,11 +14,12 @@ var arrayFilter = require('./_arrayFilter'), * @since 2.4.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without * @example * - * _.xor([2, 1], [4, 2]); - * // => [1, 4] + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ var xor = rest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); diff --git a/tools/eslint/node_modules/lodash/xorBy.js b/tools/eslint/node_modules/lodash/xorBy.js index efb977d212..924f82d2cf 100644 --- a/tools/eslint/node_modules/lodash/xorBy.js +++ b/tools/eslint/node_modules/lodash/xorBy.js @@ -18,11 +18,11 @@ var arrayFilter = require('./_arrayFilter'), * @param {...Array} [arrays] The arrays to inspect. * @param {Array|Function|Object|string} [iteratee=_.identity] * The iteratee invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * - * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor); - * // => [1.2, 4.3] + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] * * // The `_.property` iteratee shorthand. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); diff --git a/tools/eslint/node_modules/lodash/xorWith.js b/tools/eslint/node_modules/lodash/xorWith.js index d1335b837a..d03a4a303a 100644 --- a/tools/eslint/node_modules/lodash/xorWith.js +++ b/tools/eslint/node_modules/lodash/xorWith.js @@ -15,7 +15,7 @@ var arrayFilter = require('./_arrayFilter'), * @category Array * @param {...Array} [arrays] The arrays to inspect. * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @returns {Array} Returns the new array of filtered values. * @example * * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; |