diff --git a/build.js b/build.js
index 8a42d43cb..a9ab678c8 100755
--- a/build.js
+++ b/build.js
@@ -1689,7 +1689,9 @@
], function(data) {
if (!data.flag) {
source = source.replace(matchFunction(source, data.methodName), function(match) {
- return match.replace(/(callback), *thisArg/g, '$1');
+ return match
+ .replace(/(callback), *thisArg/g, '$1')
+ .replace(/^ *callback *=.+/m, 'callback || (callback = identity);')
});
}
});
diff --git a/build/pre-compile.js b/build/pre-compile.js
index 5efbc498f..c53401cb6 100644
--- a/build/pre-compile.js
+++ b/build/pre-compile.js
@@ -30,7 +30,7 @@
'skipProto',
'source',
'thisArg',
- 'value'
+ 'undefined'
];
/** Used to minify `compileIterator` option properties */
@@ -221,7 +221,9 @@
// add brackets to whitelisted properties so the Closure Compiler won't mung them
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
- source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), "['$1']");
+ source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), function(match, prop) {
+ return "['" + prop.replace(/['\n\r\t]/g, '\\$&') + "']";
+ });
// remove brackets from `_.escape()` in `_.template`
source = source.replace(/__e *= *_\['escape']/g, '__e=_.escape');
@@ -236,19 +238,17 @@
source = source.replace("result[length]['value']", 'result[length].value');
// remove whitespace from string literals
- source = source.replace(/^ *"(?:(?=(\\?))\1.)*?"|'(?:(?=(\\?))\2.)*?'/gm, function(string) {
+ source = source.replace(/^([ "'\w]+:)? *"(?:(?=(\\?))\2.)*?"|'(?:(?=(\\?))\3.)*?'/gm, function(string, captured) {
+ // remove object literal property name
+ if (/:$/.test(captured)) {
+ string = string.slice(captured.length);
+ }
// avoids removing the '\n' of the `stringEscapes` object
- return string.replace(/\[object |delete |else |function | in |return\s+[\w"']|throw |typeof |use strict|var |@ |(["'])\\n\1|\\\\n|\\n|\s+/g, function(match) {
- return match == false || match == '\\n' ? '' : match;
- });
- });
-
- // remove whitespace from string literals in double quotes
- source = source.replace(/^ *"(?:(?=(\\?))\1.)*?"/g, function(string) {
- // avoids removing the '\n' of the `stringEscapes` object
- return string.replace(reWhitespace, function(match) {
+ string = string.replace(/\[object |delete |else |function | in |return\s+[\w"']|throw |typeof |use strict|var |@ |(["'])\\n\1|\\\\n|\\n|\s+/g, function(match) {
return match == false || match == '\\n' ? '' : match;
});
+ // prepend object literal property name
+ return (captured || '') + string;
});
// add newline to `+"__p+='"` in underscore.js `_.template`
@@ -325,7 +325,7 @@
isIteratorTemplate = /var iteratorTemplate\b/.test(snippet),
modified = snippet;
- // add brackets to whitelisted properties so the Closure Compiler won't mung them
+ // add brackets to iterator option properties so the Closure Compiler won't mung them
modified = modified.replace(RegExp('\\.(' + iteratorOptions.join('|') + ')\\b', 'g'), function(match, prop) {
return "['" + prop.replace(/['\n\r\t]/g, '\\$&') + "']";
});
@@ -342,9 +342,9 @@
// ensure properties in compiled strings aren't minified
modified = modified.replace(RegExp('([^.]\\b)' + variable + '\\b(?!\' *[\\]:])', 'g'), '$1' + minNames[index]);
- // correct `typeof x == 'object'`
- if (variable == 'object') {
- modified = modified.replace(RegExp("(typeof [^']+')" + minNames[index] + "'", 'g'), "$1object'");
+ // correct `typeof` of 'object' and 'undefined'
+ if (variable == 'object' || variable == 'undefined') {
+ modified = modified.replace(RegExp("(typeof [^']+')" + minNames[index] + "'", 'g'), '$1' + variable + "'");
}
});
diff --git a/doc/README.md b/doc/README.md
index ea6d5334d..c02ed75ee 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -2325,7 +2325,7 @@ _.isFunction(_);
### `_.isNaN(value)`
# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1482 "View in source") [Ⓣ][1]
-Checks if `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return true for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
+Checks if `value` is `NaN`. Note: This is not the same as native `isNaN`, which will return `true` for `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
#### Arguments
1. `value` *(Mixed)*: The value to check.
diff --git a/lodash.js b/lodash.js
index 74e66aea5..e7251bae4 100644
--- a/lodash.js
+++ b/lodash.js
@@ -470,7 +470,7 @@
*/
var forEachIteratorOptions = {
'args': 'collection, callback, thisArg',
- 'top': 'callback = createCallback(callback, thisArg)',
+ 'top': 'callback = callback && thisArg === undefined ? callback : createCallback(callback, thisArg)',
'arrayLoop': 'if (callback(iteratee[index], index, collection) === false) return result',
'objectLoop': 'if (callback(iteratee[index], index, collection) === false) return result'
};
@@ -682,7 +682,7 @@
// create the function factory
var factory = createFunction(
'createCallback, hasOwnProperty, isArguments, isString, objectTypes, ' +
- 'nativeKeys, propertyIsEnumerable',
+ 'nativeKeys, propertyIsEnumerable, undefined',
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
);
// return the compiled function
@@ -1457,7 +1457,7 @@
/**
* Checks if `value` is `NaN`.
*
- * Note: This is not the same as native `isNaN`, which will return true for
+ * Note: This is not the same as native `isNaN`, which will return `true` for
* `undefined` and other values. See http://es5.github.com/#x15.1.2.4.
*
* @static
diff --git a/lodash.min.js b/lodash.min.js
index 4ca80bfe3..9a229abe5 100644
--- a/lodash.min.js
+++ b/lodash.min.js
@@ -6,7 +6,7 @@
r;){var o=e[n]+"";(xt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return xt.call(s,r)&&-1n||e===t)return 1;if(ei;
-i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",s("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(c,xt,g,k,tn,_t,Nt)}function p(e){return"\\"+nn[e]}function d(e){return cn[e]}function v(){}function m(e){return hn[e]}function g(e){return kt.call(e)==Bt}function y(e){var t=i;if(!e||"object"!=typeof e||g(e))return t;var n=e.constructor;return(!Qt||"function"==typeof e.toString||"string"!=typeof
+i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",s("e,h,j,k,p,n,s,x","return function("+t+"){"+r+"}")(c,xt,g,k,tn,_t,Nt)}function p(e){return"\\"+nn[e]}function d(e){return cn[e]}function v(){}function m(e){return hn[e]}function g(e){return kt.call(e)==Bt}function y(e){var t=i;if(!e||"object"!=typeof e||g(e))return t;var n=e.constructor;return(!Qt||"function"==typeof e.toString||"string"!=typeof
(e+""))&&(!T(n)||n instanceof n)?Xt?(fn(e,function(e,n,r){return t=!xt.call(r,n),i}),t===i):(fn(e,function(e,n){t=n}),t===i||xt.call(e,t)):t}function b(e){var t=[];return ln(e,function(e,n){t.push(n)}),t}function w(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=N(e)){var u=kt.call(e);if(!en[u]||Jt&&g(e))return e;var a=u==jt,n=a||(u==Rt?vn(e):n)}if(!n||!t)return n?a?Ct.call(e):an({},e):e;n=e.constructor;switch(u){case Ft:case It:return new n(+e);case qt:case zt:return new n(e);case Ut:return n(e.source
,lt.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?gn:ln)(e,function(e,n){f[n]=w(e,t,r,s,o)}),f}function E(e){var t=[];return fn(e,function(e,n){T(e)&&t.push(n)}),t.sort()}function S(e){var t={};return ln(e,function(e,n){t[e]=n}),t}function x(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=kt.call(e);if(u!=kt.call(t))return i;switch(u){case Ft:case It:return+e==+t;case qt:return e!=+e?t!=+t:0==
e?1/e==1/t:e==+t;case Ut:case zt:return e==t+""}var a=u==jt||u==Bt;if(Jt&&!a&&(a=g(e))&&!g(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return x(e.__wrapped__||e,t.__wrapped__||t);if(u!=Rt||Qt&&("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&&(!T(u)||!(u instanceof u&&T(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=
@@ -21,16 +21,16 @@ i);var f=!t&&74/g,vt=/($^)/,mt=/[&<>"']/g,gt=/['\n\r\t\u2028\u2029\\]/g,yt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),bt=Math.ceil,wt=Z.concat,Et=Math.floor,St=ht.test(St=Object.getPrototypeOf)&&St,xt=et.hasOwnProperty,Tt=Z.push,Nt=et.propertyIsEnumerable,Ct=Z.slice,kt=et.toString,Lt=ht.test(Lt=Ct.bind)&&Lt,At=ht.test(At=Array.isArray)&&At,Ot=e.isFinite,Mt=e.isNaN
,_t=ht.test(_t=Object.keys)&&_t,Dt=Math.max,Pt=Math.min,Ht=Math.random,Bt="[object Arguments]",jt="[object Array]",Ft="[object Boolean]",It="[object Date]",qt="[object Number]",Rt="[object Object]",Ut="[object RegExp]",zt="[object String]",Wt,Xt,Vt=(Vt={0:1,length:1},Z.splice.call(Vt,0,1),Vt[0]),$t=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)$t=!n;Wt=!/valueOf/.test(t),Xt="x"!=t[0]})(1);var Jt=!g(arguments),Kt="xx"!="x"[0
]+Object("x")[0];try{var Qt=("[object Object]",kt.call(Y||0)==Rt)}catch(Gt){}var Yt=Lt&&/\n|Opera/.test(Lt+kt.call(e.opera)),Zt=_t&&/^.+$|true/.test(_t+!!e.attachEvent),en={};en[Bt]=en["[object Function]"]=i,en[jt]=en[Ft]=en[It]=en[qt]=en[Rt]=en[Ut]=en[zt]=n;var tn={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},nn={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate
-:dt,variable:""};try{s()}catch(rn){s=Function}var sn={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a":">",'"':""","'":"'"},hn=S(cn),pn=h(sn,{g:"if(t[i]==null)"+sn.g}),dn=At||function(
-e){return kt.call(e)==jt};T(/x/)&&(T=function(e){return"[object Function]"==kt.call(e)});var vn=St?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=St(t))&&St(n);return n?e==n||St(e)==n&&!g(e):y(e)}:y,mn=_t?function(e){return"function"==typeof e&&Nt.call(e,"prototype")?b(e):N(e)?_t(e):[]}:b,gn=h(on);o.VERSION="0.10.0",o.assign=an,o.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=V,o.bindAll=function(e){for(var t=
-arguments,n=1U(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},o.invert=S,o.invoke=function(e,t){var n=Ct.call(arguments,2),r="function"==typeof t,i=[];return gn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},o.isArguments=g,o.isArray=dn,o.isBoolean=function(e){return e===n||e===i||kt.call(e)==Ft},o.isDate=function(e){return kt.call(e)==It},o.isElement=function(e){return e?1===e.nodeType:i
-},o.isEmpty=function(e){var t=n;if(!e)return t;var r=kt.call(e),s=e.length;return r==jt||r==zt||r==Bt||Jt&&g(e)||r==Rt&&"number"==typeof s&&T(e.splice)?!s:(ln(e,function(){return t=i}),t)},o.isEqual=x,o.isFinite=function(e){return Ot(e)&&!Mt(parseFloat(e))},o.isFunction=T,o.isNaN=function(e){return C(e)&&e!=+e},o.isNull=function(e){return e===r},o.isNumber=C,o.isObject=N,o.isPlainObject=vn,o.isRegExp=function(e){return kt.call(e)==Ut},o.isString=k,o.isUndefined=function(e){return e===t},o.keys=mn
-,o.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:Ct.call(e,-t||i)}},o.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Dt(0,r+n):Pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=P,o.max=H,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return xt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.merge=L,o.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!dn(e))t=!t&&k(e)?a:c(t,n),gn
-(e,function(e,n,i){n=t(e,n,i),nU(s,n,1))i[n]=e}),i},o.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,
-arguments),e=r,t)}},o.pairs=function(e){var t=[];return ln(e,function(e,n){t.push([n,e])}),t},o.partial=function(e){return l(e,Ct.call(arguments,1))},o.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=wt.apply(Z,arguments),o=s.length;++i":">",'"':""","'":"'"},hn=S(cn),pn=h(sn,{g:"if(t[i]==null)"+sn.g}),dn=At||
+function(e){return kt.call(e)==jt};T(/x/)&&(T=function(e){return"[object Function]"==kt.call(e)});var vn=St?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=St(t))&&St(n);return n?e==n||St(e)==n&&!g(e):y(e)}:y,mn=_t?function(e){return"function"==typeof e&&Nt.call(e,"prototype")?b(e):N(e)?_t(e):[]}:b,gn=h(on);o.VERSION="0.10.0",o.assign=an,o.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=V,o.bindAll=function(e
+){for(var t=arguments,n=1U(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},o.invert=S,o.invoke=function(e,t){var n=Ct.call(arguments,2),r="function"==typeof t,i=[];return gn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},o.isArguments=g,o.isArray=dn,o.isBoolean=function(e){return e===n||e===i||kt.call(e)==Ft},o.isDate=function(e){return kt.call(e)==It},o.isElement=function(e){return e?1===e.nodeType
+:i},o.isEmpty=function(e){var t=n;if(!e)return t;var r=kt.call(e),s=e.length;return r==jt||r==zt||r==Bt||Jt&&g(e)||r==Rt&&"number"==typeof s&&T(e.splice)?!s:(ln(e,function(){return t=i}),t)},o.isEqual=x,o.isFinite=function(e){return Ot(e)&&!Mt(parseFloat(e))},o.isFunction=T,o.isNaN=function(e){return C(e)&&e!=+e},o.isNull=function(e){return e===r},o.isNumber=C,o.isObject=N,o.isPlainObject=vn,o.isRegExp=function(e){return kt.call(e)==Ut},o.isString=k,o.isUndefined=function(e){return e===t},o.keys=
+mn,o.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:Ct.call(e,-t||i)}},o.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Dt(0,r+n):Pt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=P,o.max=H,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return xt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.merge=L,o.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!dn(e))t=!t&&k(e)?a:c(t,n),
+gn(e,function(e,n,i){n=t(e,n,i),nU(s,n,1))i[n]=e}),i},o.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this
+,arguments),e=r,t)}},o.pairs=function(e){var t=[];return ln(e,function(e,n){t.push([n,e])}),t},o.partial=function(e){return l(e,Ct.call(arguments,1))},o.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=wt.apply(Z,arguments),o=s.length;++i>>1,n(e[r])D(a,f))n&&a.push(f),u.push(r)}return u}function j(e,t){return bt||it&&2"']/g,Q=/['\n\r\t\u2028\u2029\\]/g,G=Math.ceil,Y=U.concat,Z=Math.floor,et=R.hasOwnProperty,tt=U.push,nt=U.slice,rt=R.toString,it=$.test(it=nt.bind)&&it,st=$.test(st=Array.isArray
)&&st,ot=e.isFinite,ut=$.test(ut=Object.keys)&&ut,at=Math.max,ft=Math.min,lt=Math.random,ct="[object Array]",ht="[object Boolean]",pt="[object Date]",dt="[object Number]",vt="[object Object]",mt="[object RegExp]",gt="[object String]",yt=(yt={0:1,length:1},U.splice.call(yt,0,1),yt[0]),bt=it&&/\n|Opera/.test(it+rt.call(e.opera)),wt={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,"undefined":!1},Et={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings=
-{escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},n.isArguments=function(e){return"[object Arguments]"==rt.call(e)},n.isArguments(arguments)||(n.isArguments=function(e){return e?et.call(e,"callee"):!1});var St=function(e,t){var n;if(!e)return e;t=s(t);for(n in e)if(t(e[n],n,e)===W)break;return e},xt=function(e,t){var n;if(!e)return e;t=s(t);for(n in e)if(et.call(e,n)&&t(e[n],n,e)===W)break;return e},Tt={"&":"&","<":"<",">":">",'"':"""
-,"'":"'"},Nt=d(Tt),Ct=st||function(e){return rt.call(e)==ct};m(/x/)&&(m=function(e){return"[object Function]"==rt.call(e)});var kt=ut?function(e){return g(e)?ut(e):[]}:c,Lt=function(e,t,n){if(!e)return e;var t=s(t,n),r=e.length,n=-1;if("number"==typeof r){for(;++ne?t():function(){if(1>--e)return t.apply(this,arguments)}},n.bind=j,n.bindAll=function(e){for(
-var t=arguments,n=1D(r,s,n)&&i.push(s)}return i},n.escape=function(e){return null==e?"":(e+"").replace(K,u)},n.every=S,n.filter=x,n.find=T,n.first=M,n.flatten=_,n.forEach=Lt,n.functions=p,n.groupBy=function(e,t,n){var r={},t=s(t,n);return Lt(e,function(e,n,i){n=t(e,n,i),(et.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.has=function(e,t){return e?et.call(e,t):!1},n.identity=F,n.indexOf=D,n.initial=function(e,t,n){return e?nt.call(e,0,-(null==t||n?1:t)):[]
-},n.intersection=function(e){var t=arguments,n=t.length,r=[];return Lt(e,function(e){if(0>D(r,e)){for(var i=n;--i;)if(0>D(t[i],e))return;r.push(e)}}),r},n.invert=d,n.invoke=function(e,t){var n=nt.call(arguments,2),r="function"==typeof t,i=[];return Lt(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.isArray=Ct,n.isBoolean=function(e){return!0===e||!1===e||rt.call(e)==ht},n.isDate=function(e){return rt.call(e)==pt},n.isElement=function(e){return e?1===e.nodeType:!1},n.isEmpty=function(e){if(!e)return!0
-;if(Ct(e)||b(e))return!e.length;for(var t in e)if(et.call(e,t))return!1;return!0},n.isEqual=v,n.isFinite=function(e){return ot(e)&&rt.call(e)==dt},n.isFunction=m,n.isNaN=function(e){return y(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=y,n.isObject=g,n.isRegExp=function(e){return rt.call(e)==mt},n.isString=b,n.isUndefined=function(e){return e===t},n.keys=kt,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:nt.call(e,-t||r)}},n.lastIndexOf=function(e,t,n){var r=e?
-e.length:0;for("number"==typeof n&&(r=(0>n?at(0,r+n):ft(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.map=N,n.max=C,n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return et.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||!Ct(e))t=s(t,n),Lt(e,function(e,n,i){n=t(e,n,i),nD(t,r,1)&&(n[r]=e)}),n},n.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.pairs=function(e){var t=[];return xt(e,function(e,n){t.push([n,e])}),t},n.pick=function(e){for(var t=0,n=Y.apply(U,arguments),r=n.length,i={};++t=f?(clearTimeout(o),u=a,i=e.apply(s,r)):o||(o=setTimeout(n,f)),i}},n.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++rD(arguments,i,1)&&r.push(i)}return r},n.wrap=function(e,t){return function(){var n=[e];return tt.apply(n,arguments),t.apply(this,n)}},n.zip=function(e){for(var t=-1,n=e?C(k(arguments,"length")):0,r=Array(n);++t/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},n.isArguments=function(e){return"[object Arguments]"==rt.call(e)},n.isArguments(arguments)||(n.isArguments=function(e){return e?et.call(e,"callee"):!1});var St=function(e,t){var n;if(!e)return e;t||(t=F);for(n in e)if(t(e[n],n,e)===W)break;return e},xt=function(e,t){var n;if(!e)return e;t||(t=F);for(n in e)if(et.call(e,n)&&t(e[n],n,e)===W)break;return e},Tt={"&":"&","<":"<",">":">",'"':"""
+,"'":"'"},Nt=d(Tt),Ct=st||function(e){return rt.call(e)==ct};m(/x/)&&(m=function(e){return"[object Function]"==rt.call(e)});var kt=ut?function(e){return g(e)?ut(e):[]}:c,Lt=function(e,n,r){if(!e)return e;var n=n&&r===t?n:s(n,r),i=e.length,r=-1;if("number"==typeof i){for(;++re?t():function(){if(1>--e)return t.apply(this,arguments)}},n.bind=j,n.bindAll=function(
+e){for(var t=arguments,n=1D(r,s,n)&&i.push(s)}return i},n.escape=function(e){return null==e?"":(e+"").replace(K,u)},n.every=S,n.filter=x,n.find=T,n.first=M,n.flatten=_,n.forEach=Lt,n.functions=p,n.groupBy=function(e,t,n){var r={},t=s(t,n);return Lt(e,function(e,n,i){n=t(e,n,i),(et.call(r,n)?r[n]:r[n]=[]).push(e)}),r},n.has=function(e,t){return e?et.call(e,t):!1},n.identity=F,n.indexOf=D,n.initial=function(e,t,n){return e?nt.call(e,0,-(null==t||n?1
+:t)):[]},n.intersection=function(e){var t=arguments,n=t.length,r=[];return Lt(e,function(e){if(0>D(r,e)){for(var i=n;--i;)if(0>D(t[i],e))return;r.push(e)}}),r},n.invert=d,n.invoke=function(e,t){var n=nt.call(arguments,2),r="function"==typeof t,i=[];return Lt(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},n.isArray=Ct,n.isBoolean=function(e){return!0===e||!1===e||rt.call(e)==ht},n.isDate=function(e){return rt.call(e)==pt},n.isElement=function(e){return e?1===e.nodeType:!1},n.isEmpty=function(e){
+if(!e)return!0;if(Ct(e)||b(e))return!e.length;for(var t in e)if(et.call(e,t))return!1;return!0},n.isEqual=v,n.isFinite=function(e){return ot(e)&&rt.call(e)==dt},n.isFunction=m,n.isNaN=function(e){return y(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=y,n.isObject=g,n.isRegExp=function(e){return rt.call(e)==mt},n.isString=b,n.isUndefined=function(e){return e===t},n.keys=kt,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:nt.call(e,-t||r)}},n.lastIndexOf=function(e
+,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?at(0,r+n):ft(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.map=N,n.max=C,n.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return et.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},n.min=function(e,t,n){var r=Infinity,i=-1,o=e?e.length:0,u=r;if(t||!Ct(e))t=s(t,n),Lt(e,function(e,n,i){n=t(e,n,i),nD(t,r,1)&&(n[r]=e)}),n},n.once=function(e){var t,n=!1;return function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},n.pairs=function(e){var t=[];return xt(e,function(e,n){t.push([n,e])}),t},n.pick=function(e){for(var t=0,n=Y.apply(U,arguments),r=n.length,i={};++t=f?(clearTimeout(o),u=a,i=e.apply(s,r)):o||(o=setTimeout(n,f)),i}},n.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++rD(arguments,i,1)&&r.push(i)}return r},n.wrap=function(e,t){return function(){var n=[e];return tt.apply(n,arguments),t.apply(this,n)}},n.zip=function(e){for(var t=-1,n=e?C(k(arguments,"length")):0,r=Array(n);++t