mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
43 lines
21 KiB
JavaScript
43 lines
21 KiB
JavaScript
/**
|
|
* @license
|
|
* Lo-Dash 1.0.1 (Custom Build) lodash.com/license
|
|
* Build: `lodash -o ./dist/lodash.compat.js`
|
|
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
|
*/
|
|
;(function(n){function t(i){function a(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof a?(this.__wrapped__=n,void 0):new a(n)}function P(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||p);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Wt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Wt.call(o,e)&&-1<bt(o[e],r)}return-1<bt(n,r,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
|
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function C(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=H(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(c=L(n.prototype),a=n.apply(c,a),et(a)?a:c):n.apply(c,a)}var o=rt(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function T(n,t,r){if(n==u)return kt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var i=$r(n);return function(t){for(var r=i.length,e=o;r--&&(e=tt(t[i[r]],n[i[r]],l)););return e
|
|
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function K(){for(var n,t={e:At,f:$t,g:gr,i:yr,j:_r,k:w,b:"l(n)",c:"",h:"",l:"",m:e},r=0;n=arguments[r];r++)for(var u in n)t[u]=n[u];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b?(r+="var o=n.length;j=-1;if("+t.b+"){",t.j&&(r+="if(m(n)){n=n.split('')}"),r+="while(++j<o){"+t.h+"}}else{"):t.i&&(r+="var o=n.length;j=-1;if(o&&k(n)){while(++j<o){j+='';"+t.h+"}}else{"),t.f&&(r+="var v=typeof n=='function';"),t.g&&t.m?(r+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];",t.f&&(r+="if(!(v&&j=='prototype')){"),r+=t.h+"",t.f&&(r+="}")):(r+="for(j in n){",(t.f||t.m)&&(r+="if(",t.f&&(r+="!(v&&j=='prototype')"),t.f&&t.m&&(r+="&&"),t.m&&(r+="i.call(n,j)"),r+="){"),r+=t.h+";",(t.f||t.m)&&(r+="}")),r+="}",t.e)for(r+="var g=n.constructor;",u=0;7>u;u++)r+="j='"+t.k[u]+"';if(","constructor"==t.k[u]&&(r+="!(g&&g.prototype===n)&&"),r+="i.call(n,j)){"+t.h+"}";
|
|
return(t.b||t.i)&&(r+="}"),r+=t.c+";return u",Rt("f,i,k,l,m,r,p","return function("+n+"){"+r+"}")(T,Wt,Q,Ar,ot,B,or)}function L(n){return G.prototype=n,n=new G,G.prototype=u,n}function M(n){return"\\"+F[n]}function U(n){return Nr[n]}function V(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function G(){}function H(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=qt(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function J(n){return qr[n]}function Q(n){return nr.call(n)==x
|
|
}function W(n){var t=o;if(!n||typeof n!="object"||Q(n))return t;var r=n.constructor;return!rt(r)&&(!br||!V(n))||r instanceof r?Nt?(Er(n,function(n,r,e){return t=!Wt.call(e,r),o}),t===o):(Er(n,function(n,r){t=r}),t===o||Wt.call(n,t)):t}function X(n){var t=[];return Ir(n,function(n,r){t.push(r)}),t}function Y(n,t,e,u,i,f){var a=n;if(typeof t=="function"&&(u=e,e=t,t=o),typeof e=="function"){e=typeof u=="undefined"?e:T(e,u,1);var a=e(a),c=typeof a!="undefined";c||(a=n)}if(u=et(a)){var l=nr.call(a);if(!q[l]||br&&V(a))return a;
|
|
var p=Ar(a)}if(!u||!t)return u&&!c?p?H(a):Br({},a):a;switch(u=wr[l],l){case S:case k:return c?a:new u(+a);case I:case N:return c?a:new u(a);case $:return c?a:u(a.source,y.exec(a))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c||(a=p?u(a.length):{},p&&(Wt.call(n,"index")&&(a.index=n.index),Wt.call(n,"input")&&(a.input=n.input))),i.push(n),f.push(a),(p?st:Ir)(c?a:n,function(n,u){a[u]=Y(n,t,e,r,i,f)}),a}function Z(n){var t=[];return Er(n,function(n,r){rt(n)&&t.push(r)}),t.sort()
|
|
}function nt(n){for(var t=-1,r=$r(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function tt(n,t,r,i,f,a){var c=r===l;if(r&&!c){r=typeof i=="undefined"?r:T(r,i,2);var p=r(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return o;if(n==u||t==u)return n===t;if(v=nr.call(n),s=nr.call(t),v==x&&(v=A),s==x&&(s=A),v!=s)return o;switch(v){case S:case k:return+n==+t;case I:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;
|
|
case $:case N:return n==t+""}if(s=v==O,!s){if(n.__wrapped__||t.__wrapped__)return tt(n.__wrapped__||n,t.__wrapped__||t,r,i,f,a);if(v!=A||br&&(V(n)||V(t)))return o;var v=!mr&&Q(n)?zt:n.constructor,g=!mr&&Q(t)?zt:t.constructor;if(v!=g&&(!rt(v)||!(v instanceof v&&rt(g)&&g instanceof g)))return o}for(f||(f=[]),a||(a=[]),v=f.length;v--;)if(f[v]==n)return a[v]==t;var h=0,p=e;if(f.push(n),a.push(t),s){if(v=n.length,h=t.length,p=h==n.length,!p&&!c)return p;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(p=tt(n[s],g,r,i,f,a)););else if(!(p=tt(n[h],g,r,i,f,a)))break;
|
|
return p}return Er(t,function(t,e,u){return Wt.call(u,e)?(h++,p=Wt.call(n,e)&&tt(n[e],t,r,i,f,a)):void 0}),p&&!c&&Er(n,function(n,t,r){return Wt.call(r,t)?p=-1<--h:void 0}),p}function rt(n){return typeof n=="function"}function et(n){return n?B[typeof n]:o}function ut(n){return typeof n=="number"||nr.call(n)==I}function ot(n){return typeof n=="string"||nr.call(n)==N}function it(n,t,r){var e=arguments,u=0,o=2;if(!et(n))return n;if(r===l)var i=e[3],f=e[4],a=e[5];else f=[],a=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=T(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
|
for(;++u<o;)(Ar(e[u])?st:Ir)(e[u],function(t,r){var e,u,o=t,c=n[r];if(t&&((u=Ar(t))||Rr(t))){for(o=f.length;o--;)if(e=f[o]==t){c=a[o];break}e||(c=u?Ar(c)?c:[]:Rr(c)?c:{},i&&(o=i(c,t),typeof o!="undefined"&&(c=o)),f.push(t),a.push(c),i||(c=it(c,t,l,i,f,a)))}else i&&(o=i(c,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(c=o);n[r]=c});return n}function ft(n){for(var t=-1,r=$r(n),e=r.length,u=qt(e);++t<e;)u[t]=n[r[t]];return u}function at(n,t,r){var e=-1,u=n?n.length:0,i=o;return r=(0>r?ir(0,u+r):r)||0,typeof u=="number"?i=-1<(ot(n)?n.indexOf(t,r):bt(n,t,r)):kr(n,function(n){return++e<r?void 0:!(i=n===t)
|
|
}),i}function ct(n,t,r){var u=e;if(t=T(t,r),Ar(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else kr(n,function(n,r,e){return u=!!t(n,r,e)});return u}function lt(n,t,r){var e=[];if(t=T(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else kr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function pt(n,t,r){var e;return t=T(t,r),st(n,function(n,r,u){return t(n,r,u)?(e=n,o):void 0}),e}function st(n,t,r){if(t&&typeof r=="undefined"&&Ar(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==o;);}else kr(n,t,r);
|
|
return n}function vt(n,t,r){var e=-1,u=n?n.length:0,o=qt(typeof u=="number"?u:0);if(t=T(t,r),Ar(n))for(;++e<u;)o[e]=t(n[e],e,n);else kr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function gt(n,t,r){var e=-1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&ot(n)?D:T(t,r),kr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function ht(n,t,r,e){var u=3>arguments.length;if(t=T(t,e,4),Ar(n)){var i=-1,f=n.length;for(u&&(r=n[++i]);++i<f;)r=t(r,n[i],i,n)}else kr(n,function(n,e,i){r=u?(u=o,n):t(r,n,e,i)
|
|
});return r}function yt(n,t,r,e){var u=n,i=n?n.length:0,f=3>arguments.length;if(typeof i!="number")var a=$r(n),i=a.length;else _r&&ot(n)&&(u=n.split(""));return t=T(t,e,4),st(n,function(n,e,c){e=a?a[--i]:--i,r=f?(f=o,u[e]):t(r,u[e],e,c)}),r}function mt(n,t,r){var e;if(t=T(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else kr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function dt(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=-1;for(t=T(t,r);++i<o&&t(n[i],i,n);)e++
|
|
}else if(e=t,e==u||r)return n[0];return H(n,0,fr(ir(0,e),o))}}function _t(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Ar(o)?Xt.apply(u,t?o:_t(o)):u.push(o)}return u}function bt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?ir(0,u+r):r||0)-1;else if(r)return e=wt(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function jt(n,t,r){if(typeof t!="number"&&t!=u){var e=0,o=-1,i=n?n.length:0;for(t=T(t,r);++o<i&&t(n[o],o,n);)e++}else e=t==u||r?1:ir(0,t);return H(n,e)
|
|
}function wt(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?T(r,e,1):kt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function xt(n,t,r,e){var u=-1,i=n?n.length:0,f=[],a=f;typeof t=="function"&&(e=r,r=t,t=o);var c=!t&&75<=i;if(c)var l={};for(r&&(a=[],r=T(r,e));++u<i;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Wt.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>bt(a,p))&&((r||c)&&a.push(p),f.push(e))}return f}function Ot(n,t){return vr||tr&&2<arguments.length?tr.call.apply(tr,arguments):C(n,t,H(arguments,2))
|
|
}function St(n){var t=H(arguments,1);return Zt(function(){n.apply(r,t)},1)}function kt(n){return n}function Et(n){st(Z(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=[this.__wrapped__];return Xt.apply(n,arguments),new a(r.apply(a,n))}})}function It(){return this.__wrapped__}i=i?R.extend(L(n),i):n;var At,$t,Nt,qt=i.Array,Bt=i.Boolean,Ft=i.Date,Rt=i.Function,Pt=i.Math,Dt=i.Number,zt=i.Object,Ct=i.RegExp,Tt=i.String,Kt=qt(),Lt=zt(),Mt=i._,Ut=Ct("^"+(Lt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Vt=Pt.ceil,Gt=i.clearTimeout,Ht=Kt.concat,Jt=Pt.floor,Qt=Ut.test(Qt=zt.getPrototypeOf)&&Qt,Wt=Lt.hasOwnProperty,Xt=Kt.push,Yt=i.setImmediate,Zt=i.setTimeout,nr=Lt.toString,tr=Ut.test(tr=H.bind)&&tr,rr=Ut.test(rr=qt.isArray)&&rr,er=i.isFinite,ur=i.isNaN,or=Ut.test(or=zt.keys)&&or,ir=Pt.max,fr=Pt.min,ar=i.parseInt,cr=Pt.random,lr=!!i.attachEvent,pr=!/\n{2,}/.test(Rt()),sr=tr&&!/\n|true/.test(tr+lr),vr=tr&&!sr,gr=or&&(lr||sr||!pr),hr=(hr={0:1,length:1},Kt.splice.call(hr,0,1),hr[0]),yr=e;
|
|
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)yr=!r;At=!/valueOf/.test(t),$t=n.propertyIsEnumerable("prototype"),Nt="x"!=t[0]})(1);var mr=arguments.constructor==zt,dr=!Q(arguments),_r="xx"!="x"[0]+zt("x")[0];try{var br=nr.call(document)==A&&!({toString:0}+"")}catch(jr){}var wr={};wr[O]=qt,wr[S]=Bt,wr[k]=Ft,wr[A]=zt,wr[I]=Dt,wr[$]=Ct,wr[N]=Tt,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:a}};
|
|
var xr={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},Or={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},Sr={l:"if(!r[typeof n])return u;"+Or.l,b:o},kr=K(Or);dr&&(Q=function(n){return n?Wt.call(n,"callee"):o});var Er=K(Or,Sr,{m:o}),Ir=K(Or,Sr),Ar=rr||function(n){return mr&&n instanceof qt||nr.call(n)==O},$r=or?function(n){return et(n)?$t&&typeof n=="function"||yr&&n.length&&Q(n)?X(n):or(n):[]
|
|
}:X,Nr={"&":"&","<":"<",">":">",'"':""","'":"'"},qr=nt(Nr),Br=K(xr,{l:xr.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),Fr=K(xr);rt(/x/)&&(rt=function(n){return n instanceof Rt||nr.call(n)==E});var Rr=Qt?function(n){if(!n||typeof n!="object")return o;var t=n.valueOf,r=typeof t=="function"&&(r=Qt(t))&&Qt(r);return r?n==r||Qt(n)==r&&!Q(n):W(n)}:W,Pr=8==ar("08")?ar:function(n,t){return ar(ot(n)?n.replace(/^0+(?=.$)/,""):n,t||0)
|
|
},Dr=vt,zr=lt;return sr&&f&&typeof Yt=="function"&&(St=Ot(Yt,i)),a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Br,a.at=function(n){var t=-1,r=Ht.apply(Kt,H(arguments,1)),e=r.length,u=qt(e);for(_r&&ot(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=Ot,a.bindAll=function(n){for(var t=Ht.apply(Kt,arguments),r=1<t.length?0:(t=Z(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=Ot(n[u],n)}return n},a.bindKey=function(n,t){return C(n,t,H(arguments,2))
|
|
},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},a.countBy=function(n,t,r){var e={};return t=T(t,r),st(n,function(n,r,u){r=t(n,r,u)+"",Wt.call(e,r)?e[r]++:e[r]=1}),e},a.debounce=function(n,t,r){function e(){a=u,r||(i=n.apply(f,o))}var o,i,f,a;return function(){var u=r&&!a;return o=arguments,f=this,Gt(a),a=Zt(e,t),u&&(i=n.apply(f,o)),i
|
|
}},a.defaults=Fr,a.defer=St,a.delay=function(n,t){var e=H(arguments,2);return Zt(function(){n.apply(r,e)},t)},a.difference=function(n){for(var t=-1,r=n?n.length:0,e=Ht.apply(Kt,arguments),e=P(e,r),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},a.filter=lt,a.flatten=_t,a.forEach=st,a.forIn=Er,a.forOwn=Ir,a.functions=Z,a.groupBy=function(n,t,r){var e={};return t=T(t,r),st(n,function(n,r,u){r=t(n,r,u)+"",(Wt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,o=n.length;
|
|
if(typeof t!="number"&&t!=u){var i=o;for(t=T(t,r);i--&&t(n[i],i,n);)e++}else e=t==u||r?1:t||e;return H(n,0,fr(ir(0,o-e),o))},a.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Wt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>bt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=P(t[p],0,100)))(c))continue n;f.push(c)}}return f},a.invert=nt,a.invoke=function(n,t){var r=H(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=qt(typeof o=="number"?o:0);
|
|
return st(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},a.keys=$r,a.map=vt,a.max=gt,a.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Wt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},a.merge=it,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&ot(n)?D:T(t,r),kr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},a.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];
|
|
t?u[o]=t[r]:u[o[0]]=o[1]}return u},a.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=T(t,r);else var o=Ht.apply(Kt,arguments);return Er(n,function(n,r,i){(e?!t(n,r,i):0>bt(o,r,1))&&(u[r]=n)}),u},a.once=function(n){var t,r;return function(){return t?r:(t=e,r=n.apply(this,arguments),n=u,r)}},a.pairs=function(n){for(var t=-1,r=$r(n),e=r.length,u=qt(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},a.partial=function(n){return C(n,H(arguments,1))},a.partialRight=function(n){return C(n,H(arguments,1),u,l)
|
|
},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Ht.apply(Kt,arguments),i=et(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=T(t,r),Er(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Dr,a.range=function(n,t,r){n=+n||0,r=+r||1,t==u&&(t=n,n=0);var e=-1;t=ir(0,Vt((t-n)/r));for(var o=qt(t);++e<t;)o[e]=n,n+=r;return o},a.reject=function(n,t,r){return t=T(t,r),lt(n,function(n,r,e){return!t(n,r,e)})},a.rest=jt,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=qt(typeof r=="number"?r:0);
|
|
return st(n,function(n){var r=Jt(cr()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=qt(typeof u=="number"?u:0);for(t=T(t,r),st(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(z);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function r(){a=new Ft,f=u,o=n.apply(i,e)}var e,o,i,f,a=0;return function(){var c=new Ft,l=t-(c-a);return e=arguments,i=this,0<l?f||(f=Zt(r,l)):(Gt(f),f=u,a=c,o=n.apply(i,e)),o}},a.times=function(n,t,r){n=+n||0;
|
|
for(var e=-1,u=qt(n);++e<n;)u[e]=t.call(r,e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?_r&&ot(n)?n.split(""):H(n):ft(n)},a.union=function(){return xt(Ht.apply(Kt,arguments))},a.uniq=xt,a.values=ft,a.where=zr,a.without=function(n){for(var t=-1,r=n?n.length:0,e=P(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},a.wrap=function(n,t){return function(){var r=[n];return Xt.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){for(var t=-1,r=n?gt(Dr(arguments,"length")):0,e=qt(r);++t<r;)e[t]=Dr(arguments,t);
|
|
return e},a.collect=vt,a.drop=jt,a.each=st,a.extend=Br,a.methods=Z,a.select=lt,a.tail=jt,a.unique=xt,Et(a),a.clone=Y,a.cloneDeep=function(n,t,r){return Y(n,e,t,r)},a.contains=at,a.escape=function(n){return n==u?"":(n+"").replace(b,U)},a.every=ct,a.find=pt,a.has=function(n,t){return n?Wt.call(n,t):o},a.identity=kt,a.indexOf=bt,a.isArguments=Q,a.isArray=Ar,a.isBoolean=function(n){return n===e||n===o||nr.call(n)==S},a.isDate=function(n){return n instanceof Ft||nr.call(n)==k},a.isElement=function(n){return n?1===n.nodeType:o
|
|
},a.isEmpty=function(n){var t=e;if(!n)return t;var r=nr.call(n),u=n.length;return r==O||r==N||r==x||dr&&Q(n)||r==A&&typeof u=="number"&&rt(n.splice)?!u:(Ir(n,function(){return t=o}),t)},a.isEqual=tt,a.isFinite=function(n){return er(n)&&!ur(parseFloat(n))},a.isFunction=rt,a.isNaN=function(n){return ut(n)&&n!=+n},a.isNull=function(n){return n===u},a.isNumber=ut,a.isObject=et,a.isPlainObject=Rr,a.isRegExp=function(n){return n instanceof Ct||nr.call(n)==$},a.isString=ot,a.isUndefined=function(n){return typeof n=="undefined"
|
|
},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?ir(0,e+r):fr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=Et,a.noConflict=function(){return i._=Mt,this},a.parseInt=Pr,a.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Jt(cr()*((+t||0)-n+1))},a.reduce=ht,a.reduceRight=yt,a.result=function(n,t){var e=n?n[t]:r;return rt(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:$r(n).length},a.some=mt,a.sortedIndex=wt,a.template=function(n,t,u){var o=a.templateSettings;
|
|
n||(n=""),u=Fr({},u,o);var i,f=Fr({},u.imports,o.imports),o=$r(f),f=ft(f),c=0,l=u.interpolate||_,p="__p+='",l=Ct((u.escape||_).source+"|"+l.source+"|"+(l===d?m:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(l,function(t,r,u,o,f,a){return u||(u=o),p+=n.slice(c,a).replace(j,M),r&&(p+="'+__e("+r+")+'"),f&&(i=e,p+="';"+f+";__p+='"),u&&(p+="'+((__t=("+u+"))==null?'':__t)+'"),c=a+t.length,t}),p+="';\n",l=u=u.variable,l||(u="obj",p="with("+u+"){"+p+"}"),p=(i?p.replace(v,""):p).replace(g,"$1").replace(h,"$1;"),p="function("+u+"){"+(l?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+p+"return __p}";
|
|
try{var s=Rt(o,"return "+p).apply(r,f)}catch(y){throw y.source=p,y}return t?s(t):(s.source=p,s)},a.unescape=function(n){return n==u?"":(n+"").replace(s,J)},a.uniqueId=function(n){var t=++c;return(n==u?"":n+"")+t},a.all=ct,a.any=mt,a.detect=pt,a.foldl=ht,a.foldr=yt,a.include=at,a.inject=ht,Ir(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Xt.apply(t,arguments),n.apply(a,t)})}),a.first=dt,a.last=function(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;
|
|
for(t=T(t,r);i--&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[o-1];return H(n,ir(0,o-e))}},a.take=dt,a.head=dt,Ir(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return t==u||r&&typeof t!="function"?e:new a(e)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=It,a.prototype.valueOf=It,kr(["join","pop","shift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}
|
|
}),kr(["push","reverse","sort","unshift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),kr(["concat","slice","splice"],function(n){var t=Kt[n];a.prototype[n]=function(){return new a(t.apply(this.__wrapped__,arguments))}}),hr&&kr(["pop","shift","splice"],function(n){var t=Kt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new a(e):e}}),a}var r,e=!0,u=null,o=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,a=typeof global=="object"&&global;
|
|
a.global===a&&(n=a);var c=0,l={},p=30,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,h=/(__e\(.*?\)|\b__t\))\+'';/g,y=/\w*$/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/<%=([\s\S]+?)%>/g,_=/($^)/,b=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),x="[object Arguments]",O="[object Array]",S="[object Boolean]",k="[object Date]",E="[object Function]",I="[object Number]",A="[object Object]",$="[object RegExp]",N="[object String]",q={};
|
|
q[E]=o,q[x]=q[O]=q[S]=q[k]=q[I]=q[A]=q[$]=q[N]=e;var B={"boolean":o,"function":e,object:e,number:o,string:o,undefined:o},F={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},R=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=R,define(function(){return R})):i?f?(f.exports=R)._=R:i._=R:n._=R})(this); |