lodash-rails 4.11.2 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b741d6b468f377c24ebad39a039903854540b3a
4
- data.tar.gz: b39057808c27aa9897b25e236155c9429f2fbcb0
3
+ metadata.gz: dd4890be2e4926438845d1638c61ee719aa29f55
4
+ data.tar.gz: 68e86ed6bf8c3ce574949c69c05123ea04217226
5
5
  SHA512:
6
- metadata.gz: 2f7515550993f9eb3b6e772077b174ae89ae55be5f9f5d708dc8a20fc7d10aba5d1f408f3a60699ed47f7be06e4bf698a8502d13bda8a2bf3eaf19d18ef99118
7
- data.tar.gz: a82061e513069f2d7d50bdbf47baa7d1706fc85f0d03160526e1f87ffe8e96749733a004bd63696c771273092f7b430e56bdc216e98a1511b2989293e0258d1a
6
+ metadata.gz: e7ddc10cca8de2294cb7673f79ba2e2dce7a7327321ed4ee630ad2c59610cd522858271d83995dca65f168c6f9fa591fbd48166c7756810f862dd528d0b59f12
7
+ data.tar.gz: 5b893890db7fcbc497af2952c7c7941ed777999fe34c61004292523598901f40deeb2658ff02154e8583f76e5c2c6c81912f084bc81c8ab20110e1cb3049d929
data/README.md CHANGED
@@ -18,7 +18,7 @@ Add the necessary library to `app/assets/javascripts/application.js`:
18
18
 
19
19
  ## What's included?
20
20
 
21
- lodash 4.11.2:
21
+ lodash 4.12.0:
22
22
 
23
23
  * lodash.core.js
24
24
  * lodash.core.min.js
@@ -1,5 +1,5 @@
1
1
  module LoDash
2
2
  module Rails
3
- VERSION = "4.11.2"
3
+ VERSION = "4.12.0"
4
4
  end
5
5
  end
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.11.2 (Custom Build) <https://lodash.com/>
4
- * Build: `lodash core -o ./dist/lodash.core.js`
3
+ * lodash <https://lodash.com/>
5
4
  * Copyright jQuery Foundation and other contributors <https://jquery.org/>
6
5
  * Released under MIT license <https://lodash.com/license>
7
6
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +12,7 @@
13
12
  var undefined;
14
13
 
15
14
  /** Used as the semantic version number. */
16
- var VERSION = '4.11.2';
15
+ var VERSION = '4.12.0';
17
16
 
18
17
  /** Used as the `TypeError` message for "Functions" methods. */
19
18
  var FUNC_ERROR_TEXT = 'Expected a function';
@@ -105,18 +104,6 @@
105
104
 
106
105
  /*--------------------------------------------------------------------------*/
107
106
 
108
- /**
109
- * Creates a new array concatenating `array` with `other`.
110
- *
111
- * @private
112
- * @param {Array} array The first array to concatenate.
113
- * @param {Array} other The second array to concatenate.
114
- * @returns {Array} Returns the new concatenated array.
115
- */
116
- function arrayConcat(array, other) {
117
- return arrayPush(copyArray(array), values);
118
- }
119
-
120
107
  /**
121
108
  * Appends the elements of `values` to `array`.
122
109
  *
@@ -378,10 +365,10 @@
378
365
  * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
379
366
  * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
380
367
  * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
381
- * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
382
- * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
383
- * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
384
- * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
368
+ * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
369
+ * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
370
+ * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
371
+ * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
385
372
  * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
386
373
  * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
387
374
  * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
@@ -390,9 +377,9 @@
390
377
  * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
391
378
  * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
392
379
  * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
393
- * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
394
- * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
395
- * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
380
+ * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toFinite`,
381
+ * `toInteger`, `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`,
382
+ * `toString`, `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
396
383
  * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
397
384
  *
398
385
  * @name _
@@ -651,7 +638,7 @@
651
638
  * @private
652
639
  * @param {Object} object The object to inspect.
653
640
  * @param {Array} props The property names to filter.
654
- * @returns {Array} Returns the new array of filtered property names.
641
+ * @returns {Array} Returns the function names.
655
642
  */
