/** * @license * Lo-Dash 2.4.1 (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE * Build: `lodash underscore -o ./dist/lodash.underscore.js` */ ;(function(){function n(n,r,t){t=(+t||0)-1;for(var e=n?n.length:0;++te||typeof t=="undefined"){t=1;break n}if(tu(r,i)&&o.push(i)}return o}function p(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(e=j(e);++to(f,c)&&(t&&f.push(c),i.push(a))}return i}function m(n,r){return function(t,e,u){var o=r?[[],[]]:{}; e=rr(e,u,3),u=-1;var i=j(t&&t.length);if(i)for(;++un?0:n<$r?n:$r}function x(n,r,t){return null==r||t?n?n[0]:ir:E(n,0,0>r?0:r)}function A(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?Xr(0,u+e):e||0;else if(e)return e=O(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function T(n,r,t){return E(n,null==r||t?1:0>r?0:r)}function E(n,r,t){var e=-1,u=n?n.length:0;for(r=+r||0,0>r?r=Xr(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=Xr(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e>>1,t(n[e])u&&(u=t);else r=rr(r,t,3),p(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function $(n,r,t,e){var u=3>arguments.length;r=rr(r,e,4);var o=-1,i=j(n&&n.length);if(i)for(u&&i&&(t=n[++o]);++oarguments.length;return r=rr(r,e,4),s(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function D(n){var r=-1,t=n&&n.length,e=Array(0>t?0:t>>>0);return p(n,function(n){var t;t=++r,t=0+zr(nt()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function W(n,r,t){var e;r=rr(r,t,3),t=-1;var u=j(n&&n.length);if(u){for(;++targuments.length?_(n,fr,null,r):_(n,fr|ar,null,r,E(arguments,2)) }function C(n,r,t){var e,u,o,i,f,a,c,l=0,p=false,s=true;if(!K(n))throw new TypeError;if(r=0>r?0:r,true===t)var g=true,s=false;else L(t)&&(g=t.leading,p="maxWait"in t&&(Xr(r,t.maxWait)||0),s="trailing"in t?t.trailing:s);var h=function(){var t=r-(pt()-i);0>=t||t>r?(u&&clearTimeout(u),t=c,u=a=c=ir,t&&(l=pt(),o=n.apply(f,e),a||u||(e=f=null))):a=setTimeout(h,t)},v=function(){a&&clearTimeout(a),u=a=c=ir,(s||p!==r)&&(l=pt(),o=n.apply(f,e),a||u||(e=f=null))};return function(){if(e=arguments,i=pt(),f=this,c=s&&(a||!g),false===p)var t=g&&!a; else{u||g||(l=i);var y=p-(i-l),m=0>=y||y>p;m?(u&&(u=clearTimeout(u)),l=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function P(n){if(!K(n))throw new TypeError;return function(){return!n.apply(this,arguments)}}function U(n,r,t){if(!n)return n;var e=arguments,u=0,o=e.length,i=typeof t;for("number"!=i&&"string"!=i||!e[3]||e[3][t]!==r||(o=2);++u"']/g,gr=/($^)/,hr=/[.*+?^${}()|[\]\\]/g,vr=/['\n\r\t\u2028\u2029\\]/g,yr="[object Arguments]",mr="[object Array]",_r="[object Boolean]",dr="[object Date]",br="[object Number]",wr="[object Object]",jr="[object RegExp]",xr="[object String]",Ar={"&":"&","<":"<",">":">",'"':""","'":"'"},Tr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Er={"function":true,object:true},Or={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},Sr=Er[typeof window]&&window||this,kr=Er[typeof exports]&&exports&&!exports.nodeType&&exports,Nr=Er[typeof module]&&module&&!module.nodeType&&module,qr=kr&&Nr&&typeof global=="object"&&global; !qr||qr.global!==qr&&qr.window!==qr&&qr.self!==qr||(Sr=qr);var Fr=Nr&&Nr.exports===kr&&kr,Br=Array.prototype,Mr=Object.prototype,Rr=Sr._,$r=Math.pow(2,53)-1,Ir=Mr.toString,Dr=RegExp("^"+(null==Ir?"":(Ir+"").replace(hr,"\\$&")).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wr=Math.ceil,zr=Math.floor,Cr=Function.prototype.toString,Pr=Mr.hasOwnProperty,Ur=Br.push,Vr=Mr.propertyIsEnumerable,Gr=Br.splice,Hr=b(Hr=Object.create)&&Hr,Jr=b(Jr=Array.isArray)&&Jr,Kr=Sr.isFinite,Lr=Sr.isNaN,Qr=b(Qr=Object.keys)&&Qr,Xr=Math.max,Yr=Math.min,Zr=b(Zr=Date.now)&&Zr,nt=Math.random; i.prototype=o.prototype;var rt={};!function(){var n={0:1,length:1};rt.spliceObjects=(Gr.call(n,0,1),!n[0])}(1),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Hr||(f=function(){function n(){}return function(r){if(L(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Sr.Object()}}());var tt=T,et=m(function(n,r,t){Pr.call(n,t)?n[t]++:n[t]=1}),ut=m(function(n,r,t){Pr.call(n,t)?n[t].push(r):n[t]=[r]}),ot=m(function(n,r,t){n[t]=r }),it=m(function(n,r,t){n[t?0:1].push(r)},true),ft=M,at=q;J(arguments)||(J=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Pr.call(n,"callee")&&!Vr.call(n,"callee")||false});var ct=Jr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ir.call(n)==mr||false};K(/x/)&&(K=function(n){return typeof n=="function"&&"[object Function]"==Ir.call(n)});var lt=Qr?function(n){return L(n)?Qr(n):[]}:w,pt=Zr||function(){return(new Date).getTime()};o.after=function(n,r){if(!K(r))throw new TypeError; return function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=z,o.bindAll=function(n){for(var r=1r?0:r)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++ri(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=lt(n),e=t.length,u={};++ro?0:o>>>0); return p(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},o.keys=lt,o.map=M,o.matches=er,o.max=R,o.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):"_"+arguments[0];return Pr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;"number"!=o&&"string"!=o||!t||t[r]!==n||(r=null);var o=-1,i=j(n&&n.length);if(null==r&&i)for(;++oo?0:o>>>0);for(t=rr(t,e,3),p(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!K(n))throw new TypeError;return false===t?e=false:L(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),C(n,r,{leading:e,maxWait:r,trailing:u})},o.times=function(n,r,t){n=-1<(n=+n)?n:0; var e=-1,u=Array(n);for(r=a(r,t,1);++er?0:r);++nt?Xr(0,e+t):Yr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.mixin=ur,o.noConflict=function(){return Sr._=Rr,this},o.now=pt,o.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+zr(nt()*(r-n+1))},o.reduce=$,o.reduceRight=I,o.result=function(n,r){if(null!=n){var t=n[r];return K(t)?n[r]():t}},o.size=function(n){var r=n?n.length:0;return typeof r=="number"&&-1n.indexOf(";")?n:n.replace(pr,u))},o.uniqueId=function(n){var r=++lr+"";return n?n+r:r},o.all=N,o.any=W,o.detect=F,o.findWhere=F,o.foldl=$,o.foldr=I,o.include=k,o.inject=$,o.first=x,o.last=function(n,r,t){var e=n?n.length:0;return null==r||t?n?n[e-1]:ir:(r=e-r,E(n,0>r?0:r))},o.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=nr(n)),null==r||t?(r=j(n&&n.length),0