mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
39 lines
17 KiB
JavaScript
39 lines
17 KiB
JavaScript
/*!
|
|
Lo-Dash 0.8.2 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||U),s=i?{}:e;if(i)for(n=t-1;++n<r;){var o=e[n]+"";(ot.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(e){if(i){var n=e+"";return ot.call(s,n)&&-1<M(s[n],e)}return-1<M(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(ft.call(u)):n),this instanceof r?(p.prototype=e.prototype,a=new p,(u=e.apply(a,u))&&Ut[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:B}function l(){for(var e={e:"",g:Lt,i:"",j:Ft,m:Mt,n:Pt,o:tt,p:"",q:n,r:It,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
|
|
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;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');"
|
|
);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.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+"}")(H,f,sn,ot,v,m,Ut,dt,at,Nt,lt)}function c(e){return"\\"+zt[e]}function h(e){return en[e]}function p(){}function d(e){return tn[e]}function v(e){return lt.call(e)==yt}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(!Ht||"function"==typeof e.toString||"string"!=typeof (e+""))&&(!m(n)||n instanceof
|
|
n)?Ot?(sn(e,function(e,n,r){return t=!ot.call(r,n),i}),t===i):(sn(e,function(e,n){t=n}),t===i||ot.call(e,t)):t}function y(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=Ut[typeof e]){var u=lt.call(e);if(!Rt[u]||_t&&v(e))return e;var a=u==bt,n=a||(u==xt?Yt(e):n)}if(!n||!t)return n?a?ft.call(e):rn({},e):e;n=e.constructor;switch(u){case wt:case Et:return new n(+e);case St:case Nt:return new n(e);case Tt:return n(e.source,K.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?ln:on)(e,function(e,n){f[n]=y(e,t,r,s,o)}),f}function b(e){var t=[];return sn(e,function(e,n){m(e)&&t.push(n)}),t.sort()}function w(e,t,s,o){if(e==r||t==r)return e===t;if(e===t)return 0!==e||1/e==1/t;if(Ut[typeof e]||Ut[typeof t])e=e.__wrapped__||e,t=t.__wrapped__||t;var u=lt.call(e);if(u!=lt.call(t))return i;switch(u){case wt:case Et:return+e==+t;case St:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case Tt:case Nt:return e==t+""}var a=qt[u];if(_t&&!a&&(a=v(e)
|
|
)&&!v(t)||!a&&(u!=xt||Ht&&("function"!=typeof e.toString&&"string"==typeof (e+"")||"function"!=typeof t.toString&&"string"==typeof (t+""))))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=w(e[l],t[l],s,o)););return f}a=e.constructor,f=t.constructor;if(a!=f&&(!m(a)||!(a instanceof a&&m(f)&&f instanceof f)))return i;for(var c in e)if(ot.call(e,c)&&(l++,!ot.call(t,c)||!w(e[c],t[c],s,o)))return i
|
|
;for(c in t)if(ot.call(t,c)&&!(l--))return i;if(Lt)for(;7>++u;)if(c=tt[u],ot.call(e,c)&&(!ot.call(t,c)||!w(e[c],t[c],s,o)))return i;return n}function E(e,t,n,s,o){var a=arguments,f=0,l=2;n!=u&&(s=[],o=[],l=a.length);for(;++f<l;)on(a[f],function(t,n){var a,f;if(t&&((a=Gt(t))||Yt(t))){for(var l=i,c=s.length;c--;)if(l=s[c]==t)break;l?e[n]=o[c]:(s.push(t),o.push(f=(f=e[n],a)?Gt(f)?f:[]:Yt(f)?f:{}),e[n]=E(f,t,u,s,o))}else t!=r&&(e[n]=t)});return e}function S(e){var t=[];return on(e,function(e){t.push(
|
|
e)}),t}function x(e,t){var n=e?e.length:0;return n===+n?-1<(lt.call(e)==Nt?e.indexOf(t):M(e,t)):pn(e,function(e){return e===t})}function T(e,t,r){var i,t=f(t,r);return pn(e,function(e,r,s){return t(e,r,s)&&(i=e,n)}),i}function N(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||s!==+s)t=f(t,n),ln(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 C(e,t){var n=[];return ln(e,function(e){n.push(e[t])}),n}function k(e,t,n,r){var s=3>arguments.length,
|
|
t=f(t,r);return ln(e,function(e,r,o){n=s?(s=i,e):t(n,e,r,o)}),n}function L(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 Pt&<.call(e)==Nt&&(s=e.split(""));return ln(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 A(e,t,n){if(e)return t==r||n?e[0]:ft.call(e,0,t)}function O(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];Gt(s)?ut.apply(i,t?s:O(s)):i.push(s)}return i}function M(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof
|
|
n)r=(0>n?vt(0,i+n):n||0)-1;else if(n)return r=D(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function _(e,t,n){return e?ft.call(e,t==r||n?1:t):[]}function D(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 P(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>M(a,r))a.push(r),u.push(e[s]);return u
|
|
}function H(e,t){return jt||ct&&2<arguments.length?ct.call.apply(ct,arguments):a(e,t,ft.call(arguments,2))}function B(e){return e}function j(e){ln(b(e),function(t){var r=s[t]=e[t];s.prototype[t]=function(){var e=[this.__wrapped__];return arguments.length&&ut.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,F="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(e=global),exports),I=Array.prototype,q=Object
|
|
.prototype,R=0,U=30,z=e._,W=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,X=/&(?:amp|lt|gt|quot|#x27);/g,V=/\b__p\+='';/g,$=/\b(__p\+=)''\+/g,J=/(__e\(.*?\)|\b__t\))\+'';/g,K=/\w*$/,Q=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,G=RegExp("^"+(q.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Y=/($^)/,Z=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,tt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf"
|
|
.split(" "),nt=Math.ceil,rt=I.concat,it=Math.floor,st=G.test(st=Object.getPrototypeOf)&&st,ot=q.hasOwnProperty,ut=I.push,at=q.propertyIsEnumerable,ft=I.slice,lt=q.toString,ct=G.test(ct=ft.bind)&&ct,ht=G.test(ht=Array.isArray)&&ht,pt=e.isFinite,dt=G.test(dt=Object.keys)&&dt,vt=Math.max,mt=Math.min,gt=Math.random,yt="[object Arguments]",bt="[object Array]",wt="[object Boolean]",Et="[object Date]",St="[object Number]",xt="[object Object]",Tt="[object RegExp]",Nt="[object String]",Ct=e.clearTimeout,kt=
|
|
e.setTimeout,Lt,At,Ot,Mt=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)Mt=!r;Lt=4>(n+"").length,Ot="x"!=n[0],At=(n.splice.call(t,0,1),t[0])})(1);var _t=!v(arguments),Dt="x"!=ft.call("x")[0],Pt="xx"!="x"[0]+Object("x")[0];try{var Ht=("[object Object]",lt.call(e.document||0)==xt)}catch(Bt){}var jt=ct&&/\n|Opera/.test(ct+lt.call(e.opera)),Ft=dt&&/^.+$|true/.test(dt+!!e.attachEvent),It=!jt,qt={};qt[wt]=qt[Et]=qt["[object Function]"
|
|
]=qt[St]=qt[xt]=qt[Tt]=i,qt[yt]=qt[bt]=qt[Nt]=n;var Rt={};Rt[yt]=Rt["[object Function]"]=i,Rt[bt]=Rt[wt]=Rt[Et]=Rt[St]=Rt[xt]=Rt[Tt]=Rt[Nt]=n;var Ut={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i,unknown:n},zt={"\\":"\\","'":"'","\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 Wt={a:"d,c,s",p:"c=e(c,s)",h:"if(c(u,h,d)===false)return p"},Xt={i:"true"
|
|
,h:"if(!c(u,h,d))return!p"},Vt={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:"}}"},$t={i:"[]",h:"c(u,h,d)&&p.push(u)"},Jt={p:"c=e(c,s)"},Kt={h:{k:Wt.h}},Qt=l({a:"l",i:"{}",h:"p[u]=h"});_t&&(v=function(e){return e?ot.call(e,"callee"):i});var Gt=ht||function(e){return lt.call(e)==bt};m(/x/)&&(m=function(e){return"[object Function]"==lt.call(e)});var Yt=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&&!v(e):g(e)}:g,Zt=l({a:"l",i:"[]",h:"p.push(h)"}),en={"&":"&","<":"<",">":">",'"':""","'":"'"},tn=Qt(en),nn=l(Vt,{h:"if(p[h]==null)"+Vt.h}),rn=l(Vt),sn=l(Wt,Jt,Kt,{q:i}),on=l(Wt,Jt,Kt),un=dt?function(e){var t=typeof e;return"function"==t&&at.call(e,"prototype")?Zt(e):e&&Ut[t]?dt(e):[]}:Zt,an=l(Wt,Xt),fn=l(Wt,$t),ln=l(Wt,Jt),cn=l(Wt,{i:"d||[]",d:{b:"p=Array(j)",k:"p="+(Ft?"Array(j)":"[]")},h:{b:"p[h]=c(u,h,d)",k:"p"+(Ft?"[m]=":".push")+"(c(u,h,d))"}}
|
|
),hn=l(Wt,$t,{h:"!"+$t.h}),pn=l(Wt,Xt,{i:"false",h:Xt.h.replace("!","")}),dn=l({q:i,r:i,a:"l",p:"var w=arguments,h=0,j=w.length;if(j>1){while(++h<j)p[w[h]]=v(p[w[h]],p);return p}",h:"if(y(u))p[h]=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=H,s.bindAll=dn,s.chain=function(e){return e=new s(e),e.__chain__=n,e},s.clone=y,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=x,s.countBy=function(e,t,n){var r={},t=f(t,n);return ln(e,function(e,n,i){n=t(e,n,i),ot.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,Ct(a),a=kt(i,t),r&&(o=e.apply(u,s)),o}},s.defaults=nn,s.defer=function(e){var n=ft.call(arguments,1);return kt(function(){return e
|
|
.apply(t,n)},1)},s.delay=function(e,n){var r=ft.call(arguments,2);return kt(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=rt.apply(I,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(Z,h)},s.every=an,s.extend=rn,s.filter=fn,s.find=T,s.first=A,s.flatten=O,s.forEach=ln,s.forIn=sn,s.forOwn=on,s.functions=b,s.groupBy=function(e,t,n){var r={},t=f(t,n);return ln(e,function(
|
|
e,n,i){n=t(e,n,i),(ot.call(r,n)?r[n]:r[n]=[]).push(e)}),r},s.has=function(e,t){return e?ot.call(e,t):i},s.identity=B,s.indexOf=M,s.initial=function(e,t,n){return e?ft.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>M(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=Qt,s.invoke=function(e,t){var n=ft.call(arguments,2),r="function"==typeof t,i=[];return ln
|
|
(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.isArguments=v,s.isArray=Gt,s.isBoolean=function(e){return e===n||e===i||lt.call(e)==wt},s.isDate=function(e){return lt.call(e)==Et},s.isElement=function(e){return e?1===e.nodeType:i},s.isEmpty=function(e){var t=n;if(!e)return t;var r=lt.call(e),s=e.length;return qt[r]||_t&&v(e)||r==xt&&s===+s&&m(e.splice)?!s:(on(e,function(){return t=i}),t)},s.isEqual=w,s.isFinite=function(e){return pt(e)&<.call(e)==St},s.isFunction=m,s.isNaN=function(e){return lt
|
|
.call(e)==St&&e!=+e},s.isNull=function(e){return e===r},s.isNumber=function(e){return lt.call(e)==St},s.isObject=function(e){return e?Ut[typeof e]:i},s.isPlainObject=Yt,s.isRegExp=function(e){return lt.call(e)==Tt},s.isString=function(e){return lt.call(e)==Nt},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]:ft.call(e,-t||i)}},s.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?vt(0,r+n):mt(n,r-1))+1);
|
|
r--;)if(e[r]===t)return r;return-1},s.lateBind=function(e,t){return a(t,e,ft.call(arguments,2))},s.map=cn,s.max=N,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return ot.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=E,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),ln(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=j,s.noConflict=function(){return e._=z,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=rt.apply(I,arguments);return sn(e,function(e,n,o){if(r?!t(e,n,o):0>M(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 a(e,ft.call(arguments
|
|
,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=rt.apply(I,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=f(t,n),sn(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},s.pluck=C,s.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+it(gt()*((+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=vt(0,nt((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},s.reduce=k,s.reduceRight=L,s.reject=hn,s.rest=_,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 ln(e,function(e){var r=it(gt()*(++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=pn,s.sortBy=function(e,t,n){var r=[],t=f(t,n);ln(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=D,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||Y).source+"|"+(n.interpolate||u.interpolate||Y).source+"|"+(n.evaluate||u.evaluate||Y).source+"|$","g"),function(t,n,i,s,u){a+=e.slice(o,u).replace(et,c),a+=n?"'+__e("+n+")+'":s?"';"+s+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=s||W.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(Q,"$&"+f+".")
|
|
.replace(n,"$1__d"))),a=(r?a.replace(V,""):a).replace($,"$1").replace(J,"$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,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?(Ct(u),a=r,s=e.apply(o,i)):u||(u=kt(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?(Dt?lt.call(e)==Nt:"string"==typeof e)?e.split(""):ft.call(e):S(e)},s.unescape=function(e){return e==r?"":(e+"").replace(X,d)},s.union=function(){for(var e=-1,t=rt.apply(I,arguments),n=t.length,r=[];++e<n;){var i=t[e];0>M(r,i)&&r.push(i)}return r},s.uniq=P,s.uniqueId=
|
|
function(e){var t=R++;return e?e+t:t},s.values=S,s.where=function(e,t){var r=[];sn(t,function(e,t){r.push(t)});var i=r.length,s=[];return ln(e,function(e){for(var o=n,u=0;u<i&&(o=r[u],o=e[o]===t[o]);u++);o&&s.push(e)}),s},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.length&&ut.apply(n,arguments),t.apply(this,n)}},s.zip=function(e){for(var t=-1,n=e?N(C(arguments
|
|
,"length")):0,r=Array(n);++t<n;)r[t]=C(arguments,t);return r},s.all=an,s.any=pn,s.collect=cn,s.detect=T,s.drop=_,s.each=ln,s.foldl=k,s.foldr=L,s.head=A,s.include=x,s.inject=k,s.methods=b,s.select=fn,s.tail=_,s.take=A,s.unique=P,j(s),s.prototype.chain=function(){return this.__chain__=n,this},s.prototype.value=function(){return this.__wrapped__},ln("pop push reverse shift sort splice unshift".split(" "),function(e){var t=I[e];s.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments
|
|
),At&&e.length===0&&delete e[0],this.__chain__&&(e=new s(e),e.__chain__=n),e}}),ln(["concat","join","slice"],function(e){var t=I[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})):F?"object"==typeof module&&module&&module.exports==F?(module.exports=s)._=s:F._=s:e._=s})(this); |