mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Reduce iterator template and _.bindAll.
Former-commit-id: 2655b7ca336baf9e04c87ff546c4bfc614873b50
This commit is contained in:
18
build.js
18
build.js
@@ -65,7 +65,7 @@
|
|||||||
var dependencyMap = {
|
var dependencyMap = {
|
||||||
'after': [],
|
'after': [],
|
||||||
'bind': ['isFunction'],
|
'bind': ['isFunction'],
|
||||||
'bindAll': ['bind', 'forIn', 'isFunction'],
|
'bindAll': ['bind', 'functions'],
|
||||||
'chain': ['mixin'],
|
'chain': ['mixin'],
|
||||||
'clone': ['extend', 'forEach', 'forOwn', 'isArguments', 'isPlainObject'],
|
'clone': ['extend', 'forEach', 'forOwn', 'isArguments', 'isPlainObject'],
|
||||||
'compact': [],
|
'compact': [],
|
||||||
@@ -164,16 +164,14 @@
|
|||||||
var iteratorOptions = [
|
var iteratorOptions = [
|
||||||
'args',
|
'args',
|
||||||
'array',
|
'array',
|
||||||
'arrayBranch',
|
'arrayLoop',
|
||||||
'beforeLoop',
|
|
||||||
'bottom',
|
'bottom',
|
||||||
'firstArg',
|
'firstArg',
|
||||||
'hasDontEnumBug',
|
'hasDontEnumBug',
|
||||||
'inLoop',
|
|
||||||
'init',
|
|
||||||
'isKeysFast',
|
'isKeysFast',
|
||||||
|
'loop',
|
||||||
'object',
|
'object',
|
||||||
'objectBranch',
|
'objectLoop',
|
||||||
'noArgsEnum',
|
'noArgsEnum',
|
||||||
'noCharByIndex',
|
'noCharByIndex',
|
||||||
'shadowed',
|
'shadowed',
|
||||||
@@ -676,10 +674,6 @@
|
|||||||
return removeVar(source, 'isKeysFast')
|
return removeVar(source, 'isKeysFast')
|
||||||
// remove optimized branch in `iteratorTemplate`
|
// remove optimized branch in `iteratorTemplate`
|
||||||
.replace(/(?: *\/\/.*\n)* *'( *)<% *if *\(isKeysFast[\s\S]+?'\1<% *} *else *\{ *%>.+\n([\s\S]+?) *'\1<% *} *%>.+/, "'\\n' +\n$2")
|
.replace(/(?: *\/\/.*\n)* *'( *)<% *if *\(isKeysFast[\s\S]+?'\1<% *} *else *\{ *%>.+\n([\s\S]+?) *'\1<% *} *%>.+/, "'\\n' +\n$2")
|
||||||
// remove `isKeysFast` from `beforeLoop.object` of `_.map`
|
|
||||||
.replace(/=\s*'\s*\+\s*\(isKeysFast.+/, "= []'")
|
|
||||||
// remove `isKeysFast` from `inLoop.object` of `_.map`
|
|
||||||
.replace(/'\s*\+\s*\(isKeysFast[^)]+?\)\s*\+\s*'/g, '.push')
|
|
||||||
// remove data object property assignment in `createIterator`
|
// remove data object property assignment in `createIterator`
|
||||||
.replace(/ *'isKeysFast':.+\n/, '');
|
.replace(/ *'isKeysFast':.+\n/, '');
|
||||||
}
|
}
|
||||||
@@ -791,9 +785,7 @@
|
|||||||
// replace `useStrict` branch in `value` with hard-coded option
|
// replace `useStrict` branch in `value` with hard-coded option
|
||||||
.replace(/(?: *\/\/.*\n)*(\s*)' *<% *if *\(useStrict\).+/, value ? "$1'\\'use strict\\';\\n' +" : '')
|
.replace(/(?: *\/\/.*\n)*(\s*)' *<% *if *\(useStrict\).+/, value ? "$1'\\'use strict\\';\\n' +" : '')
|
||||||
// remove `useStrict` from iterator options
|
// remove `useStrict` from iterator options
|
||||||
.replace(/ *'useStrict': *false,\n/g, '')
|
.replace(/(?:,\s*'useStrict':[^,]+?\n| *'useStrict':[^,]+,\n)/g, '');
|
||||||
// remove `useStrict` data object property assignment in `createIterator`
|
|
||||||
.replace(/ *'useStrict':.+\n/, '');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
// lesser used variables
|
// lesser used variables
|
||||||
'bind',
|
'bind',
|
||||||
'funcs',
|
'funcs',
|
||||||
|
'functions',
|
||||||
'isArguments',
|
'isArguments',
|
||||||
'isFunction',
|
'isFunction',
|
||||||
'objectTypes'
|
'objectTypes'
|
||||||
@@ -41,16 +42,14 @@
|
|||||||
var iteratorOptions = [
|
var iteratorOptions = [
|
||||||
'args',
|
'args',
|
||||||
'array',
|
'array',
|
||||||
'arrayBranch',
|
'arrayLoop',
|
||||||
'beforeLoop',
|
|
||||||
'bottom',
|
'bottom',
|
||||||
'firstArg',
|
'firstArg',
|
||||||
'hasDontEnumBug',
|
'hasDontEnumBug',
|
||||||
'inLoop',
|
|
||||||
'init',
|
|
||||||
'isKeysFast',
|
'isKeysFast',
|
||||||
|
'loop',
|
||||||
'object',
|
'object',
|
||||||
'objectBranch',
|
'objectLoop',
|
||||||
'noArgsEnum',
|
'noArgsEnum',
|
||||||
'noCharByIndex',
|
'noCharByIndex',
|
||||||
'shadowed',
|
'shadowed',
|
||||||
@@ -360,9 +359,9 @@
|
|||||||
else {
|
else {
|
||||||
// minify property name strings
|
// minify property name strings
|
||||||
modified = modified.replace(RegExp("'" + property + "'", 'g'), "'" + minNames[index] + "'");
|
modified = modified.replace(RegExp("'" + property + "'", 'g'), "'" + minNames[index] + "'");
|
||||||
// minify property names in regexes and accessors
|
// minify property names in accessors
|
||||||
if (isCreateIterator) {
|
if (isCreateIterator) {
|
||||||
modified = modified.replace(RegExp('([\\.|/])' + property + '\\b' , 'g'), '$1' + minNames[index]);
|
modified = modified.replace(RegExp('\\.' + property + '\\b' , 'g'), '.' + minNames[index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
114
lodash.js
114
lodash.js
@@ -310,16 +310,16 @@
|
|||||||
// the `iteratee` may be reassigned by the `top` snippet
|
// the `iteratee` may be reassigned by the `top` snippet
|
||||||
'var index, value, iteratee = <%= firstArg %>, ' +
|
'var index, value, iteratee = <%= firstArg %>, ' +
|
||||||
// assign the `result` variable an initial value
|
// assign the `result` variable an initial value
|
||||||
'result = <%= init || firstArg %>;\n' +
|
'result = <%= firstArg %>;\n' +
|
||||||
// exit early if the first argument is falsey
|
// exit early if the first argument is falsey
|
||||||
'if (!<%= firstArg %>) return result;\n' +
|
'if (!<%= firstArg %>) return result;\n' +
|
||||||
// add code before the iteration branches
|
// add code before the iteration branches
|
||||||
'<%= top %>;\n' +
|
'<%= top %>;\n' +
|
||||||
|
|
||||||
// the following branch is for iterating arrays and array-like objects
|
// the following branch is for iterating arrays and array-like objects
|
||||||
'<% if (arrayBranch) { %>' +
|
'<% if (arrayLoop) { %>' +
|
||||||
'var length = iteratee.length; index = -1;' +
|
'var length = iteratee.length; index = -1;' +
|
||||||
' <% if (objectBranch) { %>\nif (length === +length) {<% } %>' +
|
' <% if (objectLoop) { %>\nif (typeof length == \'number\') {<% } %>' +
|
||||||
|
|
||||||
// add support for accessing string characters by index if needed
|
// add support for accessing string characters by index if needed
|
||||||
' <% if (noCharByIndex) { %>\n' +
|
' <% if (noCharByIndex) { %>\n' +
|
||||||
@@ -328,17 +328,16 @@
|
|||||||
' }' +
|
' }' +
|
||||||
' <% } %>\n' +
|
' <% } %>\n' +
|
||||||
|
|
||||||
' <%= arrayBranch.beforeLoop %>;\n' +
|
|
||||||
' while (++index < length) {\n' +
|
' while (++index < length) {\n' +
|
||||||
' value = iteratee[index];\n' +
|
' value = iteratee[index];\n' +
|
||||||
' <%= arrayBranch.inLoop %>\n' +
|
' <%= arrayLoop %>\n' +
|
||||||
' }' +
|
' }' +
|
||||||
' <% if (objectBranch) { %>\n}<% } %>' +
|
' <% if (objectLoop) { %>\n}<% } %>' +
|
||||||
'<% } %>' +
|
'<% } %>' +
|
||||||
|
|
||||||
// the following branch is for iterating an object's own/inherited properties
|
// the following branch is for iterating an object's own/inherited properties
|
||||||
'<% if (objectBranch) { %>' +
|
'<% if (objectLoop) { %>' +
|
||||||
' <% if (arrayBranch) { %>\nelse {' +
|
' <% if (arrayLoop) { %>\nelse {' +
|
||||||
|
|
||||||
// add support for iterating over `arguments` objects if needed
|
// add support for iterating over `arguments` objects if needed
|
||||||
' <% } else if (noArgsEnum) { %>\n' +
|
' <% } else if (noArgsEnum) { %>\n' +
|
||||||
@@ -346,7 +345,7 @@
|
|||||||
' if (length && isArguments(iteratee)) {\n' +
|
' if (length && isArguments(iteratee)) {\n' +
|
||||||
' while (++index < length) {\n' +
|
' while (++index < length) {\n' +
|
||||||
' value = iteratee[index += \'\'];\n' +
|
' value = iteratee[index += \'\'];\n' +
|
||||||
' <%= objectBranch.inLoop %>\n' +
|
' <%= objectLoop %>\n' +
|
||||||
' }\n' +
|
' }\n' +
|
||||||
' } else {' +
|
' } else {' +
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
@@ -367,18 +366,16 @@
|
|||||||
' var ownIndex = -1,\n' +
|
' var ownIndex = -1,\n' +
|
||||||
' ownProps = objectTypes[typeof iteratee] ? nativeKeys(iteratee) : [],\n' +
|
' ownProps = objectTypes[typeof iteratee] ? nativeKeys(iteratee) : [],\n' +
|
||||||
' length = ownProps.length;\n\n' +
|
' length = ownProps.length;\n\n' +
|
||||||
' <%= objectBranch.beforeLoop %>;\n' +
|
|
||||||
' while (++ownIndex < length) {\n' +
|
' while (++ownIndex < length) {\n' +
|
||||||
' index = ownProps[ownIndex];\n' +
|
' index = ownProps[ownIndex];\n' +
|
||||||
' <% if (!hasDontEnumBug) { %>if (!(skipProto && index == \'prototype\')) {\n <% } %>' +
|
' <% if (!hasDontEnumBug) { %>if (!(skipProto && index == \'prototype\')) {\n <% } %>' +
|
||||||
' value = iteratee[index];\n' +
|
' value = iteratee[index];\n' +
|
||||||
' <%= objectBranch.inLoop %>\n' +
|
' <%= objectLoop %>\n' +
|
||||||
' <% if (!hasDontEnumBug) { %>}\n<% } %>' +
|
' <% if (!hasDontEnumBug) { %>}\n<% } %>' +
|
||||||
' }' +
|
' }' +
|
||||||
|
|
||||||
// else using a for-in loop
|
// else using a for-in loop
|
||||||
' <% } else { %>\n' +
|
' <% } else { %>\n' +
|
||||||
' <%= objectBranch.beforeLoop %>;\n' +
|
|
||||||
' for (index in iteratee) {<%' +
|
' for (index in iteratee) {<%' +
|
||||||
' if (!hasDontEnumBug || useHas) { %>\n if (<%' +
|
' if (!hasDontEnumBug || useHas) { %>\n if (<%' +
|
||||||
' if (!hasDontEnumBug) { %>!(skipProto && index == \'prototype\')<% }' +
|
' if (!hasDontEnumBug) { %>!(skipProto && index == \'prototype\')<% }' +
|
||||||
@@ -387,7 +384,7 @@
|
|||||||
' %>) {' +
|
' %>) {' +
|
||||||
' <% } %>\n' +
|
' <% } %>\n' +
|
||||||
' value = iteratee[index];\n' +
|
' value = iteratee[index];\n' +
|
||||||
' <%= objectBranch.inLoop %>;' +
|
' <%= objectLoop %>;' +
|
||||||
' <% if (!hasDontEnumBug || useHas) { %>\n }<% } %>\n' +
|
' <% if (!hasDontEnumBug || useHas) { %>\n }<% } %>\n' +
|
||||||
' }' +
|
' }' +
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
@@ -405,11 +402,11 @@
|
|||||||
' %>!(ctor && ctor.prototype === iteratee) && <%' +
|
' %>!(ctor && ctor.prototype === iteratee) && <%' +
|
||||||
' } %>hasOwnProperty.call(iteratee, index)) {\n' +
|
' } %>hasOwnProperty.call(iteratee, index)) {\n' +
|
||||||
' value = iteratee[index];\n' +
|
' value = iteratee[index];\n' +
|
||||||
' <%= objectBranch.inLoop %>\n' +
|
' <%= objectLoop %>\n' +
|
||||||
' }' +
|
' }' +
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
' <% } %>' +
|
' <% } %>' +
|
||||||
' <% if (arrayBranch || noArgsEnum) { %>\n}<% } %>' +
|
' <% if (arrayLoop || noArgsEnum) { %>\n}<% } %>' +
|
||||||
'<% } %>\n' +
|
'<% } %>\n' +
|
||||||
|
|
||||||
// add code to the bottom of the iteration function
|
// add code to the bottom of the iteration function
|
||||||
@@ -424,7 +421,7 @@
|
|||||||
var forEachIteratorOptions = {
|
var forEachIteratorOptions = {
|
||||||
'args': 'collection, callback, thisArg',
|
'args': 'collection, callback, thisArg',
|
||||||
'top': 'callback = createCallback(callback, thisArg)',
|
'top': 'callback = createCallback(callback, thisArg)',
|
||||||
'inLoop': 'if (callback(value, index, collection) === false) return result'
|
'loop': 'if (callback(value, index, collection) === false) return result'
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Reusable iterator options for `defaults`, and `extend` */
|
/** Reusable iterator options for `defaults`, and `extend` */
|
||||||
@@ -435,15 +432,14 @@
|
|||||||
'top':
|
'top':
|
||||||
'for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
|
'for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) {\n' +
|
||||||
' if (iteratee = arguments[argsIndex]) {',
|
' if (iteratee = arguments[argsIndex]) {',
|
||||||
'inLoop': 'result[index] = value',
|
'objectLoop': 'result[index] = value',
|
||||||
'bottom': ' }\n}'
|
'bottom': ' }\n}'
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Reusable iterator options for `forIn` and `forOwn` */
|
/** Reusable iterator options for `forIn` and `forOwn` */
|
||||||
var forOwnIteratorOptions = {
|
var forOwnIteratorOptions = {
|
||||||
'inLoop': {
|
'loop': null,
|
||||||
'object': forEachIteratorOptions.inLoop
|
'objectLoop': forEachIteratorOptions.loop
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
@@ -594,48 +590,35 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates compiled iteration functions. The iteration function will be created
|
* Creates compiled iteration functions.
|
||||||
* to iterate over only objects if the first argument of `options.args` is
|
|
||||||
* "object" or `options.inLoop.array` is falsey.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Object} [options1, options2, ...] The compile options objects.
|
* @param {Object} [options1, options2, ...] The compile options objects.
|
||||||
*
|
*
|
||||||
* useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
|
* useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
|
||||||
*
|
|
||||||
* useStrict - A boolean to specify including the "use strict" directive.
|
* useStrict - A boolean to specify including the "use strict" directive.
|
||||||
*
|
|
||||||
* args - A string of comma separated arguments the iteration function will accept.
|
* args - A string of comma separated arguments the iteration function will accept.
|
||||||
*
|
|
||||||
* init - A string to specify the initial value of the `result` variable.
|
|
||||||
*
|
|
||||||
* top - A string of code to execute before the iteration branches.
|
* top - A string of code to execute before the iteration branches.
|
||||||
*
|
* arrayLoop - A string of code to execute in the array loop.
|
||||||
* beforeLoop - A string or object containing an "array" or "object" property
|
* objectLoop - A string of code to execute in the object loop.
|
||||||
* of code to execute before the array or object loops.
|
* loop - A string of code to execute in the array or object loops.
|
||||||
*
|
* bottom - A string of code to execute after the iteration branches.
|
||||||
* inLoop - A string or object containing an "array" or "object" property
|
|
||||||
* of code to execute in the array or object loops.
|
|
||||||
*
|
|
||||||
* bottom - A string of code to execute after the iteration branches but
|
|
||||||
* before the `result` is returned.
|
|
||||||
*
|
*
|
||||||
* @returns {Function} Returns the compiled function.
|
* @returns {Function} Returns the compiled function.
|
||||||
*/
|
*/
|
||||||
function createIterator() {
|
function createIterator() {
|
||||||
var data = {
|
var data = {
|
||||||
|
'arrayLoop': '',
|
||||||
'bottom': '',
|
'bottom': '',
|
||||||
'hasDontEnumBug': hasDontEnumBug,
|
'hasDontEnumBug': hasDontEnumBug,
|
||||||
'init': '',
|
|
||||||
'isKeysFast': isKeysFast,
|
'isKeysFast': isKeysFast,
|
||||||
|
'objectLoop': '',
|
||||||
'noArgsEnum': noArgsEnum,
|
'noArgsEnum': noArgsEnum,
|
||||||
'noCharByIndex': noCharByIndex,
|
'noCharByIndex': noCharByIndex,
|
||||||
'shadowed': shadowed,
|
'shadowed': shadowed,
|
||||||
'top': '',
|
'top': '',
|
||||||
'useHas': true,
|
'useHas': true,
|
||||||
'useStrict': isStrictFast,
|
'useStrict': isStrictFast
|
||||||
'arrayBranch': { 'beforeLoop': '' },
|
|
||||||
'objectBranch': { 'beforeLoop': '' }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var object,
|
var object,
|
||||||
@@ -645,13 +628,9 @@
|
|||||||
while (object = arguments[++index]) {
|
while (object = arguments[++index]) {
|
||||||
for (var prop in object) {
|
for (var prop in object) {
|
||||||
var value = object[prop];
|
var value = object[prop];
|
||||||
// keep this regexp explicit for the build pre-process
|
if (prop == 'loop') {
|
||||||
if (/beforeLoop|inLoop/.test(prop)) {
|
data.arrayLoop = value;
|
||||||
if (typeof value == 'string') {
|
data.objectLoop = value;
|
||||||
value = { 'array': value, 'object': value };
|
|
||||||
}
|
|
||||||
data.arrayBranch[prop] = value.array;
|
|
||||||
data.objectBranch[prop] = value.object;
|
|
||||||
} else {
|
} else {
|
||||||
data[prop] = value;
|
data[prop] = value;
|
||||||
}
|
}
|
||||||
@@ -659,21 +638,17 @@
|
|||||||
}
|
}
|
||||||
// set additional template `data` properties
|
// set additional template `data` properties
|
||||||
var args = data.args;
|
var args = data.args;
|
||||||
if ((data.firstArg = /^[^,]+/.exec(args)[0]) != 'collection' || !data.arrayBranch.inLoop) {
|
data.firstArg = /^[^,]+/.exec(args)[0];
|
||||||
data.arrayBranch = null;
|
|
||||||
}
|
|
||||||
if (!data.objectBranch.inLoop) {
|
|
||||||
data.objectBranch = null;
|
|
||||||
}
|
|
||||||
// create the function factory
|
// create the function factory
|
||||||
var factory = Function(
|
var factory = Function(
|
||||||
'bind, createCallback, forIn, hasOwnProperty, isArguments, isFunction, ' +
|
'bind, createCallback, functions, hasOwnProperty, isArguments, isFunction, ' +
|
||||||
'objectTypes, nativeKeys, propertyIsEnumerable, stringClass, toString',
|
'objectTypes, nativeKeys, propertyIsEnumerable, stringClass, toString',
|
||||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||||
);
|
);
|
||||||
// return the compiled function
|
// return the compiled function
|
||||||
return factory(
|
return factory(
|
||||||
bind, createCallback, forIn, hasOwnProperty, isArguments, isFunction,
|
bind, createCallback, functions, hasOwnProperty, isArguments, isFunction,
|
||||||
objectTypes, nativeKeys, propertyIsEnumerable, stringClass, toString
|
objectTypes, nativeKeys, propertyIsEnumerable, stringClass, toString
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1082,7 +1057,7 @@
|
|||||||
* // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' }
|
* // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' }
|
||||||
*/
|
*/
|
||||||
var defaults = createIterator(extendIteratorOptions, {
|
var defaults = createIterator(extendIteratorOptions, {
|
||||||
'inLoop': 'if (result[index] == null) ' + extendIteratorOptions.inLoop
|
'objectLoop': 'if (result[index] == null) ' + extendIteratorOptions.objectLoop
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1250,7 +1225,7 @@
|
|||||||
|
|
||||||
if ((className == arrayClass || className == stringClass ||
|
if ((className == arrayClass || className == stringClass ||
|
||||||
className == argsClass || (noArgsClass && isArguments(value))) ||
|
className == argsClass || (noArgsClass && isArguments(value))) ||
|
||||||
(className == objectClass && length === +length && isFunction(value.splice))) {
|
(className == objectClass && typeof length == 'number' && isFunction(value.splice))) {
|
||||||
return !length;
|
return !length;
|
||||||
}
|
}
|
||||||
forOwn(value, function() {
|
forOwn(value, function() {
|
||||||
@@ -1856,7 +1831,7 @@
|
|||||||
*/
|
*/
|
||||||
function contains(collection, target) {
|
function contains(collection, target) {
|
||||||
var length = collection ? collection.length : 0;
|
var length = collection ? collection.length : 0;
|
||||||
if (length === +length) {
|
if (typeof length == 'number') {
|
||||||
return (toString.call(collection) == stringClass
|
return (toString.call(collection) == stringClass
|
||||||
? collection.indexOf(target)
|
? collection.indexOf(target)
|
||||||
: indexOf(collection, target)
|
: indexOf(collection, target)
|
||||||
@@ -2383,7 +2358,7 @@
|
|||||||
*/
|
*/
|
||||||
function size(collection) {
|
function size(collection) {
|
||||||
var length = collection ? collection.length : 0;
|
var length = collection ? collection.length : 0;
|
||||||
return length === +length ? length : keys(collection).length;
|
return typeof length == 'number' ? length : keys(collection).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2476,8 +2451,7 @@
|
|||||||
if (!collection) {
|
if (!collection) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
var length = collection.length;
|
if (typeof collection.length == 'number') {
|
||||||
if (length === +length) {
|
|
||||||
return (noArraySliceOnStrings ? toString.call(collection) == stringClass : typeof collection == 'string')
|
return (noArraySliceOnStrings ? toString.call(collection) == stringClass : typeof collection == 'string')
|
||||||
? collection.split('')
|
? collection.split('')
|
||||||
: slice.call(collection);
|
: slice.call(collection);
|
||||||
@@ -3212,17 +3186,13 @@
|
|||||||
'args': 'object',
|
'args': 'object',
|
||||||
'top':
|
'top':
|
||||||
'var funcs = arguments,\n' +
|
'var funcs = arguments,\n' +
|
||||||
' length = funcs.length;\n' +
|
' index = funcs.length > 1 ? 0 : (funcs = functions(object), -1),\n' +
|
||||||
'if (length > 1) {\n' +
|
' length = funcs.length;' +
|
||||||
' while (--length) {\n' +
|
'while (++index < length) {\n' +
|
||||||
' index = funcs[length];\n' +
|
' value = funcs[index];\n' +
|
||||||
' result[index] = bind(result[index], result)\n' +
|
' result[value] = bind(result[value], result)\n' +
|
||||||
' }\n' +
|
|
||||||
' return result\n' +
|
|
||||||
'}\n' +
|
'}\n' +
|
||||||
'forIn(result, function(value, key) {\n' +
|
'return result'
|
||||||
' if (isFunction(value)) result[key] = bind(value, result)\n' +
|
|
||||||
'})'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
70
lodash.min.js
vendored
70
lodash.min.js
vendored
@@ -3,38 +3,38 @@
|
|||||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||||
*/
|
*/
|
||||||
;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||J),s=i?{}:e;if(i)for(n=t-1;++n<r;){var o=e[n]+"";(ht.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(e){if(i){var n=e+"";return ht.call(s,n)&&-1<j(s[n],e)}return-1<j(s,e,t)}}function u(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function a(e,t,n){function r(){var u=arguments
|
;(function(e,t){function s(e){if(e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||J),s=i?{}:e;if(i)for(n=t-1;++n<r;){var o=e[n]+"";(ht.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(e){if(i){var n=e+"";return ht.call(s,n)&&-1<j(s[n],e)}return-1<j(s,e,t)}}function u(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function a(e,t,n){function r(){var u=arguments
|
||||||
,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(vt.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&$t[typeof u]?u:a):e.apply(a,u)}var i=m(e),s=!n,o=e;return s&&(n=t),r}function f(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function l(){for(var e={e:"",g:Pt,i:"",j:Wt,m:jt,n:qt,o:ut,p:"",q:n,r:Xt,c:{d:""},l:{d:""}},t,i=-1;t=arguments[++i];)for(var s in t){var o=t[s];/d|h/.test(s)?("string"==typeof
|
,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(vt.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&$t[typeof u]?u:a):e.apply(a,u)}var i=m(e),s=!n,o=e;return s&&(n=t),r}function f(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function l(){for(var e={c:"",d:"",f:Pt,g:Wt,j:"",k:jt,l:qt,m:ut,n:"",o:n,p:Xt},t,r=-1;t=arguments[++r];)for(var i in t){var s=t[i];"h"==i?(e.c=s,e.j=s):e[i]=s}t=e.a,
|
||||||
o&&(o={b:o,k:o}),e.c[s]=o.b,e.l[s]=o.k):e[s]=o}t=e.a;if("d"!=(e.f=/^[^,]+/.exec(t)[0])||!e.c.h)e.c=r;e.l.h||(e.l=r),i="",e.r&&(i+="'use strict';"),i+="var h,u,i="+e.f+",p="+(e.i||e.f)+";if(!"+e.f+")return p;"+e.p+";",e.c&&(i+="var j=i.length;h=-1;",e.l&&(i+="if(j===+j){"),e.n&&(i+="if(t.call(i)==r){i=i.split('')}"),i+=e.c.d+";while(++h<j){u=i[h];"+e.c.h+"}",e.l&&(i+="}"));if(e.l){e.c?i+="else {":e.m&&(i+="var j=i.length;h=-1;if(j&&x(i)){while(++h<j){u=i[h+=''];"+e.l.h+"}}else {"),e.g||(i+="var q=typeof i=='function'&&o.call(i,'prototype');"
|
e.e=/^[^,]+/.exec(t)[0],r="",e.p&&(r+="'use strict';"),r+="var h,u,i="+e.e+",p="+e.e+";if(!"+e.e+")return p;"+e.n+";",e.c&&(r+="var j=i.length;h=-1;",e.j&&(r+="if(typeof j=='number'){"),e.l&&(r+="if(t.call(i)==r){i=i.split('')}"),r+="while(++h<j){u=i[h];"+e.c+"}",e.j&&(r+="}"));if(e.j){e.c?r+="else {":e.k&&(r+="var j=i.length;h=-1;if(j&&y(i)){while(++h<j){u=i[h+=''];"+e.j+"}}else {"),e.f||(r+="var q=typeof i=='function'&&o.call(i,'prototype');");if(e.g&&e.o)r+="var m=-1,n=A[typeof i]?k(i):[],j=n.length;while(++m<j){h=n[m];"
|
||||||
);if(e.j&&e.q)i+="var m=-1,n=z[typeof i]?k(i):[],j=n.length;"+e.l.d+";while(++m<j){h=n[m];",e.g||(i+="if(!(q&&h=='prototype')){"),i+="u=i[h];"+e.l.h+"",e.g||(i+="}");else{i+=e.l.d+";for(h in i){";if(!e.g||e.q)i+="if(",e.g||(i+="!(q&&h=='prototype')"),!e.g&&e.q&&(i+="&&"),e.q&&(i+="g.call(i,h)"),i+="){";i+="u=i[h];"+e.l.h+";";if(!e.g||e.q)i+="}"}i+="}";if(e.g){i+="var f=i.constructor;";for(s=0;7>s;s++)i+="h='"+e.o[s]+"';if(","constructor"==e.o[s]&&(i+="!(f&&f.prototype===i)&&"),i+="g.call(i,h)){u=i[h];"+
|
,e.f||(r+="if(!(q&&h=='prototype')){"),r+="u=i[h];"+e.j+"",e.f||(r+="}");else{r+="for(h in i){";if(!e.f||e.o)r+="if(",e.f||(r+="!(q&&h=='prototype')"),!e.f&&e.o&&(r+="&&"),e.o&&(r+="g.call(i,h)"),r+="){";r+="u=i[h];"+e.j+";";if(!e.f||e.o)r+="}"}r+="}";if(e.f){r+="var f=i.constructor;";for(i=0;7>i;i++)r+="h='"+e.m[i]+"';if(","constructor"==e.m[i]&&(r+="!(f&&f.prototype===i)&&"),r+="g.call(i,h)){u=i[h];"+e.j+"}"}if(e.c||e.k)r+="}"}return r+=e.d+";return p",Function("v,e,x,g,y,z,A,k,o,r,t","return function("+
|
||||||
e.l.h+"}"}if(e.c||e.m)i+="}"}return i+=e.e+";return p",Function("v,e,forIn,g,x,y,z,k,o,r,t","return function("+t+"){"+i+"}")(R,f,Yt,ht,v,m,$t,wt,dt,Mt,mt)}function c(e){return"\\"+Jt[e]}function h(e){return nn[e]}function p(){}function d(e){return rn[e]}function v(e){return mt.call(e)==Tt}function m(e){return"function"==typeof e}function g(e){var t=i;if(!e||"object"!=typeof e||v(e))return t;var n=e.constructor;return(!Rt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!m(n)||n instanceof
|
t+"){"+r+"}")(R,f,w,ht,v,m,$t,wt,dt,Mt,mt)}function c(e){return"\\"+Jt[e]}function h(e){return nn[e]}function p(){}function d(e){return rn[e]}function v(e){return mt.call(e)==Tt}function m(e){return"function"==typeof e}function g(e){var t=i;if(!e||"object"!=typeof e||v(e))return t;var n=e.constructor;return(!Rt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!m(n)||n instanceof n)?Bt?(Yt(e,function(e,n,r){return t=!ht.call(r,n),i}),t===i):(Yt(e,function(e,n){t=n}),t===i||ht.call(e,t)):
|
||||||
n)?Bt?(Yt(e,function(e,n,r){return t=!ht.call(r,n),i}),t===i):(Yt(e,function(e,n){t=n}),t===i||ht.call(e,t)):t}function y(e){var t=[];return Zt(e,function(e,n){t.push(n)}),t}function b(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=$t[typeof e]){var u=mt.call(e);if(!Vt[u]||Ft&&v(e))return e;var a=u==Nt,n=a||(u==At?tn(e):n)}if(!n||!t)return n?a?vt.call(e):on({},e):e;n=e.constructor;switch(u){case Ct:case kt:return new n(+e);case Lt:case Mt:return new n(e);case Ot:return n(e.source,tt.exec(e))}s||(s=[])
|
t}function y(e){var t=[];return Zt(e,function(e,n){t.push(n)}),t}function b(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=$t[typeof e]){var u=mt.call(e);if(!Vt[u]||Ft&&v(e))return e;var a=u==Nt,n=a||(u==At?tn(e):n)}if(!n||!t)return n?a?vt.call(e):on({},e):e;n=e.constructor;switch(u){case Ct:case kt:return new n(+e);case Lt:case Mt:return new n(e);case Ot:return n(e.source,tt.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?an
|
||||||
,o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?an:Zt)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return Yt(e,function(e,n){m(e)&&t.push(n)}),t.sort()}function E(e){var t={};return Zt(e,function(e,n){t[e]=n}),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=mt.call(e);if(u!=mt.call(t))return i;switch(u){case Ct:case kt:return+e==+t;case Lt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ot
|
:Zt)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return Yt(e,function(e,n){m(e)&&t.push(n)}),t.sort()}function E(e){var t={};return Zt(e,function(e,n){t[e]=n}),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=mt.call(e);if(u!=mt.call(t))return i;switch(u){case Ct:case kt:return+e==+t;case Lt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Ot:case Mt:return e==t+""}var a=u==Nt||u==Tt;if(Ft&&!a&&(a=v(e))&&!v(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__
|
||||||
:case Mt:return e==t+""}var a=u==Nt||u==Tt;if(Ft&&!a&&(a=v(e))&&!v(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=At||Rt&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!m(u)||!(u instanceof u&&m(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(
|
)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=At||Rt&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+"")))return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!m(u)||!(u instanceof u&&m(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var u=-1,f=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=S(e[l],t[l],s,o)););return f}for(var c in e)if(ht.call(e,c)&&(l++,!
|
||||||
t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=S(e[l],t[l],s,o)););return f}for(var c in e)if(ht.call(e,c)&&(l++,!ht.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(ht.call(t,c)&&!(l--))return i;if(Pt)for(;7>++u;)if(c=ut[u],ht.call(e,c)&&(!ht.call(t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e,t,n){var i=arguments,s=0,o=2,a=i[3],f=i[4];n!=u&&(a=[],f=[],o=i.length);for(;++s<o;)Zt(i[s],function(t,n){var i,s,o;if(t&&((s=en(t))||tn(t))){for(var l=a.length;l--;)if(i=a[l]==t)break;i?e[
|
ht.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(ht.call(t,c)&&!(l--))return i;if(Pt)for(;7>++u;)if(c=ut[u],ht.call(e,c)&&(!ht.call(t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e,t,n){var i=arguments,s=0,o=2,a=i[3],f=i[4];n!=u&&(a=[],f=[],o=i.length);for(;++s<o;)Zt(i[s],function(t,n){var i,s,o;if(t&&((s=en(t))||tn(t))){for(var l=a.length;l--;)if(i=a[l]==t)break;i?e[n]=f[l]:(a.push(t),f.push(o=(o=e[n],s)?en(o)?o:[]:tn(o)?o:{}),e[n]=x(o,t,u,a,f))}else t!=r&&(e[n]=t)});return e}function T
|
||||||
n]=f[l]:(a.push(t),f.push(o=(o=e[n],s)?en(o)?o:[]:tn(o)?o:{}),e[n]=x(o,t,u,a,f))}else t!=r&&(e[n]=t)});return e}function T(e){var t=[];return Zt(e,function(e){t.push(e)}),t}function N(e,t){var n=e?e.length:0;return n===+n?-1<(mt.call(e)==Mt?e.indexOf(t):j(e,t)):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=f(t,r);return an(e,function(e,n,r){return i=t(e,n,r)}),!!i}function k(e,t,n){var r=[],t=f(t,n);return an(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=f(t,r);
|
(e){var t=[];return Zt(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (e?e.length:0)?-1<(mt.call(e)==Mt?e.indexOf(t):j(e,t)):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=f(t,r);return an(e,function(e,n,r){return i=t(e,n,r)}),!!i}function k(e,t,n){var r=[],t=f(t,n);return an(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=f(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,s=Array(i),t=f(t,n)
|
||||||
return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,s=Array(i),t=f(t,n);if(en(e))for(;++r<i;)s[r]=t(e[r],r,e);else an(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function O(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||s!==+s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function M(e,t){var n=[];return an(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var s=3>arguments.length,t=f(t,r);
|
;if(en(e))for(;++r<i;)s[r]=t(e[r],r,e);else an(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function O(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||s!==+s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function M(e,t){var n=[];return an(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var s=3>arguments.length,t=f(t,r);return an(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function D(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length
|
||||||
return an(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function D(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if(o!==+o)var a=un(e),o=a.length;else qt&&mt.call(e)==Mt&&(s=e.split(""));return an(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function P(e,t,n){var r,t=f(t,n);return an(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:vt.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];en(s)?pt.apply
|
;if(o!==+o)var a=un(e),o=a.length;else qt&&mt.call(e)==Mt&&(s=e.split(""));return an(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function P(e,t,n){var r,t=f(t,n);return an(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:vt.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];en(s)?pt.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Et(0,i+n):n||0
|
||||||
(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Et(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?vt.call(e,t==r||n?1:t):[]}function I(e,t,n,r){var i=0,s=e?e.length:i;if(n){n=f(n,r);for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=r;return i}function q(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);
|
)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?vt.call(e,t==r||n?1:t):[]}function I(e,t,n,r){var i=0,s=e?e.length:i;if(n){n=f(n,r);for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=r;return i}function q(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n=f(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>j(a,r))a.push(r),u.push(e[s]);return u}function R(e,t)
|
||||||
for(n=f(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>j(a,r))a.push(r),u.push(e[s]);return u}function R(e,t){return zt||gt&&2<arguments.length?gt.call.apply(gt,arguments):a(e,t,vt.call(arguments,2))}function U(e){return e}function z(e){an(w(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&pt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports&&("object"==typeof
|
{return zt||gt&&2<arguments.length?gt.call.apply(gt,arguments):a(e,t,vt.call(arguments,2))}function U(e){return e}function z(e){an(w(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&pt.apply(e,arguments),e=r.apply(s,e),this.__chain__&&(e=new s(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),X=Array.prototype,V=Object.prototype,$=0,
|
||||||
global&&global&&global==global.global&&(e=global),exports),X=Array.prototype,V=Object.prototype,$=0,J=30,K=e._,Q=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,G=/&(?:amp|lt|gt|quot|#x27);/g,Y=/\b__p\+='';/g,Z=/\b(__p\+=)''\+/g,et=/(__e\(.*?\)|\b__t\))\+'';/g,tt=/\w*$/,nt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,rt=RegExp("^"+(V.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),it=/($^)/,st=/[&<>"']/g,ot=/['\n\r\t\u2028\u2029\\]/g
|
J=30,K=e._,Q=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,G=/&(?:amp|lt|gt|quot|#x27);/g,Y=/\b__p\+='';/g,Z=/\b(__p\+=)''\+/g,et=/(__e\(.*?\)|\b__t\))\+'';/g,tt=/\w*$/,nt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,rt=RegExp("^"+(V.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),it=/($^)/,st=/[&<>"']/g,ot=/['\n\r\t\u2028\u2029\\]/g,ut="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf"
|
||||||
,ut="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),at=Math.ceil,ft=X.concat,lt=Math.floor,ct=rt.test(ct=Object.getPrototypeOf)&&ct,ht=V.hasOwnProperty,pt=X.push,dt=V.propertyIsEnumerable,vt=X.slice,mt=V.toString,gt=rt.test(gt=vt.bind)&>,yt=rt.test(yt=Array.isArray)&&yt,bt=e.isFinite,wt=rt.test(wt=Object.keys)&&wt,Et=Math.max,St=Math.min,xt=Math.random,Tt="[object Arguments]",Nt="[object Array]",Ct="[object Boolean]",kt="[object Date]",
|
.split(" "),at=Math.ceil,ft=X.concat,lt=Math.floor,ct=rt.test(ct=Object.getPrototypeOf)&&ct,ht=V.hasOwnProperty,pt=X.push,dt=V.propertyIsEnumerable,vt=X.slice,mt=V.toString,gt=rt.test(gt=vt.bind)&>,yt=rt.test(yt=Array.isArray)&&yt,bt=e.isFinite,wt=rt.test(wt=Object.keys)&&wt,Et=Math.max,St=Math.min,xt=Math.random,Tt="[object Arguments]",Nt="[object Array]",Ct="[object Boolean]",kt="[object Date]",Lt="[object Number]",At="[object Object]",Ot="[object RegExp]",Mt="[object String]",_t=e.clearTimeout
|
||||||
Lt="[object Number]",At="[object Object]",Ot="[object RegExp]",Mt="[object String]",_t=e.clearTimeout,Dt=e.setTimeout,Pt,Ht,Bt,jt=n;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);for(r in arguments)jt=!r;Pt=4>(n+"").length,Bt="x"!=n[0],Ht=(n.splice.call(t,0,1),t[0])})(1);var Ft=!v(arguments),It="x"!=vt.call("x")[0],qt="xx"!="x"[0]+Object("x")[0];try{var Rt=("[object Object]",mt.call(e.document||0)==At)}catch(Ut){}var zt=gt&&/\n|Opera/
|
,Dt=e.setTimeout,Pt,Ht,Bt,jt=n;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);for(r in arguments)jt=!r;Pt=4>(n+"").length,Bt="x"!=n[0],Ht=(n.splice.call(t,0,1),t[0])})(1);var Ft=!v(arguments),It="x"!=vt.call("x")[0],qt="xx"!="x"[0]+Object("x")[0];try{var Rt=("[object Object]",mt.call(e.document||0)==At)}catch(Ut){}var zt=gt&&/\n|Opera/.test(gt+mt.call(e.opera)),Wt=wt&&/^.+$|true/.test(wt+!!e.attachEvent),Xt=!zt,Vt={};Vt[Tt]=Vt["[object Function]"
|
||||||
.test(gt+mt.call(e.opera)),Wt=wt&&/^.+$|true/.test(wt+!!e.attachEvent),Xt=!zt,Vt={};Vt[Tt]=Vt["[object Function]"]=i,Vt[Nt]=Vt[Ct]=Vt[kt]=Vt[Lt]=Vt[At]=Vt[Ot]=Vt[Mt]=n;var $t={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Jt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Kt={a:"d,c,s",p:"c=e(c,s)",h:"if(c(u,h,d)===false)return p"
|
]=i,Vt[Nt]=Vt[Ct]=Vt[kt]=Vt[Lt]=Vt[At]=Vt[Ot]=Vt[Mt]=n;var $t={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Jt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var Kt={a:"d,c,s",n:"c=e(c,s)",h:"if(c(u,h,d)===false)return p"},Qt={o:i,p:i,a:"l",n:"for(var a=1,b=arguments.length;a<b;a++){if(i=arguments[a]){",j:"p[h]=u",d:"}}"
|
||||||
},Qt={q:i,r:i,a:"l",p:"for(var a=1,b=arguments.length;a<b;a++){if(i=arguments[a]){",h:"p[h]=u",e:"}}"},Gt={h:{k:Kt.h}},Yt=l(Kt,Gt,{q:i}),Zt=l(Kt,Gt);Ft&&(v=function(e){return e?ht.call(e,"callee"):i});var en=yt||function(e){return mt.call(e)==Nt};m(/x/)&&(m=function(e){return"[object Function]"==mt.call(e)});var tn=ct?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=ct(t))&&ct(n);return n?e==n||ct(e)==n&&!v(e):g(e)}:g,nn={"&":"&","<":"<",">":">",'"'
|
},Gt={h:r,j:Kt.h},Yt=l(Kt,Gt,{o:i}),Zt=l(Kt,Gt);Ft&&(v=function(e){return e?ht.call(e,"callee"):i});var en=yt||function(e){return mt.call(e)==Nt};m(/x/)&&(m=function(e){return"[object Function]"==mt.call(e)});var tn=ct?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=ct(t))&&ct(n);return n?e==n||ct(e)==n&&!v(e):g(e)}:g,nn={"&":"&","<":"<",">":">",'"':""","'":"'"},rn=E(nn),sn=l(Qt,{j:"if(p[h]==null)"+Qt.j}),on=l(Qt),un=wt?function(e){var t=typeof
|
||||||
:""","'":"'"},rn=E(nn),sn=l(Qt,{h:"if(p[h]==null)"+Qt.h}),on=l(Qt),un=wt?function(e){var t=typeof e;return"function"==t&&dt.call(e,"prototype")?y(e):e&&$t[t]?wt(e):[]}:y,an=l(Kt),fn=l({r:i,a:"l",p:"var w=arguments,j=w.length;if(j>1){while(--j){h=w[j];p[h]=v(p[h],p)}return p}forIn(p,function(u,key){if(y(u))p[key]=v(u,p)})"});s.VERSION="0.8.2",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=R,s.bindAll=fn,s.chain=function(e){return e=new s(
|
e;return"function"==t&&dt.call(e,"prototype")?y(e):e&&$t[t]?wt(e):[]}:y,an=l(Kt),fn=l({p:i,a:"l",n:"var w=arguments,h=w.length>1?0:(w=x(l),-1),j=w.length;while(++h<j){u=w[h];p[u]=v(p[u],p)}return p"});s.VERSION="0.8.2",s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=R,s.bindAll=fn,s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=b,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=
|
||||||
e),e.__chain__=n,e},s.clone=b,s.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},s.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=N,s.countBy=function(e,t,n){var r={},t=f(t,n);return an(e,function(e,n,i){n=t(e,n,i),ht.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments
|
function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},s.contains=N,s.countBy=function(e,t,n){var r={},t=f(t,n);return an(e,function(e,n,i){n=t(e,n,i),ht.call(r,n)?r[n]++:r[n]=1}),r},s.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,_t(a),a=Dt(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=sn,s.defer=function(e){var n=vt.call(arguments,1);return Dt(function(){return e
|
||||||
,u=this,_t(a),a=Dt(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=sn,s.defer=function(e){var n=vt.call(arguments,1);return Dt(function(){return e.apply(t,n)},1)},s.delay=function(e,n){var r=vt.call(arguments,2);return Dt(function(){return e.apply(t,r)},n)},s.difference=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=ft.apply(X,arguments),i=o(i,r);++n<r;){var s=e[n];i(s)||t.push(s)}return t},s.escape=function(e){return e==r?"":(e+"").replace(st,h)},s.every=C,s.extend=on,s.filter=k,s.find=L,
|
.apply(t,n)},1)},s.delay=function(e,n){var r=vt.call(arguments,2);return Dt(function(){return e.apply(t,r)},n)},s.difference=function(e){var t=[];if(!e)return t;for(var n=-1,r=e.length,i=ft.apply(X,arguments),i=o(i,r);++n<r;){var s=e[n];i(s)||t.push(s)}return t},s.escape=function(e){return e==r?"":(e+"").replace(st,h)},s.every=C,s.extend=on,s.filter=k,s.find=L,s.first=H,s.flatten=B,s.forEach=an,s.forIn=Yt,s.forOwn=Zt,s.functions=w,s.groupBy=function(e,t,n){var r={},t=f(t,n);return an(e,function(e
|
||||||
s.first=H,s.flatten=B,s.forEach=an,s.forIn=Yt,s.forOwn=Zt,s.functions=w,s.groupBy=function(e,t,n){var r={},t=f(t,n);return an(e,function(e,n,i){n=t(e,n,i),(ht.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?ht.call(e,t):i},s.identity=U,s.indexOf=j,s.initial=function(e,t,n){return e?vt.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments.length,n=[],r=-1,i=e?e.length:0,s=[];e:for(;++r<i;){var u=e[r];if(0>j(s,u)){for(var a=1;a<t;a++)if(!(n[a]||(n[a]=o(arguments[
|
,n,i){n=t(e,n,i),(ht.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?ht.call(e,t):i},s.identity=U,s.indexOf=j,s.initial=function(e,t,n){return e?vt.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments.length,n=[],r=-1,i=e?e.length:0,s=[];e:for(;++r<i;){var u=e[r];if(0>j(s,u)){for(var a=1;a<t;a++)if(!(n[a]||(n[a]=o(arguments[a])))(u))continue e;s.push(u)}}return s},s.invert=E,s.invoke=function(e,t){var n=vt.call(arguments,2),r="function"==typeof t,i=[];return an
|
||||||
a])))(u))continue e;s.push(u)}}return s},s.invert=E,s.invoke=function(e,t){var n=vt.call(arguments,2),r="function"==typeof t,i=[];return an(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=v,s.isArray=en,s.isBoolean=function(e){return e===n||e===i||mt.call(e)==Ct},s.isDate=function(e){return mt.call(e)==kt},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=mt.call(e),s=e.length;return r==Nt||r==Mt||r==Tt||Ft&&v(e)||r==At&&s===+s&&m
|
(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=v,s.isArray=en,s.isBoolean=function(e){return e===n||e===i||mt.call(e)==Ct},s.isDate=function(e){return mt.call(e)==kt},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=mt.call(e),s=e.length;return r==Nt||r==Mt||r==Tt||Ft&&v(e)||r==At&&"number"==typeof s&&m(e.splice)?!s:(Zt(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return bt(e)&&mt.call(e)==Lt},s.isFunction=m
|
||||||
(e.splice)?!s:(Zt(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return bt(e)&&mt.call(e)==Lt},s.isFunction=m,s.isNaN=function(e){return mt.call(e)==Lt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return mt.call(e)==Lt},s.isObject=function(e){return e?$t[typeof e]:i},s.isPlainObject=tn,s.isRegExp=function(e){return mt.call(e)==Ot},s.isString=function(e){return mt.call(e)==Mt},s.isUndefined=function(e){return e===t},s.keys=un,s.last=function(e,t,n){if(e){var i=
|
,s.isNaN=function(e){return mt.call(e)==Lt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return mt.call(e)==Lt},s.isObject=function(e){return e?$t[typeof e]:i},s.isPlainObject=tn,s.isRegExp=function(e){return mt.call(e)==Ot},s.isString=function(e){return mt.call(e)==Mt},s.isUndefined=function(e){return e===t},s.keys=un,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:vt.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=
|
||||||
e.length;return t==r||n?e[i-1]:vt.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Et(0,r+n):St(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,vt.call(arguments,2))},s.map=A,s.max=O,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ht.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=x,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||s!==+
|
(0>n?Et(0,r+n):St(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,vt.call(arguments,2))},s.map=A,s.max=O,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ht.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=x,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||s!==+s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=z,s.noConflict=
|
||||||
s)t=f(t,n),an(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},s.mixin=z,s.noConflict=function(){return e._=K,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=f(t,n);else var s=ft.apply(X,arguments);return Yt(e,function(e,n,o){if(r?!t(e,n,o):0>j(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e
|
function(){return e._=K,this},s.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},s.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=f(t,n);else var s=ft.apply(X,arguments);return Yt(e,function(e,n,o){if(r?!t(e,n,o):0>j(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return Zt(e,function(e,n){t.push([n,e])}),t},s.partial=function(e)
|
||||||
.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return Zt(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return a(e,vt.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=ft.apply(X,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=f(t,n),Yt(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=M,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+lt(xt()*((+t||0)-e+1))},s.range=function(e,t,n)
|
{return a(e,vt.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=ft.apply(X,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=f(t,n),Yt(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=M,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+lt(xt()*((+t||0)-e+1))},s.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Et(0,at((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=_,s.reduceRight=
|
||||||
{e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Et(0,at((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=_,s.reduceRight=D,s.reject=function(e,t,n){return t=f(t,n),k(e,function(e,n,r){return!t(e,n,r)})},s.rest=F,s.result=function(e,t){var n=e?e[t]:r;return m(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return an(e,function(e){var r=lt(xt()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return t===+t?t:un(e).length},s.some=P,s.sortBy=function(e,
|
D,s.reject=function(e,t,n){return t=f(t,n),k(e,function(e,n,r){return!t(e,n,r)})},s.rest=F,s.result=function(e,t){var n=e?e[t]:r;return m(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return an(e,function(e){var r=lt(xt()*(++t+1));n[t]=n[r],n[r]=e}),n},s.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:un(e).length},s.some=P,s.sortBy=function(e,t,n){var r=[],t=f(t,n);an(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(u);e--;)r[e]=r[e].c;return r
|
||||||
t,n){var r=[],t=f(t,n);an(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(u);e--;)r[e]=r[e].c;return r},s.sortedIndex=I,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=n.variable||u.variable,l=f;e.replace(RegExp((n.escape||u.escape||it).source+"|"+(n.interpolate||u.interpolate||it).source+"|"+(n.evaluate||u.evaluate||it).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace(ot,c),a+=n?"'+__e("+
|
},s.sortedIndex=I,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=0,u=s.templateSettings,a="__p += '",f=n.variable||u.variable,l=f;e.replace(RegExp((n.escape||u.escape||it).source+"|"+(n.interpolate||u.interpolate||it).source+"|"+(n.evaluate||u.evaluate||it).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace(ot,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||Q.test(n||i)),o=u+t.length}),a+="';",l||(
|
||||||
n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||Q.test(n||i)),o=u+t.length}),a+="';",l||(f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+f+"\\."+f+"\\b","g"),a=a.replace(nt,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(Y,""):a).replace(Z,"$1").replace(et,"$1;"),a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}"
|
f="obj",r?a="with("+f+"){"+a+"}":(n=RegExp("(\\(\\s*)"+f+"\\."+f+"\\b","g"),a=a.replace(nt,"$&"+f+".").replace(n,"$1__d"))),a=(r?a.replace(Y,""):a).replace(Z,"$1").replace(et,"$1;"),a="function("+f+"){"+(l?"":f+"||("+f+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(l?"":",__d="+f+"."+f+"||"+f)+";")+a+"return __p}";try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,
|
||||||
;try{i=Function("_","return "+a)(s)}catch(h){throw h.source=a,h}return t?i(t):(i.source=a,i)},s.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(_t(u),a=r,s=e.apply(o,i)):u||(u=Dt(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){if(!e)return[];var t=e.length;return t===+t?(It?mt.call(e)==Mt:"string"==typeof e)?e.split(""
|
t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(_t(u),a=r,s=e.apply(o,i)):u||(u=Dt(n,f)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},s.toArray=function(e){return e?"number"==typeof e.length?(It?mt.call(e)==Mt:"string"==typeof e)?e.split(""):vt.call(e):T(e):[]},s.unescape=function(e){return e==r?"":(e+"").replace(G,d)},s.union=function(){for(var e=-1,t=ft.apply
|
||||||
):vt.call(e):T(e)},s.unescape=function(e){return e==r?"":(e+"").replace(G,d)},s.union=function(){for(var e=-1,t=ft.apply(X,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},s.uniq=q,s.uniqueId=function(e){var t=$++;return e?e+t:t},s.values=T,s.where=function(e,t){var n=[];Yt(t,function(e,t){n.push(t)});var r=n.length,i=[];return an(e,function(e){for(var s=-1;++s<r;){var o=n[s],o=e[o]===t[o];if(!o)break}o&&i.push(e)}),i},s.without=function(e){for(var t=-1,n=e?e.length:0,r=
|
(X,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},s.uniq=q,s.uniqueId=function(e){var t=$++;return e?e+t:t},s.values=T,s.where=function(e,t){var n=[];Yt(t,function(e,t){n.push(t)});var r=n.length,i=[];return an(e,function(e){for(var s=-1;++s<r;){var o=n[s],o=e[o]===t[o];if(!o)break}o&&i.push(e)}),i},s.without=function(e){for(var t=-1,n=e?e.length:0,r=o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return arguments
|
||||||
o(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.wrap=function(e,t){return function(){var n=[e];return arguments.length&&pt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},s.all=C,s.any=P,s.collect=A,s.detect=L,s.drop=F,s.each=an,s.foldl=_,s.foldr=D,s.head=H,s.include=N,s.inject=_,s.methods=w,s.select=k,s.tail=F,s.take=H,s.unique=q,z(s),s.prototype.chain=function(){return this.__chain__=
|
.length&&pt.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t]=M(arguments,t);return r},s.all=C,s.any=P,s.collect=A,s.detect=L,s.drop=F,s.each=an,s.foldl=_,s.foldr=D,s.head=H,s.include=N,s.inject=_,s.methods=w,s.select=k,s.tail=F,s.take=H,s.unique=q,z(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},an("pop push reverse shift sort splice unshift".split(" "),function(
|
||||||
n,this},s.prototype.value=function(){return this.__wrapped__},an("pop push reverse shift sort splice unshift".split(" "),function(e){var t=X[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Ht&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),an(["concat","join","slice"],function(e){var t=X[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof
|
e){var t=X[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Ht&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),an(["concat","join","slice"],function(e){var t=X[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new s(e),e.__chain__=n),e}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):W?"object"==typeof module&&module&&module.exports==W?
|
||||||
define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):W?"object"==typeof module&&module&&module.exports==W?(module.exports=s)._=s:W._=s:e._=s})(this);
|
(module.exports=s)._=s:W._=s:e._=s})(this);
|
||||||
54
lodash.underscore.min.js
vendored
54
lodash.underscore.min.js
vendored
@@ -2,30 +2,30 @@
|
|||||||
Lo-Dash 0.8.2 lodash.com/license
|
Lo-Dash 0.8.2 lodash.com/license
|
||||||
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
||||||
*/
|
*/
|
||||||
;(function(e,t){function s(e,t,n){var r;if(!e)return e;var t=p(t,n),i=e.length,n=-1;if(i===+i)for(;++n<i;)r=e[n],t(r,n,e);else for(n in e)rt.call(e,n)&&(r=e[n],t(r,n,e));return e}function o(e){var t,n,r=e;if(!e)return e;for(var i=1,s=arguments.length;i<s;i++)if(r=arguments[i])for(t in r)n=r[t],e[t]=n;return e}function u(e){var t,n,i=e;if(!e)return e;for(var s=1,o=arguments.length;s<o;s++)if(i=arguments[s])for(t in i)n=i[t],e[t]==r&&(e[t]=n);return e}function a(e,t){var n,r;if(e)for(n in t=p(t,void 0
|
;(function(e,t){function s(e,t,n){var r;if(!e)return e;var t=p(t,n),i=e.length,n=-1;if("number"==typeof i)for(;++n<i;)r=e[n],t(r,n,e);else for(n in e)rt.call(e,n)&&(r=e[n],t(r,n,e));return e}function o(e){var t,n,r=e;if(!e)return e;for(var i=1,s=arguments.length;i<s;i++)if(r=arguments[i])for(t in r)n=r[t],e[t]=n;return e}function u(e){var t,n,i=e;if(!e)return e;for(var s=1,o=arguments.length;s<o;s++)if(i=arguments[s])for(t in i)n=i[t],e[t]==r&&(e[t]=n);return e}function a(e,t){var n,r;if(e)for(n in
|
||||||
),e)rt.call(e,n)&&(r=e[n],t(r,n,e))}function f(e,t){var n,r;if(e)for(n in t=p(t,void 0),e)r=e[n],t(r,n,e)}function l(e){if(e&&e.__wrapped__)return e;if(!(this instanceof l))return new l(e);this.__wrapped__=e}function c(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function h(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(st.call(i)):n),this instanceof r?(m.prototype=e.prototype,s=new m,(i=e.apply(s,i))&&Nt[typeof
|
t=p(t,void 0),e)rt.call(e,n)&&(r=e[n],t(r,n,e))}function f(e,t){var n,r;if(e)for(n in t=p(t,void 0),e)r=e[n],t(r,n,e)}function l(e){if(e&&e.__wrapped__)return e;if(!(this instanceof l))return new l(e);this.__wrapped__=e}function c(e,n){var r=e.b,i=n.b,e=e.a,n=n.a;if(e!==n){if(e>n||e===t)return 1;if(e<n||n===t)return-1}return r<i?-1:1}function h(e,t,n){function r(){var i=arguments,s=t;return n.length&&(i=i.length?n.concat(st.call(i)):n),this instanceof r?(m.prototype=e.prototype,s=new m,(i=e.apply
|
||||||
i]?i:s):e.apply(s,i)}return r}function p(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function d(e){return"\\"+Ct[e]}function v(e){return Lt[e]}function m(){}function g(e){return At[e]}function y(e){return"function"==typeof e}function b(e){var t=[];return a(e,function(e,n){t.push(n)}),t}function w(e){var t=[];return f(e,function(e,n){y(e)&&t.push(n)}),t.sort()}function E(e){var t={};return a(e,function(e,n){t[e]=n}),t}function S(e,t
|
(s,i))&&Nt[typeof i]?i:s):e.apply(s,i)}return r}function p(e,n){return e?"function"!=typeof e?function(t){return t[e]}:n!==t?function(t,r,i){return e.call(n,t,r,i)}:e:U}function d(e){return"\\"+Ct[e]}function v(e){return Lt[e]}function m(){}function g(e){return At[e]}function y(e){return"function"==typeof e}function b(e){var t=[];return a(e,function(e,n){t.push(n)}),t}function w(e){var t=[];return f(e,function(e,n){y(e)&&t.push(n)}),t.sort()}function E(e){var t={};return a(e,function(e,n){t[e]=n}
|
||||||
,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=ot.call(e);if(u!=ot.call(t))return i;switch(u){case vt:case mt:return+e==+t;case gt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case bt:case wt:return e==t+""}var a=u==dt;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=yt)return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!y(u)||!(u instanceof u&&y(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[
|
),t}function S(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=ot.call(e);if(u!=ot.call(t))return i;switch(u){case vt:case mt:return+e==+t;case gt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case bt:case wt:return e==t+""}var a=u==dt;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=yt)return i;var u=e.constructor,f=t.constructor;if(u!=f&&(!y(u)||!(u instanceof u&&y(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(
|
||||||
u]==t;u=n,f=0,s.push(e),o.push(t);if(a){f=e.length;if(u=f==t.length)for(;f--&&(u=S(e[f],t[f],s,o)););return u}for(var l in e)if(rt.call(e,l)&&(f++,!rt.call(t,l)||!S(e[l],t[l],s,o)))return i;for(l in t)if(rt.call(t,l)&&!(f--))return i;return n}function x(e){return ot.call(e)==wt}function T(e){var t=[];return a(e,function(e){t.push(e)}),t}function N(e,t){var n=e?e.length:0;return n===+n?-1<j(e,t):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=p(t,r);return s(e,function(e,n,r){return i=t
|
s[u]==e)return o[u]==t;u=n,f=0,s.push(e),o.push(t);if(a){f=e.length;if(u=f==t.length)for(;f--&&(u=S(e[f],t[f],s,o)););return u}for(var l in e)if(rt.call(e,l)&&(f++,!rt.call(t,l)||!S(e[l],t[l],s,o)))return i;for(l in t)if(rt.call(t,l)&&!(f--))return i;return n}function x(e){return ot.call(e)==wt}function T(e){var t=[];return a(e,function(e){t.push(e)}),t}function N(e,t){return"number"==typeof (e?e.length:0)?-1<j(e,t):P(e,function(e){return e===t})}function C(e,t,r){var i=n,t=p(t,r);return s(e,function(
|
||||||
(e,n,r)}),!!i}function k(e,t,n){var r=[],t=p(t,n);return s(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=p(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,o=Array(i),t=p(t,n);if(kt(e))for(;++r<i;)o[r]=t(e[r],r,e);else s(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function O(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||o!==+o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<o;)e[i]>u&&(u=e[i
|
e,n,r){return i=t(e,n,r)}),!!i}function k(e,t,n){var r=[],t=p(t,n);return s(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function L(e,t,r){var i,t=p(t,r);return P(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function A(e,t,n){var r=-1,i=e?e.length:0,o=Array(i),t=p(t,n);if(kt(e))for(;++r<i;)o[r]=t(e[r],r,e);else s(e,function(e,n,i){o[++r]=t(e,n,i)});return o}function O(e,t,n){var r=-Infinity,i=-1,o=e?e.length:0,u=r;if(t||o!==+o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,u=e)});else for(;++i<
|
||||||
]);return u}function M(e,t){var n=[];return s(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var o=3>arguments.length,t=p(t,r);return s(e,function(e,r,s){n=o?(o=i,e):t(n,e,r,s)}),n}function D(e,t,n,r){var o=e?e.length:0,u=3>arguments.length;if(o!==+o)var a=Ot(e),o=a.length;return s(e,function(s,f,l){f=a?a[--o]:--o,n=u?(u=i,e[f]):t.call(r,n,e[f],f,l)}),n}function P(e,t,n){var r,t=p(t,n);return s(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?e[0]:st.call(e,0,
|
o;)e[i]>u&&(u=e[i]);return u}function M(e,t){var n=[];return s(e,function(e){n.push(e[t])}),n}function _(e,t,n,r){var o=3>arguments.length,t=p(t,r);return s(e,function(e,r,s){n=o?(o=i,e):t(n,e,r,s)}),n}function D(e,t,n,r){var o=e?e.length:0,u=3>arguments.length;if(o!==+o)var a=Ot(e),o=a.length;return s(e,function(s,f,l){f=a?a[--o]:--o,n=u?(u=i,e[f]):t.call(r,n,e[f],f,l)}),n}function P(e,t,n){var r,t=p(t,n);return s(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function H(e,t,n){if(e)return t==r||n?
|
||||||
t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];kt(s)?it.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?ct(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?st.call(e,t==r||n?1:t):[]}function I(e,t,n,r){var i=0,s=e?e.length:i;if(n){n=p(n,r);for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=r;return i}function q
|
e[0]:st.call(e,0,t)}function B(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];kt(s)?it.apply(i,t?s:B(s)):i.push(s)}return i}function j(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?ct(0,i+n):n||0)-1;else if(n)return r=I(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function F(e,t,n){return e?st.call(e,t==r||n?1:t):[]}function I(e,t,n,r){var i=0,s=e?e.length:i;if(n){n=p(n,r);for(t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r}else for(;i<s;)r=i+s>>>1,e[r]<t?i=r+1:s=
|
||||||
(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n=p(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>j(a,r))a.push(r),u.push(e[s]);return u}function R(e,t){return Tt||ut&&2<arguments.length?ut.call.apply(ut,arguments):h(e,t,st.call(arguments,2))}function U(e){return e}function z(e){s(w(e),function(t){var r=l[t]=e[t];l.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&it.apply(e,arguments),e=r.apply(l,e),this.__chain__&&(e=new l(e),
|
r;return i}function q(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=[];"function"==typeof t&&(r=n,n=t,t=i);for(n=p(n,r);++s<o;)if(r=n(e[s],s,e),t?!s||a[a.length-1]!==r:0>j(a,r))a.push(r),u.push(e[s]);return u}function R(e,t){return Tt||ut&&2<arguments.length?ut.call.apply(ut,arguments):h(e,t,st.call(arguments,2))}function U(e){return e}function z(e){s(w(e),function(t){var r=l[t]=e[t];l.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&it.apply(e,arguments),e=r.apply(l,e),this.__chain__&&
|
||||||
e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),X=Array.prototype,V=Object.prototype,$=0,J=e._,K=/&(?:amp|lt|gt|quot|#x27);/g,Q=RegExp("^"+(V.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),G=/($^)/,Y=/[&<>"']/g,Z=/['\n\r\t\u2028\u2029\\]/g,et=Math.ceil,tt=X.concat,nt=Math.floor,rt=V.hasOwnProperty,it=X.push,st=X.slice,ot=V.toString,ut=Q.test(
|
(e=new l(e),e.__chain__=n),e}})}var n=!0,r=null,i=!1,W="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),X=Array.prototype,V=Object.prototype,$=0,J=e._,K=/&(?:amp|lt|gt|quot|#x27);/g,Q=RegExp("^"+(V.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),G=/($^)/,Y=/[&<>"']/g,Z=/['\n\r\t\u2028\u2029\\]/g,et=Math.ceil,tt=X.concat,nt=Math.floor,rt=V.hasOwnProperty,it=X.push,st=X.slice,ot=V.toString
|
||||||
ut=st.bind)&&ut,at=Q.test(at=Array.isArray)&&at,ft=e.isFinite,lt=Q.test(lt=Object.keys)&<,ct=Math.max,ht=Math.min,pt=Math.random,dt="[object Array]",vt="[object Boolean]",mt="[object Date]",gt="[object Number]",yt="[object Object]",bt="[object RegExp]",wt="[object String]",Et=e.clearTimeout,St=e.setTimeout,xt;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);xt=(n.splice.call(t,0,1),t[0])})(1);var Tt=ut&&/\n|Opera/.test(ut+ot.call(e
|
,ut=Q.test(ut=st.bind)&&ut,at=Q.test(at=Array.isArray)&&at,ft=e.isFinite,lt=Q.test(lt=Object.keys)&<,ct=Math.max,ht=Math.min,pt=Math.random,dt="[object Array]",vt="[object Boolean]",mt="[object Date]",gt="[object Number]",yt="[object Object]",bt="[object RegExp]",wt="[object String]",Et=e.clearTimeout,St=e.setTimeout,xt;(function(){function e(){this.x=1}var t={0:1,length:1},n=[];e.prototype={valueOf:1,y:1};for(var r in new e)n.push(r);xt=(n.splice.call(t,0,1),t[0])})(1);var Tt=ut&&/\n|Opera/.test(ut+
|
||||||
.opera)),Nt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Ct={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};l.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},l.isArguments=function(e){return"[object Arguments]"==ot.call(e)},l.isArguments(arguments)||(l.isArguments=function(e){return e?rt.call(e,"callee"):i});var kt=at||function(e){return ot.call(e)==dt};y(/x/)&&(y=function(
|
ot.call(e.opera)),Nt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},Ct={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};l.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},l.isArguments=function(e){return"[object Arguments]"==ot.call(e)},l.isArguments(arguments)||(l.isArguments=function(e){return e?rt.call(e,"callee"):i});var kt=at||function(e){return ot.call(e)==dt};y(/x/
|
||||||
e){return"[object Function]"==ot.call(e)});var Lt={"&":"&","<":"<",">":">",'"':""","'":"'"},At=E(Lt),Ot=lt?function(e){return e&&Nt[typeof e]?lt(e):[]}:b;l.VERSION="0.8.2",l.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},l.bind=R,l.bindAll=function(e){var t,n=e;if(!e)return n;var r=arguments,i=r.length;if(1<i){for(;--i;)t=r[i],n[t]=R(n[t],n);return n}return f(n,function(e,t){y(e)&&(n[t]=R(e,n))}),n},l.chain=function(e){return e=new l(e)
|
)&&(y=function(e){return"[object Function]"==ot.call(e)});var Lt={"&":"&","<":"<",">":">",'"':""","'":"'"},At=E(Lt),Ot=lt?function(e){return e&&Nt[typeof e]?lt(e):[]}:b;l.VERSION="0.8.2",l.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},l.bind=R,l.bindAll=function(e){var t,n,r=e;if(!e)return r;var i=arguments;t=1<i.length?0:(i=w(e),-1);for(var s=i.length;++t<s;)n=i[t],r[n]=R(r[n],r);return r},l.chain=function(e){return e=new l(e),e.__chain__=
|
||||||
,e.__chain__=n,e},l.clone=function(e){return e&&Nt[typeof e]?kt(e)?st.call(e):o({},e):e},l.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},l.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},l.contains=N,l.countBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),rt.call(r,n)?r[n]++:r[n]=1}),r},l.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,
|
n,e},l.clone=function(e){return e&&Nt[typeof e]?kt(e)?st.call(e):o({},e):e},l.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},l.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},l.contains=N,l.countBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),rt.call(r,n)?r[n]++:r[n]=1}),r},l.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u
|
||||||
s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,Et(a),a=St(i,t),r&&(o=e.apply(u,s)),o}},l.defaults=u,l.defer=function(e){var n=st.call(arguments,1);return St(function(){return e.apply(t,n)},1)},l.delay=function(e,n){var r=st.call(arguments,2);return St(function(){return e.apply(t,r)},n)},l.difference=function(e){for(var t=-1,n=e.length,r=tt.apply(X,arguments),i=[];++t<n;){var s=e[t];0>j(r,s,n)&&i.push(s)}return i},l.escape=function(e){return e==r?"":(e+"").replace(Y,v)},l.
|
,a;return function(){var r=n&&!a;return s=arguments,u=this,Et(a),a=St(i,t),r&&(o=e.apply(u,s)),o}},l.defaults=u,l.defer=function(e){var n=st.call(arguments,1);return St(function(){return e.apply(t,n)},1)},l.delay=function(e,n){var r=st.call(arguments,2);return St(function(){return e.apply(t,r)},n)},l.difference=function(e){for(var t=-1,n=e.length,r=tt.apply(X,arguments),i=[];++t<n;){var s=e[t];0>j(r,s,n)&&i.push(s)}return i},l.escape=function(e){return e==r?"":(e+"").replace(Y,v)},l.every=C,l.extend=
|
||||||
every=C,l.extend=o,l.filter=k,l.find=L,l.first=H,l.flatten=B,l.forEach=s,l.functions=w,l.groupBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),(rt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},l.has=function(e,t){return e?rt.call(e,t):i},l.identity=U,l.indexOf=j,l.initial=function(e,t,n){return e?st.call(e,0,-(t==r||n?1:t)):[]},l.intersection=function(e){var t=arguments.length,n=-1,r=e.length,i=[];e:for(;++n<r;){var s=e[n];if(0>j(i,s)){for(var o=1;o<t;o++)if(0>j(arguments[o],s))continue e
|
o,l.filter=k,l.find=L,l.first=H,l.flatten=B,l.forEach=s,l.functions=w,l.groupBy=function(e,t,n){var r={},t=p(t,n);return s(e,function(e,n,i){n=t(e,n,i),(rt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},l.has=function(e,t){return e?rt.call(e,t):i},l.identity=U,l.indexOf=j,l.initial=function(e,t,n){return e?st.call(e,0,-(t==r||n?1:t)):[]},l.intersection=function(e){var t=arguments.length,n=-1,r=e.length,i=[];e:for(;++n<r;){var s=e[n];if(0>j(i,s)){for(var o=1;o<t;o++)if(0>j(arguments[o],s))continue e;i.push(
|
||||||
;i.push(s)}}return i},l.invert=E,l.invoke=function(e,t){var n=st.call(arguments,2),r="function"==typeof t,i=[];return s(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},l.isArray=kt,l.isBoolean=function(e){return e===n||e===i||ot.call(e)==vt},l.isDate=function(e){return ot.call(e)==mt},l.isElement=function(e){return e?1===e.nodeType:i},l.isEmpty=function(e){if(!e)return n;if(kt(e)||x(e))return!e.length;for(var t in e)if(rt.call(e,t))return i;return n},l.isEqual=S,l.isFinite=function(e){return ft(
|
s)}}return i},l.invert=E,l.invoke=function(e,t){var n=st.call(arguments,2),r="function"==typeof t,i=[];return s(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},l.isArray=kt,l.isBoolean=function(e){return e===n||e===i||ot.call(e)==vt},l.isDate=function(e){return ot.call(e)==mt},l.isElement=function(e){return e?1===e.nodeType:i},l.isEmpty=function(e){if(!e)return n;if(kt(e)||x(e))return!e.length;for(var t in e)if(rt.call(e,t))return i;return n},l.isEqual=S,l.isFinite=function(e){return ft(e)&&ot.call
|
||||||
e)&&ot.call(e)==gt},l.isFunction=y,l.isNaN=function(e){return ot.call(e)==gt&&e!=+e},l.isNull=function(e){return e===r},l.isNumber=function(e){return ot.call(e)==gt},l.isObject=function(e){return e?Nt[typeof e]:i},l.isRegExp=function(e){return ot.call(e)==bt},l.isString=x,l.isUndefined=function(e){return e===t},l.keys=Ot,l.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:st.call(e,-t||i)}},l.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?ct(0,r+n):ht
|
(e)==gt},l.isFunction=y,l.isNaN=function(e){return ot.call(e)==gt&&e!=+e},l.isNull=function(e){return e===r},l.isNumber=function(e){return ot.call(e)==gt},l.isObject=function(e){return e?Nt[typeof e]:i},l.isRegExp=function(e){return ot.call(e)==bt},l.isString=x,l.isUndefined=function(e){return e===t},l.keys=Ot,l.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:st.call(e,-t||i)}},l.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?ct(0,r+n):ht(n,r-1))+1)
|
||||||
(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},l.map=A,l.max=O,l.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return rt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},l.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||o!==+o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},l.mixin=z,l.noConflict=function(){return e._=J,this},l.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++
|
;r--;)if(e[r]===t)return r;return-1},l.map=A,l.max=O,l.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return rt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},l.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||o!==+o)t=p(t,n),s(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,u=e)});else for(;++i<o;)e[i]<u&&(u=e[i]);return u},l.mixin=z,l.noConflict=function(){return e._=J,this},l.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=
|
||||||
n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},l.omit=function(e){var t=tt.apply(X,arguments),n={};return f(e,function(e,r){0>j(t,r,1)&&(n[r]=e)}),n},l.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},l.pairs=function(e){var t=[];return a(e,function(e,n){t.push([n,e])}),t},l.pick=function(e){for(var t=0,n=tt.apply(X,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},l.pluck=M,l.random=function(e,t){return e==r&&t==r&&(t=1
|
e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},l.omit=function(e){var t=tt.apply(X,arguments),n={};return f(e,function(e,r){0>j(t,r,1)&&(n[r]=e)}),n},l.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},l.pairs=function(e){var t=[];return a(e,function(e,n){t.push([n,e])}),t},l.pick=function(e){for(var t=0,n=tt.apply(X,arguments),r=n.length,i={};++t<r;){var s=n[t];s in e&&(i[s]=e[s])}return i},l.pluck=M,l.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==
|
||||||
),e=+e||0,t==r&&(t=e,e=0),e+nt(pt()*((+t||0)-e+1))},l.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ct(0,et((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},l.reduce=_,l.reduceRight=D,l.reject=function(e,t,n){return t=p(t,n),k(e,function(e,n,r){return!t(e,n,r)})},l.rest=F,l.result=function(e,t){var n=e?e[t]:r;return y(n)?e[t]():n},l.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return s(e,function(e){var r=nt(pt()*(++t+1));n[t]=n[r],n[r]=e}),n},l.size=function(e){var t=
|
r&&(t=e,e=0),e+nt(pt()*((+t||0)-e+1))},l.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=ct(0,et((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},l.reduce=_,l.reduceRight=D,l.reject=function(e,t,n){return t=p(t,n),k(e,function(e,n,r){return!t(e,n,r)})},l.rest=F,l.result=function(e,t){var n=e?e[t]:r;return y(n)?e[t]():n},l.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return s(e,function(e){var r=nt(pt()*(++t+1));n[t]=n[r],n[r]=e}),n},l.size=function(e){var t=e?e.length:0
|
||||||
e?e.length:0;return t===+t?t:Ot(e).length},l.some=P,l.sortBy=function(e,t,n){var r=[],t=p(t,n);s(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(c);e--;)r[e]=r[e].c;return r},l.sortedIndex=I,l.tap=function(e,t){return t(e),e},l.template=function(e,t,n){e||(e="");var n=u({},n,l.templateSettings),r=0,i="__p += '",s=n.variable;e.replace(RegExp((n.escape||G).source+"|"+(n.interpolate||G).source+"|"+(n.evaluate||G).source+"|$","g"),function(t,n,s,o,u){i+=e.slice(r,u).replace(Z,d
|
;return"number"==typeof t?t:Ot(e).length},l.some=P,l.sortBy=function(e,t,n){var r=[],t=p(t,n);s(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(c);e--;)r[e]=r[e].c;return r},l.sortedIndex=I,l.tap=function(e,t){return t(e),e},l.template=function(e,t,n){e||(e="");var n=u({},n,l.templateSettings),r=0,i="__p += '",s=n.variable;e.replace(RegExp((n.escape||G).source+"|"+(n.interpolate||G).source+"|"+(n.evaluate||G).source+"|$","g"),function(t,n,s,o,u){i+=e.slice(r,u).replace(Z,d)
|
||||||
),i+=n?"'+_['escape']("+n+")+'":o?"';"+o+";__p+='":s?"'+((__t=("+s+"))==null?'':__t)+'":"",r=u+t.length}),i+="';",s||(s="obj",i="with("+s+"||{}){"+i+"}"),i="function("+s+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+i+"return __p}";try{var o=Function("_","return "+i)(l)}catch(a){throw a.source=i,a}return t?o(t):(o.source=i,o)},l.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=
|
,i+=n?"'+_['escape']("+n+")+'":o?"';"+o+";__p+='":s?"'+((__t=("+s+"))==null?'':__t)+'":"",r=u+t.length}),i+="';",s||(s="obj",i="with("+s+"||{}){"+i+"}"),i="function("+s+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+i+"return __p}";try{var o=Function("_","return "+i)(l)}catch(a){throw a.source=i,a}return t?o(t):(o.source=i,o)},l.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=
|
||||||
arguments,o=this,0>=f?(Et(u),a=r,s=e.apply(o,i)):u||(u=St(n,f)),s}},l.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},l.toArray=function(e){if(!e)return[];var t=e.length;return t===+t?"string"==typeof e?e.split(""):st.call(e):T(e)},l.unescape=function(e){return e==r?"":(e+"").replace(K,g)},l.union=function(){for(var e=-1,t=tt.apply(X,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},l.uniq=q,l.uniqueId=function(e){var t=$++;return e?
|
arguments,o=this,0>=f?(Et(u),a=r,s=e.apply(o,i)):u||(u=St(n,f)),s}},l.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},l.toArray=function(e){return e?"number"==typeof e.length?"string"==typeof e?e.split(""):st.call(e):T(e):[]},l.unescape=function(e){return e==r?"":(e+"").replace(K,g)},l.union=function(){for(var e=-1,t=tt.apply(X,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>j(r,i)&&r.push(i)}return r},l.uniq=q,l.uniqueId=function(e){var t=$++;return e?e+t:
|
||||||
e+t:t},l.values=T,l.where=function(e,t){var n=[];f(t,function(e,t){n.push(t)});var r=n.length,i=[];return s(e,function(e){for(var s=-1;++s<r;){var o=n[s],o=e[o]===t[o];if(!o)break}o&&i.push(e)}),i},l.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=e[t];0>j(arguments,i,1)&&r.push(i)}return r},l.wrap=function(e,t){return function(){var n=[e];return arguments.length&&it.apply(n,arguments),t.apply(this,n)}},l.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;
|
t},l.values=T,l.where=function(e,t){var n=[];f(t,function(e,t){n.push(t)});var r=n.length,i=[];return s(e,function(e){for(var s=-1;++s<r;){var o=n[s],o=e[o]===t[o];if(!o)break}o&&i.push(e)}),i},l.without=function(e){for(var t=-1,n=e.length,r=[];++t<n;){var i=e[t];0>j(arguments,i,1)&&r.push(i)}return r},l.wrap=function(e,t){return function(){var n=[e];return arguments.length&&it.apply(n,arguments),t.apply(this,n)}},l.zip=function(e){for(var t=-1,n=e?O(M(arguments,"length")):0,r=Array(n);++t<n;)r[t
|
||||||
)r[t]=M(arguments,t);return r},l.all=C,l.any=P,l.collect=A,l.detect=L,l.drop=F,l.each=s,l.foldl=_,l.foldr=D,l.head=H,l.include=N,l.inject=_,l.methods=w,l.select=k,l.tail=F,l.take=H,l.unique=q,z(l),l.prototype.chain=function(){return this.__chain__=n,this},l.prototype.value=function(){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "),function(e){var t=X[e];l.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),xt&&e.length===0&&delete e[0],this
|
]=M(arguments,t);return r},l.all=C,l.any=P,l.collect=A,l.detect=L,l.drop=F,l.each=s,l.foldl=_,l.foldr=D,l.head=H,l.include=N,l.inject=_,l.methods=w,l.select=k,l.tail=F,l.take=H,l.unique=q,z(l),l.prototype.chain=function(){return this.__chain__=n,this},l.prototype.value=function(){return this.__wrapped__},s("pop push reverse shift sort splice unshift".split(" "),function(e){var t=X[e];l.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),xt&&e.length===0&&delete e[0],this.__chain__&&
|
||||||
.__chain__&&(e=new l(e),e.__chain__=n),e}}),s(["concat","join","slice"],function(e){var t=X[e];l.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new l(e),e.__chain__=n),e}}),W?"object"==typeof module&&module&&module.exports==W?(module.exports=l)._=l:W._=l:e._=l})(this);
|
(e=new l(e),e.__chain__=n),e}}),s(["concat","join","slice"],function(e){var t=X[e];l.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new l(e),e.__chain__=n),e}}),W?"object"==typeof module&&module&&module.exports==W?(module.exports=l)._=l:W._=l:e._=l})(this);
|
||||||
Reference in New Issue
Block a user