/** * @license * Lo-Dash 1.0.1 (Custom Build) lodash.com/license * Build: `lodash modern -o ./dist/lodash.js` * Underscore.js 1.4.4 underscorejs.org/LICENSE */ ;(function(n){function t(e){function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function $(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||a);if(u){var o={};for(r=t-1;++rt||typeof n=="undefined")return 1; if(nr?0:r);++er?Jt(0,u+r):r)||0,typeof u=="number"?o=-1<(W(n)?n.indexOf(t,r):pt(n,t,r)):Zt(n,function(n){return++eu&&(u=i)}}else t=!t&&W(n)?I:F(t,r),Zt(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function it(n,t,r,e){var u=3>arguments.length;if(t=F(t,e,4),rr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++oarguments.length;if(typeof u!="number")var i=er(n),u=i.length;return t=F(t,e,4),et(n,function(e,f,a){f=i?i[--u]:--u,r=o?(o=!1,n[f]):t(r,n[f],f,a)}),r}function at(n,t,r){var e;if(t=F(t,r),rr(n)){r=-1;for(var u=n.length;++rr?Jt(0,u+r):r||0)-1;else if(r)return e=vt(n,t),n[e]===t?e:-1;for(;++e>>1,r(n[e])pt(f,l))&&((r||a)&&f.push(l),i.push(e))}return i}function ht(n,t){return Wt||Mt&&2/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:o}};var jt={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b":">",'"':""","'":"'"},or=G(ur),ir=R(jt,{l:jt.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=R(jt),ar=function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=zt(t))&&zt(r);if(r)n=n==r||zt(n)==r&&!K(n);else{var e=!1;!n||typeof n!="object"||K(n)?n=e:(t=n.constructor,!J(t)||t instanceof t?(nr(n,function(n,t){e=t }),n=!1===e||Ct.call(n,e)):n=e)}return n};return Ot&&u&&typeof setImmediate=="function"&&(yt=ht(setImmediate,e)),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.assign=ir,o.at=function(n){for(var t=-1,r=Rt.apply(Nt,P(arguments,1)),e=r.length,u=bt(e);++tpt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=$(t[p],0,100)))(c))continue n;f.push(c)}}return f},o.invert=G,o.invoke=function(n,t){var r=P(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=bt(typeof o=="number"?o:0); return et(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=er,o.map=ut,o.max=ot,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Ct.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.merge=X,o.min=function(n,t,r){var e=1/0,u=e;if(!t&&rr(n)){r=-1;for(var o=n.length;++rpt(o,r,1))&&(u[r]=n)}),u},o.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=er(n),e=r.length,u=bt(e);++tr?Jt(0,e+r):Lt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=dt,o.noConflict=function(){return e._=It,this},o.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Dt(Qt()*((+t||0)-n+1))},o.reduce=it,o.reduceRight=ft,o.result=function(n,t){var e=n?n[t]:r;return J(e)?n[t]():e},o.runInContext=t,o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:er(n).length},o.some=at,o.sortedIndex=vt,o.template=function(n,t,e){var u=o.templateSettings; n||(n=""),e=fr({},e,u);var i,f=fr({},e.imports,u.imports),u=er(f),f=Y(f),a=0,c=e.interpolate||y,v="__p+='",c=kt((e.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(e.evaluate||y).source+"|$","g");n.replace(c,function(t,r,e,u,o,f){return e||(e=u),v+=n.slice(a,f).replace(d,D),r&&(v+="'+__e("+r+")+'"),o&&(i=!0,v+="';"+o+";__p+='"),e&&(v+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),v+="';\n",c=e=e.variable,c||(e="obj",v="with("+e+"){"+v+"}"),v=(i?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}"; try{var m=xt(u,"return "+v).apply(r,f)}catch(_){throw _.source=v,_}return t?m(t):(m.source=v,m)},o.unescape=function(n){return null==n?"":(n+"").replace(c,T)},o.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},o.all=nt,o.any=at,o.detect=rt,o.foldl=it,o.foldr=ft,o.include=Z,o.inject=it,tr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(){var t=[this.__wrapped__];return Pt.apply(t,arguments),n.apply(o,t)})}),o.first=ct,o.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u; for(t=F(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return P(n,Jt(0,u-e))}},o.take=ct,o.head=ct,tr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return null==t||r&&typeof t!="function"?e:new o(e)})}),o.VERSION="1.0.1",o.prototype.toString=function(){return this.__wrapped__+""},o.prototype.value=_t,o.prototype.valueOf=_t,Zt(["join","pop","shift"],function(n){var t=Nt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments) }}),Zt(["push","reverse","sort","unshift"],function(n){var t=Nt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Zt(["concat","slice","splice"],function(n){var t=Nt[n];o.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments))}}),o}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,o=typeof global=="object"&&global;o.global===o&&(n=o);var i=0,f={},a=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,_="[object Arguments]",b="[object Array]",j="[object Boolean]",w="[object Date]",x="[object Number]",O="[object Object]",S="[object RegExp]",A="[object String]",k={"[object Function]":!1}; k[_]=k[b]=k[j]=k[w]=k[x]=k[O]=k[S]=k[A]=!0;var E={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},N={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):e?u?(u.exports=$)._=$:e._=$:n._=$})(this);