mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Avoid Firefox's unoptimized Function constructor.
Former-commit-id: 7cc5fc63c0cebd1410edde47c88e580c64fa2b98
This commit is contained in:
27
build.js
27
build.js
@@ -329,7 +329,7 @@
|
||||
precompiled = getFunctionSource(_.template(text, null, options)),
|
||||
prop = filename.replace(/\..*$/, '');
|
||||
|
||||
source.push(" templates['" + prop.replace(/'/g, "\\'") + "'] = " + precompiled + ';', '');
|
||||
source.push(" templates['" + prop.replace(/['\n\r\t]/g, '\\$&') + "'] = " + precompiled + ';', '');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -637,6 +637,18 @@
|
||||
return _.uniq(_.intersection(allMethods, methodNames));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the `createFunction` function from `source`.
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeCreateFunction(source) {
|
||||
return removeFunction(source, 'createFunction')
|
||||
.replace(/\n *try *{\s*createFunction[\s\S]+?catch[^}]+}\n/, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the all references to `refName` from `createIterator` in `source`.
|
||||
*
|
||||
@@ -663,7 +675,7 @@
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} funcName The name of the function to remove.
|
||||
* @returns {String} Returns the source with the function removed.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeFunction(source, funcName) {
|
||||
// remove function
|
||||
@@ -690,7 +702,7 @@
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the source with the `isArguments` fallback removed.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeIsArgumentsFallback(source) {
|
||||
return source.replace(getIsArgumentsFallback(source), '');
|
||||
@@ -701,7 +713,7 @@
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @returns {String} Returns the source with the `isFunction` fallback removed.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeIsFunctionFallback(source) {
|
||||
return source.replace(getIsFunctionFallback(source), '');
|
||||
@@ -785,7 +797,7 @@
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} varName The name of the variable to remove.
|
||||
* @returns {String} Returns the source with the variable removed.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeVar(source, varName) {
|
||||
// simplify `cloneableClasses`
|
||||
@@ -823,7 +835,7 @@
|
||||
* @private
|
||||
* @param {String} source The source to inspect.
|
||||
* @param {String} varName The name of the function to replace.
|
||||
* @returns {String} Returns the source with the function replaced.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function replaceFunction(source, funcName, funcValue) {
|
||||
var match = matchFunction(source, funcName);
|
||||
@@ -843,7 +855,7 @@
|
||||
* @private
|
||||
* @param {String} source The source to inspect.
|
||||
* @param {String} varName The name of the variable to replace.
|
||||
* @returns {String} Returns the source with the variable replaced.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function replaceVar(source, varName, varValue) {
|
||||
// replace a variable that's not part of a declaration list
|
||||
@@ -1710,6 +1722,7 @@
|
||||
source = removeVar(source, 'extendIteratorOptions');
|
||||
source = removeVar(source, 'iteratorTemplate');
|
||||
source = removeVar(source, 'noCharByIndex');
|
||||
source = removeCreateFunction(source);
|
||||
source = removeNoArgsClass(source);
|
||||
source = removeNoNodeClass(source);
|
||||
}
|
||||
|
||||
@@ -246,6 +246,9 @@
|
||||
// add newline to `+"__p+='"` in underscore.js `_.template`
|
||||
source = source.replace(/\+"__p\+='"/g, '+"\\n__p+=\'"');
|
||||
|
||||
// add newline to `body + '}'` in `createFunction`
|
||||
source = source.replace(/body *\+ *'}'/, 'body+"\\n}"');
|
||||
|
||||
// remove whitespace from `_.template` related regexes
|
||||
source = source.replace(/(?:reEmptyString\w+|reInsertVariable) *=.+/g, function(match) {
|
||||
return match.replace(/ |\\n/g, '');
|
||||
@@ -318,7 +321,9 @@
|
||||
modified = snippet;
|
||||
|
||||
// add brackets to whitelisted properties so the Closure Compiler won't mung them
|
||||
modified = modified.replace(RegExp('\\.(' + iteratorOptions.join('|') + ')\\b', 'g'), "['$1']");
|
||||
modified = modified.replace(RegExp('\\.(' + iteratorOptions.join('|') + ')\\b', 'g'), function(match, prop) {
|
||||
return "['" + prop.replace(/['\n\r\t]/g, '\\$&') + "']";
|
||||
});
|
||||
|
||||
if (isCreateIterator) {
|
||||
// replace with modified snippet early and clip snippet to the `factory`
|
||||
|
||||
35
lodash.js
35
lodash.js
@@ -16,6 +16,9 @@
|
||||
window = freeGlobal;
|
||||
}
|
||||
|
||||
/** Document shortcut used by `createFunction` */
|
||||
var document = window.document;
|
||||
|
||||
/** Used for array and object method references */
|
||||
var arrayRef = [],
|
||||
// avoid a Closure Compiler bug by creatively creating an object
|
||||
@@ -171,7 +174,7 @@
|
||||
* a string without a `toString` property value of `typeof` "function".
|
||||
*/
|
||||
try {
|
||||
var noNodeClass = ({ 'toString': 0 } + '', toString.call(window.document || 0) == objectClass);
|
||||
var noNodeClass = ({ 'toString': 0 } + '', toString.call(document || 0) == objectClass);
|
||||
} catch(e) { }
|
||||
|
||||
/* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */
|
||||
@@ -298,6 +301,34 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function from the given `args` and `body` strings.
|
||||
*
|
||||
* @private
|
||||
* @param {String} args The comma separated function arguments.
|
||||
* @param {String} body The function body.
|
||||
* @returns {Function} The new function.
|
||||
*/
|
||||
var createFunction = function(args, body) {
|
||||
var oldValue = window._,
|
||||
script = document.createElement('script'),
|
||||
sibling = document.getElementsByTagName('script')[0];
|
||||
|
||||
// use script injection to avoid Firefox's unoptimized `Function` constructor
|
||||
// http://bugzil.la/804933
|
||||
script.text = 'var _=function(' + args + '){' + body + '}';
|
||||
sibling.parentNode.insertBefore(script, sibling).parentNode.removeChild(script);
|
||||
var result = window._;
|
||||
window._ = oldValue;
|
||||
return result;
|
||||
};
|
||||
|
||||
try {
|
||||
createFunction();
|
||||
} catch(e) {
|
||||
createFunction = Function;
|
||||
}
|
||||
|
||||
/**
|
||||
* The template used to create iterator functions.
|
||||
*
|
||||
@@ -639,7 +670,7 @@
|
||||
data.firstArg = /^[^,]+/.exec(args)[0];
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
var factory = createFunction(
|
||||
'createCallback, hasOwnProperty, isArguments, isString, objectTypes, ' +
|
||||
'nativeKeys, propertyIsEnumerable',
|
||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||
|
||||
74
lodash.min.js
vendored
74
lodash.min.js
vendored
@@ -2,40 +2,40 @@
|
||||
Lo-Dash 0.10.0 lodash.com/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||et);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(wt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return wt.call(s,r)&&-1<q(s[r],n)}return-1<q(e,n,t)}}function u(e){return e.charCodeAt(0)}function a(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 f(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(xt.call(u)):n),this instanceof r?(d.prototype=e.prototype,a=new d,u=e.apply(a,u),T(u)?u:a):e.apply(a,u)}var i=x(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function l(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:X}function c(){for(var e={b:"",c:"",e:Rt,f:Qt,g:"",h:Wt,i:Vt,j:vt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[
|
||||
i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var i,x,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){x=l[i];"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){x=l[i+=''];"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+="x=l[i];"+
|
||||
e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+="x=l[i];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){x=l[i];"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",Function("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(l,wt,m,N,Yt,At,St)}function h(e){return"\\"+
|
||||
Zt[e]}function p(e){return un[e]}function d(){}function v(e){return an[e]}function m(e){return Tt.call(e)==Dt}function g(e){var t=i;if(!e||"object"!=typeof e||m(e))return t;var n=e.constructor;return(!$t||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!x(n)||n instanceof n)?Ut?(sn(e,function(e,n,r){return t=!wt.call(r,n),i}),t===i):(sn(e,function(e,n){t=n}),t===i||wt.call(e,t)):t}function y(e){var t=[];return on(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(e)){var u=Tt.call(e);if(!Gt[u]||Xt&&m(e))return e;var a=u==Pt,n=a||(u==Ft?cn(e):n)}if(!n||!t)return n?a?xt.call(e):rn({},e):e;n=e.constructor;switch(u){case Ht:case Bt:return new n(+e);case jt:case qt:return new n(e);case It:return n(e.source,ut.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?pn:on)(e,function(e,n){f[n]=b(e,t,r,s,o)}),f}function w(e){var t=[];return sn(e,function(e,n){x(e)&&t.push(n)}),t.sort()
|
||||
}function E(e){var t={};return on(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=Tt.call(e);if(u!=Tt.call(t))return i;switch(u){case Ht:case Bt:return+e==+t;case jt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case It:case qt:return e==t+""}var a=u==Pt||u==Dt;if(Xt&&!a&&(a=m(e))&&!m(t))return i;if(!a){if(e.__wrapped__||t.__wrapped__)return S(e.__wrapped__||e,t.__wrapped__||t);if(u!=Ft||$t&&("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&&(!x(u)||!(u instanceof u&&x(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(wt.call(e,c)&&(l++,!wt.call(t,c)||!S(e[c],t[c],s,o)))return i;for(c in t)if(wt.call(t,c)&&!(l--))return i;if(Rt)for(;7>++u;)if(c=
|
||||
vt[u],wt.call(e,c)&&(!wt.call(t,c)||!S(e[c],t[c],s,o)))return i;return n}function x(e){return"function"==typeof e}function T(e){return e?Yt[typeof e]:i}function N(e){return Tt.call(e)==qt}function C(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==Z&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++s<o;)on(i[s],function(t,n){var i,s,o;if(t&&((s=ln(t))||cn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?ln(o)?o:[]:cn(o)?o:{}),e[n]=C(o,t,Z,u,a))}else t!=
|
||||
r&&(e[n]=t)});return e}function k(e){var t=[];return on(e,function(e){t.push(e)}),t}function L(e,t,n){var r=-1,s=e?e.length:0,o=i,n=(0>n?Ot(0,s+n):n)||0;return"number"==typeof s?o=-1<(N(e)?e.indexOf(t,n):q(e,t,n)):pn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function A(e,t,r){var i=n,t=l(t,r);if(ln(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else pn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function O(e,t,n){var r=[],t=l(t,n);if(ln(e))for(var n=-1,i=e.length;++n<i;){var s=e[n]
|
||||
;t(s,n,e)&&r.push(s)}else pn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function M(e,t,n){var r,t=l(t,n);return pn(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function _(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=l(t,n);if(ln(e))for(;++r<i;)s[r]=t(e[r],r,e);else pn(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function D(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(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 P(e,t){var n=[];return pn(e,function(e){n.push(e[t])}),n}function H(e,t,n,r){var s=3>arguments.length;return t||(t=X),pn(e,function(e,o,u){n=s?(s=i,e):t.call(r,n,e,o,u)}),n}function B(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=hn(e),o=a.length;else Vt&&N(e)&&(s=e.split(""));return t||(t=X),pn(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 j(e,t,n){var r,t=l(t,n);if(ln(e))for(var n=-1,i=e.length
|
||||
;++n<i&&!(r=t(e[n],n,e)););else pn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function F(e,t,n){if(e)return t==r||n?e[0]:xt.call(e,0,t)}function I(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];ln(s)?Et.apply(i,t?s:I(s)):i.push(s)}return i}function q(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Ot(0,i+n):n||0)-1;else if(n)return r=U(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function R(e,t,n){return e?xt.call(e,t==r||n?1:t):[]}function U(e,t,n,r){
|
||||
for(var i=0,s=e?e.length:i,n=n?l(n,r):X,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function z(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var c={};n&&(a=[],n=l(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=wt.call(c,h+"")?c[h]:c[h]=[]);if(t?!s||a[a.length-1]!==h:0>q(a,h))(n||f)&&a.push(h),u.push(r)}return u}function W(e,t){return Kt||Nt&&2<arguments.length?Nt.call.apply(Nt,arguments):f(e,t,xt.call(arguments,2))}function X(e){return e
|
||||
}function V(e){pn(w(e),function(t){var n=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return Et.apply(e,arguments),e=n.apply(s,e),new s(e)}})}function $(){return this.__wrapped__}var n=!0,r=null,i=!1,J="object"==typeof exports&&exports,K="object"==typeof global&&global;K.global===K&&(e=K);var Q=[],G=new function(){},Y=0,Z=G,et=30,tt=e._,nt=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,rt=/&(?:amp|lt|gt|quot|#x27);/g,it=/\b__p\+='';/g,st=/\b(__p\+=)''\+/g,
|
||||
ot=/(__e\(.*?\)|\b__t\))\+'';/g,ut=/\w*$/,at=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,ft=RegExp("^"+(G.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),lt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,ct=/<%=([\s\S]+?)%>/g,ht=/($^)/,pt=/[&<>"']/g,dt=/['\n\r\t\u2028\u2029\\]/g,vt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),mt=Math.ceil,gt=Q.concat,yt=Math.floor,bt=ft.test(bt=Object.getPrototypeOf)&&bt,
|
||||
wt=G.hasOwnProperty,Et=Q.push,St=G.propertyIsEnumerable,xt=Q.slice,Tt=G.toString,Nt=ft.test(Nt=xt.bind)&&Nt,Ct=ft.test(Ct=Array.isArray)&&Ct,kt=e.isFinite,Lt=e.isNaN,At=ft.test(At=Object.keys)&&At,Ot=Math.max,Mt=Math.min,_t=Math.random,Dt="[object Arguments]",Pt="[object Array]",Ht="[object Boolean]",Bt="[object Date]",jt="[object Number]",Ft="[object Object]",It="[object RegExp]",qt="[object String]",Rt,Ut,zt=(zt={0:1,length:1},Q.splice.call(zt,0,1),zt[0]),Wt=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)Wt=!n;Rt=!/valueOf/.test(t),Ut="x"!=t[0]})(1);var Xt=!m(arguments),Vt="xx"!="x"[0]+Object("x")[0];try{var $t=("[object Object]",Tt.call(e.document||0)==Ft)}catch(Jt){}var Kt=Nt&&/\n|Opera/.test(Nt+Tt.call(e.opera)),Qt=At&&/^.+$|true/.test(At+!!e.attachEvent),Gt={};Gt[Dt]=Gt["[object Function]"]=i,Gt[Pt]=Gt[Ht]=Gt[Bt]=Gt[jt]=Gt[Ft]=Gt[It]=Gt[qt]=n;var Yt={"boolean":i,"function":n,object:n,number:i,string:i,"undefined"
|
||||
:i},Zt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:ct,variable:""};var en={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=x",c:"}}"},tn={a:"d,c,w",k:"c=e(c,w)",b:"if(c(x,i,d)===false)return t",g:"if(c(x,i,d)===false)return t"},nn={b:r},rn=c(en);Xt&&(m=function(e){return e?wt.call(e,"callee"):i});var sn=c(tn,nn,{l:i}),on=
|
||||
c(tn,nn),un={"&":"&","<":"<",">":">",'"':""","'":"'"},an=E(un),fn=c(en,{g:"if(t[i]==null)"+en.g}),ln=Ct||function(e){return Tt.call(e)==Pt};x(/x/)&&(x=function(e){return"[object Function]"==Tt.call(e)});var cn=bt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=bt(t))&&bt(n);return n?e==n||bt(e)==n&&!m(e):g(e)}:g,hn=At?function(e){return"function"==typeof e&&St.call(e,"prototype")?y(e):T(e)?At(e):[]}:y,pn=c(tn);s.VERSION="0.10.0",s.assign=
|
||||
rn,s.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},s.bind=W,s.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=w(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=W(e[i],e)}return e},s.bindKey=function(e,t){return f(e,t,xt.call(arguments,2))},s.chain=function(e){return new s(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=L,s.countBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),wt.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,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=fn,s.defer=function(e){var n=xt.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},s.delay=function(e,n)
|
||||
{var r=xt.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},s.difference=function(e){for(var t=-1,n=e?e.length:0,r=gt.apply(Q,arguments),r=o(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},s.escape=function(e){return e==r?"":(e+"").replace(pt,p)},s.every=A,s.filter=O,s.find=M,s.first=F,s.flatten=I,s.forEach=pn,s.forIn=sn,s.forOwn=on,s.functions=w,s.groupBy=function(e,t,n){var r={},t=l(t,n);return pn(e,function(e,n,i){n=t(e,n,i),(wt.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=
|
||||
function(e,t){return e?wt.call(e,t):i},s.identity=X,s.indexOf=q,s.initial=function(e,t,n){return e?xt.call(e,0,-(t==r||n?1:t)):[]},s.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return pn(e,function(e){if(0>q(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=o(t[s])))(e))return;i.push(e)}}),i},s.invert=E,s.invoke=function(e,t){var n=xt.call(arguments,2),r="function"==typeof t,i=[];return pn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=m,s.isArray=ln,s.isBoolean=function(e
|
||||
){return e===n||e===i||Tt.call(e)==Ht},s.isDate=function(e){return Tt.call(e)==Bt},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=Tt.call(e),s=e.length;return r==Pt||r==qt||r==Dt||Xt&&m(e)||r==Ft&&"number"==typeof s&&x(e.splice)?!s:(on(e,function(){return t=i}),t)},s.isEqual=S,s.isFinite=function(e){return kt(e)&&!Lt(parseFloat(e))},s.isFunction=x,s.isNaN=function(e){return Tt.call(e)==jt&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=
|
||||
function(e){return Tt.call(e)==jt},s.isObject=T,s.isPlainObject=cn,s.isRegExp=function(e){return Tt.call(e)==It},s.isString=N,s.isUndefined=function(e){return e===t},s.keys=hn,s.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:xt.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Ot(0,r+n):Mt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},s.map=_,s.max=D,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):
|
||||
arguments[0];return wt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=C,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!ln(e))t=!t&&N(e)?u:l(t,n),pn(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=V,s.noConflict=function(){return e._=tt,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=l(t,n);else var s=
|
||||
gt.apply(Q,arguments);return sn(e,function(e,n,o){if(r?!t(e,n,o):0>q(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 on(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return f(e,xt.call(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=gt.apply(Q,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=l(t,n),sn(e,function(e,n,i){t(e,n,i)&&
|
||||
(r[n]=e)});return r},s.pluck=P,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+yt(_t()*((+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=Ot(0,mt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=H,s.reduceRight=B,s.reject=function(e,t,n){return t=l(t,n),O(e,function(e,n,r){return!t(e,n,r)})},s.rest=R,s.result=function(e,t){var n=e?e[t]:r;return x(n)?e[t]():n},s.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return pn(e,function(
|
||||
e){var r=yt(_t()*(++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:hn(e).length},s.some=j,s.sortBy=function(e,t,n){var r=[],t=l(t,n);pn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(a);e--;)r[e]=r[e].c;return r},s.sortedIndex=U,s.tap=function(e,t){return t(e),e},s.template=function(e,t,n){e||(e=""),n||(n={});var r,i,o=s.templateSettings,u=0,a=n.interpolate||o.interpolate||ht,f="__p += '",l=n.variable||o.variable,c=l;e.replace(
|
||||
RegExp((n.escape||o.escape||ht).source+"|"+a.source+"|"+(a===ct?lt:ht).source+"|"+(n.evaluate||o.evaluate||ht).source+"|$","g"),function(t,n,i,s,o,a){i||(i=s),f+=e.slice(u,a).replace(dt,h),f+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||nt.test(n||i)),u=a+t.length}),f+="';",c||(l="obj",r?f="with("+l+"){"+f+"}":(n=RegExp("(\\(\\s*)"+l+"\\."+l+"\\b","g"),f=f.replace(at,"$&"+l+".").replace(n,"$1__d"))),f=(r?f.replace(it,""):f).replace(st,"$1").replace(ot,"$1;"
|
||||
),f="function("+l+"){"+(c?"":l+"||("+l+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(c?"":",__d="+l+"."+l+"||"+l)+";")+f+"return __p}";try{i=Function("_","return "+f)(s)}catch(p){throw p.source=f,p}return t?i(t):(i.source=f,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?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout
|
||||
(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){var t=e?e.length:0;if("number"==typeof t){Vt&&N(e)&&(e=e.split(""));for(var n=-1,r=Array(t);++n<t;)r[n]=e[n];return r}return k(e)},s.unescape=function(e){return e==r?"":(e+"").replace(rt,v)},s.union=function(){return z(gt.apply(Q,arguments))},s.uniq=z,s.uniqueId=function(e){var t=Y++;return e?e+t:t},s.values=k,s.where=function(e,t){var n=hn(t);return O(e,function(e){for(var r=
|
||||
n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!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 Et.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?D(P(arguments,"length")):0,r=Array(n);++t<n;)r[t]=P(arguments,t);return r},s.all=A,s.any=j,s.collect=_,s.detect=M,s.drop=R,s.each=pn,s.extend=rn,s.foldl=H,s.foldr=B,s.head=F,s.include=L,
|
||||
s.inject=H,s.methods=w,s.select=O,s.tail=R,s.take=F,s.unique=z,V(s),s.prototype.chain=function(){return this},s.prototype.toString=function(){return""+this.__wrapped__},s.prototype.value=$,s.prototype.valueOf=$,pn(["first","last"],function(e){var t=s[e];t&&(s.prototype[e]=function(e,n){var i=t(this.__wrapped__,e,n);return e==r||n?i:new s(i)})}),pn(O(w(s),function(e){return/^(?:contains|every|find|has|is[A-Z].+|reduce.*|some)$/.test(e)}),function(e){var t=s[e];s.prototype[e]=function(){var e=[this
|
||||
.__wrapped__];return Et.apply(e,arguments),t.apply(s,e)}}),pn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=Q[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),zt&&e.length===0&&delete e[0],this}}),pn(["concat","join","slice"],function(e){var t=Q[e];s.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new s(e)}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=s,define(function(){return s})):J?"object"==typeof
|
||||
module&&module&&module.exports==J?(module.exports=s)._=s:J._=s:e._=s})(this);
|
||||
;(function(e,t){function s(t,n){var r=e._,i=G.createElement("script"),s=G.getElementsByTagName("script")[0];return i.text="var _=function("+t+"){"+n+"\n}",s.parentNode.insertBefore(i,s).parentNode.removeChild(i),i=e._,e._=r,i}function o(e){if(e&&e.__wrapped__)return e;if(!(this instanceof o))return new o(e);this.__wrapped__=e}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||nt);if(i)for(var s={},n=t-1;++n<r;){var o=e[n]+"";(St.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+""
|
||||
;return St.call(s,r)&&-1<R(s[r],n)}return-1<R(e,n,t)}}function a(e){return e.charCodeAt(0)}function f(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 l(e,t,n){function r(){var u=arguments,a=s?this:t;return i||(e=t[o]),n.length&&(u=u.length?n.concat(Nt.call(u)):n),this instanceof r?(v.prototype=e.prototype,a=new v,u=e.apply(a,u),N(u)?u:a):e.apply(a,u)}var i=T(e),s=!n,o=t;return s&&(n=t),i||(t=e),r}function c(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:V}function h(){for(var e={b:"",c:"",e:zt,f:Yt,g:"",h:Vt,i:Jt,j:gt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var i,x,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){",e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){x=l[i];"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){x=l[i+=''];"+e.g+"}}else {"
|
||||
),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+="x=l[i];"+e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+="x=l[i];"+e.g+";";if(!e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"
|
||||
),r+="h.call(l,i)){x=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,St,g,C,en,Mt,Tt)}function p(e){return"\\"+tn[e]}function d(e){return ln[e]}function v(){}function m(e){return cn[e]}function g(e){return Ct.call(e)==Ht}function y(e){var t=i;if(!e||"object"!=typeof e||g(e))return t;var n=e.constructor;return(!Kt||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!T(n)||n instanceof n)?Wt?(an(e,function(e,n,r){return t=!St.call
|
||||
(r,n),i}),t===i):(an(e,function(e,n){t=n}),t===i||St.call(e,t)):t}function b(e){var t=[];return fn(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=Ct.call(e);if(!Zt[u]||$t&&g(e))return e;var a=u==Bt,n=a||(u==qt?dn(e):n)}if(!n||!t)return n?a?Nt.call(e):un({},e):e;n=e.constructor;switch(u){case jt:case Ft:return new n(+e);case It:case Ut:return new n(e);case Rt:return n(e.source,ft.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?mn:fn)(e,function(e,n){f[n]=w(e,t,r,s,o)}),f}function E(e){var t=[];return an(e,function(e,n){T(e)&&t.push(n)}),t.sort()}function S(e){var t={};return fn(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=Ct.call(e);if(u!=Ct.call(t))return i;switch(u){case jt:case Ft:return+e==+t;case It:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Rt:case Ut:return e==t+""}var a=u==Bt||u==Ht;if($t&&!
|
||||
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!=qt||Kt&&("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=n,l=0;s.push(e),o.push(t);if(a){l=e.length;if(f=l==t.length)for(;l--&&(f=x
|
||||
(e[l],t[l],s,o)););return f}for(var c in e)if(St.call(e,c)&&(l++,!St.call(t,c)||!x(e[c],t[c],s,o)))return i;for(c in t)if(St.call(t,c)&&!(l--))return i;if(zt)for(;7>++u;)if(c=gt[u],St.call(e,c)&&(!St.call(t,c)||!x(e[c],t[c],s,o)))return i;return n}function T(e){return"function"==typeof e}function N(e){return e?en[typeof e]:i}function C(e){return Ct.call(e)==Ut}function k(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==tt&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++s<o;)fn(i[s],function(
|
||||
t,n){var i,s,o;if(t&&((s=pn(t))||dn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?pn(o)?o:[]:dn(o)?o:{}),e[n]=k(o,t,tt,u,a))}else t!=r&&(e[n]=t)});return e}function L(e){var t=[];return fn(e,function(e){t.push(e)}),t}function A(e,t,n){var r=-1,s=e?e.length:0,o=i,n=(0>n?_t(0,s+n):n)||0;return"number"==typeof s?o=-1<(C(e)?e.indexOf(t,n):R(e,t,n)):mn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function O(e,t,r){var i=n,t=c(t,r);if(pn(e))for(var r=-1,s=e.
|
||||
length;++r<s&&(i=!!t(e[r],r,e)););else mn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function M(e,t,n){var r=[],t=c(t,n);if(pn(e))for(var n=-1,i=e.length;++n<i;){var s=e[n];t(s,n,e)&&r.push(s)}else mn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function _(e,t,n){var r,t=c(t,n);return mn(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function D(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=c(t,n);if(pn(e))for(;++r<i;)s[r]=t(e[r],r,e);else mn(e,function(e,n,i){s[++r]=t
|
||||
(e,n,i)});return s}function P(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!pn(e))t=!t&&C(e)?a:c(t,n),mn(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 H(e,t){var n=[];return mn(e,function(e){n.push(e[t])}),n}function B(e,t,n,r){var s=3>arguments.length;return t||(t=V),mn(e,function(e,o,u){n=s?(s=i,e):t.call(r,n,e,o,u)}),n}function j(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=vn(e),o=a.length;else Jt&&
|
||||
C(e)&&(s=e.split(""));return t||(t=V),mn(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 F(e,t,n){var r,t=c(t,n);if(pn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else mn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function I(e,t,n){if(e)return t==r||n?e[0]:Nt.call(e,0,t)}function q(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];pn(s)?xt.apply(i,t?s:q(s)):i.push(s)}return i}function R(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=
|
||||
(0>n?_t(0,i+n):n||0)-1;else if(n)return r=z(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function U(e,t,n){return e?Nt.call(e,t==r||n?1:t):[]}function z(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?c(n,r):V,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function W(e,t,n,r){var s=-1,o=e?e.length:0,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var l={};n&&(a=[],n=c(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=St.call(l,h+"")?l[h]:l[h]=[]);if(t?!s||a[a.length-1
|
||||
]!==h:0>R(a,h))(n||f)&&a.push(h),u.push(r)}return u}function X(e,t){return Gt||kt&&2<arguments.length?kt.call.apply(kt,arguments):l(e,t,Nt.call(arguments,2))}function V(e){return e}function $(e){mn(E(e),function(t){var n=o[t]=e[t];o.prototype[t]=function(){var e=[this.__wrapped__];return xt.apply(e,arguments),e=n.apply(o,e),new o(e)}})}function J(){return this.__wrapped__}var n=!0,r=null,i=!1,K="object"==typeof exports&&exports,Q="object"==typeof global&&global;Q.global===Q&&(e=Q);var G=e.document
|
||||
,Y=[],Z=new function(){},et=0,tt=Z,nt=30,rt=e._,it=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,st=/&(?:amp|lt|gt|quot|#x27);/g,ot=/\b__p\+='';/g,ut=/\b(__p\+=)''\+/g,at=/(__e\(.*?\)|\b__t\))\+'';/g,ft=/\w*$/,lt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,ct=RegExp("^"+(Z.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ht=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,pt=/<%=([\s\S]+?)%>/g,dt=/($^)/,vt=/[&<>"']/g,mt=/['\n\r\t\u2028\u2029\\]/g
|
||||
,gt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),yt=Math.ceil,bt=Y.concat,wt=Math.floor,Et=ct.test(Et=Object.getPrototypeOf)&&Et,St=Z.hasOwnProperty,xt=Y.push,Tt=Z.propertyIsEnumerable,Nt=Y.slice,Ct=Z.toString,kt=ct.test(kt=Nt.bind)&&kt,Lt=ct.test(Lt=Array.isArray)&&Lt,At=e.isFinite,Ot=e.isNaN,Mt=ct.test(Mt=Object.keys)&&Mt,_t=Math.max,Dt=Math.min,Pt=Math.random,Ht="[object Arguments]",Bt="[object Array]",jt="[object Boolean]",Ft="[object Date]"
|
||||
,It="[object Number]",qt="[object Object]",Rt="[object RegExp]",Ut="[object String]",zt,Wt,Xt=(Xt={0:1,length:1},Y.splice.call(Xt,0,1),Xt[0]),Vt=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)Vt=!n;zt=!/valueOf/.test(t),Wt="x"!=t[0]})(1);var $t=!g(arguments),Jt="xx"!="x"[0]+Object("x")[0];try{var Kt=("[object Object]",Ct.call(G||0)==qt)}catch(Qt){}var Gt=kt&&/\n|Opera/.test(kt+Ct.call(e.opera)),Yt=Mt&&/^.+$|true/.test(Mt+!!
|
||||
e.attachEvent),Zt={};Zt[Ht]=Zt["[object Function]"]=i,Zt[Bt]=Zt[jt]=Zt[Ft]=Zt[It]=Zt[qt]=Zt[Rt]=Zt[Ut]=n;var en={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},tn={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:pt,variable:""};try{s()}catch(nn){s=Function}var rn={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=x"
|
||||
,c:"}}"},sn={a:"d,c,w",k:"c=e(c,w)",b:"if(c(x,i,d)===false)return t",g:"if(c(x,i,d)===false)return t"},on={b:r},un=h(rn);$t&&(g=function(e){return e?St.call(e,"callee"):i});var an=h(sn,on,{l:i}),fn=h(sn,on),ln={"&":"&","<":"<",">":">",'"':""","'":"'"},cn=S(ln),hn=h(rn,{g:"if(t[i]==null)"+rn.g}),pn=Lt||function(e){return Ct.call(e)==Bt};T(/x/)&&(T=function(e){return"[object Function]"==Ct.call(e)});var dn=Et?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof
|
||||
t&&(n=Et(t))&&Et(n);return n?e==n||Et(e)==n&&!g(e):y(e)}:y,vn=Mt?function(e){return"function"==typeof e&&Tt.call(e,"prototype")?b(e):N(e)?Mt(e):[]}:b,mn=h(sn);o.VERSION="0.10.0",o.assign=un,o.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=X,o.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=E(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=X(e[i],e)}return e},o.bindKey=function(e,t){return l(e,t,Nt.call(arguments,2))},o.chain=function(e){return new
|
||||
o(e)},o.clone=w,o.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},o.compose=function(){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},o.contains=A,o.countBy=function(e,t,n){var r={},t=c(t,n);return mn(e,function(e,n,i){n=t(e,n,i),St.call(r,n)?r[n]++:r[n]=1}),r},o.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,
|
||||
clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},o.defaults=hn,o.defer=function(e){var n=Nt.call(arguments,1);return setTimeout(function(){e.apply(t,n)},1)},o.delay=function(e,n){var r=Nt.call(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},o.difference=function(e){for(var t=-1,n=e?e.length:0,r=bt.apply(Y,arguments),r=u(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},o.escape=function(e){return e==r?"":(e+"").replace(vt,d)},o.every=O,o.filter=M,o.find=_,o.first=I,o.flatten=
|
||||
q,o.forEach=mn,o.forIn=an,o.forOwn=fn,o.functions=E,o.groupBy=function(e,t,n){var r={},t=c(t,n);return mn(e,function(e,n,i){n=t(e,n,i),(St.call(r,n)?r[n]:r[n]=[]).push(e)}),r},o.has=function(e,t){return e?St.call(e,t):i},o.identity=V,o.indexOf=R,o.initial=function(e,t,n){return e?Nt.call(e,0,-(t==r||n?1:t)):[]},o.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return mn(e,function(e){if(0>R(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=Nt.call(arguments,2),r="function"==typeof t,i=[];return mn(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},o.isArguments=g,o.isArray=pn,o.isBoolean=function(e){return e===n||e===i||Ct.call(e)==jt},o.isDate=function(e){return Ct.call(e)==Ft},o.isElement=function(e){return e?1===e.nodeType:i},o.isEmpty=function(e){var t=n;if(!e)return t;var r=Ct.call(e),s=e.length;return r==Bt||r==Ut||r==Ht||$t&&g(e)||r==qt&&"number"==typeof s&&T(e.splice)?!s:(fn(e,function(){return t=i}),t)},o
|
||||
.isEqual=x,o.isFinite=function(e){return At(e)&&!Ot(parseFloat(e))},o.isFunction=T,o.isNaN=function(e){return Ct.call(e)==It&&e!=+e},o.isNull=function(e){return e===r},o.isNumber=function(e){return Ct.call(e)==It},o.isObject=N,o.isPlainObject=dn,o.isRegExp=function(e){return Ct.call(e)==Rt},o.isString=C,o.isUndefined=function(e){return e===t},o.keys=vn,o.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:Nt.call(e,-t||i)}},o.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof
|
||||
n&&(r=(0>n?_t(0,r+n):Dt(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=D,o.max=P,o.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return St.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.merge=k,o.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!pn(e))t=!t&&C(e)?a:c(t,n),mn(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},o.mixin=$,o.noConflict=function(){return e._=rt,this},o.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},o.omit=function(e,t,n){var r="function"==typeof t,i={};if(r)t=c(t,n);else var s=bt.apply(Y,arguments);return an(e,function(e,n,o){if(r?!t(e,n,o):0>R(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 fn(e,function(e,n){t.push([n,e])}),t},o.partial=function(e){return l(e,Nt.call(arguments,1))},o.pick=function(
|
||||
e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=bt.apply(Y,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=c(t,n),an(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},o.pluck=H,o.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+wt(Pt()*((+t||0)-e+1))},o.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=_t(0,yt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},o.reduce=B,o.reduceRight=j,o.reject=function(e,t,n){return t=c(t,n),M(e,
|
||||
function(e,n,r){return!t(e,n,r)})},o.rest=U,o.result=function(e,t){var n=e?e[t]:r;return T(n)?e[t]():n},o.shuffle=function(e){var t=-1,n=Array(e?e.length:0);return mn(e,function(e){var r=wt(Pt()*(++t+1));n[t]=n[r],n[r]=e}),n},o.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:vn(e).length},o.some=F,o.sortBy=function(e,t,n){var r=[],t=c(t,n);mn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(f);e--;)r[e]=r[e].c;return r},o.sortedIndex=z,o.tap=function(e,t){return t
|
||||
(e),e},o.template=function(e,t,n){e||(e=""),n||(n={});var r,i,s=o.templateSettings,u=0,a=n.interpolate||s.interpolate||dt,f="__p += '",l=n.variable||s.variable,c=l;e.replace(RegExp((n.escape||s.escape||dt).source+"|"+a.source+"|"+(a===pt?ht:dt).source+"|"+(n.evaluate||s.evaluate||dt).source+"|$","g"),function(t,n,i,s,o,a){i||(i=s),f+=e.slice(u,a).replace(mt,p),f+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||it.test(n||i)),u=a+t.length}),f+="';",c||(l="obj"
|
||||
,r?f="with("+l+"){"+f+"}":(n=RegExp("(\\(\\s*)"+l+"\\."+l+"\\b","g"),f=f.replace(lt,"$&"+l+".").replace(n,"$1__d"))),f=(r?f.replace(ot,""):f).replace(ut,"$1").replace(at,"$1;"),f="function("+l+"){"+(c?"":l+"||("+l+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(c?"":",__d="+l+"."+l+"||"+l)+";")+f+"return __p}";try{i=Function("_","return "+f)(o)}catch(h){throw h.source=f,h}return t?i(t):(i.source=f,i)},o.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?(clearTimeout(u),a=r,s=e.apply(o,i)):u||(u=setTimeout(n,f)),s}},o.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},o.toArray=function(e){var t=e?e.length:0;if("number"==typeof t){Jt&&C(e)&&(e=e.split(""));for(var n=-1,r=Array(t);++n<t;)r[n]=e[n];return r}return L(e)},o.unescape=function(e){return e==r?"":(e+"").replace(st,m)},o.union=function(
|
||||
){return W(bt.apply(Y,arguments))},o.uniq=W,o.uniqueId=function(e){var t=et++;return e?e+t:t},o.values=L,o.where=function(e,t){var n=vn(t);return M(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===t[n[r]];if(!i)break}return!!i})},o.without=function(e){for(var t=-1,n=e?e.length:0,r=u(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},o.wrap=function(e,t){return function(){var n=[e];return xt.apply(n,arguments),t.apply(this,n)}},o.zip=function(e){for(var t=-1,n=e?P(H(arguments,"length"
|
||||
)):0,r=Array(n);++t<n;)r[t]=H(arguments,t);return r},o.all=O,o.any=F,o.collect=D,o.detect=_,o.drop=U,o.each=mn,o.extend=un,o.foldl=B,o.foldr=j,o.head=I,o.include=A,o.inject=B,o.methods=E,o.select=M,o.tail=U,o.take=I,o.unique=W,$(o),o.prototype.chain=function(){return this},o.prototype.toString=function(){return""+this.__wrapped__},o.prototype.value=J,o.prototype.valueOf=J,mn(["first","last"],function(e){var t=o[e];t&&(o.prototype[e]=function(e,n){var i=t(this.__wrapped__,e,n);return e==r||n?i:new
|
||||
o(i)})}),mn(M(E(o),function(e){return/^(?:contains|every|find|has|is[A-Z].+|reduce.*|some)$/.test(e)}),function(e){var t=o[e];o.prototype[e]=function(){var e=[this.__wrapped__];return xt.apply(e,arguments),t.apply(o,e)}}),mn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=Y[e];o.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Xt&&e.length===0&&delete e[0],this}}),mn(["concat","join","slice"],function(e){var t=Y[e];o.prototype[e]=function(){var e=
|
||||
t.apply(this.__wrapped__,arguments);return new o(e)}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=o,define(function(){return o})):K?"object"==typeof module&&module&&module.exports==K?(module.exports=o)._=o:K._=o:e._=o})(this);
|
||||
Reference in New Issue
Block a user