mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 14:37:49 +00:00
Add _.constant, _.mapValues, and _.xor.
This commit is contained in:
174
dist/lodash.compat.js
vendored
174
dist/lodash.compat.js
vendored
@@ -2483,15 +2483,15 @@
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to check.
|
||||
* @param {string} key The name of the property to check.
|
||||
* @returns {boolean} Returns `true` if key is a direct property, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
* // => true
|
||||
*/
|
||||
function has(object, prop) {
|
||||
return object ? hasOwnProperty.call(object, prop) : false;
|
||||
function has(object, key) {
|
||||
return object ? hasOwnProperty.call(object, key) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2896,6 +2896,52 @@
|
||||
return typeof value == 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object with the same keys as `object` and values generated by
|
||||
* running each own enumerable property of `object` through the callback.
|
||||
* The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, key, object).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
* callback will return the property value of the given element.
|
||||
*
|
||||
* If an object is provided for `callback` the created "_.where" style callback
|
||||
* will return `true` for elements that have the properties of the given object,
|
||||
* else `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function|Object|string} [callback=identity] The function called
|
||||
* per iteration. If a property name or object is provided it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new object with values of the results of each `callback` execution.
|
||||
* @example
|
||||
*
|
||||
* _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; });
|
||||
* // => { 'a': 3, 'b': 6, 'c': 9 }
|
||||
*
|
||||
* var characters = {
|
||||
* 'fred': { 'name': 'fred', 'age': 40 },
|
||||
* 'pebbles': { 'name': 'pebbles', 'age': 1 }
|
||||
* };
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.mapValues(characters, 'age');
|
||||
* // => { 'fred': 40, 'pebbles': 1 }
|
||||
*/
|
||||
function mapValues(object, callback, thisArg) {
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that
|
||||
* don't resolve to `undefined` into the destination object. Subsequent sources
|
||||
@@ -3111,11 +3157,11 @@
|
||||
|
||||
/**
|
||||
* An alternative to `_.reduce` this method transforms `object` to a new
|
||||
* `accumulator` object which is the result of running each of its elements
|
||||
* through a callback, with each callback execution potentially mutating
|
||||
* the `accumulator` object. The callback is bound to `thisArg` and invoked
|
||||
* with four arguments; (accumulator, value, key, object). Callbacks may exit
|
||||
* iteration early by explicitly returning `false`.
|
||||
* `accumulator` object which is the result of running each of its own
|
||||
* enumerable properties through a callback, with each callback execution
|
||||
* potentially mutating the `accumulator` object. The callback is bound to
|
||||
* `thisArg` and invoked with four arguments; (accumulator, value, key, object).
|
||||
* Callbacks may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4740,29 +4786,34 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of shared values.
|
||||
* @example
|
||||
*
|
||||
* _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
function intersection() {
|
||||
var args = [],
|
||||
argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
caches = getArray(),
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [],
|
||||
trustIndexOf = indexOf === baseIndexOf,
|
||||
seen = getArray();
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = args[argsIndex];
|
||||
caches[argsIndex] = indexOf === baseIndexOf &&
|
||||
(value ? value.length : 0) >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen);
|
||||
var value = arguments[argsIndex];
|
||||
if (isArray(value) || isArguments(value)) {
|
||||
args.push(value);
|
||||
caches.push(trustIndexOf && value.length >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen));
|
||||
}
|
||||
}
|
||||
var array = args[0],
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var cache = caches[0];
|
||||
@@ -5179,13 +5230,13 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of combined values.
|
||||
* @example
|
||||
*
|
||||
* _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* // => [1, 2, 3, 101, 10]
|
||||
* _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2, 3, 5, 4]
|
||||
*/
|
||||
function union(array) {
|
||||
function union() {
|
||||
return baseUniq(baseFlatten(arguments, true, true));
|
||||
}
|
||||
|
||||
@@ -5265,6 +5316,37 @@
|
||||
return baseDifference(array, slice(arguments, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of values.
|
||||
* @example
|
||||
*
|
||||
* _.xor([1, 2, 3], [5, 2, 1, 4]);
|
||||
* // => [3, 5, 4]
|
||||
*
|
||||
* _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]);
|
||||
* // => [1, 4, 5]
|
||||
*/
|
||||
function xor() {
|
||||
var index = 0,
|
||||
length = arguments.length,
|
||||
result = arguments[0] || [];
|
||||
|
||||
while (++index < length) {
|
||||
var array = arguments[index];
|
||||
if (isArray(array) || isArguments(array)) {
|
||||
result = baseUniq(baseDifference(result, array).concat(baseDifference(array, result)));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of grouped elements, the first of which contains the first
|
||||
* elements of the given arrays, the second of which contains the second
|
||||
@@ -5971,6 +6053,27 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that returns `value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {*} value The value to return from the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'name': 'fred' };
|
||||
* var getter = _.constant(object);
|
||||
* getter() === object;
|
||||
* // => true
|
||||
*/
|
||||
function constant(value) {
|
||||
return function() {
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a callback bound to an optional `thisArg`. If `func` is a property
|
||||
* name the created callback will return the property value for a given element.
|
||||
@@ -6200,14 +6303,14 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a "_.pluck" style function, which returns the `prop` value of a
|
||||
* Creates a "_.pluck" style function, which returns the `key` value of a
|
||||
* given object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {string} prop The name of the property to retrieve.
|
||||
* @returns {*} Returns the new function.
|
||||
* @param {string} key The name of the property to retrieve.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var characters = [
|
||||
@@ -6223,9 +6326,9 @@
|
||||
* _.sortBy(characters, getName);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
|
||||
*/
|
||||
function property(prop) {
|
||||
function property(key) {
|
||||
return function(object) {
|
||||
return object[prop];
|
||||
return object[key];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6288,7 +6391,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `prop` on `object`. If `prop` is a function
|
||||
* Resolves the value of property `key` on `object`. If `key` is a function
|
||||
* it will be invoked with the `this` binding of `object` and its result returned,
|
||||
* else the property value is returned. If `object` is falsey then `undefined`
|
||||
* is returned.
|
||||
@@ -6297,7 +6400,7 @@
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to resolve.
|
||||
* @param {string} key The name of the property to resolve.
|
||||
* @returns {*} Returns the resolved value.
|
||||
* @example
|
||||
*
|
||||
@@ -6314,10 +6417,10 @@
|
||||
* _.result(object, 'stuff');
|
||||
* // => 'nonsense'
|
||||
*/
|
||||
function result(object, prop) {
|
||||
function result(object, key) {
|
||||
if (object) {
|
||||
var value = object[prop];
|
||||
return isFunction(value) ? object[prop]() : value;
|
||||
var value = object[key];
|
||||
return isFunction(value) ? object[key]() : value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6714,6 +6817,7 @@
|
||||
lodash.chain = chain;
|
||||
lodash.compact = compact;
|
||||
lodash.compose = compose;
|
||||
lodash.constant = constant;
|
||||
lodash.countBy = countBy;
|
||||
lodash.create = create;
|
||||
lodash.createCallback = createCallback;
|
||||
@@ -6740,6 +6844,7 @@
|
||||
lodash.invoke = invoke;
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.mapValues = mapValues;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
@@ -6770,6 +6875,7 @@
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.xor = xor;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
|
||||
53
dist/lodash.compat.min.js
vendored
53
dist/lodash.compat.min.js
vendored
@@ -6,9 +6,9 @@
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:b+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:b+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){var e=n.m,r=t.m;if(e!==r){if(e>r||typeof e=="undefined")return 1;if(e<r||typeof r=="undefined")return-1}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return false;for(u=l(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=l(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+Y[n]}function i(){return v.pop()||[]}function l(){return y.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}
|
||||
}function f(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function c(n){n.length=0,v.length<w&&v.push(n)}function p(n){var t=n.l;t&&p(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,y.length<w&&y.push(n)}function s(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function g(e){function v(n){return n&&typeof n=="object"&&!We(n)&&xe.call(n,"__wrapped__")?n:new y(n)}function y(n,t){this.__chain__=!!t,this.__wrapped__=n
|
||||
}function w(n){function t(){if(r){var n=r.slice();Ce.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return Ct(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return Ke(t,n),t}function Y(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!Ct(n))return n;var a=ye.call(n);if(!H[a]||!qe.nodeClass&&f(n))return n;var l=Le[a];switch(a){case L:case z:return new l(+n);case W:case M:return new l(n);case J:return o=l(n.source,S.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}function w(n){function t(){if(r){var n=r.slice();Ce.apply(n,arguments)}if(this instanceof t){var o=nt(e.prototype),n=e.apply(o,n||arguments);return Ct(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return Ke(t,n),t}function Y(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!Ct(n))return n;var a=ye.call(n);if(!V[a]||!qe.nodeClass&&f(n))return n;var l=Le[a];switch(a){case L:case z:return new l(+n);case W:case M:return new l(n);case J:return o=l(n.source,S.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}if(a=We(n),t){var p=!r;r||(r=i()),u||(u=i());for(var g=r.length;g--;)if(r[g]==n)return u[g];o=a?l(n.length):{}}else o=a?s(n):nr({},n);return a&&(xe.call(n,"index")&&(o.index=n.index),xe.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?Ze:rr)(n,function(n,a){o[a]=Y(n,t,e,r,u)}),p&&(c(r),c(u)),o):o}function nt(n){return Ct(n)?Ae(n):{}}function tt(n,t,e){if(typeof n!="function")return Qt;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(qe.funcNames&&(r=!n.name),r=r||!qe.funcDecomp,!r)){var u=we.call(n);
|
||||
qe.funcNames||(r=!I.test(u)),r||(r=B.test(u),Ke(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Ht(n,t)}function ot(n){function t(){var n=l?a:this;if(u){var h=u.slice();Ce.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&Ce.apply(h,o),c&&h.length<i)?(r|=16,ot([e,p?r:-4&r,h,null,a,i])):(h||(h=arguments),f&&(e=n[g]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),Ct(h)?h:n):e.apply(n,h))
|
||||
qe.funcNames||(r=!I.test(u)),r||(r=B.test(u),Ke(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Vt(n,t)}function ot(n){function t(){var n=l?a:this;if(u){var h=u.slice();Ce.apply(h,arguments)}return(o||c)&&(h||(h=s(arguments)),o&&Ce.apply(h,o),c&&h.length<i)?(r|=16,ot([e,p?r:-4&r,h,null,a,i])):(h||(h=arguments),f&&(e=n[g]),this instanceof t?(n=nt(e.prototype),h=e.apply(n,h),Ct(h)?h:n):e.apply(n,h))
|
||||
}var e=n[0],r=n[1],u=n[2],o=n[3],a=n[4],i=n[5],l=1&r,f=2&r,c=4&r,p=8&r,g=e;return Ke(t,n),t}function at(e,r){var u=-1,a=yt(),i=e?e.length:0,l=i>=_&&a===n,f=[];if(l){var c=o(r);c?(a=t,r=c):l=false}for(;++u<i;)c=e[u],0>a(r,c)&&f.push(c);return l&&p(r),f}function it(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(We(a)||bt(a))){t||(a=it(a,t,e));var i=-1,l=a.length,f=o.length;for(o.length+=l;++i<l;)o[f++]=a[i]}else e||o.push(a)}return o
|
||||
}function lt(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&X[typeof n]||t&&X[typeof t]))return false;if(null==n||null==t)return n===t;var l=ye.call(n),p=ye.call(t);if(l==$&&(l=G),p==$&&(p=G),l!=p)return false;switch(l){case L:case z:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case J:case M:return n==fe(t)}if(p=l==T,!p){var s=xe.call(n,"__wrapped__"),g=xe.call(t,"__wrapped__");if(s||g)return lt(s?n.__wrapped__:n,g?t.__wrapped__:t,e,r,u,o);
|
||||
if(l!=G||!qe.nodeClass&&(f(n)||f(t)))return false;if(l=!qe.argsObject&&bt(n)?ie:n.constructor,s=!qe.argsObject&&bt(t)?ie:t.constructor,l!=s&&!(xt(l)&&l instanceof l&&xt(s)&&s instanceof s)&&"constructor"in n&&"constructor"in t)return false}for(s=!u,u||(u=i()),o||(o=i()),l=u.length;l--;)if(u[l]==n)return o[l]==t;var h=0,a=true;if(u.push(n),o.push(t),p){if(l=n.length,h=t.length,a=h==n.length,!a&&!r)return a;for(;h--;)if(p=l,s=t[h],r)for(;p--&&!(a=lt(n[p],s,e,r,u,o)););else if(!(a=lt(n[h],s,e,r,u,o)))break;return a
|
||||
@@ -17,7 +17,7 @@ n[o]=f})}function ct(n,t){return n+_e(Te()*(t-n+1))}function pt(e,r,u){var a=-1,
|
||||
});return u}}function gt(n,t,e,r,u,o){var a=1&t,i=4&t,l=16&t,f=32&t;if(!(2&t||xt(n)))throw new ce;l&&!e.length&&(t&=-17,l=e=false),f&&!r.length&&(t&=-33,f=r=false);var c=n&&n.__bindData__;return c&&true!==c?(c=c.slice(),!a||1&c[1]||(c[4]=u),!a&&1&c[1]&&(t|=8),!i||4&c[1]||(c[5]=o),l&&Ce.apply(c[2]||(c[2]=[]),e),f&&Ce.apply(c[3]||(c[3]=[]),r),c[1]|=t,gt.apply(null,c)):(1==t||17===t?w:ot)([n,t,e,r,u,o])}function ht(){Q.h=F,Q.b=Q.c=Q.g=Q.i="",Q.e="t",Q.j=true;for(var n,t=0;n=arguments[t];t++)for(var e in n)Q[e]=n[e];
|
||||
t=Q.a,Q.d=/^[^,]+/.exec(t)[0],n=ue,t="return function("+t+"){",e=Q;var r="var n,t="+e.d+",E="+e.e+";if(!t)return E;"+e.i+";";e.b?(r+="var u=t.length;n=-1;if("+e.b+"){",qe.unindexedChars&&(r+="if(s(t)){t=t.split('')}"),r+="while(++n<u){"+e.g+";}}else{"):qe.nonEnumArgs&&(r+="var u=t.length;n=-1;if(u&&p(t)){while(++n<u){n+='';"+e.g+";}}else{"),qe.enumPrototypes&&(r+="var G=typeof t=='function';"),qe.enumErrorProps&&(r+="var F=t===k||t instanceof Error;");var u=[];if(qe.enumPrototypes&&u.push('!(G&&n=="prototype")'),qe.enumErrorProps&&u.push('!(F&&(n=="message"||n=="name"))'),e.j&&e.f)r+="var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++C<u){n=D[C];",u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}";
|
||||
else if(r+="for(n in t){",e.j&&u.push("m.call(t, n)"),u.length&&(r+="if("+u.join("&&")+"){"),r+=e.g+";",u.length&&(r+="}"),r+="}",qe.nonEnumShadows){for(r+="if(t!==A){var i=t.constructor,r=t===(i&&i.prototype),f=t===J?I:t===k?j:L.call(t),x=y[f];",k=0;7>k;k++)r+="n='"+e.h[k]+"';if((!(r&&x[n])&&m.call(t,n))",e.j||(r+="||(!x[n]&&t[n]!==A[n])"),r+="){"+e.g+"}";r+="}"}return(e.b||qe.nonEnumArgs)&&(r+="}"),r+=e.c+";return E",n("d,j,k,m,o,p,q,s,v,A,B,y,I,J,L",t+r+"}")(tt,q,se,xe,d,bt,We,Et,Q.f,ge,X,ze,M,he,ye)
|
||||
}function vt(n){return Ve[n]}function yt(){var t=(t=v.indexOf)===qt?n:t;return t}function mt(n){var t,e;return!n||ye.call(n)!=G||(t=n.constructor,xt(t)&&!(t instanceof t))||!qe.argsClass&&bt(n)||!qe.nodeClass&&f(n)?false:qe.ownLast?(er(n,function(n,t,r){return e=xe.call(r,t),false}),false!==e):(er(n,function(n,t){e=t}),typeof e=="undefined"||xe.call(n,e))}function dt(n){return Qe[n]}function bt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ye.call(n)==$||false}function _t(n,t,e){var r=Je(n),u=r.length;
|
||||
}function vt(n){return Ue[n]}function yt(){var t=(t=v.indexOf)===qt?n:t;return t}function mt(n){var t,e;return!n||ye.call(n)!=G||(t=n.constructor,xt(t)&&!(t instanceof t))||!qe.argsClass&&bt(n)||!qe.nodeClass&&f(n)?false:qe.ownLast?(er(n,function(n,t,r){return e=xe.call(r,t),false}),false!==e):(er(n,function(n,t){e=t}),typeof e=="undefined"||xe.call(n,e))}function dt(n){return Qe[n]}function bt(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ye.call(n)==$||false}function _t(n,t,e){var r=Je(n),u=r.length;
|
||||
for(t=tt(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function wt(n){var t=[];return er(n,function(n,e){xt(n)&&t.push(e)}),t.sort()}function jt(n){for(var t=-1,e=Je(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function xt(n){return typeof n=="function"}function Ct(n){return!(!n||!X[typeof n])}function kt(n){return typeof n=="number"||n&&typeof n=="object"&&ye.call(n)==W||false}function Et(n){return typeof n=="string"||n&&typeof n=="object"&&ye.call(n)==M||false}function Ot(n){for(var t=-1,e=Je(n),r=e.length,u=te(r);++t<r;)u[t]=n[e[t]];
|
||||
return u}function St(n,t,e){var r=-1,u=yt(),o=n?n.length:0,a=false;return e=(0>e?Re(0,o+e):e)||0,We(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(Et(n)?n.indexOf(t,e):u(n,t,e)):Ze(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function It(n,t,e){var r=true;if(t=v.createCallback(t,e,3),We(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else Ze(n,function(n,e,u){return r=!!t(n,e,u)});return r}function At(n,t,e){var r=[];if(t=v.createCallback(t,e,3),We(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];
|
||||
t(o,e,n)&&r.push(o)}}else Ze(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function Dt(n,t,e){if(t=v.createCallback(t,e,3),!We(n)){var r;return Ze(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function Nt(n,t,e){if(t&&typeof e=="undefined"&&We(n)){e=-1;for(var r=n.length;++e<r&&false!==t(n[e],e,n););}else Ze(n,t,e);return n}function Bt(n,t,e){var r=n,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:tt(t,e,3),We(n))for(;u--&&false!==t(n[u],u,n););else{if(typeof u!="number")var o=Je(n),u=o.length;
|
||||
@@ -25,35 +25,36 @@ else qe.unindexedChars&&Et(n)&&(r=n.split(""));Ze(n,function(n,e,a){return e=o?o
|
||||
});return o}function Ft(n,t,e,r){var u=3>arguments.length;if(t=v.createCallback(t,r,4),We(n)){var o=-1,a=n.length;for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n)}else Ze(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function $t(n,t,e,r){var u=3>arguments.length;return t=v.createCallback(t,r,4),Bt(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)}),e}function Tt(n){var t=-1,e=n?n.length:0,r=te(typeof e=="number"?e:0);return Nt(n,function(n){var e=ct(0,++t);r[t]=r[e],r[e]=n}),r}function Lt(n,t,e){var r;if(t=v.createCallback(t,e,3),We(n)){e=-1;
|
||||
for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else Ze(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function zt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=v.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:h;return s(n,0,Fe(Re(0,r),u))}function qt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Re(0,u+r):r||0}else if(r)return r=Wt(t,e),t[r]===e?r:-1;return n(t,e,r)}function Kt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;
|
||||
for(t=v.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Re(0,t);return s(n,r)}function Wt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?v.createCallback(e,r,1):Qt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function Gt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=v.createCallback(e,r,3)),pt(n,t,e)}function Jt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?Rt(lr(n,"length")):0,r=te(0>e?0:e);++t<e;)r[t]=lr(n,t);
|
||||
return r}function Mt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||We(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Ht(n,t){return 2<arguments.length?gt(n,17,s(arguments,2),null,t):gt(n,1,null,null,t)}function Ut(n,t,e){function r(){c&&be(c),a=c=p=h,(v||g!==t)&&(s=fr(),i=n.apply(f,o),c||a||(o=f=null))}function u(){var e=t-(fr()-l);0<e?c=Ee(u,e):(a&&be(a),e=p,a=c=p=h,e&&(s=fr(),i=n.apply(f,o),c||a||(o=f=null)))}var o,a,i,l,f,c,p,s=0,g=false,v=true;if(!xt(n))throw new ce;
|
||||
if(t=Re(0,t)||0,true===e)var y=true,v=false;else Ct(e)&&(y=e.leading,g="maxWait"in e&&(Re(t,e.maxWait)||0),v="trailing"in e?e.trailing:v);return function(){if(o=arguments,l=fr(),f=this,p=v&&(c||!y),false===g)var e=y&&!c;else{a||y||(s=l);var h=g-(l-s),m=0>=h;m?(a&&(a=be(a)),s=l,i=n.apply(f,o)):a||(a=Ee(r,h))}return m&&c?c=be(c):c||t===g||(c=Ee(u,t)),e&&(m=true,i=n.apply(f,o)),!m||c||a||(o=f=null),i}}function Vt(n){if(!xt(n))throw new ce;var t=s(arguments,1);return Ee(function(){n.apply(h,t)},1)}function Qt(n){return n
|
||||
return r}function Mt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||We(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Vt(n,t){return 2<arguments.length?gt(n,17,s(arguments,2),null,t):gt(n,1,null,null,t)}function Ht(n,t,e){function r(){c&&be(c),a=c=p=h,(v||g!==t)&&(s=fr(),i=n.apply(f,o),c||a||(o=f=null))}function u(){var e=t-(fr()-l);0<e?c=Ee(u,e):(a&&be(a),e=p,a=c=p=h,e&&(s=fr(),i=n.apply(f,o),c||a||(o=f=null)))}var o,a,i,l,f,c,p,s=0,g=false,v=true;if(!xt(n))throw new ce;
|
||||
if(t=Re(0,t)||0,true===e)var y=true,v=false;else Ct(e)&&(y=e.leading,g="maxWait"in e&&(Re(t,e.maxWait)||0),v="trailing"in e?e.trailing:v);return function(){if(o=arguments,l=fr(),f=this,p=v&&(c||!y),false===g)var e=y&&!c;else{a||y||(s=l);var h=g-(l-s),m=0>=h;m?(a&&(a=be(a)),s=l,i=n.apply(f,o)):a||(a=Ee(r,h))}return m&&c?c=be(c):c||t===g||(c=Ee(u,t)),e&&(m=true,i=n.apply(f,o)),!m||c||a||(o=f=null),i}}function Ut(n){if(!xt(n))throw new ce;var t=s(arguments,1);return Ee(function(){n.apply(h,t)},1)}function Qt(n){return n
|
||||
}function Xt(n,t){var e=n,r=!t||xt(e);t||(e=y,t=n,n=v),Nt(wt(t),function(u){var o=n[u]=t[u];r&&(e.prototype[u]=function(){var t=this.__wrapped__,r=[t];return Ce.apply(r,arguments),r=o.apply(n,r),t&&typeof t=="object"&&t===r?this:(r=new e(r),r.__chain__=this.__chain__,r)})})}function Yt(){}function Zt(n){return function(t){return t[n]}}function ne(){return this.__wrapped__}e=e?ut.defaults(Z.Object(),e,ut.pick(Z,R)):Z;var te=e.Array,ee=e.Boolean,re=e.Date,ue=e.Function,oe=e.Math,ae=e.Number,ie=e.Object,le=e.RegExp,fe=e.String,ce=e.TypeError,pe=[],se=e.Error.prototype,ge=ie.prototype,he=fe.prototype,ve=e._,ye=ge.toString,me=le("^"+fe(ye).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),de=oe.ceil,be=e.clearTimeout,_e=oe.floor,we=ue.prototype.toString,je=me.test(je=ie.getPrototypeOf)&&je,xe=ge.hasOwnProperty,Ce=pe.push,ke=ge.propertyIsEnumerable,Ee=e.setTimeout,Oe=pe.splice,Se=typeof(Se=rt&&et&&rt.setImmediate)=="function"&&!me.test(Se)&&Se,Ie=function(){try{var n={},t=me.test(t=ie.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),Ae=me.test(Ae=ie.create)&&Ae,De=me.test(De=te.isArray)&&De,Ne=e.isFinite,Be=e.isNaN,Pe=me.test(Pe=ie.keys)&&Pe,Re=oe.max,Fe=oe.min,$e=e.parseInt,Te=oe.random,Le={};Le[T]=te,Le[L]=ee,Le[z]=re,Le[K]=ue,Le[G]=ie,Le[W]=ae,Le[J]=le,Le[M]=fe;var ze={};ze[T]=ze[z]=ze[W]={constructor:true,toLocaleString:true,toString:true,valueOf:true},ze[L]=ze[M]={constructor:true,toString:true,valueOf:true},ze[q]=ze[K]=ze[J]={constructor:true,toString:true},ze[G]={constructor:true},function(){for(var n=F.length;n--;){var t,e=F[n];
|
||||
for(t in ze)xe.call(ze,t)&&!xe.call(ze[t],e)&&(ze[t][e]=false)}}(),y.prototype=v.prototype;var qe=v.support={};!function(){function n(){this.x=1}var t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};for(var u in new n)r.push(u);for(u in arguments);qe.argsClass=ye.call(arguments)==$,qe.argsObject=arguments.constructor==ie&&!(arguments instanceof te),qe.enumErrorProps=ke.call(se,"message")||ke.call(se,"name"),qe.enumPrototypes=ke.call(n,"prototype"),qe.funcDecomp=!me.test(e.p)&&B.test(g),qe.funcNames=typeof ue.name=="string",qe.nonEnumArgs=0!=u,qe.nonEnumShadows=!/valueOf/.test(r),qe.ownLast="x"!=r[0],qe.spliceObjects=(pe.splice.call(t,0,1),!t[0]),qe.unindexedChars="xx"!="x"[0]+ie("x")[0];
|
||||
try{qe.nodeClass=!(ye.call(document)==G&&!({toString:0}+""))}catch(o){qe.nodeClass=true}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:v}},Ae||(nt=function(){function n(){}return function(t){if(Ct(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var Ke=Ie?function(n,t){V.value=t,Ie(n,"__bindData__",V)}:Yt;qe.argsClass||(bt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&xe.call(n,"callee")&&!ke.call(n,"callee")||false
|
||||
});var We=De||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ye.call(n)==T||false},Ge=ht({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),Je=Pe?function(n){return Ct(n)?qe.enumPrototypes&&typeof n=="function"||qe.nonEnumArgs&&n.length&&bt(n)?Ge(n):Pe(n):[]}:Ge,Me={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:Je,g:"if(e(t[n],n,g)===false)return E"},He={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b<c){t=a[b];if(t&&B[typeof t]){",v:Je,g:"if(typeof E[n]=='undefined')E[n]=t[n]",c:"}}"},Ue={i:"if(!B[typeof t])return E;"+Me.i,b:false},Ve={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe=jt(Ve),Xe=le("("+Je(Qe).join("|")+")","g"),Ye=le("["+Je(Ve).join("")+"]","g"),Ze=ht(Me),nr=ht(He,{i:He.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),tr=ht(He),er=ht(Me,Ue,{j:false}),rr=ht(Me,Ue);
|
||||
xt(/x/)&&(xt=function(n){return typeof n=="function"&&ye.call(n)==K});var ur=je?function(n){if(!n||ye.call(n)!=G||!qe.argsClass&&bt(n))return false;var t=n.valueOf,e=typeof t=="function"&&(e=je(t))&&je(e);return e?n==e||je(n)==e:mt(n)}:mt,or=st(function(n,t,e){xe.call(n,e)?n[e]++:n[e]=1}),ar=st(function(n,t,e){(xe.call(n,e)?n[e]:n[e]=[]).push(t)}),ir=st(function(n,t,e){n[e]=t}),lr=Pt;Se&&(Vt=function(n){if(!xt(n))throw new ce;return Se.apply(e,arguments)});var fr=me.test(fr=re.now)&&fr||function(){return(new re).getTime()
|
||||
},cr=8==$e(j+"08")?$e:function(n,t){return $e(Et(n)?n.replace(D,""):n,t||0)};return v.after=function(n,t){if(!xt(t))throw new ce;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=nr,v.at=function(n){var t=arguments,e=-1,r=it(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=te(t);for(qe.unindexedChars&&Et(n)&&(n=n.split(""));++e<t;)u[e]=n[r[e]];return u},v.bind=Ht,v.bindAll=function(n){for(var t=1<arguments.length?it(arguments,true,false,1):wt(n),e=-1,r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=gt(n[u],1,null,null,n)}return n},v.bindKey=function(n,t){return 2<arguments.length?gt(t,19,s(arguments,2),null,n):gt(t,3,null,null,n)},v.chain=function(n){return n=new y(n),n.__chain__=true,n},v.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},v.compose=function(){for(var n=arguments,t=n.length;t--;)if(!xt(n[t]))throw new ce;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},v.countBy=or,v.create=function(n,t){var e=nt(n);
|
||||
return t?nr(e,t):e},v.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return tt(n,t,e);if("object"!=r)return Zt(n);var u=Je(n),o=u[0],a=n[o];return 1!=u.length||a!==a||Ct(a)?function(t){for(var e=u.length,r=false;e--&&(r=lt(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},v.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,gt(n,4,null,null,null,t)},v.debounce=Ut,v.defaults=tr,v.defer=Vt,v.delay=function(n,t){if(!xt(n))throw new ce;
|
||||
try{qe.nodeClass=!(ye.call(document)==G&&!({toString:0}+""))}catch(o){qe.nodeClass=true}}(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:A,variable:"",imports:{_:v}},Ae||(nt=function(){function n(){}return function(t){if(Ct(t)){n.prototype=t;var r=new n;n.prototype=null}return r||e.Object()}}());var Ke=Ie?function(n,t){U.value=t,Ie(n,"__bindData__",U)}:Yt;qe.argsClass||(bt=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&xe.call(n,"callee")&&!ke.call(n,"callee")||false
|
||||
});var We=De||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ye.call(n)==T||false},Ge=ht({a:"z",e:"[]",i:"if(!(B[typeof z]))return E",g:"E.push(n)"}),Je=Pe?function(n){return Ct(n)?qe.enumPrototypes&&typeof n=="function"||qe.nonEnumArgs&&n.length&&bt(n)?Ge(n):Pe(n):[]}:Ge,Me={a:"g,e,K",i:"e=e&&typeof K=='undefined'?e:d(e,K,3)",b:"typeof u=='number'",v:Je,g:"if(e(t[n],n,g)===false)return E"},Ve={a:"z,H,l",i:"var a=arguments,b=0,c=typeof l=='number'?2:a.length;while(++b<c){t=a[b];if(t&&B[typeof t]){",v:Je,g:"if(typeof E[n]=='undefined')E[n]=t[n]",c:"}}"},He={i:"if(!B[typeof t])return E;"+Me.i,b:false},Ue={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe=jt(Ue),Xe=le("("+Je(Qe).join("|")+")","g"),Ye=le("["+Je(Ue).join("")+"]","g"),Ze=ht(Me),nr=ht(Ve,{i:Ve.i.replace(";",";if(c>3&&typeof a[c-2]=='function'){var e=d(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){e=a[--c]}"),g:"E[n]=e?e(E[n],t[n]):t[n]"}),tr=ht(Ve),er=ht(Me,He,{j:false}),rr=ht(Me,He);
|
||||
xt(/x/)&&(xt=function(n){return typeof n=="function"&&ye.call(n)==K});var ur=je?function(n){if(!n||ye.call(n)!=G||!qe.argsClass&&bt(n))return false;var t=n.valueOf,e=typeof t=="function"&&(e=je(t))&&je(e);return e?n==e||je(n)==e:mt(n)}:mt,or=st(function(n,t,e){xe.call(n,e)?n[e]++:n[e]=1}),ar=st(function(n,t,e){(xe.call(n,e)?n[e]:n[e]=[]).push(t)}),ir=st(function(n,t,e){n[e]=t}),lr=Pt;Se&&(Ut=function(n){if(!xt(n))throw new ce;return Se.apply(e,arguments)});var fr=me.test(fr=re.now)&&fr||function(){return(new re).getTime()
|
||||
},cr=8==$e(j+"08")?$e:function(n,t){return $e(Et(n)?n.replace(D,""):n,t||0)};return v.after=function(n,t){if(!xt(t))throw new ce;return function(){return 1>--n?t.apply(this,arguments):void 0}},v.assign=nr,v.at=function(n){var t=arguments,e=-1,r=it(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=te(t);for(qe.unindexedChars&&Et(n)&&(n=n.split(""));++e<t;)u[e]=n[r[e]];return u},v.bind=Vt,v.bindAll=function(n){for(var t=1<arguments.length?it(arguments,true,false,1):wt(n),e=-1,r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=gt(n[u],1,null,null,n)}return n},v.bindKey=function(n,t){return 2<arguments.length?gt(t,19,s(arguments,2),null,n):gt(t,3,null,null,n)},v.chain=function(n){return n=new y(n),n.__chain__=true,n},v.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},v.compose=function(){for(var n=arguments,t=n.length;t--;)if(!xt(n[t]))throw new ce;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},v.constant=function(n){return function(){return n
|
||||
}},v.countBy=or,v.create=function(n,t){var e=nt(n);return t?nr(e,t):e},v.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return tt(n,t,e);if("object"!=r)return Zt(n);var u=Je(n),o=u[0],a=n[o];return 1!=u.length||a!==a||Ct(a)?function(t){for(var e=u.length,r=false;e--&&(r=lt(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)}},v.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,gt(n,4,null,null,null,t)},v.debounce=Ht,v.defaults=tr,v.defer=Ut,v.delay=function(n,t){if(!xt(n))throw new ce;
|
||||
var e=s(arguments,2);return Ee(function(){n.apply(h,e)},t)},v.difference=function(n){return at(n,it(arguments,true,true,1))},v.filter=At,v.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Pt(n,e,r)),it(n,t)},v.forEach=Nt,v.forEachRight=Bt,v.forIn=er,v.forInRight=function(n,t,e){var r=[];er(n,function(n,t){r.push(t,n)});var u=r.length;for(t=tt(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},v.forOwn=rr,v.forOwnRight=_t,v.functions=wt,v.groupBy=ar,v.indexBy=ir,v.initial=function(n,t,e){var r=0,u=n?n.length:0;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return s(n,0,Fe(Re(0,u-r),u))},v.intersection=function(e){for(var r=arguments,u=r.length,a=-1,l=i(),f=-1,s=yt(),g=e?e.length:0,h=[],v=i();++a<u;){var y=r[a];l[a]=s===n&&(y?y.length:0)>=_&&o(a?r[a]:v)}n:for(;++f<g;){var m=l[0],y=e[f];if(0>(m?t(m,y):s(v,y))){for(a=u,(m||v).push(y);--a;)if(m=l[a],0>(m?t(m,y):s(r[a],y)))continue n;h.push(y)}}for(;u--;)(m=l[u])&&p(m);return c(l),c(v),h},v.invert=jt,v.invoke=function(n,t){var e=s(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=te(typeof o=="number"?o:0);
|
||||
return Nt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},v.keys=Je,v.map=Pt,v.max=Rt,v.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return xe.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!xt(n))throw new ce;return e.cache={},e},v.merge=function(n){var t=arguments,e=2;if(!Ct(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=s(arguments,1,e),u=-1,o=i(),a=i();++u<e;)ft(n,t[u],r,o,a);
|
||||
return c(o),c(a),n},v.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&We(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=null==t&&Et(n)?r:v.createCallback(t,e,3),Ze(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},v.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];er(n,function(n,t){u.push(t)});for(var u=at(u,it(arguments,true,false,1)),o=-1,a=u.length;++o<a;){var i=u[o];r[i]=n[i]}}else t=v.createCallback(t,e,3),er(n,function(n,e,u){t(n,e,u)||(r[e]=n)
|
||||
});return r},v.once=function(n){var t,e;if(!xt(n))throw new ce;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},v.pairs=function(n){for(var t=-1,e=Je(n),r=e.length,u=te(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},v.partial=function(n){return gt(n,16,s(arguments,1))},v.partialRight=function(n){return gt(n,32,null,s(arguments,1))},v.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=it(arguments,true,false,1),a=Ct(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])
|
||||
}else t=v.createCallback(t,e,3),er(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},v.pluck=lr,v.property=Zt,v.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(Oe.call(n,o--,1),u--);return n},v.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Re(0,de((t-n)/(e||1)));for(var u=te(t);++r<t;)u[r]=n,n+=e;return u},v.reject=function(n,t,e){return t=v.createCallback(t,e,3),At(n,function(n,e,r){return!t(n,e,r)
|
||||
})},v.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=v.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),Oe.call(n,r--,1),u--);return o},v.rest=Kt,v.shuffle=Tt,v.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,a=te(typeof o=="number"?o:0);for(t=v.createCallback(t,e,3),Nt(n,function(n,e,u){var o=a[++r]=l();o.m=t(n,e,u),o.n=r,o.o=n}),o=a.length,a.sort(u);o--;)n=a[o],a[o]=n.o,p(n);return a},v.tap=function(n,t){return t(n),n},v.throttle=function(n,t,e){var r=true,u=true;if(!xt(n))throw new ce;
|
||||
return false===e?r=false:Ct(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),U.leading=r,U.maxWait=t,U.trailing=u,Ut(n,t,U)},v.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=te(n);for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},v.toArray=function(n){return n&&typeof n.length=="number"?qe.unindexedChars&&Et(n)?n.split(""):s(n):Ot(n)},v.transform=function(n,t,e,r){var u=We(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=v.createCallback(t,r,4),(u?Ze:rr)(n,function(n,r,u){return t(e,n,r,u)
|
||||
})),e},v.union=function(){return pt(it(arguments,true,true))},v.uniq=Gt,v.values=Ot,v.where=At,v.without=function(n){return at(n,s(arguments,1))},v.wrap=function(n,t){return gt(t,16,[n])},v.zip=Jt,v.zipObject=Mt,v.collect=Pt,v.drop=Kt,v.each=Nt,v.eachRight=Bt,v.extend=nr,v.methods=wt,v.object=Mt,v.select=At,v.tail=Kt,v.unique=Gt,v.unzip=Jt,Xt(v),v.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),Y(n,t,typeof e=="function"&&tt(e,r,1))},v.cloneDeep=function(n,t,e){return Y(n,true,typeof t=="function"&&tt(t,e,1))
|
||||
},v.contains=St,v.escape=function(n){return null==n?"":fe(n).replace(Ye,vt)},v.every=It,v.find=Dt,v.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=v.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},v.findKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),rr(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.findLast=function(n,t,e){var r;return t=v.createCallback(t,e,3),Bt(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},v.findLastIndex=function(n,t,e){var r=n?n.length:0;
|
||||
for(t=v.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},v.findLastKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),_t(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.has=function(n,t){return n?xe.call(n,t):false},v.identity=Qt,v.indexOf=qt,v.isArguments=bt,v.isArray=We,v.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ye.call(n)==L||false},v.isDate=function(n){return n&&typeof n=="object"&&ye.call(n)==z||false},v.isElement=function(n){return n&&1===n.nodeType||false
|
||||
},v.isEmpty=function(n){var t=true;if(!n)return t;var e=ye.call(n),r=n.length;return e==T||e==M||(qe.argsClass?e==$:bt(n))||e==G&&typeof r=="number"&&xt(n.splice)?!r:(rr(n,function(){return t=false}),t)},v.isEqual=function(n,t,e,r){return lt(n,t,typeof e=="function"&&tt(e,r,2))},v.isFinite=function(n){return Ne(n)&&!Be(parseFloat(n))},v.isFunction=xt,v.isNaN=function(n){return kt(n)&&n!=+n},v.isNull=function(n){return null===n},v.isNumber=kt,v.isObject=Ct,v.isPlainObject=ur,v.isRegExp=function(n){return n&&X[typeof n]&&ye.call(n)==J||false
|
||||
},v.isString=Et,v.isUndefined=function(n){return typeof n=="undefined"},v.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Re(0,r+e):Fe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},v.mixin=Xt,v.noConflict=function(){return e._=ve,this},v.noop=Yt,v.now=fr,v.parseInt=cr,v.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Te(),Fe(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):ct(n,t)
|
||||
},v.reduce=Ft,v.reduceRight=$t,v.result=function(n,t){if(n){var e=n[t];return xt(e)?n[t]():e}},v.runInContext=g,v.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Je(n).length},v.some=Lt,v.sortedIndex=Wt,v.template=function(n,t,e){var r=v.templateSettings;n=fe(n||""),e=tr({},e,r);var u,o=tr({},e.imports,r.imports),r=Je(o),o=Ot(o),i=0,l=e.interpolate||N,f="__p+='",l=le((e.escape||N).source+"|"+l.source+"|"+(l===A?O:N).source+"|"+(e.evaluate||N).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(P,a),e&&(f+="'+__e("+e+")+'"),l&&(u=true,f+="';"+l+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return s(n,0,Fe(Re(0,u-r),u))},v.intersection=function(){for(var e=[],r=-1,u=arguments.length,a=i(),l=yt(),f=l===n,s=i();++r<u;){var g=arguments[r];(We(g)||bt(g))&&(e.push(g),a.push(f&&g.length>=_&&o(r?e[r]:s)))}var f=e[0],h=-1,v=f?f.length:0,y=[];n:for(;++h<v;){var m=a[0],g=f[h];if(0>(m?t(m,g):l(s,g))){for(r=u,(m||s).push(g);--r;)if(m=a[r],0>(m?t(m,g):l(e[r],g)))continue n;y.push(g)
|
||||
}}for(;u--;)(m=a[u])&&p(m);return c(a),c(s),y},v.invert=jt,v.invoke=function(n,t){var e=s(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=te(typeof o=="number"?o:0);return Nt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},v.keys=Je,v.map=Pt,v.mapValues=function(n,t,e){var r={};return t=v.createCallback(t,e,3),rr(n,function(n,e,u){r[e]=t(n,e,u)}),r},v.max=Rt,v.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):b+arguments[0];return xe.call(r,u)?r[u]:r[u]=n.apply(this,arguments)
|
||||
}if(!xt(n))throw new ce;return e.cache={},e},v.merge=function(n){var t=arguments,e=2;if(!Ct(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=tt(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=s(arguments,1,e),u=-1,o=i(),a=i();++u<e;)ft(n,t[u],r,o,a);return c(o),c(a),n},v.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&We(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=null==t&&Et(n)?r:v.createCallback(t,e,3),Ze(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)
|
||||
});return o},v.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];er(n,function(n,t){u.push(t)});for(var u=at(u,it(arguments,true,false,1)),o=-1,a=u.length;++o<a;){var i=u[o];r[i]=n[i]}}else t=v.createCallback(t,e,3),er(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},v.once=function(n){var t,e;if(!xt(n))throw new ce;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},v.pairs=function(n){for(var t=-1,e=Je(n),r=e.length,u=te(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u
|
||||
},v.partial=function(n){return gt(n,16,s(arguments,1))},v.partialRight=function(n){return gt(n,32,null,s(arguments,1))},v.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=it(arguments,true,false,1),a=Ct(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=v.createCallback(t,e,3),er(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},v.pluck=lr,v.property=Zt,v.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(Oe.call(n,o--,1),u--);
|
||||
return n},v.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Re(0,de((t-n)/(e||1)));for(var u=te(t);++r<t;)u[r]=n,n+=e;return u},v.reject=function(n,t,e){return t=v.createCallback(t,e,3),At(n,function(n,e,r){return!t(n,e,r)})},v.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=v.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),Oe.call(n,r--,1),u--);return o},v.rest=Kt,v.shuffle=Tt,v.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,a=te(typeof o=="number"?o:0);
|
||||
for(t=v.createCallback(t,e,3),Nt(n,function(n,e,u){var o=a[++r]=l();o.m=t(n,e,u),o.n=r,o.o=n}),o=a.length,a.sort(u);o--;)n=a[o],a[o]=n.o,p(n);return a},v.tap=function(n,t){return t(n),n},v.throttle=function(n,t,e){var r=true,u=true;if(!xt(n))throw new ce;return false===e?r=false:Ct(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),H.leading=r,H.maxWait=t,H.trailing=u,Ht(n,t,H)},v.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=te(n);for(t=tt(t,e,1);++r<n;)u[r]=t(r);return u},v.toArray=function(n){return n&&typeof n.length=="number"?qe.unindexedChars&&Et(n)?n.split(""):s(n):Ot(n)
|
||||
},v.transform=function(n,t,e,r){var u=We(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=nt(o&&o.prototype)}return t&&(t=v.createCallback(t,r,4),(u?Ze:rr)(n,function(n,r,u){return t(e,n,r,u)})),e},v.union=function(){return pt(it(arguments,true,true))},v.uniq=Gt,v.values=Ot,v.where=At,v.without=function(n){return at(n,s(arguments,1))},v.wrap=function(n,t){return gt(t,16,[n])},v.xor=function(){for(var n=0,t=arguments.length,e=arguments[0]||[];++n<t;){var r=arguments[n];(We(r)||bt(r))&&(e=pt(at(e,r).concat(at(r,e))))
|
||||
}return e},v.zip=Jt,v.zipObject=Mt,v.collect=Pt,v.drop=Kt,v.each=Nt,v.eachRight=Bt,v.extend=nr,v.methods=wt,v.object=Mt,v.select=At,v.tail=Kt,v.unique=Gt,v.unzip=Jt,Xt(v),v.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),Y(n,t,typeof e=="function"&&tt(e,r,1))},v.cloneDeep=function(n,t,e){return Y(n,true,typeof t=="function"&&tt(t,e,1))},v.contains=St,v.escape=function(n){return null==n?"":fe(n).replace(Ye,vt)},v.every=It,v.find=Dt,v.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=v.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},v.findKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),rr(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},v.findLast=function(n,t,e){var r;return t=v.createCallback(t,e,3),Bt(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},v.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=v.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},v.findLastKey=function(n,t,e){var r;return t=v.createCallback(t,e,3),_t(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0
|
||||
}),r},v.has=function(n,t){return n?xe.call(n,t):false},v.identity=Qt,v.indexOf=qt,v.isArguments=bt,v.isArray=We,v.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ye.call(n)==L||false},v.isDate=function(n){return n&&typeof n=="object"&&ye.call(n)==z||false},v.isElement=function(n){return n&&1===n.nodeType||false},v.isEmpty=function(n){var t=true;if(!n)return t;var e=ye.call(n),r=n.length;return e==T||e==M||(qe.argsClass?e==$:bt(n))||e==G&&typeof r=="number"&&xt(n.splice)?!r:(rr(n,function(){return t=false
|
||||
}),t)},v.isEqual=function(n,t,e,r){return lt(n,t,typeof e=="function"&&tt(e,r,2))},v.isFinite=function(n){return Ne(n)&&!Be(parseFloat(n))},v.isFunction=xt,v.isNaN=function(n){return kt(n)&&n!=+n},v.isNull=function(n){return null===n},v.isNumber=kt,v.isObject=Ct,v.isPlainObject=ur,v.isRegExp=function(n){return n&&X[typeof n]&&ye.call(n)==J||false},v.isString=Et,v.isUndefined=function(n){return typeof n=="undefined"},v.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Re(0,r+e):Fe(e,r-1))+1);r--;)if(n[r]===t)return r;
|
||||
return-1},v.mixin=Xt,v.noConflict=function(){return e._=ve,this},v.noop=Yt,v.now=fr,v.parseInt=cr,v.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=Te(),Fe(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):ct(n,t)},v.reduce=Ft,v.reduceRight=$t,v.result=function(n,t){if(n){var e=n[t];return xt(e)?n[t]():e}},v.runInContext=g,v.size=function(n){var t=n?n.length:0;
|
||||
return typeof t=="number"?t:Je(n).length},v.some=Lt,v.sortedIndex=Wt,v.template=function(n,t,e){var r=v.templateSettings;n=fe(n||""),e=tr({},e,r);var u,o=tr({},e.imports,r.imports),r=Je(o),o=Ot(o),i=0,l=e.interpolate||N,f="__p+='",l=le((e.escape||N).source+"|"+l.source+"|"+(l===A?O:N).source+"|"+(e.evaluate||N).source+"|$","g");n.replace(l,function(t,e,r,o,l,c){return r||(r=o),f+=n.slice(i,c).replace(P,a),e&&(f+="'+__e("+e+")+'"),l&&(u=true,f+="';"+l+";\n__p+='"),r&&(f+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
}),f+="';",l=e=e.variable,l||(e="obj",f="with("+e+"){"+f+"}"),f=(u?f.replace(x,""):f).replace(C,"$1").replace(E,"$1;"),f="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+f+"return __p}";try{var c=ue(r,"return "+f).apply(h,o)}catch(p){throw p.source=f,p}return t?c(t):(c.source=f,c)},v.unescape=function(n){return null==n?"":fe(n).replace(Xe,dt)},v.uniqueId=function(n){var t=++m;return fe(null==n?"":n)+t
|
||||
},v.all=It,v.any=Lt,v.detect=Dt,v.findWhere=Dt,v.foldl=Ft,v.foldr=$t,v.include=St,v.inject=Ft,rr(v,function(n,t){v.prototype[t]||(v.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return Ce.apply(t,arguments),t=n.apply(v,t),e?new y(t,e):t})}),v.first=zt,v.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=v.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:h;return s(n,Re(0,u-r))},v.sample=function(n,t,e){return n&&typeof n.length!="number"?n=Ot(n):qe.unindexedChars&&Et(n)&&(n=n.split("")),null==t||e?n?n[ct(0,n.length-1)]:h:(n=Tt(n),n.length=Fe(Re(0,t),n.length),n)
|
||||
},v.take=zt,v.head=zt,rr(v,function(n,t){var e="sample"!==t;v.prototype[t]||(v.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new y(o,u):o})}),v.VERSION="2.3.0",v.prototype.chain=function(){return this.__chain__=true,this},v.prototype.toString=function(){return fe(this.__wrapped__)},v.prototype.value=ne,v.prototype.valueOf=ne,Ze(["join","pop","shift"],function(n){var t=pe[n];v.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new y(e,n):e}}),Ze(["push","reverse","sort","unshift"],function(n){var t=pe[n];v.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ze(["concat","slice","splice"],function(n){var t=pe[n];v.prototype[n]=function(){return new y(t.apply(this.__wrapped__,arguments),this.__chain__)}}),qe.spliceObjects||Ze(["pop","shift","splice"],function(n){var t=pe[n],e="splice"==n;v.prototype[n]=function(){var n=this.__chain__,r=this.__wrapped__,u=t.apply(r,arguments);return 0===r.length&&delete r[0],n||e?new y(u,n):u
|
||||
}}),v}var h,v=[],y=[],m=0,d={},b=+new Date+"",_=75,w=40,j=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",x=/\b__p\+='';/g,C=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,O=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,I=/^\s*function[ \n\r\t]+\w/,A=/<%=([\s\S]+?)%>/g,D=RegExp("^["+j+"]*0+(?=.$)"),N=/($^)/,B=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),$="[object Arguments]",T="[object Array]",L="[object Boolean]",z="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",H={};
|
||||
H[K]=false,H[$]=H[T]=H[L]=H[z]=H[W]=H[G]=H[J]=H[M]=true;var U={leading:false,maxWait:0,trailing:false},V={configurable:false,enumerable:false,value:null,writable:false},Q={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},X={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports&&!exports.nodeType&&exports,tt=X[typeof module]&&module&&!module.nodeType&&module,et=tt&&tt.exports===nt&&nt,rt=X[typeof global]&&global;
|
||||
}}),v}var h,v=[],y=[],m=0,d={},b=+new Date+"",_=75,w=40,j=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",x=/\b__p\+='';/g,C=/\b(__p\+=)''\+/g,E=/(__e\(.*?\)|\b__t\))\+'';/g,O=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S=/\w*$/,I=/^\s*function[ \n\r\t]+\w/,A=/<%=([\s\S]+?)%>/g,D=RegExp("^["+j+"]*0+(?=.$)"),N=/($^)/,B=/\bthis\b/,P=/['\n\r\t\u2028\u2029\\]/g,R="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),F="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),$="[object Arguments]",T="[object Array]",L="[object Boolean]",z="[object Date]",q="[object Error]",K="[object Function]",W="[object Number]",G="[object Object]",J="[object RegExp]",M="[object String]",V={};
|
||||
V[K]=false,V[$]=V[T]=V[L]=V[z]=V[W]=V[G]=V[J]=V[M]=true;var H={leading:false,maxWait:0,trailing:false},U={configurable:false,enumerable:false,value:null,writable:false},Q={a:"",b:null,c:"",d:"",e:"",v:null,g:"",h:null,support:null,i:"",j:false},X={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Z=X[typeof window]&&window||this,nt=X[typeof exports]&&exports&&!exports.nodeType&&exports,tt=X[typeof module]&&module&&!module.nodeType&&module,et=tt&&tt.exports===nt&&nt,rt=X[typeof global]&&global;
|
||||
!rt||rt.global!==rt&&rt.window!==rt||(Z=rt);var ut=g();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Z._=ut, define(function(){return ut})):nt&&tt?et?(tt.exports=ut)._=ut:nt._=ut:Z._=ut}).call(this);
|
||||
174
dist/lodash.js
vendored
174
dist/lodash.js
vendored
@@ -2150,15 +2150,15 @@
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to check.
|
||||
* @param {string} key The name of the property to check.
|
||||
* @returns {boolean} Returns `true` if key is a direct property, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
* // => true
|
||||
*/
|
||||
function has(object, prop) {
|
||||
return object ? hasOwnProperty.call(object, prop) : false;
|
||||
function has(object, key) {
|
||||
return object ? hasOwnProperty.call(object, key) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2556,6 +2556,52 @@
|
||||
return typeof value == 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object with the same keys as `object` and values generated by
|
||||
* running each own enumerable property of `object` through the callback.
|
||||
* The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, key, object).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
* callback will return the property value of the given element.
|
||||
*
|
||||
* If an object is provided for `callback` the created "_.where" style callback
|
||||
* will return `true` for elements that have the properties of the given object,
|
||||
* else `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function|Object|string} [callback=identity] The function called
|
||||
* per iteration. If a property name or object is provided it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new object with values of the results of each `callback` execution.
|
||||
* @example
|
||||
*
|
||||
* _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; });
|
||||
* // => { 'a': 3, 'b': 6, 'c': 9 }
|
||||
*
|
||||
* var characters = {
|
||||
* 'fred': { 'name': 'fred', 'age': 40 },
|
||||
* 'pebbles': { 'name': 'pebbles', 'age': 1 }
|
||||
* };
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.mapValues(characters, 'age');
|
||||
* // => { 'fred': 40, 'pebbles': 1 }
|
||||
*/
|
||||
function mapValues(object, callback, thisArg) {
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that
|
||||
* don't resolve to `undefined` into the destination object. Subsequent sources
|
||||
@@ -2771,11 +2817,11 @@
|
||||
|
||||
/**
|
||||
* An alternative to `_.reduce` this method transforms `object` to a new
|
||||
* `accumulator` object which is the result of running each of its elements
|
||||
* through a callback, with each callback execution potentially mutating
|
||||
* the `accumulator` object. The callback is bound to `thisArg` and invoked
|
||||
* with four arguments; (accumulator, value, key, object). Callbacks may exit
|
||||
* iteration early by explicitly returning `false`.
|
||||
* `accumulator` object which is the result of running each of its own
|
||||
* enumerable properties through a callback, with each callback execution
|
||||
* potentially mutating the `accumulator` object. The callback is bound to
|
||||
* `thisArg` and invoked with four arguments; (accumulator, value, key, object).
|
||||
* Callbacks may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4390,29 +4436,34 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of shared values.
|
||||
* @example
|
||||
*
|
||||
* _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
function intersection() {
|
||||
var args = [],
|
||||
argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
caches = getArray(),
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [],
|
||||
trustIndexOf = indexOf === baseIndexOf,
|
||||
seen = getArray();
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = args[argsIndex];
|
||||
caches[argsIndex] = indexOf === baseIndexOf &&
|
||||
(value ? value.length : 0) >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen);
|
||||
var value = arguments[argsIndex];
|
||||
if (isArray(value) || isArguments(value)) {
|
||||
args.push(value);
|
||||
caches.push(trustIndexOf && value.length >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen));
|
||||
}
|
||||
}
|
||||
var array = args[0],
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var cache = caches[0];
|
||||
@@ -4829,13 +4880,13 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of combined values.
|
||||
* @example
|
||||
*
|
||||
* _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* // => [1, 2, 3, 101, 10]
|
||||
* _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2, 3, 5, 4]
|
||||
*/
|
||||
function union(array) {
|
||||
function union() {
|
||||
return baseUniq(baseFlatten(arguments, true, true));
|
||||
}
|
||||
|
||||
@@ -4915,6 +4966,37 @@
|
||||
return baseDifference(array, slice(arguments, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of values.
|
||||
* @example
|
||||
*
|
||||
* _.xor([1, 2, 3], [5, 2, 1, 4]);
|
||||
* // => [3, 5, 4]
|
||||
*
|
||||
* _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]);
|
||||
* // => [1, 4, 5]
|
||||
*/
|
||||
function xor() {
|
||||
var index = 0,
|
||||
length = arguments.length,
|
||||
result = arguments[0] || [];
|
||||
|
||||
while (++index < length) {
|
||||
var array = arguments[index];
|
||||
if (isArray(array) || isArguments(array)) {
|
||||
result = baseUniq(baseDifference(result, array).concat(baseDifference(array, result)));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of grouped elements, the first of which contains the first
|
||||
* elements of the given arrays, the second of which contains the second
|
||||
@@ -5621,6 +5703,27 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that returns `value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {*} value The value to return from the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'name': 'fred' };
|
||||
* var getter = _.constant(object);
|
||||
* getter() === object;
|
||||
* // => true
|
||||
*/
|
||||
function constant(value) {
|
||||
return function() {
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a callback bound to an optional `thisArg`. If `func` is a property
|
||||
* name the created callback will return the property value for a given element.
|
||||
@@ -5850,14 +5953,14 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a "_.pluck" style function, which returns the `prop` value of a
|
||||
* Creates a "_.pluck" style function, which returns the `key` value of a
|
||||
* given object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {string} prop The name of the property to retrieve.
|
||||
* @returns {*} Returns the new function.
|
||||
* @param {string} key The name of the property to retrieve.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var characters = [
|
||||
@@ -5873,9 +5976,9 @@
|
||||
* _.sortBy(characters, getName);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
|
||||
*/
|
||||
function property(prop) {
|
||||
function property(key) {
|
||||
return function(object) {
|
||||
return object[prop];
|
||||
return object[key];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5938,7 +6041,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `prop` on `object`. If `prop` is a function
|
||||
* Resolves the value of property `key` on `object`. If `key` is a function
|
||||
* it will be invoked with the `this` binding of `object` and its result returned,
|
||||
* else the property value is returned. If `object` is falsey then `undefined`
|
||||
* is returned.
|
||||
@@ -5947,7 +6050,7 @@
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to resolve.
|
||||
* @param {string} key The name of the property to resolve.
|
||||
* @returns {*} Returns the resolved value.
|
||||
* @example
|
||||
*
|
||||
@@ -5964,10 +6067,10 @@
|
||||
* _.result(object, 'stuff');
|
||||
* // => 'nonsense'
|
||||
*/
|
||||
function result(object, prop) {
|
||||
function result(object, key) {
|
||||
if (object) {
|
||||
var value = object[prop];
|
||||
return isFunction(value) ? object[prop]() : value;
|
||||
var value = object[key];
|
||||
return isFunction(value) ? object[key]() : value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6364,6 +6467,7 @@
|
||||
lodash.chain = chain;
|
||||
lodash.compact = compact;
|
||||
lodash.compose = compose;
|
||||
lodash.constant = constant;
|
||||
lodash.countBy = countBy;
|
||||
lodash.create = create;
|
||||
lodash.createCallback = createCallback;
|
||||
@@ -6390,6 +6494,7 @@
|
||||
lodash.invoke = invoke;
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.mapValues = mapValues;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
@@ -6420,6 +6525,7 @@
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.xor = xor;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
|
||||
77
dist/lodash.min.js
vendored
77
dist/lodash.min.js
vendored
@@ -4,51 +4,52 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
*/
|
||||
;(function(){function n(n,t,e){e=(e||0)-1;for(var r=n?n.length:0;++e<r;)if(n[e]===t)return e;return-1}function t(t,e){var r=typeof e;if(t=t.l,"boolean"==r||null==e)return t[e]?0:-1;"number"!=r&&"string"!=r&&(r="object");var u="number"==r?e:m+e;return t=(t=t[r])&&t[u],"object"==r?t&&-1<n(t,e)?0:-1:t?0:-1}function e(n){var t=this.l,e=typeof n;if("boolean"==e||null==n)t[n]=true;else{"number"!=e&&"string"!=e&&(e="object");var r="number"==e?n:m+n,t=t[e]||(t[e]={});"object"==e?(t[r]||(t[r]=[])).push(n):t[r]=true
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){var e=n.m,r=t.m;if(e!==r){if(e>r||typeof e=="undefined")return 1;if(e<r||typeof r=="undefined")return-1}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],i=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&i&&typeof i=="object")return false;for(u=f(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function i(n){return"\\"+V[n]}function a(){return h.pop()||[]}function f(){return g.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}
|
||||
}function l(n){n.length=0,h.length<b&&h.push(n)}function c(n){var t=n.l;t&&c(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,g.length<b&&g.push(n)}function p(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function s(e){function h(n){if(!n||ve.call(n)!=q)return false;var t=n.valueOf,e=typeof t=="function"&&(e=be(t))&&be(e);return e?n==e||be(n)==e:yt(n)}function g(n,t,e){if(!n||!U[typeof n])return n;t=t&&typeof e=="undefined"?t:ut(t,e,3);
|
||||
for(var r=-1,u=U[typeof n]&&qe(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function b(n,t,e){var r;if(!n||!U[typeof n])return n;t=t&&typeof e=="undefined"?t:ut(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function V(n,t,e){var r,u=n,o=u;if(!u)return o;for(var i=arguments,a=0,f=typeof e=="number"?2:i.length;++a<f;)if((u=i[a])&&U[typeof u])for(var l=-1,c=U[typeof u]&&qe(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof o[r]&&(o[r]=u[r]);return o}function H(n,t,e){var r,u=n,o=u;
|
||||
if(!u)return o;var i=arguments,a=0,f=typeof e=="number"?2:i.length;if(3<f&&"function"==typeof i[f-2])var l=ut(i[--f-1],i[f--],2);else 2<f&&"function"==typeof i[f-1]&&(l=i[--f]);for(;++a<f;)if((u=i[a])&&U[typeof u])for(var c=-1,p=U[typeof u]&&qe(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function J(n){var t,e=[];if(!n||!U[typeof n])return e;for(t in n)de.call(n,t)&&e.push(t);return e}function Z(n){return n&&typeof n=="object"&&!We(n)&&de.call(n,"__wrapped__")?n:new nt(n)}function nt(n,t){this.__chain__=!!t,this.__wrapped__=n
|
||||
}function tt(n){function t(){if(r){var n=r.slice();we.apply(n,arguments)}if(this instanceof t){var o=rt(e.prototype),n=e.apply(o,n||arguments);return kt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return Be(t,n),t}function et(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!kt(n))return n;var i=ve.call(n);if(!K[i])return n;var f=Te[i];switch(i){case T:case F:return new f(+n);case W:case P:return new f(n);case z:return o=f(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}if(i=We(n),t){var c=!r;r||(r=a()),u||(u=a());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=i?f(n.length):{}}else o=i?p(n):H({},n);return i&&(de.call(n,"index")&&(o.index=n.index),de.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(i?Rt:g)(n,function(n,i){o[i]=et(n,t,e,r,u)}),c&&(l(r),l(u)),o):o}function rt(n){return kt(n)?Oe(n):{}}function ut(n,t,e){if(typeof n!="function")return Jt;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(Fe.funcNames&&(r=!n.name),r=r||!Fe.funcDecomp,!r)){var u=_e.call(n);
|
||||
Fe.funcNames||(r=!O.test(u)),r||(r=E.test(u),Be(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Vt(n,t)}function ot(n){function t(){var n=f?i:this;if(u){var h=u.slice();we.apply(h,arguments)}return(o||c)&&(h||(h=p(arguments)),o&&we.apply(h,o),c&&h.length<a)?(r|=16,ot([e,s?r:-4&r,h,null,i,a])):(h||(h=arguments),l&&(e=n[v]),this instanceof t?(n=rt(e.prototype),h=e.apply(n,h),kt(h)?h:n):e.apply(n,h))
|
||||
}var e=n[0],r=n[1],u=n[2],o=n[3],i=n[4],a=n[5],f=1&r,l=2&r,c=4&r,s=8&r,v=e;return Be(t,n),t}function it(e,r){var u=-1,i=gt(),a=e?e.length:0,f=a>=_&&i===n,l=[];if(f){var p=o(r);p?(i=t,r=p):f=false}for(;++u<a;)p=e[u],0>i(r,p)&&l.push(p);return f&&c(r),l}function at(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var i=n[r];if(i&&typeof i=="object"&&typeof i.length=="number"&&(We(i)||_t(i))){t||(i=at(i,t,e));var a=-1,f=i.length,l=o.length;for(o.length+=f;++a<f;)o[l++]=i[a]}else e||o.push(i)}return o
|
||||
}function ft(n,t,e,r,u,o){if(e){var i=e(n,t);if(typeof i!="undefined")return!!i}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&U[typeof n]||t&&U[typeof t]))return false;if(null==n||null==t)return n===t;var f=ve.call(n),c=ve.call(t);if(f==D&&(f=q),c==D&&(c=q),f!=c)return false;switch(f){case T:case F:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case P:return n==fe(t)}if(c=f==$,!c){var p=de.call(n,"__wrapped__"),s=de.call(t,"__wrapped__");if(p||s)return ft(p?n.__wrapped__:n,s?t.__wrapped__:t,e,r,u,o);
|
||||
if(f!=q)return false;if(f=n.constructor,p=t.constructor,f!=p&&!(jt(f)&&f instanceof f&&jt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in t)return false}for(p=!u,u||(u=a()),o||(o=a()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var v=0,i=true;if(u.push(n),o.push(t),c){if(f=n.length,v=t.length,i=v==n.length,!i&&!r)return i;for(;v--;)if(c=f,p=t[v],r)for(;c--&&!(i=ft(n[c],p,e,r,u,o)););else if(!(i=ft(n[v],p,e,r,u,o)))break;return i}return b(t,function(t,a,f){return de.call(f,a)?(v++,i=de.call(n,a)&&ft(n[a],t,e,r,u,o)):void 0
|
||||
}),i&&!r&&b(n,function(n,t,e){return de.call(e,t)?i=-1<--v:void 0}),p&&(l(u),l(o)),i}function lt(n,t,e,r,u){(We(t)?Rt:g)(t,function(t,o){var i,a,f=t,l=n[o];if(t&&((a=We(t))||h(t))){for(f=r.length;f--;)if(i=r[f]==t){l=u[f];break}if(!i){var c;e&&(f=e(l,t),c=typeof f!="undefined")&&(l=f),c||(l=a?We(l)?l:[]:h(l)?l:{}),r.push(t),u.push(l),c||lt(l,t,e,r,u)}}else e&&(f=e(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function ct(n,t){return n+me($e()*(t-n+1))}function pt(e,r,u){var i=-1,f=gt(),p=e?e.length:0,s=[],v=!r&&p>=_&&f===n,h=u||v?a():s;
|
||||
if(v){var g=o(h);g?(f=t,h=g):(v=false,h=u?h:(l(h),s))}for(;++i<p;){var g=e[i],y=u?u(g,i,e):g;(r?!i||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function st(n){return function(t,e,r){var u={};e=Z.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r<o;){var i=t[r];n(u,i,e(i,r,t),t)}else g(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function vt(n,t,e,r,u,o){var i=1&t,a=4&t,f=16&t,l=32&t;if(!(2&t||jt(n)))throw new le;f&&!e.length&&(t&=-17,f=e=false),l&&!r.length&&(t&=-33,l=r=false);
|
||||
var c=n&&n.__bindData__;return c&&true!==c?(c=c.slice(),!i||1&c[1]||(c[4]=u),!i&&1&c[1]&&(t|=8),!a||4&c[1]||(c[5]=o),f&&we.apply(c[2]||(c[2]=[]),e),l&&we.apply(c[3]||(c[3]=[]),r),c[1]|=t,vt.apply(null,c)):(1==t||17===t?tt:ot)([n,t,e,r,u,o])}function ht(n){return ze[n]}function gt(){var t=(t=Z.indexOf)===zt?n:t;return t}function yt(n){var t,e;return n&&ve.call(n)==q&&(t=n.constructor,!jt(t)||t instanceof t)?(b(n,function(n,t){e=t}),typeof e=="undefined"||de.call(n,e)):false}function mt(n){return Pe[n]}function _t(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ve.call(n)==D||false
|
||||
}function bt(n,t,e){var r=qe(n),u=r.length;for(t=ut(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function dt(n){var t=[];return b(n,function(n,e){jt(n)&&t.push(e)}),t.sort()}function wt(n){for(var t=-1,e=qe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function jt(n){return typeof n=="function"}function kt(n){return!(!n||!U[typeof n])}function xt(n){return typeof n=="number"||n&&typeof n=="object"&&ve.call(n)==W||false}function Ct(n){return typeof n=="string"||n&&typeof n=="object"&&ve.call(n)==P||false
|
||||
}function Ot(n){for(var t=-1,e=qe(n),r=e.length,u=ne(r);++t<r;)u[t]=n[e[t]];return u}function It(n,t,e){var r=-1,u=gt(),o=n?n.length:0,i=false;return e=(0>e?Re(0,o+e):e)||0,We(n)?i=-1<u(n,t,e):typeof o=="number"?i=-1<(Ct(n)?n.indexOf(t,e):u(n,t,e)):g(n,function(n){return++r<e?void 0:!(i=n===t)}),i}function Nt(n,t,e){var r=true;t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else g(n,function(n,e,u){return r=!!t(n,e,u)});return r}function St(n,t,e){var r=[];
|
||||
}}function r(n){return n.charCodeAt(0)}function u(n,t){var e=n.m,r=t.m;if(e!==r){if(e>r||typeof e=="undefined")return 1;if(e<r||typeof r=="undefined")return-1}return n.n-t.n}function o(n){var t=-1,r=n.length,u=n[0],o=n[r/2|0],a=n[r-1];if(u&&typeof u=="object"&&o&&typeof o=="object"&&a&&typeof a=="object")return false;for(u=f(),u["false"]=u["null"]=u["true"]=u.undefined=false,o=f(),o.k=n,o.l=u,o.push=e;++t<r;)o.push(n[t]);return o}function a(n){return"\\"+U[n]}function i(){return h.pop()||[]}function f(){return g.pop()||{k:null,l:null,m:null,"false":false,n:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,o:null}
|
||||
}function l(n){n.length=0,h.length<b&&h.push(n)}function c(n){var t=n.l;t&&c(t),n.k=n.l=n.m=n.object=n.number=n.string=n.o=null,g.length<b&&g.push(n)}function p(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Array(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function s(e){function h(n){if(!n||ve.call(n)!=q)return false;var t=n.valueOf,e=typeof t=="function"&&(e=be(t))&&be(e);return e?n==e||be(n)==e:yt(n)}function g(n,t,e){if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:ut(t,e,3);
|
||||
for(var r=-1,u=V[typeof n]&&qe(n),o=u?u.length:0;++r<o&&(e=u[r],false!==t(n[e],e,n)););return n}function b(n,t,e){var r;if(!n||!V[typeof n])return n;t=t&&typeof e=="undefined"?t:ut(t,e,3);for(r in n)if(false===t(n[r],r,n))break;return n}function U(n,t,e){var r,u=n,o=u;if(!u)return o;for(var a=arguments,i=0,f=typeof e=="number"?2:a.length;++i<f;)if((u=a[i])&&V[typeof u])for(var l=-1,c=V[typeof u]&&qe(u),p=c?c.length:0;++l<p;)r=c[l],"undefined"==typeof o[r]&&(o[r]=u[r]);return o}function H(n,t,e){var r,u=n,o=u;
|
||||
if(!u)return o;var a=arguments,i=0,f=typeof e=="number"?2:a.length;if(3<f&&"function"==typeof a[f-2])var l=ut(a[--f-1],a[f--],2);else 2<f&&"function"==typeof a[f-1]&&(l=a[--f]);for(;++i<f;)if((u=a[i])&&V[typeof u])for(var c=-1,p=V[typeof u]&&qe(u),s=p?p.length:0;++c<s;)r=p[c],o[r]=l?l(o[r],u[r]):u[r];return o}function J(n){var t,e=[];if(!n||!V[typeof n])return e;for(t in n)de.call(n,t)&&e.push(t);return e}function Z(n){return n&&typeof n=="object"&&!We(n)&&de.call(n,"__wrapped__")?n:new nt(n)}function nt(n,t){this.__chain__=!!t,this.__wrapped__=n
|
||||
}function tt(n){function t(){if(r){var n=r.slice();we.apply(n,arguments)}if(this instanceof t){var o=rt(e.prototype),n=e.apply(o,n||arguments);return kt(n)?n:o}return e.apply(u,n||arguments)}var e=n[0],r=n[2],u=n[4];return Be(t,n),t}function et(n,t,e,r,u){if(e){var o=e(n);if(typeof o!="undefined")return o}if(!kt(n))return n;var a=ve.call(n);if(!K[a])return n;var f=Te[a];switch(a){case T:case F:return new f(+n);case W:case P:return new f(n);case z:return o=f(n.source,C.exec(n)),o.lastIndex=n.lastIndex,o
|
||||
}if(a=We(n),t){var c=!r;r||(r=i()),u||(u=i());for(var s=r.length;s--;)if(r[s]==n)return u[s];o=a?f(n.length):{}}else o=a?p(n):H({},n);return a&&(de.call(n,"index")&&(o.index=n.index),de.call(n,"input")&&(o.input=n.input)),t?(r.push(n),u.push(o),(a?Rt:g)(n,function(n,a){o[a]=et(n,t,e,r,u)}),c&&(l(r),l(u)),o):o}function rt(n){return kt(n)?Oe(n):{}}function ut(n,t,e){if(typeof n!="function")return Jt;if(typeof t=="undefined"||!("prototype"in n))return n;var r=n.__bindData__;if(typeof r=="undefined"&&(Fe.funcNames&&(r=!n.name),r=r||!Fe.funcDecomp,!r)){var u=_e.call(n);
|
||||
Fe.funcNames||(r=!O.test(u)),r||(r=E.test(u),Be(n,r))}if(false===r||true!==r&&1&r[1])return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,u){return n.call(t,e,r,u)};case 4:return function(e,r,u,o){return n.call(t,e,r,u,o)}}return Ut(n,t)}function ot(n){function t(){var n=f?a:this;if(u){var h=u.slice();we.apply(h,arguments)}return(o||c)&&(h||(h=p(arguments)),o&&we.apply(h,o),c&&h.length<i)?(r|=16,ot([e,s?r:-4&r,h,null,a,i])):(h||(h=arguments),l&&(e=n[v]),this instanceof t?(n=rt(e.prototype),h=e.apply(n,h),kt(h)?h:n):e.apply(n,h))
|
||||
}var e=n[0],r=n[1],u=n[2],o=n[3],a=n[4],i=n[5],f=1&r,l=2&r,c=4&r,s=8&r,v=e;return Be(t,n),t}function at(e,r){var u=-1,a=gt(),i=e?e.length:0,f=i>=_&&a===n,l=[];if(f){var p=o(r);p?(a=t,r=p):f=false}for(;++u<i;)p=e[u],0>a(r,p)&&l.push(p);return f&&c(r),l}function it(n,t,e,r){r=(r||0)-1;for(var u=n?n.length:0,o=[];++r<u;){var a=n[r];if(a&&typeof a=="object"&&typeof a.length=="number"&&(We(a)||_t(a))){t||(a=it(a,t,e));var i=-1,f=a.length,l=o.length;for(o.length+=f;++i<f;)o[l++]=a[i]}else e||o.push(a)}return o
|
||||
}function ft(n,t,e,r,u,o){if(e){var a=e(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;if(n===n&&!(n&&V[typeof n]||t&&V[typeof t]))return false;if(null==n||null==t)return n===t;var f=ve.call(n),c=ve.call(t);if(f==D&&(f=q),c==D&&(c=q),f!=c)return false;switch(f){case T:case F:return+n==+t;case W:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case P:return n==fe(t)}if(c=f==$,!c){var p=de.call(n,"__wrapped__"),s=de.call(t,"__wrapped__");if(p||s)return ft(p?n.__wrapped__:n,s?t.__wrapped__:t,e,r,u,o);
|
||||
if(f!=q)return false;if(f=n.constructor,p=t.constructor,f!=p&&!(jt(f)&&f instanceof f&&jt(p)&&p instanceof p)&&"constructor"in n&&"constructor"in t)return false}for(p=!u,u||(u=i()),o||(o=i()),f=u.length;f--;)if(u[f]==n)return o[f]==t;var v=0,a=true;if(u.push(n),o.push(t),c){if(f=n.length,v=t.length,a=v==n.length,!a&&!r)return a;for(;v--;)if(c=f,p=t[v],r)for(;c--&&!(a=ft(n[c],p,e,r,u,o)););else if(!(a=ft(n[v],p,e,r,u,o)))break;return a}return b(t,function(t,i,f){return de.call(f,i)?(v++,a=de.call(n,i)&&ft(n[i],t,e,r,u,o)):void 0
|
||||
}),a&&!r&&b(n,function(n,t,e){return de.call(e,t)?a=-1<--v:void 0}),p&&(l(u),l(o)),a}function lt(n,t,e,r,u){(We(t)?Rt:g)(t,function(t,o){var a,i,f=t,l=n[o];if(t&&((i=We(t))||h(t))){for(f=r.length;f--;)if(a=r[f]==t){l=u[f];break}if(!a){var c;e&&(f=e(l,t),c=typeof f!="undefined")&&(l=f),c||(l=i?We(l)?l:[]:h(l)?l:{}),r.push(t),u.push(l),c||lt(l,t,e,r,u)}}else e&&(f=e(l,t),typeof f=="undefined"&&(f=t)),typeof f!="undefined"&&(l=f);n[o]=l})}function ct(n,t){return n+me($e()*(t-n+1))}function pt(e,r,u){var a=-1,f=gt(),p=e?e.length:0,s=[],v=!r&&p>=_&&f===n,h=u||v?i():s;
|
||||
if(v){var g=o(h);g?(f=t,h=g):(v=false,h=u?h:(l(h),s))}for(;++a<p;){var g=e[a],y=u?u(g,a,e):g;(r?!a||h[h.length-1]!==y:0>f(h,y))&&((u||v)&&h.push(y),s.push(g))}return v?(l(h.k),c(h)):u&&l(h),s}function st(n){return function(t,e,r){var u={};e=Z.createCallback(e,r,3),r=-1;var o=t?t.length:0;if(typeof o=="number")for(;++r<o;){var a=t[r];n(u,a,e(a,r,t),t)}else g(t,function(t,r,o){n(u,t,e(t,r,o),o)});return u}}function vt(n,t,e,r,u,o){var a=1&t,i=4&t,f=16&t,l=32&t;if(!(2&t||jt(n)))throw new le;f&&!e.length&&(t&=-17,f=e=false),l&&!r.length&&(t&=-33,l=r=false);
|
||||
var c=n&&n.__bindData__;return c&&true!==c?(c=c.slice(),!a||1&c[1]||(c[4]=u),!a&&1&c[1]&&(t|=8),!i||4&c[1]||(c[5]=o),f&&we.apply(c[2]||(c[2]=[]),e),l&&we.apply(c[3]||(c[3]=[]),r),c[1]|=t,vt.apply(null,c)):(1==t||17===t?tt:ot)([n,t,e,r,u,o])}function ht(n){return ze[n]}function gt(){var t=(t=Z.indexOf)===zt?n:t;return t}function yt(n){var t,e;return n&&ve.call(n)==q&&(t=n.constructor,!jt(t)||t instanceof t)?(b(n,function(n,t){e=t}),typeof e=="undefined"||de.call(n,e)):false}function mt(n){return Pe[n]}function _t(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ve.call(n)==D||false
|
||||
}function bt(n,t,e){var r=qe(n),u=r.length;for(t=ut(t,e,3);u--&&(e=r[u],false!==t(n[e],e,n)););return n}function dt(n){var t=[];return b(n,function(n,e){jt(n)&&t.push(e)}),t.sort()}function wt(n){for(var t=-1,e=qe(n),r=e.length,u={};++t<r;){var o=e[t];u[n[o]]=o}return u}function jt(n){return typeof n=="function"}function kt(n){return!(!n||!V[typeof n])}function xt(n){return typeof n=="number"||n&&typeof n=="object"&&ve.call(n)==W||false}function Ct(n){return typeof n=="string"||n&&typeof n=="object"&&ve.call(n)==P||false
|
||||
}function Ot(n){for(var t=-1,e=qe(n),r=e.length,u=ne(r);++t<r;)u[t]=n[e[t]];return u}function It(n,t,e){var r=-1,u=gt(),o=n?n.length:0,a=false;return e=(0>e?Re(0,o+e):e)||0,We(n)?a=-1<u(n,t,e):typeof o=="number"?a=-1<(Ct(n)?n.indexOf(t,e):u(n,t,e)):g(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function Nt(n,t,e){var r=true;t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else g(n,function(n,e,u){return r=!!t(n,e,u)});return r}function St(n,t,e){var r=[];
|
||||
t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else g(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function Et(n,t,e){t=Z.createCallback(t,e,3),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return g(n,function(n,e,r){return t(n,e,r)?(u=n,false):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function Rt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:ut(t,e,3),typeof u=="number")for(;++r<u&&false!==t(n[r],r,n););else g(n,t);
|
||||
return n}function At(n,t,e){var r=n?n.length:0;if(t=t&&typeof e=="undefined"?t:ut(t,e,3),typeof r=="number")for(;r--&&false!==t(n[r],r,n););else{var u=qe(n),r=u.length;g(n,function(n,e,o){return e=u?u[--r]:--r,t(o[e],e,o)})}return n}function Dt(n,t,e){var r=-1,u=n?n.length:0;if(t=Z.createCallback(t,e,3),typeof u=="number")for(var o=ne(u);++r<u;)o[r]=t(n[r],r,n);else o=[],g(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function $t(n,t,e){var u=-1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&We(n)){e=-1;
|
||||
for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else t=null==t&&Ct(n)?r:Z.createCallback(t,e,3),Rt(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Tt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=Z.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else g(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function Ft(n,t,e,r){var u=3>arguments.length;return t=Z.createCallback(t,r,4),At(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)
|
||||
for(var a=n.length;++e<a;){var i=n[e];i>o&&(o=i)}}else t=null==t&&Ct(n)?r:Z.createCallback(t,e,3),Rt(n,function(n,e,r){e=t(n,e,r),e>u&&(u=e,o=n)});return o}function Tt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=Z.createCallback(t,r,4);var o=-1,a=n.length;if(typeof a=="number")for(u&&(e=n[++o]);++o<a;)e=t(e,n[o],o,n);else g(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)});return e}function Ft(n,t,e,r){var u=3>arguments.length;return t=Z.createCallback(t,r,4),At(n,function(n,r,o){e=u?(u=false,n):t(e,n,r,o)
|
||||
}),e}function Bt(n){var t=-1,e=n?n.length:0,r=ne(typeof e=="number"?e:0);return Rt(n,function(n){var e=ct(0,++t);r[t]=r[e],r[e]=n}),r}function Wt(n,t,e){var r;t=Z.createCallback(t,e,3),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else g(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function qt(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=-1;for(t=Z.createCallback(t,e,3);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[0]:v;return p(n,0,Ae(Re(0,r),u))
|
||||
}function zt(t,e,r){if(typeof r=="number"){var u=t?t.length:0;r=0>r?Re(0,u+r):r||0}else if(r)return r=Kt(t,e),t[r]===e?r:-1;return n(t,e,r)}function Pt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=Z.createCallback(t,e,3);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Re(0,t);return p(n,r)}function Kt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?Z.createCallback(e,r,1):Jt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function Lt(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(e=Z.createCallback(e,r,3)),pt(n,t,e)
|
||||
}function Mt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?$t(Ge(n,"length")):0,r=ne(0>e?0:e);++t<e;)r[t]=Ge(n,t);return r}function Ut(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||We(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Vt(n,t){return 2<arguments.length?vt(n,17,p(arguments,2),null,t):vt(n,1,null,null,t)}function Gt(n,t,e){function r(){c&&ye(c),i=c=p=v,(g||h!==t)&&(s=He(),a=n.apply(l,o),c||i||(o=l=null))}function u(){var e=t-(He()-f);0<e?c=je(u,e):(i&&ye(i),e=p,i=c=p=v,e&&(s=He(),a=n.apply(l,o),c||i||(o=l=null)))
|
||||
}var o,i,a,f,l,c,p,s=0,h=false,g=true;if(!jt(n))throw new le;if(t=Re(0,t)||0,true===e)var y=true,g=false;else kt(e)&&(y=e.leading,h="maxWait"in e&&(Re(t,e.maxWait)||0),g="trailing"in e?e.trailing:g);return function(){if(o=arguments,f=He(),l=this,p=g&&(c||!y),false===h)var e=y&&!c;else{i||y||(s=f);var v=h-(f-s),m=0>=v;m?(i&&(i=ye(i)),s=f,a=n.apply(l,o)):i||(i=je(r,v))}return m&&c?c=ye(c):c||t===h||(c=je(u,t)),e&&(m=true,a=n.apply(l,o)),!m||c||i||(o=l=null),a}}function Ht(n){if(!jt(n))throw new le;var t=p(arguments,1);
|
||||
return je(function(){n.apply(v,t)},1)}function Jt(n){return n}function Qt(n,t){var e=n,r=!t||jt(e);t||(e=nt,t=n,n=Z),Rt(dt(t),function(u){var o=n[u]=t[u];r&&(e.prototype[u]=function(){var t=this.__wrapped__,r=[t];return we.apply(r,arguments),r=o.apply(n,r),t&&typeof t=="object"&&t===r?this:(r=new e(r),r.__chain__=this.__chain__,r)})})}function Xt(){}function Yt(n){return function(t){return t[n]}}function Zt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var ne=e.Array,te=e.Boolean,ee=e.Date,re=e.Function,ue=e.Math,oe=e.Number,ie=e.Object,ae=e.RegExp,fe=e.String,le=e.TypeError,ce=[],pe=ie.prototype,se=e._,ve=pe.toString,he=ae("^"+fe(ve).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ge=ue.ceil,ye=e.clearTimeout,me=ue.floor,_e=re.prototype.toString,be=he.test(be=ie.getPrototypeOf)&&be,de=pe.hasOwnProperty,we=ce.push,je=e.setTimeout,ke=ce.splice,xe=typeof(xe=X&&Q&&X.setImmediate)=="function"&&!he.test(xe)&&xe,Ce=function(){try{var n={},t=he.test(t=ie.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),Oe=he.test(Oe=ie.create)&&Oe,Ie=he.test(Ie=ne.isArray)&&Ie,Ne=e.isFinite,Se=e.isNaN,Ee=he.test(Ee=ie.keys)&&Ee,Re=ue.max,Ae=ue.min,De=e.parseInt,$e=ue.random,Te={};Te[$]=ne,Te[T]=te,Te[F]=ee,Te[B]=re,Te[q]=ie,Te[W]=oe,Te[z]=ae,Te[P]=fe,nt.prototype=Z.prototype;var Fe=Z.support={};Fe.funcDecomp=!he.test(e.a)&&E.test(s),Fe.funcNames=typeof re.name=="string",Z.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:Z}},Oe||(rt=function(){function n(){}return function(t){if(kt(t)){n.prototype=t;
|
||||
var r=new n;n.prototype=null}return r||e.Object()}}());var Be=Ce?function(n,t){M.value=t,Ce(n,"__bindData__",M)}:Xt,We=Ie||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ve.call(n)==$||false},qe=Ee?function(n){return kt(n)?Ee(n):[]}:J,ze={"&":"&","<":"<",">":">",'"':""","'":"'"},Pe=wt(ze),Ke=ae("("+qe(Pe).join("|")+")","g"),Le=ae("["+qe(ze).join("")+"]","g"),Me=st(function(n,t,e){de.call(n,e)?n[e]++:n[e]=1}),Ue=st(function(n,t,e){(de.call(n,e)?n[e]:n[e]=[]).push(t)
|
||||
}),Ve=st(function(n,t,e){n[e]=t}),Ge=Dt;xe&&(Ht=function(n){if(!jt(n))throw new le;return xe.apply(e,arguments)});var He=he.test(He=ee.now)&&He||function(){return(new ee).getTime()},Je=8==De(d+"08")?De:function(n,t){return De(Ct(n)?n.replace(N,""):n,t||0)};return Z.after=function(n,t){if(!jt(t))throw new le;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=H,Z.at=function(n){for(var t=arguments,e=-1,r=at(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=ne(t);++e<t;)u[e]=n[r[e]];
|
||||
return u},Z.bind=Vt,Z.bindAll=function(n){for(var t=1<arguments.length?at(arguments,true,false,1):dt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=vt(n[u],1,null,null,n)}return n},Z.bindKey=function(n,t){return 2<arguments.length?vt(t,19,p(arguments,2),null,n):vt(t,3,null,null,n)},Z.chain=function(n){return n=new nt(n),n.__chain__=true,n},Z.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},Z.compose=function(){for(var n=arguments,t=n.length;t--;)if(!jt(n[t]))throw new le;
|
||||
return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},Z.countBy=Me,Z.create=function(n,t){var e=rt(n);return t?H(e,t):e},Z.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return ut(n,t,e);if("object"!=r)return Yt(n);var u=qe(n),o=u[0],i=n[o];return 1!=u.length||i!==i||kt(i)?function(t){for(var e=u.length,r=false;e--&&(r=ft(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],i===n&&(0!==i||1/i==1/n)}},Z.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,vt(n,4,null,null,null,t)
|
||||
},Z.debounce=Gt,Z.defaults=V,Z.defer=Ht,Z.delay=function(n,t){if(!jt(n))throw new le;var e=p(arguments,2);return je(function(){n.apply(v,e)},t)},Z.difference=function(n){return it(n,at(arguments,true,true,1))},Z.filter=St,Z.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Dt(n,e,r)),at(n,t)},Z.forEach=Rt,Z.forEachRight=At,Z.forIn=b,Z.forInRight=function(n,t,e){var r=[];b(n,function(n,t){r.push(t,n)});var u=r.length;for(t=ut(t,e,3);u--&&false!==t(r[u--],r[u],n););return n
|
||||
},Z.forOwn=g,Z.forOwnRight=bt,Z.functions=dt,Z.groupBy=Ue,Z.indexBy=Ve,Z.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Z.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return p(n,0,Ae(Re(0,u-r),u))},Z.intersection=function(e){for(var r=arguments,u=r.length,i=-1,f=a(),p=-1,s=gt(),v=e?e.length:0,h=[],g=a();++i<u;){var y=r[i];f[i]=s===n&&(y?y.length:0)>=_&&o(i?r[i]:g)}n:for(;++p<v;){var m=f[0],y=e[p];if(0>(m?t(m,y):s(g,y))){for(i=u,(m||g).push(y);--i;)if(m=f[i],0>(m?t(m,y):s(r[i],y)))continue n;
|
||||
h.push(y)}}for(;u--;)(m=f[u])&&c(m);return l(f),l(g),h},Z.invert=wt,Z.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,i=ne(typeof o=="number"?o:0);return Rt(n,function(n){i[++r]=(u?t:n[t]).apply(n,e)}),i},Z.keys=qe,Z.map=Dt,Z.max=$t,Z.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return de.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!jt(n))throw new le;return e.cache={},e},Z.merge=function(n){var t=arguments,e=2;
|
||||
if(!kt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=ut(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=p(arguments,1,e),u=-1,o=a(),i=a();++u<e;)lt(n,t[u],r,o,i);return l(o),l(i),n},Z.min=function(n,t,e){var u=1/0,o=u;if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&We(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else t=null==t&&Ct(n)?r:Z.createCallback(t,e,3),Rt(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)
|
||||
});return o},Z.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];b(n,function(n,t){u.push(t)});for(var u=it(u,at(arguments,true,false,1)),o=-1,i=u.length;++o<i;){var a=u[o];r[a]=n[a]}}else t=Z.createCallback(t,e,3),b(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},Z.once=function(n){var t,e;if(!jt(n))throw new le;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},Z.pairs=function(n){for(var t=-1,e=qe(n),r=e.length,u=ne(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},Z.partial=function(n){return vt(n,16,p(arguments,1))
|
||||
},Z.partialRight=function(n){return vt(n,32,null,p(arguments,1))},Z.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=at(arguments,true,false,1),i=kt(n)?o.length:0;++u<i;){var a=o[u];a in n&&(r[a]=n[a])}else t=Z.createCallback(t,e,3),b(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},Z.pluck=Ge,Z.property=Yt,Z.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,i=t[e];++o<u;)n[o]===i&&(ke.call(n,o--,1),u--);return n},Z.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);
|
||||
var r=-1;t=Re(0,ge((t-n)/(e||1)));for(var u=ne(t);++r<t;)u[r]=n,n+=e;return u},Z.reject=function(n,t,e){return t=Z.createCallback(t,e,3),St(n,function(n,e,r){return!t(n,e,r)})},Z.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=Z.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),ke.call(n,r--,1),u--);return o},Z.rest=Pt,Z.shuffle=Bt,Z.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,i=ne(typeof o=="number"?o:0);for(t=Z.createCallback(t,e,3),Rt(n,function(n,e,u){var o=i[++r]=f();o.m=t(n,e,u),o.n=r,o.o=n
|
||||
}),o=i.length,i.sort(u);o--;)n=i[o],i[o]=n.o,c(n);return i},Z.tap=function(n,t){return t(n),n},Z.throttle=function(n,t,e){var r=true,u=true;if(!jt(n))throw new le;return false===e?r=false:kt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),L.leading=r,L.maxWait=t,L.trailing=u,Gt(n,t,L)},Z.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=ne(n);for(t=ut(t,e,1);++r<n;)u[r]=t(r);return u},Z.toArray=function(n){return n&&typeof n.length=="number"?p(n):Ot(n)},Z.transform=function(n,t,e,r){var u=We(n);
|
||||
if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=rt(o&&o.prototype)}return t&&(t=Z.createCallback(t,r,4),(u?Rt:g)(n,function(n,r,u){return t(e,n,r,u)})),e},Z.union=function(){return pt(at(arguments,true,true))},Z.uniq=Lt,Z.values=Ot,Z.where=St,Z.without=function(n){return it(n,p(arguments,1))},Z.wrap=function(n,t){return vt(t,16,[n])},Z.zip=Mt,Z.zipObject=Ut,Z.collect=Dt,Z.drop=Pt,Z.each=Rt,Z.eachRight=At,Z.extend=H,Z.methods=dt,Z.object=Ut,Z.select=St,Z.tail=Pt,Z.unique=Lt,Z.unzip=Mt,Qt(Z),Z.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),et(n,t,typeof e=="function"&&ut(e,r,1))
|
||||
},Z.cloneDeep=function(n,t,e){return et(n,true,typeof t=="function"&&ut(t,e,1))},Z.contains=It,Z.escape=function(n){return null==n?"":fe(n).replace(Le,ht)},Z.every=Nt,Z.find=Et,Z.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=Z.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},Z.findKey=function(n,t,e){var r;return t=Z.createCallback(t,e,3),g(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Z.findLast=function(n,t,e){var r;return t=Z.createCallback(t,e,3),At(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0
|
||||
}),r},Z.findLastIndex=function(n,t,e){var r=n?n.length:0;for(t=Z.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},Z.findLastKey=function(n,t,e){var r;return t=Z.createCallback(t,e,3),bt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Z.has=function(n,t){return n?de.call(n,t):false},Z.identity=Jt,Z.indexOf=zt,Z.isArguments=_t,Z.isArray=We,Z.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ve.call(n)==T||false},Z.isDate=function(n){return n&&typeof n=="object"&&ve.call(n)==F||false
|
||||
},Z.isElement=function(n){return n&&1===n.nodeType||false},Z.isEmpty=function(n){var t=true;if(!n)return t;var e=ve.call(n),r=n.length;return e==$||e==P||e==D||e==q&&typeof r=="number"&&jt(n.splice)?!r:(g(n,function(){return t=false}),t)},Z.isEqual=function(n,t,e,r){return ft(n,t,typeof e=="function"&&ut(e,r,2))},Z.isFinite=function(n){return Ne(n)&&!Se(parseFloat(n))},Z.isFunction=jt,Z.isNaN=function(n){return xt(n)&&n!=+n},Z.isNull=function(n){return null===n},Z.isNumber=xt,Z.isObject=kt,Z.isPlainObject=h,Z.isRegExp=function(n){return n&&typeof n=="object"&&ve.call(n)==z||false
|
||||
}function Mt(){for(var n=1<arguments.length?arguments:arguments[0],t=-1,e=n?$t(Ge(n,"length")):0,r=ne(0>e?0:e);++t<e;)r[t]=Ge(n,t);return r}function Vt(n,t){var e=-1,r=n?n.length:0,u={};for(t||!r||We(n[0])||(t=[]);++e<r;){var o=n[e];t?u[o]=t[e]:o&&(u[o[0]]=o[1])}return u}function Ut(n,t){return 2<arguments.length?vt(n,17,p(arguments,2),null,t):vt(n,1,null,null,t)}function Gt(n,t,e){function r(){c&&ye(c),a=c=p=v,(g||h!==t)&&(s=He(),i=n.apply(l,o),c||a||(o=l=null))}function u(){var e=t-(He()-f);0<e?c=je(u,e):(a&&ye(a),e=p,a=c=p=v,e&&(s=He(),i=n.apply(l,o),c||a||(o=l=null)))
|
||||
}var o,a,i,f,l,c,p,s=0,h=false,g=true;if(!jt(n))throw new le;if(t=Re(0,t)||0,true===e)var y=true,g=false;else kt(e)&&(y=e.leading,h="maxWait"in e&&(Re(t,e.maxWait)||0),g="trailing"in e?e.trailing:g);return function(){if(o=arguments,f=He(),l=this,p=g&&(c||!y),false===h)var e=y&&!c;else{a||y||(s=f);var v=h-(f-s),m=0>=v;m?(a&&(a=ye(a)),s=f,i=n.apply(l,o)):a||(a=je(r,v))}return m&&c?c=ye(c):c||t===h||(c=je(u,t)),e&&(m=true,i=n.apply(l,o)),!m||c||a||(o=l=null),i}}function Ht(n){if(!jt(n))throw new le;var t=p(arguments,1);
|
||||
return je(function(){n.apply(v,t)},1)}function Jt(n){return n}function Qt(n,t){var e=n,r=!t||jt(e);t||(e=nt,t=n,n=Z),Rt(dt(t),function(u){var o=n[u]=t[u];r&&(e.prototype[u]=function(){var t=this.__wrapped__,r=[t];return we.apply(r,arguments),r=o.apply(n,r),t&&typeof t=="object"&&t===r?this:(r=new e(r),r.__chain__=this.__chain__,r)})})}function Xt(){}function Yt(n){return function(t){return t[n]}}function Zt(){return this.__wrapped__}e=e?Y.defaults(G.Object(),e,Y.pick(G,A)):G;var ne=e.Array,te=e.Boolean,ee=e.Date,re=e.Function,ue=e.Math,oe=e.Number,ae=e.Object,ie=e.RegExp,fe=e.String,le=e.TypeError,ce=[],pe=ae.prototype,se=e._,ve=pe.toString,he=ie("^"+fe(ve).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),ge=ue.ceil,ye=e.clearTimeout,me=ue.floor,_e=re.prototype.toString,be=he.test(be=ae.getPrototypeOf)&&be,de=pe.hasOwnProperty,we=ce.push,je=e.setTimeout,ke=ce.splice,xe=typeof(xe=X&&Q&&X.setImmediate)=="function"&&!he.test(xe)&&xe,Ce=function(){try{var n={},t=he.test(t=ae.defineProperty)&&t,e=t(n,n,n)&&t
|
||||
}catch(r){}return e}(),Oe=he.test(Oe=ae.create)&&Oe,Ie=he.test(Ie=ne.isArray)&&Ie,Ne=e.isFinite,Se=e.isNaN,Ee=he.test(Ee=ae.keys)&&Ee,Re=ue.max,Ae=ue.min,De=e.parseInt,$e=ue.random,Te={};Te[$]=ne,Te[T]=te,Te[F]=ee,Te[B]=re,Te[q]=ae,Te[W]=oe,Te[z]=ie,Te[P]=fe,nt.prototype=Z.prototype;var Fe=Z.support={};Fe.funcDecomp=!he.test(e.a)&&E.test(s),Fe.funcNames=typeof re.name=="string",Z.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:I,variable:"",imports:{_:Z}},Oe||(rt=function(){function n(){}return function(t){if(kt(t)){n.prototype=t;
|
||||
var r=new n;n.prototype=null}return r||e.Object()}}());var Be=Ce?function(n,t){M.value=t,Ce(n,"__bindData__",M)}:Xt,We=Ie||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ve.call(n)==$||false},qe=Ee?function(n){return kt(n)?Ee(n):[]}:J,ze={"&":"&","<":"<",">":">",'"':""","'":"'"},Pe=wt(ze),Ke=ie("("+qe(Pe).join("|")+")","g"),Le=ie("["+qe(ze).join("")+"]","g"),Me=st(function(n,t,e){de.call(n,e)?n[e]++:n[e]=1}),Ve=st(function(n,t,e){(de.call(n,e)?n[e]:n[e]=[]).push(t)
|
||||
}),Ue=st(function(n,t,e){n[e]=t}),Ge=Dt;xe&&(Ht=function(n){if(!jt(n))throw new le;return xe.apply(e,arguments)});var He=he.test(He=ee.now)&&He||function(){return(new ee).getTime()},Je=8==De(d+"08")?De:function(n,t){return De(Ct(n)?n.replace(N,""):n,t||0)};return Z.after=function(n,t){if(!jt(t))throw new le;return function(){return 1>--n?t.apply(this,arguments):void 0}},Z.assign=H,Z.at=function(n){for(var t=arguments,e=-1,r=it(t,true,false,1),t=t[2]&&t[2][t[1]]===n?1:r.length,u=ne(t);++e<t;)u[e]=n[r[e]];
|
||||
return u},Z.bind=Ut,Z.bindAll=function(n){for(var t=1<arguments.length?it(arguments,true,false,1):dt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=vt(n[u],1,null,null,n)}return n},Z.bindKey=function(n,t){return 2<arguments.length?vt(t,19,p(arguments,2),null,n):vt(t,3,null,null,n)},Z.chain=function(n){return n=new nt(n),n.__chain__=true,n},Z.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},Z.compose=function(){for(var n=arguments,t=n.length;t--;)if(!jt(n[t]))throw new le;
|
||||
return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},Z.constant=function(n){return function(){return n}},Z.countBy=Me,Z.create=function(n,t){var e=rt(n);return t?H(e,t):e},Z.createCallback=function(n,t,e){var r=typeof n;if(null==n||"function"==r)return ut(n,t,e);if("object"!=r)return Yt(n);var u=qe(n),o=u[0],a=n[o];return 1!=u.length||a!==a||kt(a)?function(t){for(var e=u.length,r=false;e--&&(r=ft(t[u[e]],n[u[e]],null,true)););return r}:function(n){return n=n[o],a===n&&(0!==a||1/a==1/n)
|
||||
}},Z.curry=function(n,t){return t=typeof t=="number"?t:+t||n.length,vt(n,4,null,null,null,t)},Z.debounce=Gt,Z.defaults=U,Z.defer=Ht,Z.delay=function(n,t){if(!jt(n))throw new le;var e=p(arguments,2);return je(function(){n.apply(v,e)},t)},Z.difference=function(n){return at(n,it(arguments,true,true,1))},Z.filter=St,Z.flatten=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=typeof t!="function"&&r&&r[t]===n?null:t,t=false),null!=e&&(n=Dt(n,e,r)),it(n,t)},Z.forEach=Rt,Z.forEachRight=At,Z.forIn=b,Z.forInRight=function(n,t,e){var r=[];
|
||||
b(n,function(n,t){r.push(t,n)});var u=r.length;for(t=ut(t,e,3);u--&&false!==t(r[u--],r[u],n););return n},Z.forOwn=g,Z.forOwnRight=bt,Z.functions=dt,Z.groupBy=Ve,Z.indexBy=Ue,Z.initial=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Z.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return p(n,0,Ae(Re(0,u-r),u))},Z.intersection=function(){for(var e=[],r=-1,u=arguments.length,a=i(),f=gt(),p=f===n,s=i();++r<u;){var v=arguments[r];(We(v)||_t(v))&&(e.push(v),a.push(p&&v.length>=_&&o(r?e[r]:s)))
|
||||
}var p=e[0],h=-1,g=p?p.length:0,y=[];n:for(;++h<g;){var m=a[0],v=p[h];if(0>(m?t(m,v):f(s,v))){for(r=u,(m||s).push(v);--r;)if(m=a[r],0>(m?t(m,v):f(e[r],v)))continue n;y.push(v)}}for(;u--;)(m=a[u])&&c(m);return l(a),l(s),y},Z.invert=wt,Z.invoke=function(n,t){var e=p(arguments,2),r=-1,u=typeof t=="function",o=n?n.length:0,a=ne(typeof o=="number"?o:0);return Rt(n,function(n){a[++r]=(u?t:n[t]).apply(n,e)}),a},Z.keys=qe,Z.map=Dt,Z.mapValues=function(n,t,e){var r={};return t=Z.createCallback(t,e,3),g(n,function(n,e,u){r[e]=t(n,e,u)
|
||||
}),r},Z.max=$t,Z.memoize=function(n,t){function e(){var r=e.cache,u=t?t.apply(this,arguments):m+arguments[0];return de.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}if(!jt(n))throw new le;return e.cache={},e},Z.merge=function(n){var t=arguments,e=2;if(!kt(n))return n;if("number"!=typeof t[2]&&(e=t.length),3<e&&"function"==typeof t[e-2])var r=ut(t[--e-1],t[e--],2);else 2<e&&"function"==typeof t[e-1]&&(r=t[--e]);for(var t=p(arguments,1,e),u=-1,o=i(),a=i();++u<e;)lt(n,t[u],r,o,a);return l(o),l(a),n},Z.min=function(n,t,e){var u=1/0,o=u;
|
||||
if(typeof t!="function"&&e&&e[t]===n&&(t=null),null==t&&We(n)){e=-1;for(var a=n.length;++e<a;){var i=n[e];i<o&&(o=i)}}else t=null==t&&Ct(n)?r:Z.createCallback(t,e,3),Rt(n,function(n,e,r){e=t(n,e,r),e<u&&(u=e,o=n)});return o},Z.omit=function(n,t,e){var r={};if(typeof t!="function"){var u=[];b(n,function(n,t){u.push(t)});for(var u=at(u,it(arguments,true,false,1)),o=-1,a=u.length;++o<a;){var i=u[o];r[i]=n[i]}}else t=Z.createCallback(t,e,3),b(n,function(n,e,u){t(n,e,u)||(r[e]=n)});return r},Z.once=function(n){var t,e;
|
||||
if(!jt(n))throw new le;return function(){return t?e:(t=true,e=n.apply(this,arguments),n=null,e)}},Z.pairs=function(n){for(var t=-1,e=qe(n),r=e.length,u=ne(r);++t<r;){var o=e[t];u[t]=[o,n[o]]}return u},Z.partial=function(n){return vt(n,16,p(arguments,1))},Z.partialRight=function(n){return vt(n,32,null,p(arguments,1))},Z.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,o=it(arguments,true,false,1),a=kt(n)?o.length:0;++u<a;){var i=o[u];i in n&&(r[i]=n[i])}else t=Z.createCallback(t,e,3),b(n,function(n,e,u){t(n,e,u)&&(r[e]=n)
|
||||
});return r},Z.pluck=Ge,Z.property=Yt,Z.pull=function(n){for(var t=arguments,e=0,r=t.length,u=n?n.length:0;++e<r;)for(var o=-1,a=t[e];++o<u;)n[o]===a&&(ke.call(n,o--,1),u--);return n},Z.range=function(n,t,e){n=+n||0,e=typeof e=="number"?e:+e||1,null==t&&(t=n,n=0);var r=-1;t=Re(0,ge((t-n)/(e||1)));for(var u=ne(t);++r<t;)u[r]=n,n+=e;return u},Z.reject=function(n,t,e){return t=Z.createCallback(t,e,3),St(n,function(n,e,r){return!t(n,e,r)})},Z.remove=function(n,t,e){var r=-1,u=n?n.length:0,o=[];for(t=Z.createCallback(t,e,3);++r<u;)e=n[r],t(e,r,n)&&(o.push(e),ke.call(n,r--,1),u--);
|
||||
return o},Z.rest=Pt,Z.shuffle=Bt,Z.sortBy=function(n,t,e){var r=-1,o=n?n.length:0,a=ne(typeof o=="number"?o:0);for(t=Z.createCallback(t,e,3),Rt(n,function(n,e,u){var o=a[++r]=f();o.m=t(n,e,u),o.n=r,o.o=n}),o=a.length,a.sort(u);o--;)n=a[o],a[o]=n.o,c(n);return a},Z.tap=function(n,t){return t(n),n},Z.throttle=function(n,t,e){var r=true,u=true;if(!jt(n))throw new le;return false===e?r=false:kt(e)&&(r="leading"in e?e.leading:r,u="trailing"in e?e.trailing:u),L.leading=r,L.maxWait=t,L.trailing=u,Gt(n,t,L)},Z.times=function(n,t,e){n=-1<(n=+n)?n:0;
|
||||
var r=-1,u=ne(n);for(t=ut(t,e,1);++r<n;)u[r]=t(r);return u},Z.toArray=function(n){return n&&typeof n.length=="number"?p(n):Ot(n)},Z.transform=function(n,t,e,r){var u=We(n);if(null==e)if(u)e=[];else{var o=n&&n.constructor;e=rt(o&&o.prototype)}return t&&(t=Z.createCallback(t,r,4),(u?Rt:g)(n,function(n,r,u){return t(e,n,r,u)})),e},Z.union=function(){return pt(it(arguments,true,true))},Z.uniq=Lt,Z.values=Ot,Z.where=St,Z.without=function(n){return at(n,p(arguments,1))},Z.wrap=function(n,t){return vt(t,16,[n])
|
||||
},Z.xor=function(){for(var n=0,t=arguments.length,e=arguments[0]||[];++n<t;){var r=arguments[n];(We(r)||_t(r))&&(e=pt(at(e,r).concat(at(r,e))))}return e},Z.zip=Mt,Z.zipObject=Vt,Z.collect=Dt,Z.drop=Pt,Z.each=Rt,Z.eachRight=At,Z.extend=H,Z.methods=dt,Z.object=Vt,Z.select=St,Z.tail=Pt,Z.unique=Lt,Z.unzip=Mt,Qt(Z),Z.clone=function(n,t,e,r){return typeof t!="boolean"&&null!=t&&(r=e,e=t,t=false),et(n,t,typeof e=="function"&&ut(e,r,1))},Z.cloneDeep=function(n,t,e){return et(n,true,typeof t=="function"&&ut(t,e,1))
|
||||
},Z.contains=It,Z.escape=function(n){return null==n?"":fe(n).replace(Le,ht)},Z.every=Nt,Z.find=Et,Z.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=Z.createCallback(t,e,3);++r<u;)if(t(n[r],r,n))return r;return-1},Z.findKey=function(n,t,e){var r;return t=Z.createCallback(t,e,3),g(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Z.findLast=function(n,t,e){var r;return t=Z.createCallback(t,e,3),At(n,function(n,e,u){return t(n,e,u)?(r=n,false):void 0}),r},Z.findLastIndex=function(n,t,e){var r=n?n.length:0;
|
||||
for(t=Z.createCallback(t,e,3);r--;)if(t(n[r],r,n))return r;return-1},Z.findLastKey=function(n,t,e){var r;return t=Z.createCallback(t,e,3),bt(n,function(n,e,u){return t(n,e,u)?(r=e,false):void 0}),r},Z.has=function(n,t){return n?de.call(n,t):false},Z.identity=Jt,Z.indexOf=zt,Z.isArguments=_t,Z.isArray=We,Z.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&ve.call(n)==T||false},Z.isDate=function(n){return n&&typeof n=="object"&&ve.call(n)==F||false},Z.isElement=function(n){return n&&1===n.nodeType||false
|
||||
},Z.isEmpty=function(n){var t=true;if(!n)return t;var e=ve.call(n),r=n.length;return e==$||e==P||e==D||e==q&&typeof r=="number"&&jt(n.splice)?!r:(g(n,function(){return t=false}),t)},Z.isEqual=function(n,t,e,r){return ft(n,t,typeof e=="function"&&ut(e,r,2))},Z.isFinite=function(n){return Ne(n)&&!Se(parseFloat(n))},Z.isFunction=jt,Z.isNaN=function(n){return xt(n)&&n!=+n},Z.isNull=function(n){return null===n},Z.isNumber=xt,Z.isObject=kt,Z.isPlainObject=h,Z.isRegExp=function(n){return n&&typeof n=="object"&&ve.call(n)==z||false
|
||||
},Z.isString=Ct,Z.isUndefined=function(n){return typeof n=="undefined"},Z.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Re(0,r+e):Ae(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},Z.mixin=Qt,Z.noConflict=function(){return e._=se,this},Z.noop=Xt,Z.now=He,Z.parseInt=Je,Z.random=function(n,t,e){var r=null==n,u=null==t;return null==e&&(typeof n=="boolean"&&u?(e=n,n=1):u||typeof t!="boolean"||(e=t,u=true)),r&&u&&(t=1),n=+n||0,u?(t=n,n=0):t=+t||0,e||n%1||t%1?(e=$e(),Ae(n+e*(t-n+parseFloat("1e-"+((e+"").length-1))),t)):ct(n,t)
|
||||
},Z.reduce=Tt,Z.reduceRight=Ft,Z.result=function(n,t){if(n){var e=n[t];return jt(e)?n[t]():e}},Z.runInContext=s,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qe(n).length},Z.some=Wt,Z.sortedIndex=Kt,Z.template=function(n,t,e){var r=Z.templateSettings;n=fe(n||""),e=V({},e,r);var u,o=V({},e.imports,r.imports),r=qe(o),o=Ot(o),a=0,f=e.interpolate||S,l="__p+='",f=ae((e.escape||S).source+"|"+f.source+"|"+(f===I?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(a,c).replace(R,i),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
},Z.reduce=Tt,Z.reduceRight=Ft,Z.result=function(n,t){if(n){var e=n[t];return jt(e)?n[t]():e}},Z.runInContext=s,Z.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:qe(n).length},Z.some=Wt,Z.sortedIndex=Kt,Z.template=function(n,t,e){var r=Z.templateSettings;n=fe(n||""),e=U({},e,r);var u,o=U({},e.imports,r.imports),r=qe(o),o=Ot(o),i=0,f=e.interpolate||S,l="__p+='",f=ie((e.escape||S).source+"|"+f.source+"|"+(f===I?x:S).source+"|"+(e.evaluate||S).source+"|$","g");n.replace(f,function(t,e,r,o,f,c){return r||(r=o),l+=n.slice(i,c).replace(R,a),e&&(l+="'+__e("+e+")+'"),f&&(u=true,l+="';"+f+";\n__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),i=c+t.length,t
|
||||
}),l+="';",f=e=e.variable,f||(e="obj",l="with("+e+"){"+l+"}"),l=(u?l.replace(w,""):l).replace(j,"$1").replace(k,"$1;"),l="function("+e+"){"+(f?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(u?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var c=re(r,"return "+l).apply(v,o)}catch(p){throw p.source=l,p}return t?c(t):(c.source=l,c)},Z.unescape=function(n){return null==n?"":fe(n).replace(Ke,mt)},Z.uniqueId=function(n){var t=++y;return fe(null==n?"":n)+t
|
||||
},Z.all=Nt,Z.any=Wt,Z.detect=Et,Z.findWhere=Et,Z.foldl=Tt,Z.foldr=Ft,Z.include=It,Z.inject=Tt,g(Z,function(n,t){Z.prototype[t]||(Z.prototype[t]=function(){var t=[this.__wrapped__],e=this.__chain__;return we.apply(t,arguments),t=n.apply(Z,t),e?new nt(t,e):t})}),Z.first=qt,Z.last=function(n,t,e){var r=0,u=n?n.length:0;if(typeof t!="number"&&null!=t){var o=u;for(t=Z.createCallback(t,e,3);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n?n[u-1]:v;return p(n,Re(0,u-r))},Z.sample=function(n,t,e){return n&&typeof n.length!="number"&&(n=Ot(n)),null==t||e?n?n[ct(0,n.length-1)]:v:(n=Bt(n),n.length=Ae(Re(0,t),n.length),n)
|
||||
},Z.take=qt,Z.head=qt,g(Z,function(n,t){var e="sample"!==t;Z.prototype[t]||(Z.prototype[t]=function(t,r){var u=this.__chain__,o=n(this.__wrapped__,t,r);return u||null!=t&&(!r||e&&typeof t=="function")?new nt(o,u):o})}),Z.VERSION="2.3.0",Z.prototype.chain=function(){return this.__chain__=true,this},Z.prototype.toString=function(){return fe(this.__wrapped__)},Z.prototype.value=Zt,Z.prototype.valueOf=Zt,Rt(["join","pop","shift"],function(n){var t=ce[n];Z.prototype[n]=function(){var n=this.__chain__,e=t.apply(this.__wrapped__,arguments);
|
||||
return n?new nt(e,n):e}}),Rt(["push","reverse","sort","unshift"],function(n){var t=ce[n];Z.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Rt(["concat","slice","splice"],function(n){var t=ce[n];Z.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments),this.__chain__)}}),Z}var v,h=[],g=[],y=0,m=+new Date+"",_=75,b=40,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",w=/\b__p\+='';/g,j=/\b(__p\+=)''\+/g,k=/(__e\(.*?\)|\b__t\))\+'';/g,x=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,O=/^\s*function[ \n\r\t]+\w/,I=/<%=([\s\S]+?)%>/g,N=RegExp("^["+d+"]*0+(?=.$)"),S=/($^)/,E=/\bthis\b/,R=/['\n\r\t\u2028\u2029\\]/g,A="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),D="[object Arguments]",$="[object Array]",T="[object Boolean]",F="[object Date]",B="[object Function]",W="[object Number]",q="[object Object]",z="[object RegExp]",P="[object String]",K={};
|
||||
K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},U={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},V={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=U[typeof window]&&window||this,H=U[typeof exports]&&exports&&!exports.nodeType&&exports,J=U[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=U[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X);
|
||||
K[B]=false,K[D]=K[$]=K[T]=K[F]=K[W]=K[q]=K[z]=K[P]=true;var L={leading:false,maxWait:0,trailing:false},M={configurable:false,enumerable:false,value:null,writable:false},V={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},U={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},G=V[typeof window]&&window||this,H=V[typeof exports]&&exports&&!exports.nodeType&&exports,J=V[typeof module]&&module&&!module.nodeType&&module,Q=J&&J.exports===H&&H,X=V[typeof global]&&global;!X||X.global!==X&&X.window!==X||(G=X);
|
||||
var Y=s();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(G._=Y, define(function(){return Y})):H&&J?Q?(J.exports=Y)._=Y:H._=Y:G._=Y}).call(this);
|
||||
55
dist/lodash.underscore.js
vendored
55
dist/lodash.underscore.js
vendored
@@ -1215,15 +1215,15 @@
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to check.
|
||||
* @param {string} key The name of the property to check.
|
||||
* @returns {boolean} Returns `true` if key is a direct property, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
* // => true
|
||||
*/
|
||||
function has(object, prop) {
|
||||
return object ? hasOwnProperty.call(object, prop) : false;
|
||||
function has(object, key) {
|
||||
return object ? hasOwnProperty.call(object, key) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3108,15 +3108,24 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of shared values.
|
||||
* @example
|
||||
*
|
||||
* _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
function intersection() {
|
||||
var args = [],
|
||||
argsIndex = -1,
|
||||
argsLength = arguments.length;
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = arguments[argsIndex];
|
||||
if (isArray(value) || isArguments(value)) {
|
||||
args.push(value);
|
||||
}
|
||||
}
|
||||
var array = args[0],
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
@@ -3124,7 +3133,7 @@
|
||||
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
value = array[index];
|
||||
if (indexOf(result, value) < 0) {
|
||||
var argsIndex = argsLength;
|
||||
while (--argsIndex) {
|
||||
@@ -3441,13 +3450,13 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of combined values.
|
||||
* @example
|
||||
*
|
||||
* _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* // => [1, 2, 3, 101, 10]
|
||||
* _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2, 3, 5, 4]
|
||||
*/
|
||||
function union(array) {
|
||||
function union() {
|
||||
return baseUniq(baseFlatten(arguments, true, true));
|
||||
}
|
||||
|
||||
@@ -4294,14 +4303,14 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a "_.pluck" style function, which returns the `prop` value of a
|
||||
* Creates a "_.pluck" style function, which returns the `key` value of a
|
||||
* given object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {string} prop The name of the property to retrieve.
|
||||
* @returns {*} Returns the new function.
|
||||
* @param {string} key The name of the property to retrieve.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var characters = [
|
||||
@@ -4317,9 +4326,9 @@
|
||||
* _.sortBy(characters, getName);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
|
||||
*/
|
||||
function property(prop) {
|
||||
function property(key) {
|
||||
return function(object) {
|
||||
return object[prop];
|
||||
return object[key];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4365,7 +4374,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `prop` on `object`. If `prop` is a function
|
||||
* Resolves the value of property `key` on `object`. If `key` is a function
|
||||
* it will be invoked with the `this` binding of `object` and its result returned,
|
||||
* else the property value is returned. If `object` is falsey then `undefined`
|
||||
* is returned.
|
||||
@@ -4374,7 +4383,7 @@
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to resolve.
|
||||
* @param {string} key The name of the property to resolve.
|
||||
* @returns {*} Returns the resolved value.
|
||||
* @example
|
||||
*
|
||||
@@ -4391,10 +4400,10 @@
|
||||
* _.result(object, 'stuff');
|
||||
* // => 'nonsense'
|
||||
*/
|
||||
function result(object, prop) {
|
||||
function result(object, key) {
|
||||
if (object) {
|
||||
var value = object[prop];
|
||||
return isFunction(value) ? object[prop]() : value;
|
||||
var value = object[key];
|
||||
return isFunction(value) ? object[key]() : value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
18
dist/lodash.underscore.min.js
vendored
18
dist/lodash.underscore.min.js
vendored
@@ -25,15 +25,15 @@ Wr.spliceObjects=(wr.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<
|
||||
},Cr=function(n){var r,t=[];if(!n||!hr[typeof n])return t;for(r in n)Sr.call(n,r)&&t.push(r);return t},Pr=Dr?function(n){return A(n)?Dr(n):[]}:Cr,Ur={"&":"&","<":"<",">":">",'"':""","'":"'"},Vr=x(Ur),Gr=RegExp("("+Pr(Vr).join("|")+")","g"),Hr=RegExp("["+Pr(Ur).join("")+"]","g"),Jr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(r(n[t],t,n)===tr)break;return n},Kr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(Sr.call(n,t)&&r(n[t],t,n)===tr)break;
|
||||
return n};E(/x/)&&(E=function(n){return typeof n=="function"&&"[object Function]"==Tr.call(n)});var Lr=h(function(n,r,t){Sr.call(n,t)?n[t]++:n[t]=1}),Qr=h(function(n,r,t){(Sr.call(n,t)?n[t]:n[t]=[]).push(r)}),Xr=h(function(n,r,t){n[t]=r}),Yr=I,Zr=Er.test(Zr=Date.now)&&Zr||function(){return(new Date).getTime()};u.after=function(n,r){if(!E(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=K,u.bindAll=function(n){for(var r=1<arguments.length?p(arguments,true,false,1):j(n),t=-1,e=r.length;++t<e;){var u=r[t];
|
||||
n[u]=v(n[u],1,null,null,n)}return n},u.chain=function(n){return n=new o(n),n.__chain__=true,n},u.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},u.compose=function(){for(var n=arguments,r=n.length;r--;)if(!E(n[r]))throw new TypeError;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},u.countBy=Lr,u.debounce=L,u.defaults=w,u.defer=function(n){if(!E(n))throw new TypeError;var r=e(arguments,1);return setTimeout(function(){n.apply(nr,r)
|
||||
},1)},u.delay=function(n,r){if(!E(n))throw new TypeError;var t=e(arguments,2);return setTimeout(function(){n.apply(nr,t)},r)},u.difference=function(n){return c(n,p(arguments,true,true,1))},u.filter=B,u.flatten=function(n,r){return p(n,r)},u.forEach=q,u.functions=j,u.groupBy=Qr,u.indexBy=Xr,u.initial=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else u=null==r||t?1:r||u;return e(n,0,Mr(Ir(0,o-u),o))},u.intersection=function(n){var r=arguments,t=r.length,e=-1,u=m(),o=n?n.length:0,i=[];
|
||||
n:for(;++e<o;){var f=n[e];if(0>u(i,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n;i.push(f)}}return i},u.invert=x,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return q(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Pr,u.map=I,u.max=M,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):er+arguments[0];return Sr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e;
|
||||
typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=Q(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},u.omit=function(n){var r=[];Jr(n,function(n,t){r.push(t)});for(var r=c(r,p(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},u.once=function(n){var r,t;if(!E(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=Pr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];
|
||||
u[r]=[o,n[o]]}return u},u.partial=function(n){return v(n,16,e(arguments,1))},u.pick=function(n){for(var r=-1,t=p(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},u.pluck=Yr,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Ir(0,Ar((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=Q(r,t,3),B(n,function(n,t,e){return!r(n,t,e)})},u.rest=G,u.shuffle=z,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
for(t=Q(t,e,3),q(n,function(n,r,e){i[++u]={m:t(n,r,e),n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n},u.throttle=function(n,r,t){var e=true,u=true;if(!E(n))throw new TypeError;return false===t?e=false:A(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,L(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return zr(n)?e(n):n&&typeof n.length=="number"?I(n):N(n)
|
||||
},u.union=function(){return g(p(arguments,true,true))},u.uniq=J,u.values=N,u.where=P,u.without=function(n){return c(n,e(arguments,1))},u.wrap=function(n,r){return v(r,16,[n])},u.zip=function(){for(var n=-1,r=M(Yr(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=Yr(arguments,n);return t},u.collect=I,u.drop=G,u.each=q,u.extend=b,u.methods=j,u.object=function(n,r){var t=-1,e=n?n.length:0,u={};for(r||!e||zr(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=B,u.tail=G,u.unique=J,u.clone=function(n){return A(n)?zr(n)?e(n):b({},n):n
|
||||
},u.contains=R,u.escape=function(n){return null==n?"":(n+"").replace(Hr,y)},u.every=k,u.find=F,u.has=function(n,r){return n?Sr.call(n,r):false},u.identity=X,u.indexOf=V,u.isArguments=d,u.isArray=zr,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Tr.call(n)==ar||false},u.isDate=function(n){return n&&typeof n=="object"&&Tr.call(n)==lr||false},u.isElement=function(n){return n&&1===n.nodeType||false},u.isEmpty=T,u.isEqual=function(n,r){return s(n,r)},u.isFinite=function(n){return Fr(n)&&!qr(parseFloat(n))
|
||||
},u.isFunction=E,u.isNaN=function(n){return O(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=O,u.isObject=A,u.isRegExp=function(n){return n&&hr[typeof n]&&Tr.call(n)==sr||false},u.isString=S,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Ir(0,e+t):Mr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=Y,u.noConflict=function(){return yr._=xr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Or($r()*(r-n+1))
|
||||
},u.reduce=$,u.reduceRight=W,u.result=function(n,r){if(n){var t=n[r];return E(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Pr(n).length},u.some=C,u.sortedIndex=H,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=w({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||ur).source+"|"+(e.interpolate||ur).source+"|"+(e.evaluate||ur).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(or,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
},1)},u.delay=function(n,r){if(!E(n))throw new TypeError;var t=e(arguments,2);return setTimeout(function(){n.apply(nr,t)},r)},u.difference=function(n){return c(n,p(arguments,true,true,1))},u.filter=B,u.flatten=function(n,r){return p(n,r)},u.forEach=q,u.functions=j,u.groupBy=Qr,u.indexBy=Xr,u.initial=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else u=null==r||t?1:r||u;return e(n,0,Mr(Ir(0,o-u),o))},u.intersection=function(){for(var n=[],r=-1,t=arguments.length;++r<t;){var e=arguments[r];
|
||||
(zr(e)||d(e))&&n.push(e)}var u=n[0],o=-1,i=m(),f=u?u.length:0,a=[];n:for(;++o<f;)if(e=u[o],0>i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=x,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return q(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Pr,u.map=I,u.max=M,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):er+arguments[0];return Sr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)
|
||||
}},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++o<i;)t=n[o],t<u&&(u=t);else r=Q(r,t,3),q(n,function(n,t,o){t=r(n,t,o),t<e&&(e=t,u=n)});return u},u.omit=function(n){var r=[];Jr(n,function(n,t){r.push(t)});for(var r=c(r,p(arguments,true,false,1)),t=-1,e=r.length,u={};++t<e;){var o=r[t];u[o]=n[o]}return u},u.once=function(n){var r,t;if(!E(n))throw new TypeError;return function(){return r?t:(r=true,t=n.apply(this,arguments),n=null,t)
|
||||
}},u.pairs=function(n){for(var r=-1,t=Pr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},u.partial=function(n){return v(n,16,e(arguments,1))},u.pick=function(n){for(var r=-1,t=p(arguments,true,false,1),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},u.pluck=Yr,u.range=function(n,r,t){n=+n||0,t=+t||1,null==r&&(r=n,n=0);var e=-1;r=Ir(0,Ar((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},u.reject=function(n,r,t){return r=Q(r,t,3),B(n,function(n,t,e){return!r(n,t,e)
|
||||
})},u.rest=G,u.shuffle=z,u.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=Q(t,e,3),q(n,function(n,r,e){i[++u]={m:t(n,r,e),n:u,o:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].o;return i},u.tap=function(n,r){return r(n),n},u.throttle=function(n,r,t){var e=true,u=true;if(!E(n))throw new TypeError;return false===t?e=false:A(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),t={},t.leading=e,t.maxWait=r,t.trailing=u,L(n,r,t)},u.times=function(n,r,t){n=-1<(n=+n)?n:0;var e=-1,u=Array(n);
|
||||
for(r=a(r,t,1);++e<n;)u[e]=r(e);return u},u.toArray=function(n){return zr(n)?e(n):n&&typeof n.length=="number"?I(n):N(n)},u.union=function(){return g(p(arguments,true,true))},u.uniq=J,u.values=N,u.where=P,u.without=function(n){return c(n,e(arguments,1))},u.wrap=function(n,r){return v(r,16,[n])},u.zip=function(){for(var n=-1,r=M(Yr(arguments,"length")),t=Array(0>r?0:r);++n<r;)t[n]=Yr(arguments,n);return t},u.collect=I,u.drop=G,u.each=q,u.extend=b,u.methods=j,u.object=function(n,r){var t=-1,e=n?n.length:0,u={};
|
||||
for(r||!e||zr(n[0])||(r=[]);++t<e;){var o=n[t];r?u[o]=r[t]:o&&(u[o[0]]=o[1])}return u},u.select=B,u.tail=G,u.unique=J,u.clone=function(n){return A(n)?zr(n)?e(n):b({},n):n},u.contains=R,u.escape=function(n){return null==n?"":(n+"").replace(Hr,y)},u.every=k,u.find=F,u.has=function(n,r){return n?Sr.call(n,r):false},u.identity=X,u.indexOf=V,u.isArguments=d,u.isArray=zr,u.isBoolean=function(n){return true===n||false===n||n&&typeof n=="object"&&Tr.call(n)==ar||false},u.isDate=function(n){return n&&typeof n=="object"&&Tr.call(n)==lr||false
|
||||
},u.isElement=function(n){return n&&1===n.nodeType||false},u.isEmpty=T,u.isEqual=function(n,r){return s(n,r)},u.isFinite=function(n){return Fr(n)&&!qr(parseFloat(n))},u.isFunction=E,u.isNaN=function(n){return O(n)&&n!=+n},u.isNull=function(n){return null===n},u.isNumber=O,u.isObject=A,u.isRegExp=function(n){return n&&hr[typeof n]&&Tr.call(n)==sr||false},u.isString=S,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Ir(0,e+t):Mr(t,e-1))+1);e--;)if(n[e]===r)return e;
|
||||
return-1},u.mixin=Y,u.noConflict=function(){return yr._=xr,this},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Or($r()*(r-n+1))},u.reduce=$,u.reduceRight=W,u.result=function(n,r){if(n){var t=n[r];return E(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Pr(n).length},u.some=C,u.sortedIndex=H,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=w({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||ur).source+"|"+(e.interpolate||ur).source+"|"+(e.evaluate||ur).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(or,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r
|
||||
}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}";try{var l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+"").replace(Gr,_)},u.uniqueId=function(n){var r=++rr+"";return n?n+r:r},u.all=k,u.any=C,u.detect=F,u.findWhere=function(n,r){return P(n,r,true)},u.foldl=$,u.foldr=W,u.include=R,u.inject=$,u.first=U,u.last=function(n,r,t){var u=0,o=n?n.length:0;
|
||||
if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:nr;return e(n,Ir(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=N(n)),null==r||t?n?n[0+Or($r()*(n.length-1-0+1))]:nr:(n=z(n),n.length=Mr(Ir(0,r),n.length),n)},u.take=U,u.head=U,Y(u),u.VERSION="2.3.0",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},q("pop push reverse shift sort splice unshift".split(" "),function(n){var r=wr[n];
|
||||
u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Wr.spliceObjects||0!==n.length||delete n[0],this}}),q(["concat","join","slice"],function(n){var r=wr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yr._=u, define(function(){return u})):mr&&_r?dr?(_r.exports=u)._=u:mr._=u:yr._=u}).call(this);
|
||||
447
doc/README.md
447
doc/README.md
File diff suppressed because it is too large
Load Diff
174
lodash.js
174
lodash.js
@@ -2501,15 +2501,15 @@
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to check.
|
||||
* @param {string} key The name of the property to check.
|
||||
* @returns {boolean} Returns `true` if key is a direct property, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
* // => true
|
||||
*/
|
||||
function has(object, prop) {
|
||||
return object ? hasOwnProperty.call(object, prop) : false;
|
||||
function has(object, key) {
|
||||
return object ? hasOwnProperty.call(object, key) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2914,6 +2914,52 @@
|
||||
return typeof value == 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an object with the same keys as `object` and values generated by
|
||||
* running each own enumerable property of `object` through the callback.
|
||||
* The callback is bound to `thisArg` and invoked with three arguments;
|
||||
* (value, key, object).
|
||||
*
|
||||
* If a property name is provided for `callback` the created "_.pluck" style
|
||||
* callback will return the property value of the given element.
|
||||
*
|
||||
* If an object is provided for `callback` the created "_.where" style callback
|
||||
* will return `true` for elements that have the properties of the given object,
|
||||
* else `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function|Object|string} [callback=identity] The function called
|
||||
* per iteration. If a property name or object is provided it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array} Returns a new object with values of the results of each `callback` execution.
|
||||
* @example
|
||||
*
|
||||
* _.mapValues({ 'a': 1, 'b': 2, 'c': 3} , function(num) { return num * 3; });
|
||||
* // => { 'a': 3, 'b': 6, 'c': 9 }
|
||||
*
|
||||
* var characters = {
|
||||
* 'fred': { 'name': 'fred', 'age': 40 },
|
||||
* 'pebbles': { 'name': 'pebbles', 'age': 1 }
|
||||
* };
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.mapValues(characters, 'age');
|
||||
* // => { 'fred': 40, 'pebbles': 1 }
|
||||
*/
|
||||
function mapValues(object, callback, thisArg) {
|
||||
var result = {};
|
||||
callback = lodash.createCallback(callback, thisArg, 3);
|
||||
|
||||
forOwn(object, function(value, key, object) {
|
||||
result[key] = callback(value, key, object);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that
|
||||
* don't resolve to `undefined` into the destination object. Subsequent sources
|
||||
@@ -3129,11 +3175,11 @@
|
||||
|
||||
/**
|
||||
* An alternative to `_.reduce` this method transforms `object` to a new
|
||||
* `accumulator` object which is the result of running each of its elements
|
||||
* through a callback, with each callback execution potentially mutating
|
||||
* the `accumulator` object. The callback is bound to `thisArg` and invoked
|
||||
* with four arguments; (accumulator, value, key, object). Callbacks may exit
|
||||
* iteration early by explicitly returning `false`.
|
||||
* `accumulator` object which is the result of running each of its own
|
||||
* enumerable properties through a callback, with each callback execution
|
||||
* potentially mutating the `accumulator` object. The callback is bound to
|
||||
* `thisArg` and invoked with four arguments; (accumulator, value, key, object).
|
||||
* Callbacks may exit iteration early by explicitly returning `false`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -4758,29 +4804,34 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of shared values.
|
||||
* @example
|
||||
*
|
||||
* _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* _.intersection([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2]
|
||||
*/
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
function intersection() {
|
||||
var args = [],
|
||||
argsIndex = -1,
|
||||
argsLength = arguments.length,
|
||||
caches = getArray(),
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [],
|
||||
trustIndexOf = indexOf === baseIndexOf,
|
||||
seen = getArray();
|
||||
|
||||
while (++argsIndex < argsLength) {
|
||||
var value = args[argsIndex];
|
||||
caches[argsIndex] = indexOf === baseIndexOf &&
|
||||
(value ? value.length : 0) >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen);
|
||||
var value = arguments[argsIndex];
|
||||
if (isArray(value) || isArguments(value)) {
|
||||
args.push(value);
|
||||
caches.push(trustIndexOf && value.length >= largeArraySize &&
|
||||
createCache(argsIndex ? args[argsIndex] : seen));
|
||||
}
|
||||
}
|
||||
var array = args[0],
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var cache = caches[0];
|
||||
@@ -5197,13 +5248,13 @@
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of composite values.
|
||||
* @returns {Array} Returns an array of combined values.
|
||||
* @example
|
||||
*
|
||||
* _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
* // => [1, 2, 3, 101, 10]
|
||||
* _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
* // => [1, 2, 3, 5, 4]
|
||||
*/
|
||||
function union(array) {
|
||||
function union() {
|
||||
return baseUniq(baseFlatten(arguments, true, true));
|
||||
}
|
||||
|
||||
@@ -5283,6 +5334,37 @@
|
||||
return baseDifference(array, slice(arguments, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array that is the smymetric difference of the provided arrays.
|
||||
* See http://en.wikipedia.org/wiki/Symmetric_difference.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {...Array} [array] The arrays to inspect.
|
||||
* @returns {Array} Returns an array of values.
|
||||
* @example
|
||||
*
|
||||
* _.xor([1, 2, 3], [5, 2, 1, 4]);
|
||||
* // => [3, 5, 4]
|
||||
*
|
||||
* _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]);
|
||||
* // => [1, 4, 5]
|
||||
*/
|
||||
function xor() {
|
||||
var index = 0,
|
||||
length = arguments.length,
|
||||
result = arguments[0] || [];
|
||||
|
||||
while (++index < length) {
|
||||
var array = arguments[index];
|
||||
if (isArray(array) || isArguments(array)) {
|
||||
result = baseUniq(baseDifference(result, array).concat(baseDifference(array, result)));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of grouped elements, the first of which contains the first
|
||||
* elements of the given arrays, the second of which contains the second
|
||||
@@ -5989,6 +6071,27 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function that returns `value`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {*} value The value to return from the new function.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'name': 'fred' };
|
||||
* var getter = _.constant(object);
|
||||
* getter() === object;
|
||||
* // => true
|
||||
*/
|
||||
function constant(value) {
|
||||
return function() {
|
||||
return value;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Produces a callback bound to an optional `thisArg`. If `func` is a property
|
||||
* name the created callback will return the property value for a given element.
|
||||
@@ -6218,14 +6321,14 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a "_.pluck" style function, which returns the `prop` value of a
|
||||
* Creates a "_.pluck" style function, which returns the `key` value of a
|
||||
* given object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {string} prop The name of the property to retrieve.
|
||||
* @returns {*} Returns the new function.
|
||||
* @param {string} key The name of the property to retrieve.
|
||||
* @returns {Function} Returns the new function.
|
||||
* @example
|
||||
*
|
||||
* var characters = [
|
||||
@@ -6241,9 +6344,9 @@
|
||||
* _.sortBy(characters, getName);
|
||||
* // => [{ 'name': 'barney', 'age': 36 }, { 'name': 'fred', 'age': 40 }]
|
||||
*/
|
||||
function property(prop) {
|
||||
function property(key) {
|
||||
return function(object) {
|
||||
return object[prop];
|
||||
return object[key];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6306,7 +6409,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the value of `prop` on `object`. If `prop` is a function
|
||||
* Resolves the value of property `key` on `object`. If `key` is a function
|
||||
* it will be invoked with the `this` binding of `object` and its result returned,
|
||||
* else the property value is returned. If `object` is falsey then `undefined`
|
||||
* is returned.
|
||||
@@ -6315,7 +6418,7 @@
|
||||
* @memberOf _
|
||||
* @category Utilities
|
||||
* @param {Object} object The object to inspect.
|
||||
* @param {string} prop The name of the property to resolve.
|
||||
* @param {string} key The name of the property to resolve.
|
||||
* @returns {*} Returns the resolved value.
|
||||
* @example
|
||||
*
|
||||
@@ -6332,10 +6435,10 @@
|
||||
* _.result(object, 'stuff');
|
||||
* // => 'nonsense'
|
||||
*/
|
||||
function result(object, prop) {
|
||||
function result(object, key) {
|
||||
if (object) {
|
||||
var value = object[prop];
|
||||
return isFunction(value) ? object[prop]() : value;
|
||||
var value = object[key];
|
||||
return isFunction(value) ? object[key]() : value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6732,6 +6835,7 @@
|
||||
lodash.chain = chain;
|
||||
lodash.compact = compact;
|
||||
lodash.compose = compose;
|
||||
lodash.constant = constant;
|
||||
lodash.countBy = countBy;
|
||||
lodash.create = create;
|
||||
lodash.createCallback = createCallback;
|
||||
@@ -6758,6 +6862,7 @@
|
||||
lodash.invoke = invoke;
|
||||
lodash.keys = keys;
|
||||
lodash.map = map;
|
||||
lodash.mapValues = mapValues;
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
@@ -6788,6 +6893,7 @@
|
||||
lodash.where = where;
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.xor = xor;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
|
||||
161
test/test.js
161
test/test.js
@@ -1019,6 +1019,25 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.constant');
|
||||
|
||||
(function() {
|
||||
test('should create a function that always returns `value`', 1, function() {
|
||||
var object = { 'a': 1 },
|
||||
values = falsey.concat(1, 'a'),
|
||||
constant = _.constant(object),
|
||||
expected = _.map(values, function() { return object; });
|
||||
|
||||
var actual = _.map(values, function(value, index) {
|
||||
return index ? constant(value) : constant();
|
||||
});
|
||||
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.contains');
|
||||
|
||||
(function() {
|
||||
@@ -1736,7 +1755,7 @@
|
||||
deepEqual(_.difference(array1, array2), []);
|
||||
});
|
||||
|
||||
test('should not accept individual secondary values', 1, function() {
|
||||
test('should ignore individual secondary values', 1, function() {
|
||||
var array = [1, null, 3];
|
||||
deepEqual(_.difference(array, null, 3), array);
|
||||
});
|
||||
@@ -2391,7 +2410,7 @@
|
||||
|
||||
test('`_.' + methodName + '` should return a wrapped value when chaining', 1, function() {
|
||||
if (!isNpm) {
|
||||
var actual = _(array)[methodName](Boolean);
|
||||
var actual = _(array)[methodName](noop);
|
||||
ok(actual instanceof _);
|
||||
}
|
||||
else {
|
||||
@@ -2425,7 +2444,7 @@
|
||||
test('`_.' + methodName + '` should return the existing wrapper when chaining', 1, function() {
|
||||
if (!isNpm) {
|
||||
var wrapper = _(array);
|
||||
equal(wrapper[methodName](Boolean), wrapper);
|
||||
equal(wrapper[methodName](noop), wrapper);
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
@@ -3066,18 +3085,18 @@
|
||||
|
||||
(function() {
|
||||
test('should return the intersection of the given arrays', 1, function() {
|
||||
var actual = _.intersection([1, 3, 2], [101, 2, 1, 10], [2, 1]);
|
||||
var actual = _.intersection([1, 3, 2], [5, 2, 1, 4], [2, 1]);
|
||||
deepEqual(actual, [1, 2]);
|
||||
});
|
||||
|
||||
test('should return an array of unique values', 1, function() {
|
||||
var actual = _.intersection([1, 1, 3, 2, 2], [101, 2, 2, 1, 101], [2, 1, 1]);
|
||||
var actual = _.intersection([1, 1, 3, 2, 2], [5, 2, 2, 1, 4], [2, 1, 1]);
|
||||
deepEqual(actual, [1, 2]);
|
||||
});
|
||||
|
||||
test('should return a wrapped value when chaining', 2, function() {
|
||||
if (!isNpm) {
|
||||
var actual = _([1, 3, 2]).intersection([101, 2, 1, 10]);
|
||||
var actual = _([1, 3, 2]).intersection([5, 2, 1, 4]);
|
||||
ok(actual instanceof _);
|
||||
deepEqual(actual.value(), [1, 2]);
|
||||
}
|
||||
@@ -3085,6 +3104,10 @@
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
|
||||
test('should ignore individual secondary values', 1, function() {
|
||||
deepEqual(_.intersection([1, null, 3], 3, null), []);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
@@ -4628,22 +4651,22 @@
|
||||
|
||||
test('should support the `thisArg` argument', 2, function() {
|
||||
function callback(num, index) {
|
||||
return this[index];
|
||||
return this[index] + num;
|
||||
}
|
||||
|
||||
var actual = _.map([1], callback, [2]);
|
||||
equal(actual, 2);
|
||||
deepEqual(actual, [3]);
|
||||
|
||||
actual = _.map({ 'a': 1 }, callback, { 'a': 2 });
|
||||
equal(actual, 2);
|
||||
deepEqual(actual, [3]);
|
||||
});
|
||||
|
||||
test('should iterate over own properties of objects', 1, function() {
|
||||
function Foo() { this.a = 1; }
|
||||
Foo.prototype.b = 2;
|
||||
|
||||
var keys = _.map(new Foo, function(value, key) { return key; });
|
||||
deepEqual(keys, ['a']);
|
||||
var actual = _.map(new Foo, function(value, key) { return key; });
|
||||
deepEqual(actual, ['a']);
|
||||
});
|
||||
|
||||
test('should work on an object with no `callback`', 1, function() {
|
||||
@@ -4663,7 +4686,7 @@
|
||||
|
||||
test('should return a wrapped value when chaining', 1, function() {
|
||||
if (!isNpm) {
|
||||
ok(_(array).map(Boolean) instanceof _);
|
||||
ok(_(array).map(noop) instanceof _);
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
@@ -4702,6 +4725,70 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.mapValues');
|
||||
|
||||
(function() {
|
||||
var object = { 'a': 1, 'b': 2, 'c': 3 };
|
||||
|
||||
test('should pass the correct `callback` arguments', 1, function() {
|
||||
var args;
|
||||
|
||||
_.mapValues(object, function() {
|
||||
args || (args = slice.call(arguments));
|
||||
});
|
||||
|
||||
deepEqual(args, [1, 'a', object]);
|
||||
});
|
||||
|
||||
test('should support the `thisArg` argument', 2, function() {
|
||||
function callback(num, key) {
|
||||
return this[key] + num;
|
||||
}
|
||||
|
||||
var actual = _.mapValues({ 'a': 1 }, callback, { 'a': 2 });
|
||||
deepEqual(actual, { 'a': 3 });
|
||||
|
||||
actual = _.mapValues([1], callback, [2]);
|
||||
deepEqual(actual, { '0': 3 });
|
||||
});
|
||||
|
||||
test('should iterate over own properties of objects', 1, function() {
|
||||
function Foo() { this.a = 1; }
|
||||
Foo.prototype.b = 2;
|
||||
|
||||
var actual = _.mapValues(new Foo, function(value, key) { return key; });
|
||||
deepEqual(actual, { 'a': 'a' });
|
||||
});
|
||||
|
||||
test('should work on an object with no `callback`', 1, function() {
|
||||
var actual = _.mapValues({ 'a': 1, 'b': 2, 'c': 3 });
|
||||
deepEqual(actual, object);
|
||||
});
|
||||
|
||||
test('should return a wrapped value when chaining', 1, function() {
|
||||
if (!isNpm) {
|
||||
ok(_(object).mapValues(noop) instanceof _);
|
||||
}
|
||||
else {
|
||||
skipTest();
|
||||
}
|
||||
});
|
||||
|
||||
test('should accept a falsey `object` argument', 1, function() {
|
||||
var expected = _.map(falsey, function() { return {}; });
|
||||
|
||||
var actual = _.map(falsey, function(value, index) {
|
||||
try {
|
||||
return index ? _.mapValues(value) : _.mapValues();
|
||||
} catch(e) { }
|
||||
});
|
||||
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.max');
|
||||
|
||||
(function() {
|
||||
@@ -5488,7 +5575,7 @@
|
||||
QUnit.module('lodash.property');
|
||||
|
||||
(function() {
|
||||
test('should great a function that plucks a property value of a given object', 3, function() {
|
||||
test('should create a function that plucks a property value of a given object', 3, function() {
|
||||
var object = { 'a': 1, 'b': 2 },
|
||||
actual = _.property('a');
|
||||
|
||||
@@ -7364,13 +7451,13 @@
|
||||
|
||||
(function() {
|
||||
test('should return the union of the given arrays', 1, function() {
|
||||
var actual = _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
deepEqual(actual, [1, 2, 3, 101, 10]);
|
||||
var actual = _.union([1, 2, 3], [5, 2, 1, 4], [2, 1]);
|
||||
deepEqual(actual, [1, 2, 3, 5, 4]);
|
||||
});
|
||||
|
||||
test('should not flatten nested arrays', 1, function() {
|
||||
var actual = _.union([1, 2, 3], [1, [4]], [2, [5]]);
|
||||
deepEqual(actual, [1, 2, 3, [4], [5]]);
|
||||
var actual = _.union([1, 2, 3], [1, [5]], [2, [4]]);
|
||||
deepEqual(actual, [1, 2, 3, [5], [4]]);
|
||||
});
|
||||
|
||||
test('should produce correct results when provided a falsey `array` argument', 1, function() {
|
||||
@@ -7380,8 +7467,9 @@
|
||||
deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
test('should not accept individual secondary values', 1, function() {
|
||||
deepEqual(_.union([1], 1, 2, 3), [1]);
|
||||
test('should ignore individual secondary values', 1, function() {
|
||||
var array = [1];
|
||||
deepEqual(_.union(array, 1, 2, 3), array);
|
||||
});
|
||||
}());
|
||||
|
||||
@@ -7633,6 +7721,38 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.xor');
|
||||
|
||||
(function() {
|
||||
test('should return the symmetric difference of the given arrays', 1, function() {
|
||||
var actual = _.xor([1, 2, 5], [2, 3, 5], [3, 4, 5]);
|
||||
deepEqual(actual, [1, 4, 5]);
|
||||
});
|
||||
|
||||
test('should return an array of unique values', 1, function() {
|
||||
var actual = _.xor([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);
|
||||
deepEqual(actual, [1, 4, 5]);
|
||||
});
|
||||
|
||||
test('should return a wrapped value when chaining', 2, function() {
|
||||
if (!isNpm) {
|
||||
var actual = _([1, 2, 3]).xor([5, 2, 1, 4]);
|
||||
ok(actual instanceof _);
|
||||
deepEqual(actual.value(), [3, 5, 4]);
|
||||
}
|
||||
else {
|
||||
skipTest(2);
|
||||
}
|
||||
});
|
||||
|
||||
test('should ignore individual secondary values', 1, function() {
|
||||
var array = [1, null, 3];
|
||||
deepEqual(_.xor(array, 3, null), array);
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.zip');
|
||||
|
||||
(function() {
|
||||
@@ -8067,6 +8187,7 @@
|
||||
'values',
|
||||
'where',
|
||||
'without',
|
||||
'xor',
|
||||
'zip'
|
||||
];
|
||||
|
||||
@@ -8089,7 +8210,7 @@
|
||||
|
||||
var acceptFalsey = _.difference(allMethods, rejectFalsey);
|
||||
|
||||
test('should accept falsey arguments', 151, function() {
|
||||
test('should accept falsey arguments', 155, function() {
|
||||
var isExported = '_' in root,
|
||||
oldDash = root._;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user