656
643
  function baseFunctions(object, props) {
657
644
  return baseFilter(props, function(key) {
@@ -856,7 +843,7 @@
856
843
  *
857
844
  * @private
858
845
  * @param {Object} source The object of property values to match.
859
- * @returns {Function} Returns the new function.
846
+ * @returns {Function} Returns the new spec function.
860
847
  */
861
848
  function baseMatches(source) {
862
849
  var props = keys(source);
@@ -902,7 +889,7 @@
902
889
  *
903
890
  * @private
904
891
  * @param {string} key The key of the property to get.
905
- * @returns {Function} Returns the new function.
892
+ * @returns {Function} Returns the new accessor function.
906
893
  */
907
894
  function baseProperty(key) {
908
895
  return function(object) {
@@ -1067,7 +1054,7 @@
1067
1054
  length = sources.length,
1068
1055
  customizer = length > 1 ? sources[length - 1] : undefined;
1069
1056
 
1070
- customizer = typeof customizer == 'function'
1057
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
1071
1058
  ? (length--, customizer)
1072
1059
  : undefined;
1073
1060
 
@@ -1212,16 +1199,16 @@
1212
1199
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1213
1200
  */
1214
1201
  function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
1215
- var index = -1,
1216
- isPartial = bitmask & PARTIAL_COMPARE_FLAG,
1217
- isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
1202
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
1218
1203
  arrLength = array.length,
1219
1204
  othLength = other.length;
1220
1205
 
1221
1206
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1222
1207
  return false;
1223
1208
  }
1224
- var result = true;
1209
+ var index = -1,
1210
+ result = true,
1211
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? [] : undefined;
1225
1212
 
1226
1213
  // Ignore non-index properties.
1227
1214
  while (++index < arrLength) {
@@ -1237,10 +1224,12 @@
1237
1224
  break;
1238
1225
  }
1239
1226
  // Recursively compare arrays (susceptible to call stack limits).
1240
- if (isUnordered) {
1241
- if (!baseSome(other, function(othValue) {
1242
- return arrValue === othValue ||
1243
- equalFunc(arrValue, othValue, customizer, bitmask, stack);
1227
+ if (seen) {
1228
+ if (!baseSome(other, function(othValue, othIndex) {
1229
+ if (!indexOf(seen, othIndex) &&
1230
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
1231
+ return seen.push(othIndex);
1232
+ }
1244
1233
  })) {
1245
1234
  result = false;
1246
1235
  break;
@@ -1405,7 +1394,7 @@
1405
1394
  * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
1406
1395
  */
1407
1396
  function isFlattenable(value) {
1408
- return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
1397
+ return isArray(value) || isArguments(value);
1409
1398
  }
1410
1399
 
1411
1400
  /**
@@ -1491,16 +1480,16 @@
1491
1480
  */
1492
1481
  function concat() {
1493
1482
  var length = arguments.length,
1494
- array = castArray(arguments[0]);
1483
+ args = Array(length ? length - 1 : 0),
1484
+ array = arguments[0],
1485
+ index = length;
1495
1486
 
1496
- if (length < 2) {
1497
- return length ? copyArray(array) : [];
1498
- }
1499
- var args = Array(length - 1);
1500
- while (length--) {
1501
- args[length - 1] = arguments[length];
1487
+ while (index--) {
1488
+ args[index - 1] = arguments[index];
1502
1489
  }
1503
- return arrayConcat(array, baseFlatten(args, 1));
1490
+ return length
1491
+ ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
1492
+ : [];
1504
1493
  }
1505
1494
 
1506
1495
  /**
@@ -2280,7 +2269,7 @@
2280
2269
  * @since 3.0.0
2281
2270
  * @category Function
2282
2271
  * @param {Function} predicate The predicate to negate.
2283
- * @returns {Function} Returns the new function.
2272
+ * @returns {Function} Returns the new negated function.
2284
2273
  * @example
2285
2274
  *
2286
2275
  * function isEven(n) {
@@ -2372,47 +2361,6 @@
2372
2361
 
2373
2362
  /*------------------------------------------------------------------------*/
2374
2363
 
2375
- /**
2376
- * Casts `value` as an array if it's not one.
2377
- *
2378
- * @static
2379
- * @memberOf _
2380
- * @since 4.4.0
2381
- * @category Lang
2382
- * @param {*} value The value to inspect.
2383
- * @returns {Array} Returns the cast array.
2384
- * @example
2385
- *
2386
- * _.castArray(1);
2387
- * // => [1]
2388
- *
2389
- * _.castArray({ 'a': 1 });
2390
- * // => [{ 'a': 1 }]
2391
- *
2392
- * _.castArray('abc');
2393
- * // => ['abc']
2394
- *
2395
- * _.castArray(null);
2396
- * // => [null]
2397
- *
2398
- * _.castArray(undefined);
2399
- * // => [undefined]
2400
- *
2401
- * _.castArray();
2402
- * // => []
2403
- *
2404
- * var array = [1, 2, 3];
2405
- * console.log(_.castArray(array) === array);
2406
- * // => true
2407
- */
2408
- function castArray() {
2409
- if (!arguments.length) {
2410
- return [];
2411
- }
2412
- var value = arguments[0];
2413
- return isArray(value) ? value : [value];
2414
- }
2415
-
2416
2364
  /**
2417
2365
  * Creates a shallow clone of `value`.
2418
2366
  *
@@ -2729,14 +2677,14 @@
2729
2677
  * _.isFinite(3);
2730
2678
  * // => true
2731
2679
  *
2732
- * _.isFinite(Number.MAX_VALUE);
2733
- * // => true
2734
- *
2735
- * _.isFinite(3.14);
2680
+ * _.isFinite(Number.MIN_VALUE);
2736
2681
  * // => true
2737
2682
  *
2738
2683
  * _.isFinite(Infinity);
2739
2684
  * // => false
2685
+ *
2686
+ * _.isFinite('3');
2687
+ * // => false
2740
2688
  */
2741
2689
  function isFinite(value) {
2742
2690
  return typeof value == 'number' && nativeIsFinite(value);
@@ -3056,7 +3004,7 @@
3056
3004
  * @returns {number} Returns the converted integer.
3057
3005
  * @example
3058
3006
  *
3059
- * _.toInteger(3);
3007
+ * _.toInteger(3.2);
3060
3008
  * // => 3
3061
3009
  *
3062
3010
  * _.toInteger(Number.MIN_VALUE);
@@ -3065,7 +3013,7 @@
3065
3013
  * _.toInteger(Infinity);
3066
3014
  * // => 1.7976931348623157e+308
3067
3015
  *
3068
- * _.toInteger('3');
3016
+ * _.toInteger('3.2');
3069
3017
  * // => 3
3070
3018
  */
3071
3019
  var toInteger = Number;
@@ -3081,8 +3029,8 @@
3081
3029
  * @returns {number} Returns the number.
3082
3030
  * @example
3083
3031
  *
3084
- * _.toNumber(3);
3085
- * // => 3
3032
+ * _.toNumber(3.2);
3033
+ * // => 3.2
3086
3034
  *
3087
3035
  * _.toNumber(Number.MIN_VALUE);
3088
3036
  * // => 5e-324
@@ -3090,8 +3038,8 @@
3090
3038
  * _.toNumber(Infinity);
3091
3039
  * // => Infinity
3092
3040
  *
3093
- * _.toNumber('3');
3094
- * // => 3
3041
+ * _.toNumber('3.2');
3042
+ * // => 3.2
3095
3043
  */
3096
3044
  var toNumber = Number;
3097
3045
 
@@ -3626,7 +3574,7 @@
3626
3574
  * @since 3.0.0
3627
3575
  * @category Util
3628
3576
  * @param {Object} source The object of property values to match.
3629
- * @returns {Function} Returns the new function.
3577
+ * @returns {Function} Returns the new spec function.
3630
3578
  * @example
3631
3579
  *
3632
3580
  * var users = [
@@ -1,30 +1,28 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
4
- * Build: `lodash core -o ./dist/lodash.core.js`
3
+ * lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
5
4
  */
6
5
  ;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return O(t,function(t){return n[t]})}function u(n){return n&&n.Object===Object?n:null}function o(n){return gn[n]}function i(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function c(n){return n instanceof f?n:new f(n)}function f(n,t){
7
6
  this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(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 l(n){return nn(n)?Bn(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(pn,r)},t)}function s(n,t){var r=true;return zn(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===pn?i===i:r(i,c)))var c=i,f=o;
8
7
  }return f}function v(n,t){var r=[];return zn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=G),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Cn(n,t,on)}function b(n,t){return v(t,function(t){return Y(n[t])})}function _(n,t){return n>t}function d(n,t,r,e,u){return n===t?true:null==n||null==t||!nn(n)&&!tn(t)?n!==n&&t!==t:j(n,t,d,r,e,u)}function j(n,t,r,e,u,o){var c=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";
9
- c||(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&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=U(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o),
10
- o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(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&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),H(t,function(t,r){
11
- return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(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 S(n){return N(n,0,n.length)}function T(n,t){var r;return zn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(t,r){return H(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function R(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){
12
- 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 B(n){return L(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 D(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return nn(t)?t:r}}function I(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==On&&this instanceof e?u:n;++c<f;)a[c]=r[c];
13
- for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=D(n);return e}function $(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(!T(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 q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":
14
- 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 z(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)),
15
- a}function C(n){var t=n?n.length:pn;if(Z(t)&&(Vn(n)||en(n)||W(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function G(n){return tn(n)&&X(n)&&(Vn(n)||W(n))}function J(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||yn.test(n))&&n>-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function P(n){return n&&n.length?n[0]:pn}function U(n,r){return t(n,m(r),zn)}function V(n,t){return zn(n,m(t))}function H(n,t,e){
16
- return r(n,m(t),e,3>arguments.length,zn)}function K(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 L(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 Q(){
17
- if(!arguments.length)return[];var n=arguments[0];return Vn(n)?n:[n]}function W(n){return tn(n)&&X(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n))}function X(n){return null!=n&&Z(Gn(n))&&!Y(n)}function Y(n){return n=nn(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function Z(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object";
18
- }function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t<u;){
19
- var f=e[t];i&&("length"==f||J(f,c))||"constructor"==f&&(r||!kn.call(n,f))||o.push(f)}return o}function fn(n){return n?e(n,on(n)):[]}function an(n){return n}function ln(t,r,e){var u=on(r),o=b(r,u);null!=e||nn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,on(r)));var i=!(nn(e)&&"chain"in e&&!e.chain),c=Y(t);return zn(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__=S(this.__actions__)).push({func:u,args:arguments,
20
- 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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max;
21
- f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(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}}(g),Cn=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")&&(w=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var Gn=k("length"),Jn=String,Mn=L(function(n,t,r){
22
- return I(n,t,r)}),Pn=L(function(n,t){return p(n,1,t)}),Un=L(function(n,t,r){return p(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=B(function(n,t){R(t,on(t),n)}),Qn=B(function(n,t){R(t,cn(t),n)}),Wn=B(function(n,t,r,e){R(t,cn(t),n,e)}),Xn=L(function(n){return n.push(pn,a),Wn.apply(pn,n)}),Yn=L(function(n,t){return null==n?{}:E(n,O(y(t,1),Jn))}),Zn=m;c.assignIn=Qn,c.before=K,c.bind=Mn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){
23
- var t=arguments.length,r=Q(arguments[0]);if(2>t)return t?S(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return y(e,1),n(S(r),fn)},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,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,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){
24
- if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return K(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(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!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){
25
- 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}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=U,c.forEach=V,c.has=function(n,t){return null!=n&&kn.call(n,t);
26
- },c.head=P,c.identity=an,c.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},c.isArguments=W,c.isArray=Vn,c.isBoolean=function(n){return true===n||false===n||tn(n)&&"[object Boolean]"==Sn.call(n)},c.isDate=function(n){return tn(n)&&"[object Date]"==Sn.call(n)},c.isEmpty=function(n){return X(n)&&(Vn(n)||en(n)||Y(n.splice)||W(n))?!n.length:!on(n).length},c.isEqual=function(n,t){return d(n,t)},
27
- c.isFinite=function(n){return typeof n=="number"&&In(n)},c.isFunction=Y,c.isNaN=function(n){return rn(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=rn,c.isObject=nn,c.isRegExp=function(n){return nn(n)&&"[object RegExp]"==Sn.call(n)},c.isString=en,c.isUndefined=function(n){return n===pn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},c.max=function(n){return n&&n.length?h(n,an,_):pn},c.min=function(n){return n&&n.length?h(n,an,x):pn},c.noConflict=function(){return On._===this&&(On._=Tn),
28
- this},c.noop=function(){},c.reduce=H,c.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),Y(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=X(n)?n:on(n),n.length)},c.some=function(n,t,r){return t=r?pn:t,T(n,m(t))},c.uniqueId=function(n){var t=++Nn;return un(n)+t},c.each=V,c.first=P,ln(c,function(){var n={};return g(c,function(t,r){kn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.11.2",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
29
- 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);c.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)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(wn||mn||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
30
- return c}):_n&&dn?(jn&&((dn.exports=c)._=c),_n._=c):On._=c}).call(this);
8
+ c||(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&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=V(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o),
9
+ o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(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&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),K(t,function(t,r){
10
+ return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(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 S(n){return N(n,0,n.length)}function T(n,t){var r;return zn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(t,r){return K(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function R(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){
11
+ 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 B(n){return Q(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:pn,o=n.length>3&&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 D(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return nn(t)?t:r}}function I(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==On&&this instanceof e?u:n;++c<f;)a[c]=r[c];
12
+ for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=D(n);return e}function $(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?[]:pn;++c<i;){var l=n[c],p=t[c];if(void 0!==pn){f=false;break}if(a){if(!T(t,function(n,t){return U(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]":
13
+ 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 z(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,
14
+ r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),a}function C(n){var t=n?n.length:pn;if(Z(t)&&(Vn(n)||en(n)||W(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function G(n){return Vn(n)||W(n)}function J(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||yn.test(n))&&n>-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En);
15
+ }function P(n){return n&&n.length?n[0]:pn}function U(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}function V(n,r){return t(n,m(r),zn)}function H(n,t){return zn(n,m(t))}function K(n,t,e){return r(n,m(t),e,3>arguments.length,zn)}function L(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}}
16
+ function Q(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 W(n){return tn(n)&&X(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n))}function X(n){return null!=n&&Z(Gn(n))&&!Y(n)}function Y(n){return n=nn(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n;
17
+ }function Z(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object"}function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;
18
+ for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t<u;){var f=e[t];i&&("length"==f||J(f,c))||"constructor"==f&&(r||!kn.call(n,f))||o.push(f)}return o}function fn(n){return n?e(n,on(n)):[]}function an(n){return n}function ln(t,r,e){var u=on(r),o=b(r,u);null!=e||nn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,on(r)));var i=!(nn(e)&&"chain"in e&&!e.chain),c=Y(t);return zn(o,function(e){
19
+ 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__=S(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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max;
20
+ f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(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}}(g),Cn=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")&&(w=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var Gn=k("length"),Jn=String,Mn=Q(function(n,t,r){
21
+ return I(n,t,r)}),Pn=Q(function(n,t){return p(n,1,t)}),Un=Q(function(n,t,r){return p(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=B(function(n,t){R(t,on(t),n)}),Qn=B(function(n,t){R(t,cn(t),n)}),Wn=B(function(n,t,r,e){R(t,cn(t),n,e)}),Xn=Q(function(n){return n.push(pn,a),Wn.apply(pn,n)}),Yn=Q(function(n,t){return null==n?{}:E(n,O(y(t,1),Jn))}),Zn=m;c.assignIn=Qn,c.before=L,c.bind=Mn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){
22
+ for(var t=arguments.length,r=Array(t?t-1:0),e=arguments[0],u=t;u--;)r[u-1]=arguments[u];return t?n(Vn(e)?S(e):[e],y(r,1)):[]},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,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,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){
23
+ if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return L(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(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!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){
24
+ 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}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=V,c.forEach=H,c.has=function(n,t){return null!=n&&kn.call(n,t);
25
+ },c.head=P,c.identity=an,c.indexOf=U,c.isArguments=W,c.isArray=Vn,c.isBoolean=function(n){return true===n||false===n||tn(n)&&"[object Boolean]"==Sn.call(n)},c.isDate=function(n){return tn(n)&&"[object Date]"==Sn.call(n)},c.isEmpty=function(n){return X(n)&&(Vn(n)||en(n)||Y(n.splice)||W(n))?!n.length:!on(n).length},c.isEqual=function(n,t){return d(n,t)},c.isFinite=function(n){return typeof n=="number"&&In(n)},c.isFunction=Y,c.isNaN=function(n){return rn(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=rn,
26
+ c.isObject=nn,c.isRegExp=function(n){return nn(n)&&"[object RegExp]"==Sn.call(n)},c.isString=en,c.isUndefined=function(n){return n===pn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},c.max=function(n){return n&&n.length?h(n,an,_):pn},c.min=function(n){return n&&n.length?h(n,an,x):pn},c.noConflict=function(){return On._===this&&(On._=Tn),this},c.noop=function(){},c.reduce=K,c.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),Y(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=X(n)?n:on(n),
27
+ n.length)},c.some=function(n,t,r){return t=r?pn:t,T(n,m(t))},c.uniqueId=function(n){var t=++Nn;return un(n)+t},c.each=H,c.first=P,ln(c,function(){var n={};return g(c,function(t,r){kn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.12.0",zn("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);c.prototype[n]=function(){
28
+ 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)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(wn||mn||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return c}):_n&&dn?(jn&&((dn.exports=c)._=c),_n._=c):On._=c}).call(this);
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * lodash 4.11.2 (Custom Build) <https://lodash.com/>
4
- * Build: `lodash -o ./dist/lodash.js`
3
+ * lodash <https://lodash.com/>
5
4
  * Copyright jQuery Foundation and other contributors <https://jquery.org/>
6
5
  * Released under MIT license <https://lodash.com/license>
7
6
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@@ -13,7 +12,7 @@
13
12
  var undefined;
14
13
 
15
14
  /** Used as the semantic version number. */
16
- var VERSION = '4.11.2';
15
+ var VERSION = '4.12.0';
17
16
 
18
17
  /** Used as the size to enable large array optimizations. */
19
18
  var LARGE_ARRAY_SIZE = 200;
@@ -457,30 +456,6 @@
457
456
  return accumulator;
458
457
  }
459
458
 
460
- /**
461
- * Creates a new array concatenating `array` with `other`.
462
- *
463
- * @private
464
- * @param {Array} array The first array to concatenate.
465
- * @param {Array} other The second array to concatenate.
466
- * @returns {Array} Returns the new concatenated array.
467
- */
468
- function arrayConcat(array, other) {
469
- var index = -1,
470
- length = array.length,
471
- othIndex = -1,
472
- othLength = other.length,
473
- result = Array(length + othLength);
474
-
475
- while (++index < length) {
476
- result[index] = array[index];
477
- }
478
- while (++othIndex < othLength) {
479
- result[index++] = other[othIndex];
480
- }
481
- return result;
482
- }
483
-
484
459
  /**
485
460
  * A specialized version of `_.forEach` for arrays without support for
486
461
  * iteratee shorthands.
@@ -908,7 +883,7 @@
908
883
  * @private
909
884
  * @param {Object} object The object to query.
910
885
  * @param {Array} props The property names to get values for.
911
- * @returns {Object} Returns the new array of key-value pairs.
886
+ * @returns {Object} Returns the key-value pairs.
912
887
  */
913
888
  function baseToPairs(object, props) {
914
889
  return arrayMap(props, function(key) {
@@ -921,7 +896,7 @@
921
896
  *
922
897
  * @private
923
898
  * @param {Function} func The function to cap arguments for.
924
- * @returns {Function} Returns the new function.
899
+ * @returns {Function} Returns the new capped function.
925
900
  */
926
901
  function baseUnary(func) {
927
902
  return function(value) {
@@ -945,6 +920,18 @@
945
920
  });
946
921
  }
947
922
 
923
+ /**
924
+ * Checks if a cache value for `key` exists.
925
+ *
926
+ * @private
927
+ * @param {Object} cache The cache to query.
928
+ * @param {string} key The key of the entry to check.
929
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
930
+ */
931
+ function cacheHas(cache, key) {
932
+ return cache.has(key);
933
+ }
934
+
948
935
  /**
949
936
  * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
950
937
  * that is not found in the character symbols.
@@ -1101,11 +1088,11 @@
1101
1088
  }
1102
1089
 
1103
1090
  /**
1104
- * Converts `map` to an array.
1091
+ * Converts `map` to its key-value pairs.
1105
1092
  *
1106
1093
  * @private
1107
1094
  * @param {Object} map The map to convert.
1108
- * @returns {Array} Returns the converted array.
1095
+ * @returns {Array} Returns the key-value pairs.
1109
1096
  */
1110
1097
  function mapToArray(map) {
1111
1098
  var index = -1,
@@ -1143,11 +1130,11 @@
1143
1130
  }
1144
1131
 
1145
1132
  /**
1146
- * Converts `set` to an array.
1133
+ * Converts `set` to an array of its values.
1147
1134
  *
1148
1135
  * @private
1149
1136
  * @param {Object} set The set to convert.
1150
- * @returns {Array} Returns the converted array.
1137
+ * @returns {Array} Returns the values.
1151
1138
  */
1152
1139
  function setToArray(set) {
1153
1140
  var index = -1,
@@ -1159,6 +1146,23 @@
1159
1146
  return result;
1160
1147
  }
1161
1148
 
1149
+ /**
1150
+ * Converts `set` to its value-value pairs.
1151
+ *
1152
+ * @private
1153
+ * @param {Object} set The set to convert.
1154
+ * @returns {Array} Returns the value-value pairs.
1155
+ */
1156
+ function setToPairs(set) {
1157
+ var index = -1,
1158
+ result = Array(set.size);
1159
+
1160
+ set.forEach(function(value) {
1161
+ result[++index] = [value, value];
1162
+ });
1163
+ return result;
1164
+ }
1165
+
1162
1166
  /**
1163
1167
  * Gets the number of symbols in `string`.
1164
1168
  *
@@ -1412,10 +1416,10 @@
1412
1416
  * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
1413
1417
  * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
1414
1418
  * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
1415
- * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
1416
- * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
1417
- * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
1418
- * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
1419
+ * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
1420
+ * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
1421
+ * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
1422
+ * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
1419
1423
  * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
1420
1424
  * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
1421
1425
  * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
@@ -1424,9 +1428,9 @@
1424
1428
  * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
1425
1429
  * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
1426
1430
  * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
1427
- * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
1428
- * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
1429
- * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
1431
+ * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toFinite`,
1432
+ * `toInteger`, `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`,
1433
+ * `toString`, `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
1430
1434
  * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
1431
1435
  *
1432
1436
  * @name _
@@ -1686,64 +1690,212 @@
1686
1690
  *
1687
1691
  * @private
1688
1692
  * @constructor
1689
- * @returns {Object} Returns the new hash object.
1693
+ * @param {Array} [entries] The key-value pairs to cache.
1690
1694
  */
1691
- function Hash() {}
1695
+ function Hash(entries) {
1696
+ var index = -1,
1697
+ length = entries ? entries.length : 0;
1698
+
1699
+ this.clear();
1700
+ while (++index < length) {
1701
+ var entry = entries[index];
1702
+ this.set(entry[0], entry[1]);
1703
+ }
1704
+ }
1705
+
1706
+ /**
1707
+ * Removes all key-value entries from the hash.
1708
+ *
1709
+ * @private
1710
+ * @name clear
1711
+ * @memberOf Hash
1712
+ */
1713
+ function hashClear() {
1714
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
1715
+ }
1692
1716
 
1693
1717
  /**
1694
1718
  * Removes `key` and its value from the hash.
1695
1719
  *
1696
1720
  * @private
1721
+ * @name delete
1722
+ * @memberOf Hash
1697
1723
  * @param {Object} hash The hash to modify.
1698
1724
  * @param {string} key The key of the value to remove.
1699
1725
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1700
1726
  */
1701
- function hashDelete(hash, key) {
1702
- return hashHas(hash, key) && delete hash[key];
1727
+ function hashDelete(key) {
1728
+ return this.has(key) && delete this.__data__[key];
1703
1729
  }
1704
1730
 
1705
1731
  /**
1706
1732
  * Gets the hash value for `key`.
1707
1733
  *
1708
1734
  * @private
1709
- * @param {Object} hash The hash to query.
1735
+ * @name get
1736
+ * @memberOf Hash
1710
1737
  * @param {string} key The key of the value to get.
1711
1738
  * @returns {*} Returns the entry value.
1712
1739
  */
1713
- function hashGet(hash, key) {
1740
+ function hashGet(key) {
1741
+ var data = this.__data__;
1714
1742
  if (nativeCreate) {
1715
- var result = hash[key];
1743
+ var result = data[key];
1716
1744
  return result === HASH_UNDEFINED ? undefined : result;
1717
1745
  }
1718
- return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
1746
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
1719
1747
  }
1720
1748
 
1721
1749
  /**
1722
1750
  * Checks if a hash value for `key` exists.
1723
1751
  *
1724
1752
  * @private
1725
- * @param {Object} hash The hash to query.
1753
+ * @name has
1754
+ * @memberOf Hash
1726
1755
  * @param {string} key The key of the entry to check.
1727
1756
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1728
1757
  */
1729
- function hashHas(hash, key) {
1730
- return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
1758
+ function hashHas(key) {
1759
+ var data = this.__data__;
1760
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
1731
1761
  }
1732
1762
 
1733
1763
  /**
1734
1764
  * Sets the hash `key` to `value`.
1735
1765
  *
1736
1766
  * @private
1737
- * @param {Object} hash The hash to modify.
1767
+ * @name set
1768
+ * @memberOf Hash
1769
+ * @param {string} key The key of the value to set.
1770
+ * @param {*} value The value to set.
1771
+ * @returns {Object} Returns the hash instance.
1772
+ */
1773
+ function hashSet(key, value) {
1774
+ var data = this.__data__;
1775
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1776
+ return this;
1777
+ }
1778
+
1779
+ // Add methods to `Hash`.
1780
+ Hash.prototype.clear = hashClear;
1781
+ Hash.prototype['delete'] = hashDelete;
1782
+ Hash.prototype.get = hashGet;
1783
+ Hash.prototype.has = hashHas;
1784
+ Hash.prototype.set = hashSet;
1785
+
1786
+ /*------------------------------------------------------------------------*/
1787
+
1788
+ /**
1789
+ * Creates an list cache object.
1790
+ *
1791
+ * @private
1792
+ * @constructor
1793
+ * @param {Array} [entries] The key-value pairs to cache.
1794
+ */
1795
+ function ListCache(entries) {
1796
+ var index = -1,
1797
+ length = entries ? entries.length : 0;
1798
+
1799
+ this.clear();
1800
+ while (++index < length) {
1801
+ var entry = entries[index];
1802
+ this.set(entry[0], entry[1]);
1803
+ }
1804
+ }
1805
+
1806
+ /**
1807
+ * Removes all key-value entries from the list cache.
1808
+ *
1809
+ * @private
1810
+ * @name clear
1811
+ * @memberOf ListCache
1812
+ */
1813
+ function listCacheClear() {
1814
+ this.__data__ = [];
1815
+ }
1816
+
1817
+ /**
1818
+ * Removes `key` and its value from the list cache.
1819
+ *
1820
+ * @private
1821
+ * @name delete
1822
+ * @memberOf ListCache
1823
+ * @param {string} key The key of the value to remove.
1824
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1825
+ */
1826
+ function listCacheDelete(key) {
1827
+ var data = this.__data__,
1828
+ index = assocIndexOf(data, key);
1829
+
1830
+ if (index < 0) {
1831
+ return false;
1832
+ }
1833
+ var lastIndex = data.length - 1;
1834
+ if (index == lastIndex) {
1835
+ data.pop();
1836
+ } else {
1837
+ splice.call(data, index, 1);
1838
+ }
1839
+ return true;
1840
+ }
1841
+
1842
+ /**
1843
+ * Gets the list cache value for `key`.
1844
+ *
1845
+ * @private
1846
+ * @name get
1847
+ * @memberOf ListCache
1848
+ * @param {string} key The key of the value to get.
1849
+ * @returns {*} Returns the entry value.
1850
+ */
1851
+ function listCacheGet(key) {
1852
+ var data = this.__data__,
1853
+ index = assocIndexOf(data, key);
1854
+
1855
+ return index < 0 ? undefined : data[index][1];
1856
+ }
1857
+
1858
+ /**
1859
+ * Checks if a list cache value for `key` exists.
1860
+ *
1861
+ * @private
1862
+ * @name has
1863
+ * @memberOf ListCache
1864
+ * @param {string} key The key of the entry to check.
1865
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1866
+ */
1867
+ function listCacheHas(key) {
1868
+ return assocIndexOf(this.__data__, key) > -1;
1869
+ }
1870
+
1871
+ /**
1872
+ * Sets the list cache `key` to `value`.
1873
+ *
1874
+ * @private
1875
+ * @name set
1876
+ * @memberOf ListCache
1738
1877
  * @param {string} key The key of the value to set.
1739
1878
  * @param {*} value The value to set.
1879
+ * @returns {Object} Returns the list cache instance.
1740
1880
  */
1741
- function hashSet(hash, key, value) {
1742
- hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1881
+ function listCacheSet(key, value) {
1882
+ var data = this.__data__,
1883
+ index = assocIndexOf(data, key);
1884
+
1885
+ if (index < 0) {
1886
+ data.push([key, value]);
1887
+ } else {
1888
+ data[index][1] = value;
1889
+ }
1890
+ return this;
1743
1891
  }
1744
1892
 
1745
- // Avoid inheriting from `Object.prototype` when possible.
1746
- Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
1893
+ // Add methods to `ListCache`.
1894
+ ListCache.prototype.clear = listCacheClear;
1895
+ ListCache.prototype['delete'] = listCacheDelete;
1896
+ ListCache.prototype.get = listCacheGet;
1897
+ ListCache.prototype.has = listCacheHas;
1898
+ ListCache.prototype.set = listCacheSet;
1747
1899
 
1748
1900
  /*------------------------------------------------------------------------*/
1749
1901
 
@@ -1752,15 +1904,15 @@
1752
1904
  *
1753
1905
  * @private
1754
1906
  * @constructor
1755
- * @param {Array} [values] The values to cache.
1907
+ * @param {Array} [entries] The key-value pairs to cache.
1756
1908
  */
1757
- function MapCache(values) {
1909
+ function MapCache(entries) {
1758
1910
  var index = -1,
1759
- length = values ? values.length : 0;
1911
+ length = entries ? entries.length : 0;
1760
1912
 
1761
1913
  this.clear();
1762
1914
  while (++index < length) {
1763
- var entry = values[index];
1915
+ var entry = entries[index];
1764
1916
  this.set(entry[0], entry[1]);
1765
1917
  }
1766
1918
  }
@@ -1772,10 +1924,10 @@
1772
1924
  * @name clear
1773
1925
  * @memberOf MapCache
1774
1926
  */
1775
- function mapClear() {
1927
+ function mapCacheClear() {
1776
1928
  this.__data__ = {
1777
1929
  'hash': new Hash,
1778
- 'map': Map ? new Map : [],
1930
+ 'map': new (Map || ListCache),
1779
1931
  'string': new Hash
1780
1932
  };
1781
1933
  }
@@ -1789,12 +1941,8 @@
1789
1941
  * @param {string} key The key of the value to remove.
1790
1942
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1791
1943
  */
1792
- function mapDelete(key) {
1793
- var data = this.__data__;
1794
- if (isKeyable(key)) {
1795
- return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
1796
- }
1797
- return Map ? data.map['delete'](key) : assocDelete(data.map, key);
1944
+ function mapCacheDelete(key) {
1945
+ return getMapData(this, key)['delete'](key);
1798
1946
  }
1799
1947
 
1800
1948
  /**
@@ -1806,12 +1954,8 @@
1806
1954
  * @param {string} key The key of the value to get.
1807
1955
  * @returns {*} Returns the entry value.
1808
1956
  */
1809
- function mapGet(key) {
1810
- var data = this.__data__;
1811
- if (isKeyable(key)) {
1812
- return hashGet(typeof key == 'string' ? data.string : data.hash, key);
1813
- }
1814
- return Map ? data.map.get(key) : assocGet(data.map, key);
1957
+ function mapCacheGet(key) {
1958
+ return getMapData(this, key).get(key);
1815
1959
  }
1816
1960
 
1817
1961
  /**
@@ -1823,12 +1967,8 @@
1823
1967
  * @param {string} key The key of the entry to check.
1824
1968
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1825
1969
  */
1826
- function mapHas(key) {
1827
- var data = this.__data__;
1828
- if (isKeyable(key)) {
1829
- return hashHas(typeof key == 'string' ? data.string : data.hash, key);
1830
- }
1831
- return Map ? data.map.has(key) : assocHas(data.map, key);
1970
+ function mapCacheHas(key) {
1971
+ return getMapData(this, key).has(key);
1832
1972
  }
1833
1973
 
1834
1974
  /**
@@ -1841,30 +1981,23 @@
1841
1981
  * @param {*} value The value to set.
1842
1982
  * @returns {Object} Returns the map cache instance.
1843
1983
  */
1844
- function mapSet(key, value) {
1845
- var data = this.__data__;
1846
- if (isKeyable(key)) {
1847
- hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
1848
- } else if (Map) {
1849
- data.map.set(key, value);
1850
- } else {
1851
- assocSet(data.map, key, value);
1852
- }
1984
+ function mapCacheSet(key, value) {
1985
+ getMapData(this, key).set(key, value);
1853
1986
  return this;
1854
1987
  }
1855
1988
 
1856
1989
  // Add methods to `MapCache`.
1857
- MapCache.prototype.clear = mapClear;
1858
- MapCache.prototype['delete'] = mapDelete;
1859
- MapCache.prototype.get = mapGet;
1860
- MapCache.prototype.has = mapHas;
1861
- MapCache.prototype.set = mapSet;
1990
+ MapCache.prototype.clear = mapCacheClear;
1991
+ MapCache.prototype['delete'] = mapCacheDelete;
1992
+ MapCache.prototype.get = mapCacheGet;
1993
+ MapCache.prototype.has = mapCacheHas;
1994
+ MapCache.prototype.set = mapCacheSet;
1862
1995
 
1863
1996
  /*------------------------------------------------------------------------*/
1864
1997
 
1865
1998
  /**
1866
1999
  *
1867
- * Creates a set cache object to store unique values.
2000
+ * Creates an array cache object to store unique values.
1868
2001
  *
1869
2002
  * @private
1870
2003
  * @constructor
@@ -1876,52 +2009,41 @@
1876
2009
 
1877
2010
  this.__data__ = new MapCache;
1878
2011
  while (++index < length) {
1879
- this.push(values[index]);
2012
+ this.add(values[index]);
1880
2013
  }
1881
2014
  }
1882
2015
 
1883
2016
  /**
1884
- * Checks if `value` is in `cache`.
2017
+ * Adds `value` to the array cache.
1885
2018
  *
1886
2019
  * @private
1887
- * @param {Object} cache The set cache to search.
1888
- * @param {*} value The value to search for.
1889
- * @returns {number} Returns `true` if `value` is found, else `false`.
2020
+ * @name add
2021
+ * @memberOf SetCache
2022
+ * @alias push
2023
+ * @param {*} value The value to cache.
2024
+ * @returns {Object} Returns the cache instance.
1890
2025
  */
1891
- function cacheHas(cache, value) {
1892
- var map = cache.__data__;
1893
- if (isKeyable(value)) {
1894
- var data = map.__data__,
1895
- hash = typeof value == 'string' ? data.string : data.hash;
1896
-
1897
- return hash[value] === HASH_UNDEFINED;
1898
- }
1899
- return map.has(value);
2026
+ function setCacheAdd(value) {
2027
+ this.__data__.set(value, HASH_UNDEFINED);
2028
+ return this;
1900
2029
  }
1901
2030
 
1902
2031
  /**
1903
- * Adds `value` to the set cache.
2032
+ * Checks if `value` is in the array cache.
1904
2033
  *
1905
2034
  * @private
1906
- * @name push
2035
+ * @name has
1907
2036
  * @memberOf SetCache
1908
- * @param {*} value The value to cache.
2037
+ * @param {*} value The value to search for.
2038
+ * @returns {number} Returns `true` if `value` is found, else `false`.
1909
2039
  */
1910
- function cachePush(value) {
1911
- var map = this.__data__;
1912
- if (isKeyable(value)) {
1913
- var data = map.__data__,
1914
- hash = typeof value == 'string' ? data.string : data.hash;
1915
-
1916
- hash[value] = HASH_UNDEFINED;
1917
- }
1918
- else {
1919
- map.set(value, HASH_UNDEFINED);
1920
- }
2040
+ function setCacheHas(value) {
2041
+ return this.__data__.has(value);
1921
2042
  }
1922
2043
 
1923
2044
  // Add methods to `SetCache`.
1924
- SetCache.prototype.push = cachePush;
2045
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
2046
+ SetCache.prototype.has = setCacheHas;
1925
2047
 
1926
2048
  /*------------------------------------------------------------------------*/
1927
2049
 
@@ -1930,17 +2052,10 @@
1930
2052
  *
1931
2053
  * @private
1932
2054
  * @constructor
1933
- * @param {Array} [values] The values to cache.
2055
+ * @param {Array} [entries] The key-value pairs to cache.
1934
2056
  */
1935
- function Stack(values) {
1936
- var index = -1,
1937
- length = values ? values.length : 0;
1938
-
1939
- this.clear();
1940
- while (++index < length) {
1941
- var entry = values[index];
1942
- this.set(entry[0], entry[1]);
1943
- }
2057
+ function Stack(entries) {
2058
+ this.__data__ = new ListCache(entries);
1944
2059
  }
1945
2060
 
1946
2061
  /**
@@ -1951,7 +2066,7 @@
1951
2066
  * @memberOf Stack
1952
2067
  */
1953
2068
  function stackClear() {
1954
- this.__data__ = { 'array': [], 'map': null };
2069
+ this.__data__ = new ListCache;
1955
2070
  }
1956
2071
 
1957
2072
  /**
@@ -1964,10 +2079,7 @@
1964
2079
  * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1965
2080
  */
1966
2081
  function stackDelete(key) {
1967
- var data = this.__data__,
1968
- array = data.array;
1969
-
1970
- return array ? assocDelete(array, key) : data.map['delete'](key);
2082
+ return this.__data__['delete'](key);
1971
2083
  }
1972
2084
 
1973
2085
  /**
@@ -1980,10 +2092,7 @@
1980
2092
  * @returns {*} Returns the entry value.
1981
2093
  */
1982
2094
  function stackGet(key) {
1983
- var data = this.__data__,
1984
- array = data.array;
1985
-
1986
- return array ? assocGet(array, key) : data.map.get(key);
2095
+ return this.__data__.get(key);
1987
2096
  }
1988
2097
 
1989
2098
  /**
@@ -1996,10 +2105,7 @@
1996
2105
  * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1997
2106
  */
1998
2107
  function stackHas(key) {
1999
- var data = this.__data__,
2000
- array = data.array;
2001
-
2002
- return array ? assocHas(array, key) : data.map.has(key);
2108
+ return this.__data__.has(key);
2003
2109
  }
2004
2110
 
2005
2111
  /**
@@ -2013,21 +2119,11 @@
2013
2119
  * @returns {Object} Returns the stack cache instance.
2014
2120
  */
2015
2121
  function stackSet(key, value) {
2016
- var data = this.__data__,
2017
- array = data.array;
2018
-
2019
- if (array) {
2020
- if (array.length < (LARGE_ARRAY_SIZE - 1)) {
2021
- assocSet(array, key, value);
2022
- } else {
2023
- data.array = null;
2024
- data.map = new MapCache(array);
2025
- }
2026
- }
2027
- var map = data.map;
2028
- if (map) {
2029
- map.set(key, value);
2122
+ var cache = this.__data__;
2123
+ if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) {
2124
+ cache = this.__data__ = new MapCache(cache.__data__);
2030
2125
  }
2126
+ cache.set(key, value);
2031
2127
  return this;
2032
2128
  }
2033
2129
 
@@ -2040,90 +2136,6 @@
2040
2136
 
2041
2137
  /*------------------------------------------------------------------------*/
2042
2138
 
2043
- /**
2044
- * Removes `key` and its value from the associative array.
2045
- *
2046
- * @private
2047
- * @param {Array} array The array to modify.
2048
- * @param {string} key The key of the value to remove.
2049
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2050
- */
2051
- function assocDelete(array, key) {
2052
- var index = assocIndexOf(array, key);
2053
- if (index < 0) {
2054
- return false;
2055
- }
2056
- var lastIndex = array.length - 1;
2057
- if (index == lastIndex) {
2058
- array.pop();
2059
- } else {
2060
- splice.call(array, index, 1);
2061
- }
2062
- return true;
2063
- }
2064
-
2065
- /**
2066
- * Gets the associative array value for `key`.
2067
- *
2068
- * @private
2069
- * @param {Array} array The array to query.
2070
- * @param {string} key The key of the value to get.
2071
- * @returns {*} Returns the entry value.
2072
- */
2073
- function assocGet(array, key) {
2074
- var index = assocIndexOf(array, key);
2075
- return index < 0 ? undefined : array[index][1];
2076
- }
2077
-
2078
- /**
2079
- * Checks if an associative array value for `key` exists.
2080
- *
2081
- * @private
2082
- * @param {Array} array The array to query.
2083
- * @param {string} key The key of the entry to check.
2084
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2085
- */
2086
- function assocHas(array, key) {
2087
- return assocIndexOf(array, key) > -1;
2088
- }
2089
-
2090
- /**
2091
- * Gets the index at which the `key` is found in `array` of key-value pairs.
2092
- *
2093
- * @private
2094
- * @param {Array} array The array to search.
2095
- * @param {*} key The key to search for.
2096
- * @returns {number} Returns the index of the matched value, else `-1`.
2097
- */
2098
- function assocIndexOf(array, key) {
2099
- var length = array.length;
2100
- while (length--) {
2101
- if (eq(array[length][0], key)) {
2102
- return length;
2103
- }
2104
- }
2105
- return -1;
2106
- }
2107
-
2108
- /**
2109
- * Sets the associative array `key` to `value`.
2110
- *
2111
- * @private
2112
- * @param {Array} array The array to modify.
2113
- * @param {string} key The key of the value to set.
2114
- * @param {*} value The value to set.
2115
- */
2116
- function assocSet(array, key, value) {
2117
- var index = assocIndexOf(array, key);
2118
- if (index < 0) {
2119
- array.push([key, value]);
2120
- } else {
2121
- array[index][1] = value;
2122
- }
2123
- }
2124
-
2125
- /*------------------------------------------------------------------------*/
2126
-
2127
2139
  /**
2128
2140
  * Used by `_.defaults` to customize its `_.assignIn` use.
2129
2141
  *
@@ -2176,6 +2188,24 @@
2176
2188
  }
2177
2189
  }
2178
2190
 
2191
+ /**
2192
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
2193
+ *
2194
+ * @private
2195
+ * @param {Array} array The array to search.
2196
+ * @param {*} key The key to search for.
2197
+ * @returns {number} Returns the index of the matched value, else `-1`.
2198
+ */
2199
+ function assocIndexOf(array, key) {
2200
+ var length = array.length;
2201
+ while (length--) {
2202
+ if (eq(array[length][0], key)) {
2203
+ return length;
2204
+ }
2205
+ }
2206
+ return -1;
2207
+ }
2208
+
2179
2209
  /**
2180
2210
  * Aggregates elements of `collection` on `accumulator` with keys transformed
2181
2211
  * by `iteratee` and values set by `setter`.
@@ -2213,7 +2243,7 @@
2213
2243
  * @private
2214
2244
  * @param {Object} object The object to iterate over.
2215
2245
  * @param {string[]} paths The property paths of elements to pick.
2216
- * @returns {Array} Returns the new array of picked elements.
2246
+ * @returns {Array} Returns the picked elements.
2217
2247
  */
2218
2248
  function baseAt(object, paths) {
2219
2249
  var index = -1,
@@ -2328,7 +2358,7 @@
2328
2358
  *
2329
2359
  * @private
2330
2360
  * @param {Object} source The object of property predicates to conform to.
2331
- * @returns {Function} Returns the new function.
2361
+ * @returns {Function} Returns the new spec function.
2332
2362
  */
2333
2363
  function baseConforms(source) {
2334
2364
  var props = keys(source),
@@ -2641,7 +2671,7 @@
2641
2671
  * @private
2642
2672
  * @param {Object} object The object to inspect.
2643
2673
  * @param {Array} props The property names to filter.
2644
- * @returns {Array} Returns the new array of filtered property names.
2674
+ * @returns {Array} Returns the function names.
2645
2675
  */
2646
2676
  function baseFunctions(object, props) {
2647
2677
  return arrayFilter(props, function(key) {
@@ -2682,9 +2712,7 @@
2682
2712
  */
2683
2713
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2684
2714
  var result = keysFunc(object);
2685
- return isArray(object)
2686
- ? result
2687
- : arrayPush(result, symbolsFunc(object));
2715
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
2688
2716
  }
2689
2717
 
2690
2718
  /**
@@ -3076,7 +3104,7 @@
3076
3104
  *
3077
3105
  * @private
3078
3106
  * @param {Object} source The object of property values to match.
3079
- * @returns {Function} Returns the new function.
3107
+ * @returns {Function} Returns the new spec function.
3080
3108
  */
3081
3109
  function baseMatches(source) {
3082
3110
  var matchData = getMatchData(source);
@@ -3094,7 +3122,7 @@
3094
3122
  * @private
3095
3123
  * @param {string} path The path of the property to get.
3096
3124
  * @param {*} srcValue The value to match.
3097
- * @returns {Function} Returns the new function.
3125
+ * @returns {Function} Returns the new spec function.
3098
3126
  */
3099
3127
  function baseMatchesProperty(path, srcValue) {
3100
3128
  if (isKey(path) && isStrictComparable(srcValue)) {
@@ -3309,7 +3337,7 @@
3309
3337
  *
3310
3338
  * @private
3311
3339
  * @param {string} key The key of the property to get.
3312
- * @returns {Function} Returns the new function.
3340
+ * @returns {Function} Returns the new accessor function.
3313
3341
  */
3314
3342
  function baseProperty(key) {
3315
3343
  return function(object) {
@@ -3322,7 +3350,7 @@
3322
3350
  *
3323
3351
  * @private
3324
3352
  * @param {Array|string} path The path of the property to get.
3325
- * @returns {Function} Returns the new function.
3353
+ * @returns {Function} Returns the new accessor function.
3326
3354
  */
3327
3355
  function basePropertyDeep(path) {
3328
3356
  return function(object) {
@@ -3423,7 +3451,7 @@
3423
3451
  * @param {number} end The end of the range.
3424
3452
  * @param {number} step The value to increment or decrement by.
3425
3453
  * @param {boolean} [fromRight] Specify iterating from right to left.
3426
- * @returns {Array} Returns the new array of numbers.
3454
+ * @returns {Array} Returns the range of numbers.
3427
3455
  */
3428
3456
  function baseRange(start, end, step, fromRight) {
3429
3457
  var index = -1,
@@ -4137,7 +4165,7 @@
4137
4165
  * placeholders, and provided arguments into a single array of arguments.
4138
4166
  *
4139
4167
  * @private
4140
- * @param {Array|Object} args The provided arguments.
4168
+ * @param {Array} args The provided arguments.
4141
4169
  * @param {Array} partials The arguments to prepend to those provided.
4142
4170
  * @param {Array} holders The `partials` placeholder indexes.
4143
4171
  * @params {boolean} [isCurried] Specify composing for a curried function.
@@ -4172,7 +4200,7 @@
4172
4200
  * is tailored for `_.partialRight`.
4173
4201
  *
4174
4202
  * @private
4175
- * @param {Array|Object} args The provided arguments.
4203
+ * @param {Array} args The provided arguments.
4176
4204
  * @param {Array} partials The arguments to append to those provided.
4177
4205
  * @param {Array} holders The `partials` placeholder indexes.
4178
4206
  * @params {boolean} [isCurried] Specify composing for a curried function.
@@ -4294,7 +4322,7 @@
4294
4322
  customizer = length > 1 ? sources[length - 1] : undefined,
4295
4323
  guard = length > 2 ? sources[2] : undefined;
4296
4324
 
4297
- customizer = typeof customizer == 'function'
4325
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
4298
4326
  ? (length--, customizer)
4299
4327
  : undefined;
4300
4328
 
@@ -4393,7 +4421,7 @@
4393
4421
  *
4394
4422
  * @private
4395
4423
  * @param {string} methodName The name of the `String` case method to use.
4396
- * @returns {Function} Returns the new function.
4424
+ * @returns {Function} Returns the new case function.
4397
4425
  */
4398
4426
  function createCaseFirst(methodName) {
4399
4427
  return function(string) {
@@ -4478,7 +4506,7 @@
4478
4506
  var length = arguments.length,
4479
4507
  args = Array(length),
4480
4508
  index = length,
4481
- placeholder = getPlaceholder(wrapper);
4509
+ placeholder = getHolder(wrapper);
4482
4510
 
4483
4511
  while (index--) {
4484
4512
  args[index] = arguments[index];
@@ -4593,14 +4621,14 @@
4593
4621
 
4594
4622
  function wrapper() {
4595
4623
  var length = arguments.length,
4596
- index = length,
4597
- args = Array(length);
4624
+ args = Array(length),
4625
+ index = length;
4598
4626
 
4599
4627
  while (index--) {
4600
4628
  args[index] = arguments[index];
4601
4629
  }
4602
4630
  if (isCurried) {
4603
- var placeholder = getPlaceholder(wrapper),
4631
+ var placeholder = getHolder(wrapper),
4604
4632
  holdersCount = countHolders(args, placeholder);
4605
4633
  }
4606
4634
  if (partials) {
@@ -4689,7 +4717,7 @@
4689
4717
  *
4690
4718
  * @private
4691
4719
  * @param {Function} arrayFunc The function to iterate over iteratees.
4692
- * @returns {Function} Returns the new invoker function.
4720
+ * @returns {Function} Returns the new over function.
4693
4721
  */
4694
4722
  function createOver(arrayFunc) {
4695
4723
  return rest(function(iteratees) {
@@ -4887,6 +4915,26 @@
4887
4915
  return new Set(values);
4888
4916
  };
4889
4917
 
4918
+ /**
4919
+ * Creates a `_.toPairs` or `_.toPairsIn` function.
4920
+ *
4921
+ * @private
4922
+ * @param {Function} keysFunc The function to get the keys of a given object.
4923
+ * @returns {Function} Returns the new pairs function.
4924
+ */
4925
+ function createToPairs(keysFunc) {
4926
+ return function(object) {
4927
+ var tag = getTag(object);
4928
+ if (tag == mapTag) {
4929
+ return mapToArray(object);
4930
+ }
4931
+ if (tag == setTag) {
4932
+ return setToPairs(object);
4933
+ }
4934
+ return baseToPairs(object, keysFunc(object));
4935
+ };
4936
+ }
4937
+
4890
4938
  /**
4891
4939
  * Creates a function that either curries or invokes `func` with optional
4892
4940
  * `this` binding and partially applied arguments.
@@ -4904,6 +4952,7 @@
4904
4952
  * 64 - `_.partialRight`
4905
4953
  * 128 - `_.rearg`
4906
4954
  * 256 - `_.ary`
4955
+ * 512 - `_.flip`
4907
4956
  * @param {*} [thisArg] The `this` binding of `func`.
4908
4957
  * @param {Array} [partials] The arguments to be partially applied.
4909
4958
  * @param {Array} [holders] The `partials` placeholder indexes.
@@ -4982,9 +5031,7 @@
4982
5031
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
4983
5032
  */
4984
5033
  function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
4985
- var index = -1,
4986
- isPartial = bitmask & PARTIAL_COMPARE_FLAG,
4987
- isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
5034
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
4988
5035
  arrLength = array.length,
4989
5036
  othLength = other.length;
4990
5037
 
@@ -4996,7 +5043,10 @@
4996
5043
  if (stacked) {
4997
5044
  return stacked == other;
4998
5045
  }
4999
- var result = true;
5046
+ var index = -1,
5047
+ result = true,
5048
+ seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
5049
+
5000
5050
  stack.set(array, other);
5001
5051
 
5002
5052
  // Ignore non-index properties.
@@ -5017,10 +5067,12 @@
5017
5067
  break;
5018
5068
  }
5019
5069
  // Recursively compare arrays (susceptible to call stack limits).
5020
- if (isUnordered) {
5021
- if (!arraySome(other, function(othValue) {
5022
- return arrValue === othValue ||
5023
- equalFunc(arrValue, othValue, customizer, bitmask, stack);
5070
+ if (seen) {
5071
+ if (!arraySome(other, function(othValue, othIndex) {
5072
+ if (!seen.has(othIndex) &&
5073
+ (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
5074
+ return seen.add(othIndex);
5075
+ }
5024
5076
  })) {
5025
5077
  result = false;
5026
5078
  break;
@@ -5254,6 +5306,18 @@
5254
5306
  return result;
5255
5307
  }
5256
5308
 
5309
+ /**
5310
+ * Gets the argument placeholder value for `func`.
5311
+ *
5312
+ * @private
5313
+ * @param {Function} func The function to inspect.
5314
+ * @returns {*} Returns the placeholder value.
5315
+ */
5316
+ function getHolder(func) {
5317
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
5318
+ return object.placeholder;
5319
+ }
5320
+
5257
5321
  /**
5258
5322
  * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
5259
5323
  * this function returns the custom method, otherwise it returns `baseIteratee`.
@@ -5284,6 +5348,21 @@
5284
5348
  */
5285
5349
  var getLength = baseProperty('length');
5286
5350
 
5351
+ /**
5352
+ * Gets the data for `map`.
5353
+ *
5354
+ * @private
5355
+ * @param {Object} map The map to query.
5356
+ * @param {string} key The reference key.
5357
+ * @returns {*} Returns the map data.
5358
+ */
5359
+ function getMapData(map, key) {
5360
+ var data = map.__data__;
5361
+ return isKeyable(key)
5362
+ ? data[typeof key == 'string' ? 'string' : 'hash']
5363
+ : data.map;
5364
+ }
5365
+
5287
5366
  /**
5288
5367
  * Gets the property names, values, and compare flags of `object`.
5289
5368
  *
@@ -5314,18 +5393,6 @@
5314
5393
  return isNative(value) ? value : undefined;
5315
5394
  }
5316
5395
 
5317
- /**
5318
- * Gets the argument placeholder value for `func`.
5319
- *
5320
- * @private
5321
- * @param {Function} func The function to inspect.
5322
- * @returns {*} Returns the placeholder value.
5323
- */
5324
- function getPlaceholder(func) {
5325
- var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
5326
- return object.placeholder;
5327
- }
5328
-
5329
5396
  /**
5330
5397
  * Gets the `[[Prototype]]` of `value`.
5331
5398
  *
@@ -5575,7 +5642,7 @@
5575
5642
  * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
5576
5643
  */
5577
5644
  function isFlattenable(value) {
5578
- return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
5645
+ return isArray(value) || isArguments(value);
5579
5646
  }
5580
5647
 
5581
5648
  /**
@@ -5719,7 +5786,7 @@
5719
5786
  * @private
5720
5787
  * @param {string} key The key of the property to get.
5721
5788
  * @param {*} srcValue The value to match.
5722
- * @returns {Function} Returns the new function.
5789
+ * @returns {Function} Returns the new spec function.
5723
5790
  */
5724
5791
  function matchesStrictComparable(key, srcValue) {
5725
5792
  return function(object) {
@@ -5971,7 +6038,7 @@
5971
6038
  * @param {Array} array The array to process.
5972
6039
  * @param {number} [size=1] The length of each chunk
5973
6040
  * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
5974
- * @returns {Array} Returns the new array containing chunks.
6041
+ * @returns {Array} Returns the new array of chunks.
5975
6042
  * @example
5976
6043
  *
5977
6044
  * _.chunk(['a', 'b', 'c', 'd'], 2);
@@ -6054,16 +6121,16 @@
6054
6121
  */
6055
6122
  function concat() {
6056
6123
  var length = arguments.length,
6057
- array = castArray(arguments[0]);
6124
+ args = Array(length ? length - 1 : 0),
6125
+ array = arguments[0],
6126
+ index = length;
6058
6127
 
6059
- if (length < 2) {
6060
- return length ? copyArray(array) : [];
6061
- }
6062
- var args = Array(length - 1);
6063
- while (length--) {
6064
- args[length - 1] = arguments[length];
6128
+ while (index--) {
6129
+ args[index - 1] = arguments[index];
6065
6130
  }
6066
- return arrayConcat(array, baseFlatten(args, 1));
6131
+ return length
6132
+ ? arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1))
6133
+ : [];
6067
6134
  }
6068
6135
 
6069
6136
  /**
@@ -6782,8 +6849,8 @@
6782
6849
  }
6783
6850
 
6784
6851
  /**
6785
- * Gets the nth element of `array`. If `n` is negative, the nth element
6786
- * from the end is returned.
6852
+ * Gets the element at `n` index of `array`. If `n` is negative, the nth
6853
+ * element from the end is returned.
6787
6854
  *
6788
6855
  * @static
6789
6856
  * @memberOf _
@@ -7663,7 +7730,7 @@
7663
7730
  * @memberOf _
7664
7731
  * @since 0.1.0
7665
7732
  * @category Array
7666
- * @param {Array} array The array to filter.
7733
+ * @param {Array} array The array to inspect.
7667
7734
  * @param {...*} [values] The values to exclude.
7668
7735
  * @returns {Array} Returns the new array of filtered values.
7669
7736
  * @see _.difference, _.xor
@@ -7689,7 +7756,7 @@
7689
7756
  * @since 2.4.0
7690
7757
  * @category Array
7691
7758
  * @param {...Array} [arrays] The arrays to inspect.
7692
- * @returns {Array} Returns the new array of values.
7759
+ * @returns {Array} Returns the new array of filtered values.
7693
7760
  * @see _.difference, _.without
7694
7761
  * @example
7695
7762
  *
@@ -7713,7 +7780,7 @@
7713
7780
  * @param {...Array} [arrays] The arrays to inspect.
7714
7781
  * @param {Array|Function|Object|string} [iteratee=_.identity]
7715
7782
  * The iteratee invoked per element.
7716
- * @returns {Array} Returns the new array of values.
7783
+ * @returns {Array} Returns the new array of filtered values.
7717
7784
  * @example
7718
7785
  *
7719
7786
  * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
@@ -7742,7 +7809,7 @@
7742
7809
  * @category Array
7743
7810
  * @param {...Array} [arrays] The arrays to inspect.
7744
7811
  * @param {Function} [comparator] The comparator invoked per element.
7745
- * @returns {Array} Returns the new array of values.
7812
+ * @returns {Array} Returns the new array of filtered values.
7746
7813
  * @example
7747
7814
  *
7748
7815
  * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
@@ -8490,9 +8557,8 @@
8490
8557
  * // => Logs 'a' then 'b' (iteration order is not guaranteed).
8491
8558
  */
8492
8559
  function forEach(collection, iteratee) {
8493
- return (typeof iteratee == 'function' && isArray(collection))
8494
- ? arrayEach(collection, iteratee)
8495
- : baseEach(collection, getIteratee(iteratee));
8560
+ var func = isArray(collection) ? arrayEach : baseEach;
8561
+ return func(collection, getIteratee(iteratee, 3));
8496
8562
  }
8497
8563
 
8498
8564
  /**
@@ -8516,9 +8582,8 @@
8516
8582
  * // => Logs `2` then `1`.
8517
8583
  */
8518
8584
  function forEachRight(collection, iteratee) {
8519
- return (typeof iteratee == 'function' && isArray(collection))
8520
- ? arrayEachRight(collection, iteratee)
8521
- : baseEachRight(collection, getIteratee(iteratee));
8585
+ var func = isArray(collection) ? arrayEachRight : baseEachRight;
8586
+ return func(collection, getIteratee(iteratee, 3));
8522
8587
  }
8523
8588
 
8524
8589
  /**
@@ -9199,7 +9264,7 @@
9199
9264
  * @param {Function} func The function to cap arguments for.
9200
9265
  * @param {number} [n=func.length] The arity cap.
9201
9266
  * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
9202
- * @returns {Function} Returns the new function.
9267
+ * @returns {Function} Returns the new capped function.
9203
9268
  * @example
9204
9269
  *
9205
9270
  * _.map(['6', '8', '10'], _.ary(parseInt, 1));
@@ -9283,7 +9348,7 @@
9283
9348
  var bind = rest(function(func, thisArg, partials) {
9284
9349
  var bitmask = BIND_FLAG;
9285
9350
  if (partials.length) {
9286
- var holders = replaceHolders(partials, getPlaceholder(bind));
9351
+ var holders = replaceHolders(partials, getHolder(bind));
9287
9352
  bitmask |= PARTIAL_FLAG;
9288
9353
  }
9289
9354
  return createWrapper(func, bitmask, thisArg, partials, holders);
@@ -9337,7 +9402,7 @@
9337
9402
  var bindKey = rest(function(object, key, partials) {
9338
9403
  var bitmask = BIND_FLAG | BIND_KEY_FLAG;
9339
9404
  if (partials.length) {
9340
- var holders = replaceHolders(partials, getPlaceholder(bindKey));
9405
+ var holders = replaceHolders(partials, getHolder(bindKey));
9341
9406
  bitmask |= PARTIAL_FLAG;
9342
9407
  }
9343
9408
  return createWrapper(key, bitmask, object, partials, holders);
@@ -9663,7 +9728,7 @@
9663
9728
  * @since 4.0.0
9664
9729
  * @category Function
9665
9730
  * @param {Function} func The function to flip arguments for.
9666
- * @returns {Function} Returns the new function.
9731
+ * @returns {Function} Returns the new flipped function.
9667
9732
  * @example
9668
9733
  *
9669
9734
  * var flipped = _.flip(function() {
@@ -9696,7 +9761,7 @@
9696
9761
  * @category Function
9697
9762
  * @param {Function} func The function to have its output memoized.
9698
9763
  * @param {Function} [resolver] The function to resolve the cache key.
9699
- * @returns {Function} Returns the new memoizing function.
9764
+ * @returns {Function} Returns the new memoized function.
9700
9765
  * @example
9701
9766
  *
9702
9767
  * var object = { 'a': 1, 'b': 2 };
@@ -9754,7 +9819,7 @@
9754
9819
  * @since 3.0.0
9755
9820
  * @category Function
9756
9821
  * @param {Function} predicate The predicate to negate.
9757
- * @returns {Function} Returns the new function.
9822
+ * @returns {Function} Returns the new negated function.
9758
9823
  * @example
9759
9824
  *
9760
9825
  * function isEven(n) {
@@ -9878,7 +9943,7 @@
9878
9943
  * // => 'hi fred'
9879
9944
  */
9880
9945
  var partial = rest(function(func, partials) {
9881
- var holders = replaceHolders(partials, getPlaceholder(partial));
9946
+ var holders = replaceHolders(partials, getHolder(partial));
9882
9947
  return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
9883
9948
  });
9884
9949
 
@@ -9915,7 +9980,7 @@
9915
9980
  * // => 'hello fred'
9916
9981
  */
9917
9982
  var partialRight = rest(function(func, partials) {
9918
- var holders = replaceHolders(partials, getPlaceholder(partialRight));
9983
+ var holders = replaceHolders(partials, getHolder(partialRight));
9919
9984
  return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
9920
9985
  });
9921
9986
 
@@ -10117,7 +10182,7 @@
10117
10182
  * @since 4.0.0
10118
10183
  * @category Function
10119
10184
  * @param {Function} func The function to cap arguments for.
10120
- * @returns {Function} Returns the new function.
10185
+ * @returns {Function} Returns the new capped function.
10121
10186
  * @example
10122
10187
  *
10123
10188
  * _.map(['6', '8', '10'], _.unary(parseInt));
@@ -10793,14 +10858,14 @@
10793
10858
  * _.isFinite(3);
10794
10859
  * // => true
10795
10860
  *
10796
- * _.isFinite(Number.MAX_VALUE);
10797
- * // => true
10798
- *
10799
- * _.isFinite(3.14);
10861
+ * _.isFinite(Number.MIN_VALUE);
10800
10862
  * // => true
10801
10863
  *
10802
10864
  * _.isFinite(Infinity);
10803
10865
  * // => false
10866
+ *
10867
+ * _.isFinite('3');
10868
+ * // => false
10804
10869
  */
10805
10870
  function isFinite(value) {
10806
10871
  return typeof value == 'number' && nativeIsFinite(value);
@@ -11521,6 +11586,41 @@
11521
11586
  return func(value);
11522
11587
  }
11523
11588
 
11589
+ /**
11590
+ * Converts `value` to a finite number.
11591
+ *
11592
+ * @static
11593
+ * @memberOf _
11594
+ * @since 4.12.0
11595
+ * @category Lang
11596
+ * @param {*} value The value to convert.
11597
+ * @returns {number} Returns the converted number.
11598
+ * @example
11599
+ *
11600
+ * _.toFinite(3.2);
11601
+ * // => 3.2
11602
+ *
11603
+ * _.toFinite(Number.MIN_VALUE);
11604
+ * // => 5e-324
11605
+ *
11606
+ * _.toFinite(Infinity);
11607
+ * // => 1.7976931348623157e+308
11608
+ *
11609
+ * _.toFinite('3.2');
11610
+ * // => 3.2
11611
+ */
11612
+ function toFinite(value) {
11613
+ if (!value) {
11614
+ return value === 0 ? value : 0;
11615
+ }
11616
+ value = toNumber(value);
11617
+ if (value === INFINITY || value === -INFINITY) {
11618
+ var sign = (value < 0 ? -1 : 1);
11619
+ return sign * MAX_INTEGER;
11620
+ }
11621
+ return value === value ? value : 0;
11622
+ }
11623
+
11524
11624
  /**
11525
11625
  * Converts `value` to an integer.
11526
11626
  *
@@ -11535,7 +11635,7 @@
11535
11635
  * @returns {number} Returns the converted integer.
11536
11636
  * @example
11537
11637
  *
11538
- * _.toInteger(3);
11638
+ * _.toInteger(3.2);
11539
11639
  * // => 3
11540
11640
  *
11541
11641
  * _.toInteger(Number.MIN_VALUE);
@@ -11544,20 +11644,14 @@
11544
11644
  * _.toInteger(Infinity);
11545
11645
  * // => 1.7976931348623157e+308
11546
11646
  *
11547
- * _.toInteger('3');
11647
+ * _.toInteger('3.2');
11548
11648
  * // => 3
11549
11649
  */
11550
11650
  function toInteger(value) {
11551
- if (!value) {
11552
- return value === 0 ? value : 0;
11553
- }
11554
- value = toNumber(value);
11555
- if (value === INFINITY || value === -INFINITY) {
11556
- var sign = (value < 0 ? -1 : 1);
11557
- return sign * MAX_INTEGER;
11558
- }
11559
- var remainder = value % 1;
11560
- return value === value ? (remainder ? value - remainder : value) : 0;
11651
+ var result = toFinite(value),
11652
+ remainder = result % 1;
11653
+
11654
+ return result === result ? (remainder ? result - remainder : result) : 0;
11561
11655
  }
11562
11656
 
11563
11657
  /**
@@ -11575,7 +11669,7 @@
11575
11669
  * @returns {number} Returns the converted integer.
11576
11670
  * @example
11577
11671
  *
11578
- * _.toLength(3);
11672
+ * _.toLength(3.2);
11579
11673
  * // => 3
11580
11674
  *
11581
11675
  * _.toLength(Number.MIN_VALUE);
@@ -11584,7 +11678,7 @@
11584
11678
  * _.toLength(Infinity);
11585
11679
  * // => 4294967295
11586
11680
  *
11587
- * _.toLength('3');
11681
+ * _.toLength('3.2');
11588
11682
  * // => 3
11589
11683
  */
11590
11684
  function toLength(value) {
@@ -11602,8 +11696,8 @@
11602
11696
  * @returns {number} Returns the number.
11603
11697
  * @example
11604
11698
  *
11605
- * _.toNumber(3);
11606
- * // => 3
11699
+ * _.toNumber(3.2);
11700
+ * // => 3.2
11607
11701
  *
11608
11702
  * _.toNumber(Number.MIN_VALUE);
11609
11703
  * // => 5e-324
@@ -11611,8 +11705,8 @@
11611
11705
  * _.toNumber(Infinity);
11612
11706
  * // => Infinity
11613
11707
  *
11614
- * _.toNumber('3');
11615
- * // => 3
11708
+ * _.toNumber('3.2');
11709
+ * // => 3.2
11616
11710
  */
11617
11711
  function toNumber(value) {
11618
11712
  if (typeof value == 'number') {
@@ -11675,7 +11769,7 @@
11675
11769
  * @returns {number} Returns the converted integer.
11676
11770
  * @example
11677
11771
  *
11678
- * _.toSafeInteger(3);
11772
+ * _.toSafeInteger(3.2);
11679
11773
  * // => 3
11680
11774
  *
11681
11775
  * _.toSafeInteger(Number.MIN_VALUE);
@@ -11684,7 +11778,7 @@
11684
11778
  * _.toSafeInteger(Infinity);
11685
11779
  * // => 9007199254740991
11686
11780
  *
11687
- * _.toSafeInteger('3');
11781
+ * _.toSafeInteger('3.2');
11688
11782
  * // => 3
11689
11783
  */
11690
11784
  function toSafeInteger(value) {
@@ -11877,7 +11971,7 @@
11877
11971
  * @category Object
11878
11972
  * @param {Object} object The object to iterate over.
11879
11973
  * @param {...(string|string[])} [paths] The property paths of elements to pick.
11880
- * @returns {Array} Returns the new array of picked elements.
11974
+ * @returns {Array} Returns the picked values.
11881
11975
  * @example
11882
11976
  *
11883
11977
  * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
@@ -12093,7 +12187,7 @@
12093
12187
  function forIn(object, iteratee) {
12094
12188
  return object == null
12095
12189
  ? object
12096
- : baseFor(object, getIteratee(iteratee), keysIn);
12190
+ : baseFor(object, getIteratee(iteratee, 3), keysIn);
12097
12191
  }
12098
12192
 
12099
12193
  /**
@@ -12125,7 +12219,7 @@
12125
12219
  function forInRight(object, iteratee) {
12126
12220
  return object == null
12127
12221
  ? object
12128
- : baseForRight(object, getIteratee(iteratee), keysIn);
12222
+ : baseForRight(object, getIteratee(iteratee, 3), keysIn);
12129
12223
  }
12130
12224
 
12131
12225
  /**
@@ -12157,7 +12251,7 @@
12157
12251
  * // => Logs 'a' then 'b' (iteration order is not guaranteed).
12158
12252
  */
12159
12253
  function forOwn(object, iteratee) {
12160
- return object && baseForOwn(object, getIteratee(iteratee));
12254
+ return object && baseForOwn(object, getIteratee(iteratee, 3));
12161
12255
  }
12162
12256
 
12163
12257
  /**
@@ -12187,7 +12281,7 @@
12187
12281
  * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
12188
12282
  */
12189
12283
  function forOwnRight(object, iteratee) {
12190
- return object && baseForOwnRight(object, getIteratee(iteratee));
12284
+ return object && baseForOwnRight(object, getIteratee(iteratee, 3));
12191
12285
  }
12192
12286
 
12193
12287
  /**
@@ -12199,7 +12293,7 @@
12199
12293
  * @memberOf _
12200
12294
  * @category Object
12201
12295
  * @param {Object} object The object to inspect.
12202
- * @returns {Array} Returns the new array of property names.
12296
+ * @returns {Array} Returns the function names.
12203
12297
  * @see _.functionsIn
12204
12298
  * @example
12205
12299
  *
@@ -12226,7 +12320,7 @@
12226
12320
  * @since 4.0.0
12227
12321
  * @category Object
12228
12322
  * @param {Object} object The object to inspect.
12229
- * @returns {Array} Returns the new array of property names.
12323
+ * @returns {Array} Returns the function names.
12230
12324
  * @see _.functions
12231
12325
  * @example
12232
12326
  *
@@ -12579,7 +12673,7 @@
12579
12673
  * inherited enumerable string keyed properties of source objects into the
12580
12674
  * destination object. Source properties that resolve to `undefined` are
12581
12675
  * skipped if a destination value exists. Array and plain object properties
12582
- * are merged recursively.Other objects and value types are overridden by
12676
+ * are merged recursively. Other objects and value types are overridden by
12583
12677
  * assignment. Source objects are applied from left to right. Subsequent
12584
12678
  * sources overwrite property assignments of previous sources.
12585
12679
  *
@@ -12864,7 +12958,8 @@
12864
12958
 
12865
12959
  /**
12866
12960
  * Creates an array of own enumerable string keyed-value pairs for `object`
12867
- * which can be consumed by `_.fromPairs`.
12961
+ * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
12962
+ * entries are returned.
12868
12963
  *
12869
12964
  * @static
12870
12965
  * @memberOf _
@@ -12872,7 +12967,7 @@
12872
12967
  * @alias entries
12873
12968
  * @category Object
12874
12969
  * @param {Object} object The object to query.
12875
- * @returns {Array} Returns the new array of key-value pairs.
12970
+ * @returns {Array} Returns the key-value pairs.
12876
12971
  * @example
12877
12972
  *
12878
12973
  * function Foo() {
@@ -12885,13 +12980,12 @@
12885
12980
  * _.toPairs(new Foo);
12886
12981
  * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
12887
12982
  */
12888
- function toPairs(object) {
12889
- return baseToPairs(object, keys(object));
12890
- }
12983
+ var toPairs = createToPairs(keys);
12891
12984
 
12892
12985
  /**
12893
12986
  * Creates an array of own and inherited enumerable string keyed-value pairs
12894
- * for `object` which can be consumed by `_.fromPairs`.
12987
+ * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
12988
+ * or set, its entries are returned.
12895
12989
  *
12896
12990
  * @static
12897
12991
  * @memberOf _
@@ -12899,7 +12993,7 @@
12899
12993
  * @alias entriesIn
12900
12994
  * @category Object
12901
12995
  * @param {Object} object The object to query.
12902
- * @returns {Array} Returns the new array of key-value pairs.
12996
+ * @returns {Array} Returns the key-value pairs.
12903
12997
  * @example
12904
12998
  *
12905
12999
  * function Foo() {
@@ -12910,11 +13004,9 @@
12910
13004
  * Foo.prototype.c = 3;
12911
13005
  *
12912
13006
  * _.toPairsIn(new Foo);
12913
- * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
13007
+ * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
12914
13008
  */
12915
- function toPairsIn(object) {
12916
- return baseToPairs(object, keysIn(object));
12917
- }
13009
+ var toPairsIn = createToPairs(keysIn);
12918
13010
 
12919
13011
  /**
12920
13012
  * An alternative to `_.reduce`; this method transforms `object` to a new
@@ -13744,7 +13836,7 @@
13744
13836
  * @param {string} [string=''] The string to split.
13745
13837
  * @param {RegExp|string} separator The separator pattern to split by.
13746
13838
  * @param {number} [limit] The length to truncate results to.
13747
- * @returns {Array} Returns the new array of string segments.
13839
+ * @returns {Array} Returns the string segments.
13748
13840
  * @example
13749
13841
  *
13750
13842
  * _.split('a-b-c', '-', 2);
@@ -13889,12 +13981,6 @@
13889
13981
  * compiled({ 'user': 'pebbles' });
13890
13982
  * // => 'hello pebbles!'
13891
13983
  *
13892
- * // Use custom template delimiters.
13893
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
13894
- * var compiled = _.template('hello {{ user }}!');
13895
- * compiled({ 'user': 'mustache' });
13896
- * // => 'hello mustache!'
13897
- *
13898
13984
  * // Use backslashes to treat delimiters as plain text.
13899
13985
  * var compiled = _.template('<%= "\\<%- value %\\>" %>');
13900
13986
  * compiled({ 'value': 'ignored' });
@@ -13920,9 +14006,15 @@
13920
14006
  * // return __p;
13921
14007
  * // }
13922
14008
  *
14009
+ * // Use custom template delimiters.
14010
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
14011
+ * var compiled = _.template('hello {{ user }}!');
14012
+ * compiled({ 'user': 'mustache' });
14013
+ * // => 'hello mustache!'
14014
+ *
13923
14015
  * // Use the `source` property to inline compiled templates for meaningful
13924
14016
  * // line numbers in error messages and stack traces.
13925
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
14017
+ * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
13926
14018
  * var JST = {\
13927
14019
  * "main": ' + _.template(mainText).source + '\
13928
14020
  * };\
@@ -14458,7 +14550,7 @@
14458
14550
  * @since 4.0.0
14459
14551
  * @category Util
14460
14552
  * @param {Array} pairs The predicate-function pairs.
14461
- * @returns {Function} Returns the new function.
14553
+ * @returns {Function} Returns the new composite function.
14462
14554
  * @example
14463
14555
  *
14464
14556
  * var func = _.cond([
@@ -14508,7 +14600,7 @@
14508
14600
  * @since 4.0.0
14509
14601
  * @category Util
14510
14602
  * @param {Object} source The object of property predicates to conform to.
14511
- * @returns {Function} Returns the new function.
14603
+ * @returns {Function} Returns the new spec function.
14512
14604
  * @example
14513
14605
  *
14514
14606
  * var users = [
@@ -14531,7 +14623,7 @@
14531
14623
  * @since 2.4.0
14532
14624
  * @category Util
14533
14625
  * @param {*} value The value to return from the new function.
14534
- * @returns {Function} Returns the new function.
14626
+ * @returns {Function} Returns the new constant function.
14535
14627
  * @example
14536
14628
  *
14537
14629
  * var object = { 'user': 'fred' };
@@ -14556,7 +14648,7 @@
14556
14648
  * @since 3.0.0
14557
14649
  * @category Util
14558
14650
  * @param {...(Function|Function[])} [funcs] Functions to invoke.
14559
- * @returns {Function} Returns the new function.
14651
+ * @returns {Function} Returns the new composite function.
14560
14652
  * @see _.flowRight
14561
14653
  * @example
14562
14654
  *
@@ -14579,7 +14671,7 @@
14579
14671
  * @memberOf _
14580
14672
  * @category Util
14581
14673
  * @param {...(Function|Function[])} [funcs] Functions to invoke.
14582
- * @returns {Function} Returns the new function.
14674
+ * @returns {Function} Returns the new composite function.
14583
14675
  * @see _.flow
14584
14676
  * @example
14585
14677
  *
@@ -14672,7 +14764,7 @@
14672
14764
  * @since 3.0.0
14673
14765
  * @category Util
14674
14766
  * @param {Object} source The object of property values to match.
14675
- * @returns {Function} Returns the new function.
14767
+ * @returns {Function} Returns the new spec function.
14676
14768
  * @example
14677
14769
  *
14678
14770
  * var users = [
@@ -14700,7 +14792,7 @@
14700
14792
  * @category Util
14701
14793
  * @param {Array|string} path The path of the property to get.
14702
14794
  * @param {*} srcValue The value to match.
14703
- * @returns {Function} Returns the new function.
14795
+ * @returns {Function} Returns the new spec function.
14704
14796
  * @example
14705
14797
  *
14706
14798
  * var users = [
@@ -14725,7 +14817,7 @@
14725
14817
  * @category Util
14726
14818
  * @param {Array|string} path The path of the method to invoke.
14727
14819
  * @param {...*} [args] The arguments to invoke the method with.
14728
- * @returns {Function} Returns the new function.
14820
+ * @returns {Function} Returns the new invoker function.
14729
14821
  * @example
14730
14822
  *
14731
14823
  * var objects = [
@@ -14756,7 +14848,7 @@
14756
14848
  * @category Util
14757
14849
  * @param {Object} object The object to query.
14758
14850
  * @param {...*} [args] The arguments to invoke the method with.
14759
- * @returns {Function} Returns the new function.
14851
+ * @returns {Function} Returns the new invoker function.
14760
14852
  * @example
14761
14853
  *
14762
14854
  * var array = _.times(3, _.constant),
@@ -14886,7 +14978,7 @@
14886
14978
  }
14887
14979
 
14888
14980
  /**
14889
- * Creates a function that returns its nth argument. If `n` is negative,
14981
+ * Creates a function that gets the argument at `n` index. If `n` is negative,
14890
14982
  * the nth argument from the end is returned.
14891
14983
  *
14892
14984
  * @static
@@ -14894,7 +14986,7 @@
14894
14986
  * @since 4.0.0
14895
14987
  * @category Util
14896
14988
  * @param {number} [n=0] The index of the argument to return.
14897
- * @returns {Function} Returns the new function.
14989
+ * @returns {Function} Returns the new pass-thru function.
14898
14990
  * @example
14899
14991
  *
14900
14992
  * var func = _.nthArg(1);
@@ -14992,7 +15084,7 @@
14992
15084
  * @since 2.4.0
14993
15085
  * @category Util
14994
15086
  * @param {Array|string} path The path of the property to get.
14995
- * @returns {Function} Returns the new function.
15087
+ * @returns {Function} Returns the new accessor function.
14996
15088
  * @example
14997
15089
  *
14998
15090
  * var objects = [
@@ -15019,7 +15111,7 @@
15019
15111
  * @since 3.0.0
15020
15112
  * @category Util
15021
15113
  * @param {Object} object The object to query.
15022
- * @returns {Function} Returns the new function.
15114
+ * @returns {Function} Returns the new accessor function.
15023
15115
  * @example
15024
15116
  *
15025
15117
  * var array = [0, 1, 2],
@@ -15053,7 +15145,7 @@
15053
15145
  * @param {number} [start=0] The start of the range.
15054
15146
  * @param {number} end The end of the range.
15055
15147
  * @param {number} [step=1] The value to increment or decrement by.
15056
- * @returns {Array} Returns the new array of numbers.
15148
+ * @returns {Array} Returns the range of numbers.
15057
15149
  * @see _.inRange, _.rangeRight
15058
15150
  * @example
15059
15151
  *
@@ -15091,7 +15183,7 @@
15091
15183
  * @param {number} [start=0] The start of the range.
15092
15184
  * @param {number} end The end of the range.
15093
15185
  * @param {number} [step=1] The value to increment or decrement by.
15094
- * @returns {Array} Returns the new array of numbers.
15186
+ * @returns {Array} Returns the range of numbers.
15095
15187
  * @see _.inRange, _.range
15096
15188
  * @example
15097
15189
  *
@@ -15852,6 +15944,7 @@
15852
15944
  lodash.sumBy = sumBy;
15853
15945
  lodash.template = template;
15854
15946
  lodash.times = times;
15947
+ lodash.toFinite = toFinite;
15855
15948
  lodash.toInteger = toInteger;
15856
15949
  lodash.toLength = toLength;
15857
15950
  lodash.toLower = toLower;