Array Performance

JavaScript performance comparison

Revision 192 of this test case created by Mo

Preparation code

<script>/**
 * @license
 * lodash 3.7.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
 * Build: `lodash modern -o ./lodash.js`
 */
;(function(){function n(n,t){if(n!==t){var r=n===n,e=t===t;if(n>t||!r||n===w&&e)return 1;if(n<t||!e||t===w&&r)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return typeof n=="string"?n:null==n?"":n+""}function o(n){return n.charCodeAt(0)}function i(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););
return r}function f(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function a(t,r){return n(t.a,r.a)||t.b-r.b}function c(n){return $n[n]}function l(n){return Ln[n]}function s(n){return"\\"+Mn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&typeof n=="object"}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);

}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=B,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Bn[n]}function m(_){function $n(n){if(h(n)&&!(Io(n)||n instanceof zn)){if(n instanceof Bn)return n;if(Ke.call(n,"__chain__")&&Ke.call(n,"__wrapped__"))return Fr(n)}return new Bn(n)}function Ln(){}function Bn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],
this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=null,this.__dir__=1,this.__filtered__=false,this.__iteratees__=null,this.__takeCount__=ju,this.__views__=null}function Mn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:_u(null),set:new iu};t--;)this.push(n[t])}function Pn(n,t){var r=n.data;return(typeof t=="string"||ae(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=Ce(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););
return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Gn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Jn(n,t){for(var r=-1,e=n.length,u=Ce(e);++r<e;)u[r]=t(n[r],r,n);return u}function Xn(n){for(var t=-1,r=n.length,e=Au;++t<r;){var u=n[t];u>e&&(e=u)}return e}function Hn(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;return false}function Qn(n,t){return n===w?t:n}function nt(n,t,r,e){return n!==w&&Ke.call(e,r)?n:t;

}function tt(n,t,r){var e=zo(t);eu.apply(e,qu(t));for(var u=-1,o=e.length;++u<o;){var i=e[u],f=n[i],a=r(f,t[i],i,n,t);(a===a?a===f:f!==f)&&(f!==w||i in n)||(n[i]=a)}return n}function rt(n,t){for(var r=-1,e=n.length,u=Er(e),o=t.length,i=Ce(o);++r<o;){var f=t[r];i[r]=u?Ar(f,e)?n[f]:w:n[f]}return i}function et(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function ut(n,t,r){var e=typeof n;return"function"==e?t===w?n:Bt(n,t,r):null==n?Oe:"object"==e?wt(n):t===w?Re(n):bt(n,t);

}function ot(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==w)return f;if(!ae(n))return n;if(e=Io(n)){if(f=mr(n),!t)return qn(n,f)}else{var a=Ye.call(n),c=a==K;if(a!=Y&&a!=z&&(!c||u))return Nn[a]?br(n,a,t):u?n:{};if(f=wr(c?{}:n),!t)return Tu(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Kn:ht)(n,function(e,u){f[u]=ot(e,t,r,u,n,o,i)}),f}function it(n,t,r){if(typeof n!="function")throw new Be(L);return fu(function(){n.apply(w,r)},t)}function ft(n,t){
var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=dr(),f=i==r,a=f&&200<=t.length?zu(t):null,c=t.length;a&&(i=Pn,f=false,t=a);n:for(;++o<e;)if(a=n[o],f&&a===a){for(var l=c;l--;)if(t[l]===a)continue n;u.push(a)}else 0>i(t,a,0)&&u.push(a);return u}function at(n,t){var r=true;return Nu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function ct(n,t){var r=[];return Nu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function lt(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function st(n,t,r){
for(var e=-1,u=n.length,o=-1,i=[];++e<u;){var f=n[e];if(h(f)&&Er(f.length)&&(Io(f)||oe(f))){t&&(f=st(f,t,r));var a=-1,c=f.length;for(i.length+=c;++a<c;)i[++o]=f[a]}else r||(i[++o]=f)}return i}function pt(n,t){$u(n,t,ge)}function ht(n,t){return $u(n,t,zo)}function _t(n,t){return Lu(n,t,zo)}function vt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){var i=t[r];Co(n[i])&&(o[++u]=i)}return o}function gt(n,t,r){if(null!=n){r!==w&&r in Ur(n)&&(t=[r]),r=-1;for(var e=t.length;null!=n&&++r<e;)var u=n=n[t[r]];

return u}}function yt(n,t,r,e,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,f=typeof t;if("function"!=i&&"object"!=i&&"function"!=f&&"object"!=f||null==n||null==t)n=n!==n&&t!==t;else n:{var i=yt,f=Io(n),a=Io(t),c=M,l=M;f||(c=Ye.call(n),c==z?c=Y:c!=Y&&(f=he(n))),a||(l=Ye.call(t),l==z?l=Y:l!=Y&&he(t));var s=c==Y,a=l==Y,l=c==l;if(!l||f||s){if(!e&&(c=s&&Ke.call(n,"__wrapped__"),a=a&&Ke.call(t,"__wrapped__"),c||a)){n=i(c?n.value():n,a?t.value():t,r,e,u,o);break n}if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){
n=o[c]==t;break n}u.push(n),o.push(t),n=(f?hr:vr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false}else n=_r(n,t,c)}return n}function dt(n,t,r,e,u){for(var o=-1,i=t.length,f=!u;++o<i;)if(f&&e[o]?r[o]!==n[t[o]]:!(t[o]in n))return false;for(o=-1;++o<i;){var a=t[o],c=n[a],l=r[o];if(f&&e[o]?a=c!==w||a in n:(a=u?u(c,l,a):w,a===w&&(a=yt(l,c,u,true))),!a)return false}return true}function mt(n,t){var r=-1,e=Pu(n),u=Er(e)?Ce(e):[];return Nu(n,function(n,e,o){u[++r]=t(n,e,o)}),u}function wt(n){var t=zo(n),r=t.length;if(!r)return ke(true);

if(1==r){var e=t[0],u=n[e];if(Ir(u))return function(n){return null==n?false:n[e]===u&&(u!==w||e in Ur(n))}}for(var o=Ce(r),i=Ce(r);r--;)u=n[t[r]],o[r]=u,i[r]=Ir(u);return function(n){return null!=n&&dt(Ur(n),t,o,i)}}function bt(n,t){var r=Io(n),e=kr(n)&&Ir(t),u=n+"";return n=Nr(n),function(o){if(null==o)return false;var i=u;if(o=Ur(o),!(!r&&e||i in o)){if(o=1==n.length?o:gt(o,It(n,0,-1)),null==o)return false;i=Mr(n),o=Ur(o)}return o[i]===t?t!==w||i in o:yt(t,o[i],null,true)}}function xt(n,t,r,e,u){if(!ae(n))return n;

var o=Er(t.length)&&(Io(t)||he(t));if(!o){var i=zo(t);eu.apply(i,qu(t))}return Kn(i||t,function(f,a){if(i&&(a=f,f=t[a]),h(f)){e||(e=[]),u||(u=[]);n:{for(var c=a,l=e,s=u,p=l.length,_=t[c];p--;)if(l[p]==_){n[c]=s[p];break n}var p=n[c],v=r?r(p,_,c,n,t):w,g=v===w;g&&(v=_,Er(_.length)&&(Io(_)||he(_))?v=Io(p)?p:Pu(p)?qn(p):[]:So(_)||oe(_)?v=oe(p)?_e(p):So(p)?p:{}:g=false),l.push(_),s.push(v),g?n[c]=xt(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[c]=v)}}else c=n[a],l=r?r(c,f,a,n,t):w,(s=l===w)&&(l=f),!o&&l===w||!s&&(l===l?l===c:c!==c)||(n[a]=l);

}),n}function At(n){return function(t){return null==t?w:t[n]}}function jt(n){var t=n+"";return n=Nr(n),function(r){return gt(r,n,t)}}function kt(n,t){for(var r=t.length;r--;){var e=parseFloat(t[r]);if(e!=u&&Ar(e)){var u=e;au.call(n,e,1)}}}function Ot(n,t){return n+nu(xu()*(t-n+1))}function Et(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function It(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,0>t&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Ce(u);++e<u;)r[e]=n[e+t];

return r}function Rt(n,t){var r;return Nu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function Ct(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function St(t,r,e){var u=yr(),o=-1;return r=Jn(r,function(n){return u(n)}),t=mt(t,function(n){return{a:Jn(r,function(t){return t(n)}),b:++o,c:n}}),Ct(t,function(t,r){var u;n:{u=-1;for(var o=t.a,i=r.a,f=o.length,a=e.length;++u<f;){var c=n(o[u],i[u]);if(c){u=u<a?c*(e[u]?1:-1):c;break n}}u=t.b-r.b}return u})}function Wt(n,t){var r=0;return Nu(n,function(n,e,u){
r+=+t(n,e,u)||0}),r}function Tt(n,t){var e=-1,u=dr(),o=n.length,i=u==r,f=i&&200<=o,a=f?zu():null,c=[];a?(u=Pn,i=false):(f=false,a=t?[]:c);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=a.length;p--;)if(a[p]===s)continue n;t&&a.push(s),c.push(l)}else 0>u(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Ut(n,t){for(var r=-1,e=t.length,u=Ce(e);++r<e;)u[r]=n[t[r]];return u}function Nt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?It(n,e?0:o,e?o+1:u):It(n,e?o+1:0,e?u:o);

}function Ft(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;){var r=[r],o=t[e];eu.apply(r,o.args),r=o.func.apply(o.thisArg,r)}return r}function $t(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Eu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)?e=o+1:u=o}return u}return Lt(n,t,Oe,r)}function Lt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=t===w;u<o;){var a=nu((u+o)/2),c=r(n[a]),l=c===c;(i?l||e:f?l&&(e||c!==w):e?c<=t:c<t)?u=a+1:o=a}return du(o,Ou)}function Bt(n,t,r){
if(typeof n!="function")return Oe;if(t===w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function zt(n){return Xe.call(n,0)}function Mt(n,t,r){for(var e=r.length,u=-1,o=yu(n.length-e,0),i=-1,f=t.length,a=Ce(o+f);++i<f;)a[i]=t[i];for(;++u<e;)a[r[u]]=n[u];for(;o--;)a[i++]=n[u++];

return a}function Dt(n,t,r){for(var e=-1,u=r.length,o=-1,i=yu(n.length-u,0),f=-1,a=t.length,c=Ce(i+a);++o<i;)c[o]=n[o];for(i=o;++f<a;)c[i+f]=t[f];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Pt(n,t){return function(r,e,u){var o=t?t():{};if(e=yr(e,u,3),Io(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r)}}else Nu(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function qt(n){return ue(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u&&r[u-2],i=2<u&&r[2],f=1<u&&r[u-1];for(typeof o=="function"?(o=Bt(o,f,5),
u-=2):(o=typeof f=="function"?f:null,u-=o?1:0),i&&jr(r[0],r[1],i)&&(o=3>u?null:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Kt(n,t){return function(r,e){var u=r?Pu(r):0;if(!Er(u))return n(r,e);for(var o=t?u:-1,i=Ur(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Vt(n){return function(t,r,e){var u=Ur(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){var f=e[i];if(false===r(u[f],f,u))break}return t}}function Yt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments);

}var e=Gt(n);return r}function Zt(n){return function(t){var r=-1;t=Ae(de(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Gt(n){return function(){var t=Uu(n.prototype),r=n.apply(t,arguments);return ae(r)?r:t}}function Jt(n){function t(r,e,u){return u&&jr(r,e,u)&&(e=null),r=pr(r,n,null,null,null,null,null,e),r.placeholder=t.placeholder,r}return t}function Xt(n,t){return function(r,e,u){u&&jr(r,e,u)&&(e=null);var i=yr(),f=null==e;if(i===ut&&f||(f=false,e=i(e,u,3)),f){if(e=Io(r),e||!pe(r))return n(e?r:Tr(r));

e=o}return gr(r,e,t)}}function Ht(n,r){return function(e,u,o){return u=yr(u,o,3),Io(e)?(u=t(e,u,r),-1<u?e[u]:w):lt(e,u,n)}}function Qt(n){return function(r,e,u){return r&&r.length?(e=yr(e,u,3),t(r,e,n)):-1}}function nr(n){return function(t,r,e){return r=yr(r,e,3),lt(t,r,n,true)}}function tr(n){return function(){var t=arguments.length;if(!t)return function(){return arguments[0]};for(var r,e=n?t:-1,u=0,o=Ce(t);n?e--:++e<t;){var i=o[u++]=arguments[e];if(typeof i!="function")throw new Be(L);var f=r?"":Du(i);

r="wrapper"==f?new Bn([]):r}for(e=r?-1:t;++e<t;)i=o[e],f=Du(i),r=(u="wrapper"==f?Mu(i):null)&&Or(u[0])?r[Du(u[0])].apply(r,u[3]):1==i.length&&Or(i)?r[f]():r.thru(i);return function(){var n=arguments;if(r&&1==n.length&&Io(n[0]))return r.plant(n[0]).value();for(var e=0,n=o[e].apply(this,n);++e<t;)n=o[e].call(this,n);return n}}}function rr(n,t){return function(r,e,u){return typeof e=="function"&&u===w&&Io(r)?n(r,e):t(r,Bt(e,u,3))}}function er(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Bt(r,e,3)),
n(t,r,ge)}}function ur(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Bt(r,e,3)),n(t,r)}}function or(n){return function(t,r,e){return(t=u(t))&&(n?t:"")+cr(t,r,e)+(n?"":t)}}function ir(n){var t=ue(function(r,e){var u=v(e,t.placeholder);return pr(r,n,null,e,u)});return t}function fr(n,t){return function(r,e,u,o){var i=3>arguments.length;return typeof e=="function"&&o===w&&Io(r)?n(r,e,u,i):Et(r,yr(e,o,4),u,i,t)}}function ar(n,t,r,e,u,o,i,f,a,c){function l(){for(var b=arguments.length,j=b,k=Ce(b);j--;)k[j]=arguments[j];

if(e&&(k=Mt(k,e,u)),o&&(k=Dt(k,o,i)),_||y){var j=l.placeholder,O=v(k,j),b=b-O.length;if(b<c){var R=f?qn(f):null,b=yu(c-b,0),C=_?O:null,O=_?null:O,S=_?k:null,k=_?null:k;return t|=_?E:I,t&=~(_?I:E),g||(t&=~(x|A)),k=[n,t,r,S,C,k,O,R,a,b],R=ar.apply(w,k),Or(n)&&Ku(R,k),R.placeholder=j,R}}if(j=p?r:this,h&&(n=j[m]),f)for(R=k.length,b=du(f.length,R),C=qn(k);b--;)O=f[b],k[b]=Ar(O,R)?C[O]:w;return s&&a<k.length&&(k.length=a),(this&&this!==Yn&&this instanceof l?d||Gt(n):n).apply(j,k)}var s=t&R,p=t&x,h=t&A,_=t&k,g=t&j,y=t&O,d=!h&&Gt(n),m=n;

return l}function cr(n,t,r){return n=n.length,t=+t,n<t&&vu(t)?(t-=n,r=null==r?" ":r+"",be(r,He(t/r.length)).slice(0,t)):""}function lr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,a=-1,c=e.length,l=Ce(f+c);++a<c;)l[a]=e[a];for(;f--;)l[a++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&x,i=Gt(n);return u}function sr(n){return function(t,r,e,u){var o=yr(e);return o===ut&&null==e?$t(t,r,n):Lt(t,r,o(e,u,1),n)}}function pr(n,t,r,e,u,o,i,f){var a=t&A;if(!a&&typeof n!="function")throw new Be(L);

var c=e?e.length:0;if(c||(t&=~(E|I),e=u=null),c-=u?u.length:0,t&I){var l=e,s=u;e=u=null}var p=a?null:Mu(n);return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==R&&e==k||t==R&&e==C&&r[7].length<=p[8]||t==(R|C)&&e==k,(f<R||u)&&(t&x&&(r[2]=p[2],f|=e&x?0:j),(e=p[3])&&(u=r[3],r[3]=u?Mt(u,e,p[4]):qn(e),r[4]=u?v(r[3],B):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Dt(u,e,p[6]):qn(e),r[6]=u?v(r[5],B):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&R&&(r[8]=null==r[8]?p[8]:du(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],
r[1]=f),t=r[1],f=r[9]),r[9]=null==f?a?0:n.length:yu(f-c,0)||0,(p?Bu:Ku)(t==x?Yt(r[0],r[2]):t!=E&&t!=(x|E)||r[4].length?ar.apply(w,r):lr.apply(w,r),r)}function hr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length,l=true;if(a!=c&&(!u||c<=a))return false;for(;l&&++f<a;){var s=n[f],p=t[f],l=w;if(e&&(l=u?e(p,s,f):e(s,p,f)),l===w)if(u)for(var h=c;h--&&(p=t[h],!(l=s&&s===p||r(s,p,e,u,o,i))););else l=s&&s===p||r(s,p,e,u,o,i)}return!!l}function _r(n,t,r){switch(r){case D:case P:return+n==+t;case q:return n.name==t.name&&n.message==t.message;

case V:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case Z:case G:return n==t+""}return false}function vr(n,t,r,e,u,o,i){var f=zo(n),a=f.length,c=zo(t).length;if(a!=c&&!u)return false;for(var c=u,l=-1;++l<a;){var s=f[l],p=u?s in t:Ke.call(t,s);if(p){var h=n[s],_=t[s],p=w;e&&(p=u?e(_,h,s):e(h,_,s)),p===w&&(p=h&&h===_||r(h,_,e,u,o,i))}if(!p)return false;c||(c="constructor"==s)}return c||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false;

}function gr(n,t,r){var e=r?ju:Au,u=e,o=u;return Nu(n,function(n,i,f){i=t(n,i,f),((r?i<u:i>u)||i===e&&i===o)&&(u=i,o=n)}),o}function yr(n,t,r){var e=$n.callback||je,e=e===je?ut:e;return r?e(n,t,r):e}function dr(n,t,e){var u=$n.indexOf||zr,u=u===zr?r:u;return n?u(n,t,e):u}function mr(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&Ke.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function wr(n){return n=n.constructor,typeof n=="function"&&n instanceof n||(n=Fe),new n;

}function br(n,t,r){var e=n.constructor;switch(t){case J:return zt(n);case D:case P:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return t=n.buffer,new e(r?zt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Z:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function xr(n,t,r){return null==n||kr(t,n)||(t=Nr(t),n=1==t.length?n:gt(n,It(t,0,-1)),t=Mr(t)),t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Ar(n,t){return n=+n,t=null==t?Ru:t,
-1<n&&0==n%1&&n<t}function jr(n,t,r){if(!ae(r))return false;var e=typeof t;return"number"==e?(e=Pu(r),e=Er(e)&&Ar(t,e)):e="string"==e&&t in r,e?(t=r[t],n===n?n===t:t!==t):false}function kr(n,t){var r=typeof n;return"string"==r&&dn.test(n)||"number"==r?true:Io(n)?false:!yn.test(n)||null!=t&&n in Ur(t)}function Or(n){var t=Du(n);return!!t&&n===$n[t]&&t in zn.prototype}function Er(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=Ru}function Ir(n){return n===n&&(0===n?0<1/n:!ae(n))}function Rr(n,t){n=Ur(n);for(var r=-1,e=t.length,u={};++r<e;){
var o=t[r];o in n&&(u[o]=n[o])}return u}function Cr(n,t){var r={};return pt(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function Sr(n){var t;if(!h(n)||Ye.call(n)!=Y||!(Ke.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return pt(n,function(n,t){r=t}),r===w||Ke.call(n,r)}function Wr(n){for(var t=ge(n),r=t.length,e=r&&n.length,u=$n.support,u=e&&Er(e)&&(Io(n)||u.nonEnumArgs&&oe(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Ar(f,e)||Ke.call(n,f))&&i.push(f)}return i}
function Tr(n){return null==n?[]:Er(Pu(n))?ae(n)?n:Fe(n):ye(n)}function Ur(n){return ae(n)?n:Fe(n)}function Nr(n){if(Io(n))return n;var t=[];return u(n).replace(mn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function Fr(n){return n instanceof zn?n.clone():new Bn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function $r(n,t,r){return n&&n.length?((r?jr(n,t,r):null==t)&&(t=1),It(n,0>t?0:t)):[]}function Lr(n,t,r){var e=n?n.length:0;return e?((r?jr(n,t,r):null==t)&&(t=1),t=e-(+t||0),It(n,0,0>t?0:t)):[];

}function Br(n){return n?n[0]:w}function zr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?yu(u+e,0):e;else if(e)return e=$t(n,t),n=n[e],(t===t?t===n:n!==n)?e:-1;return r(n,t,e||0)}function Mr(n){var t=n?n.length:0;return t?n[t-1]:w}function Dr(n){return $r(n,1)}function Pr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=jr(n,t,u)?null:t,t=false);var o=yr();if((o!==ut||null!=e)&&(e=o(e,u,3)),t&&dr()==r){t=e;var i;e=-1,u=n.length;for(var o=-1,f=[];++e<u;){
var a=n[e],c=t?t(a,e,n):a;e&&i===c||(i=c,f[++o]=a)}n=f}else n=Tt(n,e);return n}function qr(n){for(var t=-1,r=(n&&n.length&&Xn(Jn(n,Pu)))>>>0,e=Ce(r);++t<r;)e[t]=Jn(n,At(t));return e}function Kr(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Io(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1])}return u}function Vr(n){return n=$n(n),n.__chain__=true,n}function Yr(n,t,r){return t.call(r,n)}function Zr(n,t,r){var e=Io(n)?Vn:at;return r&&jr(n,t,r)&&(t=null),(typeof t!="function"||r!==w)&&(t=yr(t,r,3)),
e(n,t)}function Gr(n,t,r){var e=Io(n)?Gn:ct;return t=yr(t,r,3),e(n,t)}function Jr(n,t,r,e){var u=n?Pu(n):0;return Er(u)||(n=ye(n),u=n.length),u?(r=typeof r!="number"||e&&jr(t,r,e)?0:0>r?yu(u+r,0):r||0,typeof n=="string"||!Io(n)&&pe(n)?r<u&&-1<n.indexOf(t,r):-1<dr(n,t,r)):false}function Xr(n,t,r){var e=Io(n)?Jn:mt;return t=yr(t,r,3),e(n,t)}function Hr(n,t,r){return(r?jr(n,t,r):null==t)?(n=Tr(n),t=n.length,0<t?n[Ot(0,t-1)]:w):(n=Qr(n),n.length=du(0>t?0:+t||0,n.length),n)}function Qr(n){n=Tr(n);for(var t=-1,r=n.length,e=Ce(r);++t<r;){
var u=Ot(0,t);t!=u&&(e[t]=e[u]),e[u]=n[t]}return e}function ne(n,t,r){var e=Io(n)?Hn:Rt;return r&&jr(n,t,r)&&(t=null),(typeof t!="function"||r!==w)&&(t=yr(t,r,3)),e(n,t)}function te(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Be(L);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}}function re(n,t,r){function e(){var r=t-(_o()-c);0>=r||r>t?(f&&Qe(f),r=p,f=s=p=w,r&&(h=_o(),a=n.apply(l,i),s||f||(i=l=null))):s=fu(e,r)}function u(){
s&&Qe(s),f=s=p=w,(v||_!==t)&&(h=_o(),a=n.apply(l,i),s||f||(i=l=null))}function o(){if(i=arguments,c=_o(),l=this,p=v&&(s||!g),false===_)var r=g&&!s;else{f||g||(h=c);var o=_-(c-h),y=0>=o||o>_;y?(f&&(f=Qe(f)),h=c,a=n.apply(l,i)):f||(f=fu(u,o))}return y&&s?s=Qe(s):s||t===_||(s=fu(e,t)),r&&(y=true,a=n.apply(l,i)),!y||s||f||(i=l=null),a}var i,f,a,c,l,s,p,h=0,_=false,v=true;if(typeof n!="function")throw new Be(L);if(t=0>t?0:+t||0,true===r)var g=true,v=false;else ae(r)&&(g=r.leading,_="maxWait"in r&&yu(+r.maxWait||0,t),v="trailing"in r?r.trailing:v);

return o.cancel=function(){s&&Qe(s),f&&Qe(f),f=s=p=w},o}function ee(n,t){function r(){var e=arguments,u=r.cache,o=t?t.apply(this,e):e[0];return u.has(o)?u.get(o):(e=n.apply(this,e),u.set(o,e),e)}if(typeof n!="function"||t&&typeof t!="function")throw new Be(L);return r.cache=new ee.Cache,r}function ue(n,t){if(typeof n!="function")throw new Be(L);return t=yu(t===w?n.length-1:+t||0,0),function(){for(var r=arguments,e=-1,u=yu(r.length-t,0),o=Ce(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);

case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=Ce(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function oe(n){return Er(h(n)?n.length:w)&&Ye.call(n)==z}function ie(n){return!!n&&1===n.nodeType&&h(n)&&-1<Ye.call(n).indexOf("Element")}function fe(n){return h(n)&&typeof n.message=="string"&&Ye.call(n)==q}function ae(n){var t=typeof n;return"function"==t||!!n&&"object"==t}function ce(n){return null==n?false:Ye.call(n)==K?Ge.test(qe.call(n)):h(n)&&En.test(n)}function le(n){
return typeof n=="number"||h(n)&&Ye.call(n)==V}function se(n){return h(n)&&Ye.call(n)==Z||false}function pe(n){return typeof n=="string"||h(n)&&Ye.call(n)==G}function he(n){return h(n)&&Er(n.length)&&!!Un[Ye.call(n)]}function _e(n){return et(n,ge(n))}function ve(n){return vt(n,ge(n))}function ge(n){if(null==n)return[];ae(n)||(n=Fe(n));for(var t=n.length,t=t&&Er(t)&&(Io(n)||Wu.nonEnumArgs&&oe(n))&&t||0,r=n.constructor,e=-1,r=typeof r=="function"&&r.prototype===n,u=Ce(t),o=0<t;++e<t;)u[e]=e+"";for(var i in n)o&&Ar(i,t)||"constructor"==i&&(r||!Ke.call(n,i))||u.push(i);

return u}function ye(n){return Ut(n,zo(n))}function de(n){return(n=u(n))&&n.replace(In,c).replace(xn,"")}function me(n){return(n=u(n))&&bn.test(n)?n.replace(wn,"\\$&"):n}function we(n,t,r){return r&&jr(n,t,r)&&(t=0),bu(n,t)}function be(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!vu(t))return r;do t%2&&(r+=n),t=nu(t/2),n+=n;while(t);return r}function xe(n,t,r){var e=n;return(n=u(n))?(r?jr(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(i(n,t),f(n,t)+1)):n}function Ae(n,t,r){return r&&jr(n,t,r)&&(t=null),
n=u(n),n.match(t||Sn)||[]}function je(n,t,r){return r&&jr(n,t,r)&&(t=null),ut(n,t)}function ke(n){return function(){return n}}function Oe(n){return n}function Ee(n,t,r){if(null==r){var e=ae(t),u=e&&zo(t);((u=u&&u.length&&vt(t,u))?u.length:e)||(u=false,r=t,t=n,n=this)}u||(u=vt(t,zo(t)));var o=true,e=-1,i=Co(n),f=u.length;false===r?o=false:ae(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var a=t[r];n[r]=a,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);

return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return r=[this.value()],eu.apply(r,arguments),t.apply(n,r)}}(a))}return n}function Ie(){}function Re(n){return kr(n)?At(n):jt(n)}_=_?Zn.defaults(Yn.Object(),_,Zn.pick(Yn,Tn)):Yn;var Ce=_.Array,Se=_.Date,We=_.Error,Te=_.Function,Ue=_.Math,Ne=_.Number,Fe=_.Object,$e=_.RegExp,Le=_.String,Be=_.TypeError,ze=Ce.prototype,Me=Fe.prototype,De=Le.prototype,Pe=(Pe=_.window)&&Pe.document,qe=Te.prototype.toString,Ke=Me.hasOwnProperty,Ve=0,Ye=Me.toString,Ze=_._,Ge=$e("^"+me(Ye).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Je=ce(Je=_.ArrayBuffer)&&Je,Xe=ce(Xe=Je&&new Je(0).slice)&&Xe,He=Ue.ceil,Qe=_.clearTimeout,nu=Ue.floor,tu=ce(tu=Fe.getOwnPropertySymbols)&&tu,ru=ce(ru=Fe.getPrototypeOf)&&ru,eu=ze.push,uu=ce(Fe.preventExtensions=Fe.preventExtensions)&&uu,ou=Me.propertyIsEnumerable,iu=ce(iu=_.Set)&&iu,fu=_.setTimeout,au=ze.splice,cu=ce(cu=_.Uint8Array)&&cu,lu=ce(lu=_.WeakMap)&&lu,su=function(){
try{var n=ce(n=_.Float64Array)&&n,t=new n(new Je(10),0,1)&&n}catch(r){}return t}(),pu=function(){var n={1:0},t=uu&&ce(t=Fe.assign)&&t;try{t(uu(n),"xo")}catch(r){}return!n[1]&&t}(),hu=ce(hu=Ce.isArray)&&hu,_u=ce(_u=Fe.create)&&_u,vu=_.isFinite,gu=ce(gu=Fe.keys)&&gu,yu=Ue.max,du=Ue.min,mu=ce(mu=Se.now)&&mu,wu=ce(wu=Ne.isFinite)&&wu,bu=_.parseInt,xu=Ue.random,Au=Ne.NEGATIVE_INFINITY,ju=Ne.POSITIVE_INFINITY,ku=Ue.pow(2,32)-1,Ou=ku-1,Eu=ku>>>1,Iu=su?su.BYTES_PER_ELEMENT:0,Ru=Ue.pow(2,53)-1,Cu=lu&&new lu,Su={},Wu=$n.support={};

!function(n){function t(){this.x=n}var r=[];t.prototype={valueOf:n,y:n};for(var e in new t)r.push(e);Wu.funcDecomp=/\bthis\b/.test(function(){return this}),Wu.funcNames=typeof Te.name=="string";try{Wu.dom=11===Pe.createDocumentFragment().nodeType}catch(u){Wu.dom=false}try{Wu.nonEnumArgs=!ou.call(arguments,1)}catch(o){Wu.nonEnumArgs=true}}(1,0),$n.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:$n}};var Tu=pu||function(n,t){return null==t?n:et(t,qu(t),et(t,zo(t),n))},Uu=function(){
function n(){}return function(t){if(ae(t)){n.prototype=t;var r=new n;n.prototype=null}return r||_.Object()}}(),Nu=Kt(ht),Fu=Kt(_t,true),$u=Vt(),Lu=Vt(true),Bu=Cu?function(n,t){return Cu.set(n,t),n}:Oe;Xe||(zt=Je&&cu?function(n){var t=n.byteLength,r=su?nu(t/Iu):0,e=r*Iu,u=new Je(t);if(r){var o=new su(u,0,r);o.set(new su(n,0,r))}return t!=e&&(o=new cu(u,e),o.set(new cu(n,e))),u}:ke(null));var zu=_u&&iu?function(n){return new Dn(n)}:ke(null),Mu=Cu?function(n){return Cu.get(n)}:Ie,Du=function(){return Wu.funcNames?"constant"==ke.name?At("name"):function(n){
for(var t=n.name,r=Su[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}:ke("")}(),Pu=At("length"),qu=tu?function(n){return tu(Ur(n))}:ke([]),Ku=function(){var n=0,t=0;return function(r,e){var u=_o(),o=U-(u-t);if(t=u,0<o){if(++n>=T)return r}else n=0;return Bu(r,e)}}(),Vu=ue(function(n,t){return Io(n)||oe(n)?ft(n,st(t,false,true)):[]}),Yu=Qt(),Zu=Qt(true),Gu=ue(function(t,r){t||(t=[]),r=st(r);var e=rt(t,r);return kt(t,r.sort(n)),e}),Ju=sr(),Xu=sr(true),Hu=ue(function(n){return Tt(st(n,false,true));

}),Qu=ue(function(n,t){return Io(n)||oe(n)?ft(n,t):[]}),no=ue(qr),to=ue(function(n,t){var r=n?Pu(n):0;return Er(r)&&(n=Tr(n)),rt(n,st(t))}),ro=Pt(function(n,t,r){Ke.call(n,r)?++n[r]:n[r]=1}),eo=Ht(Nu),uo=Ht(Fu,true),oo=rr(Kn,Nu),io=rr(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Fu),fo=Pt(function(n,t,r){Ke.call(n,r)?n[r].push(t):n[r]=[t]}),ao=Pt(function(n,t,r){n[r]=t}),co=ue(function(n,t,r){var e=-1,u=typeof t=="function",o=kr(t),i=Pu(n),f=Er(i)?Ce(i):[];return Nu(n,function(n){
var i=u?t:o&&null!=n&&n[t];f[++e]=i?i.apply(n,r):xr(n,t,r)}),f}),lo=Pt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),so=fr(function(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r},Nu),po=fr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Fu),ho=ue(function(n,t){if(null==n)return[];var r=t[2];return r&&jr(t[0],t[1],r)&&(t.length=1),St(n,st(t),[])}),_o=mu||function(){return(new Se).getTime()},vo=ue(function(n,t,r){
var e=x;if(r.length)var u=v(r,vo.placeholder),e=e|E;return pr(n,e,t,r,u)}),go=ue(function(n,t){t=t.length?st(t):ve(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=pr(n[u],x,n)}return n}),yo=ue(function(n,t,r){var e=x|A;if(r.length)var u=v(r,yo.placeholder),e=e|E;return pr(t,e,n,r,u)}),mo=Jt(k),wo=Jt(O),bo=ue(function(n,t){return it(n,1,t)}),xo=ue(function(n,t,r){return it(n,t,r)}),Ao=tr(),jo=tr(true),ko=ir(E),Oo=ir(I),Eo=ue(function(n,t){return pr(n,C,null,null,null,st(t))}),Io=hu||function(n){return h(n)&&Er(n.length)&&Ye.call(n)==M;

};Wu.dom||(ie=function(n){return!!n&&1===n.nodeType&&h(n)&&!So(n)});var Ro=wu||function(n){return typeof n=="number"&&vu(n)},Co=e(/x/)||cu&&!e(cu)?function(n){return Ye.call(n)==K}:e,So=ru?function(n){if(!n||Ye.call(n)!=Y)return false;var t=n.valueOf,r=ce(t)&&(r=ru(t))&&ru(r);return r?n==r||ru(n)==r:Sr(n)}:Sr,Wo=qt(function(n,t,r){return r?tt(n,t,r):Tu(n,t)}),To=ue(function(n){var t=n[0];return null==t?t:(n.push(Qn),Wo.apply(w,n))}),Uo=nr(ht),No=nr(_t),Fo=er($u),$o=er(Lu),Lo=ur(ht),Bo=ur(_t),zo=gu?function(n){
if(n)var t=n.constructor,r=n.length;return typeof t=="function"&&t.prototype===n||typeof n!="function"&&Er(r)?Wr(n):ae(n)?gu(n):[]}:Wr,Mo=qt(xt),Do=ue(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Jn(st(t),Le),Rr(n,ft(ge(n),t));var r=Bt(t[0],t[1],3);return Cr(n,function(n,t,e){return!r(n,t,e)})}),Po=ue(function(n,t){return null==n?{}:"function"==typeof t[0]?Cr(n,Bt(t[0],t[1],3)):Rr(n,st(t))}),qo=Zt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t);

}),Ko=Zt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vo=or(),Yo=or(true);8!=bu(Wn+"08")&&(we=function(n,t,r){return(r?jr(n,t,r):null==t)?t=0:t&&(t=+t),n=xe(n),bu(n,t||(On.test(n)?16:10))});var Zo=Zt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}),Go=Zt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),Jo=ue(function(n,t){try{return n.apply(w,t)}catch(r){return fe(r)?r:new We(r)}}),Xo=ue(function(n,t){return function(r){return xr(r,n,t)}}),Ho=ue(function(n,t){
return function(r){return xr(n,r,t)}}),Qo=Xt(Xn),ni=Xt(function(n){for(var t=-1,r=n.length,e=ju;++t<r;){var u=n[t];u<e&&(e=u)}return e},true);return $n.prototype=Ln.prototype,Bn.prototype=Uu(Ln.prototype),Bn.prototype.constructor=Bn,zn.prototype=Uu(Ln.prototype),zn.prototype.constructor=zn,Mn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Mn.prototype.get=function(n){return"__proto__"==n?w:this.__data__[n]},Mn.prototype.has=function(n){return"__proto__"!=n&&Ke.call(this.__data__,n);

},Mn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;typeof n=="string"||ae(n)?t.set.add(n):t.hash[n]=true},ee.Cache=Mn,$n.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Be(L);var r=n;n=t,t=r}return n=vu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},$n.ary=function(n,t,r){return r&&jr(n,t,r)&&(t=null),t=n&&null==t?n.length:yu(+t||0,0),pr(n,R,null,null,null,null,t)},$n.assign=Wo,
$n.at=to,$n.before=te,$n.bind=vo,$n.bindAll=go,$n.bindKey=yo,$n.callback=je,$n.chain=Vr,$n.chunk=function(n,t,r){t=(r?jr(n,t,r):null==t)?1:yu(+t||1,1),r=0;for(var e=n?n.length:0,u=-1,o=Ce(He(e/t));r<e;)o[++u]=It(n,r,r+=t);return o},$n.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},$n.constant=ke,$n.countBy=ro,$n.create=function(n,t,r){var e=Uu(n);return r&&jr(n,t,r)&&(t=null),t?Tu(e,t):e},$n.curry=mo,$n.curryRight=wo,$n.debounce=re,$n.defaults=To,
$n.defer=bo,$n.delay=xo,$n.difference=Vu,$n.drop=$r,$n.dropRight=Lr,$n.dropRightWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3),true,true):[]},$n.dropWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3),true):[]},$n.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&jr(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},$n.filter=Gr,$n.flatten=function(n,t,r){var e=n?n.length:0;

return r&&jr(n,t,r)&&(t=false),e?st(n,t):[]},$n.flattenDeep=function(n){return n&&n.length?st(n,true):[]},$n.flow=Ao,$n.flowRight=jo,$n.forEach=oo,$n.forEachRight=io,$n.forIn=Fo,$n.forInRight=$o,$n.forOwn=Lo,$n.forOwnRight=Bo,$n.functions=ve,$n.groupBy=fo,$n.indexBy=ao,$n.initial=function(n){return Lr(n,1)},$n.intersection=function(){for(var n=[],t=-1,e=arguments.length,u=[],o=dr(),i=o==r,f=[];++t<e;){var a=arguments[t];(Io(a)||oe(a))&&(n.push(a),u.push(i&&120<=a.length?zu(t&&a):null))}if(e=n.length,2>e)return f;

var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c<l;)if(a=i[c],0>(s?Pn(s,a):o(f,a,0))){for(t=e;--t;){var p=u[t];if(0>(p?Pn(p,a):o(n[t],a,0)))continue n}s&&s.push(a),f.push(a)}return f},$n.invert=function(n,t,r){r&&jr(n,t,r)&&(t=null),r=-1;for(var e=zo(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?Ke.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},$n.invoke=co,$n.keys=zo,$n.keysIn=ge,$n.map=Xr,$n.mapValues=function(n,t,r){var e={};return t=yr(t,r,3),ht(n,function(n,r,u){e[r]=t(n,r,u)}),e},$n.matches=function(n){
return wt(ot(n,true))},$n.matchesProperty=function(n,t){return bt(n,ot(t,true))},$n.memoize=ee,$n.merge=Mo,$n.method=Xo,$n.methodOf=Ho,$n.mixin=Ee,$n.negate=function(n){if(typeof n!="function")throw new Be(L);return function(){return!n.apply(this,arguments)}},$n.omit=Do,$n.once=function(n){return te(2,n)},$n.pairs=function(n){for(var t=-1,r=zo(n),e=r.length,u=Ce(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},$n.partial=ko,$n.partialRight=Oo,$n.partition=lo,$n.pick=Po,$n.pluck=function(n,t){return Xr(n,Re(t));

},$n.property=Re,$n.propertyOf=function(n){return function(t){return gt(n,Nr(t),t+"")}},$n.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=dr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)au.call(t,o,1);return t},$n.pullAt=Gu,$n.range=function(n,t,r){r&&jr(n,t,r)&&(t=r=null),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=yu(He((t-n)/(r||1)),0);for(var u=Ce(t);++e<t;)u[e]=n,n+=r;return u},$n.rearg=Eo,$n.reject=function(n,t,r){var e=Io(n)?Gn:ct;

return t=yr(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},$n.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=yr(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return kt(n,o),e},$n.rest=Dr,$n.restParam=ue,$n.set=function(n,t,r){if(null==n)return n;var e=t+"";t=null!=n[e]||kr(t,n)?[e]:Nr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];ae(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Ar(t[e+1])?[]:{})),i=i[f]}return n},$n.shuffle=Qr,$n.slice=function(n,t,r){
var e=n?n.length:0;return e?(r&&typeof r!="number"&&jr(n,t,r)&&(t=0,r=e),It(n,t,r)):[]},$n.sortBy=function(n,t,r){if(null==n)return[];r&&jr(n,t,r)&&(t=null);var e=-1;return t=yr(t,r,3),n=mt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),Ct(n,a)},$n.sortByAll=ho,$n.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&jr(t,r,e)&&(r=null),Io(t)||(t=null==t?[]:[t]),Io(r)||(r=null==r?[]:[r]),St(n,t,r))},$n.spread=function(n){if(typeof n!="function")throw new Be(L);return function(t){return n.apply(this,t);

}},$n.take=function(n,t,r){return n&&n.length?((r?jr(n,t,r):null==t)&&(t=1),It(n,0,0>t?0:t)):[]},$n.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?jr(n,t,r):null==t)&&(t=1),t=e-(+t||0),It(n,0>t?0:t)):[]},$n.takeRightWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3),false,true):[]},$n.takeWhile=function(n,t,r){return n&&n.length?Nt(n,yr(t,r,3)):[]},$n.tap=function(n,t,r){return t.call(r,n),n},$n.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Be(L);return false===r?e=false:ae(r)&&(e="leading"in r?!!r.leading:e,
u="trailing"in r?!!r.trailing:u),Fn.leading=e,Fn.maxWait=+t,Fn.trailing=u,re(n,t,Fn)},$n.thru=Yr,$n.times=function(n,t,r){if(n=+n,1>n||!vu(n))return[];var e=-1,u=Ce(du(n,ku));for(t=Bt(t,r,1);++e<n;)e<ku?u[e]=t(e):t(e);return u},$n.toArray=function(n){var t=n?Pu(n):0;return Er(t)?t?qn(n):[]:ye(n)},$n.toPlainObject=_e,$n.transform=function(n,t,r,e){var u=Io(n)||he(n);return t=yr(t,e,4),null==r&&(u||ae(n)?(e=n.constructor,r=u?Io(n)?new e:[]:Uu(Co(e)&&e.prototype)):r={}),(u?Kn:ht)(n,function(n,e,u){return t(r,n,e,u);

}),r},$n.union=Hu,$n.uniq=Pr,$n.unzip=qr,$n.values=ye,$n.valuesIn=function(n){return Ut(n,ge(n))},$n.where=function(n,t){return Gr(n,wt(t))},$n.without=Qu,$n.wrap=function(n,t){return t=null==t?Oe:t,pr(t,E,null,[n],[])},$n.xor=function(){for(var n=-1,t=arguments.length;++n<t;){var r=arguments[n];if(Io(r)||oe(r))var e=e?ft(e,r).concat(ft(r,e)):r}return e?Tt(e):[]},$n.zip=no,$n.zipObject=Kr,$n.backflow=jo,$n.collect=Xr,$n.compose=jo,$n.each=oo,$n.eachRight=io,$n.extend=Wo,$n.iteratee=je,$n.methods=ve,
$n.object=Kr,$n.select=Gr,$n.tail=Dr,$n.unique=Pr,Ee($n,$n),$n.add=function(n,t){return(+n||0)+(+t||0)},$n.attempt=Jo,$n.camelCase=qo,$n.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},$n.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&jr(n,t,r)?t=false:typeof t=="function"&&(e=r,r=t,t=false),r=typeof r=="function"&&Bt(r,e,1),ot(n,t,r)},$n.cloneDeep=function(n,t,r){return t=typeof t=="function"&&Bt(t,r,1),ot(n,true,t)},$n.deburr=de,$n.endsWith=function(n,t,r){n=u(n),t+="";

var e=n.length;return r=r===w?e:du(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},$n.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,l):n},$n.escapeRegExp=me,$n.every=Zr,$n.find=eo,$n.findIndex=Yu,$n.findKey=Uo,$n.findLast=uo,$n.findLastIndex=Zu,$n.findLastKey=No,$n.findWhere=function(n,t){return eo(n,wt(t))},$n.first=Br,$n.get=function(n,t,r){return n=null==n?w:gt(n,Nr(t),t+""),n===w?r:n},$n.has=function(n,t){if(null==n)return false;var r=Ke.call(n,t);return r||kr(t)||(t=Nr(t),n=1==t.length?n:gt(n,It(t,0,-1)),
t=Mr(t),r=null!=n&&Ke.call(n,t)),r},$n.identity=Oe,$n.includes=Jr,$n.indexOf=zr,$n.inRange=function(n,t,r){return t=+t||0,"undefined"===typeof r?(r=t,t=0):r=+r||0,n>=du(t,r)&&n<yu(t,r)},$n.isArguments=oe,$n.isArray=Io,$n.isBoolean=function(n){return true===n||false===n||h(n)&&Ye.call(n)==D},$n.isDate=function(n){return h(n)&&Ye.call(n)==P},$n.isElement=ie,$n.isEmpty=function(n){if(null==n)return true;var t=Pu(n);return Er(t)&&(Io(n)||pe(n)||oe(n)||h(n)&&Co(n.splice))?!t:!zo(n).length},$n.isEqual=function(n,t,r,e){
return r=typeof r=="function"&&Bt(r,e,3),!r&&Ir(n)&&Ir(t)?n===t:(e=r?r(n,t):w,e===w?yt(n,t,r):!!e)},$n.isError=fe,$n.isFinite=Ro,$n.isFunction=Co,$n.isMatch=function(n,t,r,e){var u=zo(t),o=u.length;if(!o)return true;if(null==n)return false;if(r=typeof r=="function"&&Bt(r,e,3),n=Ur(n),!r&&1==o){var i=u[0];if(e=t[i],Ir(e))return e===n[i]&&(e!==w||i in n)}for(var i=Ce(o),f=Ce(o);o--;)e=i[o]=t[u[o]],f[o]=Ir(e);return dt(n,u,i,f,r)},$n.isNaN=function(n){return le(n)&&n!=+n},$n.isNative=ce,$n.isNull=function(n){
return null===n},$n.isNumber=le,$n.isObject=ae,$n.isPlainObject=So,$n.isRegExp=se,$n.isString=pe,$n.isTypedArray=he,$n.isUndefined=function(n){return n===w},$n.kebabCase=Ko,$n.last=Mr,$n.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?yu(e+r,0):du(r||0,e-1))+1;else if(r)return u=$t(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},$n.max=Qo,$n.min=ni,$n.noConflict=function(){return _._=Ze,
this},$n.noop=Ie,$n.now=_o,$n.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&vu(t)?(e=(t-e)/2,t=nu(e),e=He(e),r=cr("",e,r),r.slice(0,t)+n+r):n},$n.padLeft=Vo,$n.padRight=Yo,$n.parseInt=we,$n.random=function(n,t,r){r&&jr(n,t,r)&&(t=r=null);var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=xu(),du(n+r*(t-n+parseFloat("1e-"+((r+"").length-1))),t)):Ot(n,t)},$n.reduce=so,$n.reduceRight=po,
$n.repeat=be,$n.result=function(n,t,r){var e=null==n?w:n[t];return e===w&&(null==n||kr(t,n)||(t=Nr(t),n=1==t.length?n:gt(n,It(t,0,-1)),e=null==n?w:n[Mr(t)]),e=e===w?r:e),Co(e)?e.call(n):e},$n.runInContext=m,$n.size=function(n){var t=n?Pu(n):0;return Er(t)?t:zo(n).length},$n.snakeCase=Zo,$n.some=ne,$n.sortedIndex=Ju,$n.sortedLastIndex=Xu,$n.startCase=Go,$n.startsWith=function(n,t,r){return n=u(n),r=null==r?0:du(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},$n.sum=function(n,t,r){r&&jr(n,t,r)&&(t=null);

var e=yr(),u=null==t;if(e===ut&&u||(u=false,t=e(t,r,3)),u){for(n=Io(n)?n:Tr(n),t=n.length,r=0;t--;)r+=+n[t]||0;n=r}else n=Wt(n,t);return n},$n.template=function(n,t,r){var e=$n.templateSettings;r&&jr(n,t,r)&&(t=r=null),n=u(n),t=tt(Tu({},r||t),e,nt),r=tt(Tu({},t.imports),e.imports,nt);var o,i,f=zo(r),a=Ut(r,f),c=0;r=t.interpolate||Rn;var l="__p+='";r=$e((t.escape||Rn).source+"|"+r.source+"|"+(r===gn?jn:Rn).source+"|"+(t.evaluate||Rn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";

if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Cn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",
t=Jo(function(){return Te(f,p+"return "+l).apply(w,a)}),t.source=l,fe(t))throw t;return t},$n.trim=xe,$n.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?jr(e,t,r):null==t)?g(n):i(n,t+"")):n},$n.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?jr(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,f(n,t+"")+1):n},$n.trunc=function(n,t,r){r&&jr(n,t,r)&&(t=null);var e=S;if(r=W,null!=t)if(ae(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;

if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(se(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=$e(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),-1<o&&(t=t.slice(0,o)));return t+r},$n.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},$n.uniqueId=function(n){var t=++Ve;return u(n)+t},$n.words=Ae,$n.all=Zr,$n.any=ne,$n.contains=Jr,
$n.detect=eo,$n.foldl=so,$n.foldr=po,$n.head=Br,$n.include=Jr,$n.inject=so,Ee($n,function(){var n={};return ht($n,function(t,r){$n.prototype[r]||(n[r]=t)}),n}(),false),$n.sample=Hr,$n.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return Hr(t,n)}):Hr(this.value())},$n.VERSION=b,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){$n[n].placeholder=$n}),Kn(["dropWhile","filter","map","takeWhile"],function(n,t){var r=t!=$,e=t==N;zn.prototype[n]=function(n,u){
var o=this.__filtered__,i=o&&e?new zn(this):this.clone();return(i.__iteratees__||(i.__iteratees__=[])).push({done:false,count:0,index:0,iteratee:yr(n,u,1),limit:-1,type:t}),i.__filtered__=o||r,i}}),Kn(["drop","take"],function(n,t){var r=n+"While";zn.prototype[n]=function(r){var e=this.__filtered__,u=e&&!t?this.dropWhile():this.clone();return r=null==r?1:yu(nu(r)||0,0),e?t?u.__takeCount__=du(u.__takeCount__,r):Mr(u.__iteratees__).limit=r:(u.__views__||(u.__views__=[])).push({size:r,type:n+(0>u.__dir__?"Right":"")
}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()},zn.prototype[n+"RightWhile"]=function(n,t){return this.reverse()[r](n,t).reverse()}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?wt:Re;zn.prototype[n]=function(n){return this[r](e(n));

}}),zn.prototype.compact=function(){return this.filter(Oe)},zn.prototype.reject=function(n,t){return n=yr(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=0>n?this.takeRight(-n):this.drop(n);return t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r},zn.prototype.toArray=function(){return this.drop(0)},ht(zn.prototype,function(n,t){var r=$n[t];if(r){var e=/^(?:filter|map|reject)|While$/.test(t),u=/^(?:first|last)$/.test(t);$n.prototype[t]=function(){
function t(n){return n=[n],eu.apply(n,o),r.apply($n,n)}var o=arguments,i=this.__chain__,f=this.__wrapped__,a=!!this.__actions__.length,c=f instanceof zn,l=o[0],s=c||Io(f);return s&&e&&typeof l=="function"&&1!=l.length&&(c=s=false),c=c&&!a,u&&!i?c?n.call(f):r.call($n,this.value()):s?(f=n.apply(c?f:new zn(this),o),u||!a&&!f.__actions__||(f.__actions__||(f.__actions__=[])).push({func:Yr,args:[t],thisArg:$n}),new Bn(f,i)):this.thru(t)}}}),Kn("concat join pop push replace shift sort splice split unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?De:ze)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(n);$n.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r](function(r){return t.apply(r,n)})}}),ht(zn.prototype,function(n,t){var r=$n[t];if(r){var e=r.name;(Su[e]||(Su[e]=[])).push({name:t,func:r})}}),Su[ar(null,A).name]=[{name:"wrapper",func:null}],zn.prototype.clone=function(){var n=this.__actions__,t=this.__iteratees__,r=this.__views__,e=new zn(this.__wrapped__);

return e.__actions__=n?qn(n):null,e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=t?qn(t):null,e.__takeCount__=this.__takeCount__,e.__views__=r?qn(r):null,e},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n=this.__wrapped__.value();if(!Io(n))return Ft(n,this.__actions__);var t,r=this.__dir__,e=0>r;t=n.length;for(var u=this.__views__,o=0,i=-1,f=u?u.length:0;++i<f;){
var a=u[i],c=a.size;switch(a.type){case"drop":o+=c;break;case"dropRight":t-=c;break;case"take":t=du(t,o+c);break;case"takeRight":o=yu(o,t-c)}}t={start:o,end:t},u=t.start,o=t.end,t=o-u,u=e?o:u-1,o=du(t,this.__takeCount__),f=(i=this.__iteratees__)?i.length:0,a=0,c=[];n:for(;t--&&a<o;){for(var u=u+r,l=-1,s=n[u];++l<f;){var p=i[l],h=p.iteratee,_=p.type;if(_==N){if(p.done&&(e?u>p.index:u<p.index)&&(p.count=0,p.done=false),p.index=u,!(p.done||(_=p.limit,p.done=-1<_?p.count++>=_:!h(s))))continue n}else if(p=h(s),
_==$)s=p;else if(!p){if(_==F)continue n;break n}}c[a++]=s}return c},$n.prototype.chain=function(){return Vr(this)},$n.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},$n.prototype.plant=function(n){for(var t,r=this;r instanceof Ln;){var e=Fr(r);t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},$n.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),new Bn(n.reverse(),this.__chain__)):this.thru(function(n){
return n.reverse()})},$n.prototype.toString=function(){return this.value()+""},$n.prototype.run=$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return Ft(this.__wrapped__,this.__actions__)},$n.prototype.collect=$n.prototype.map,$n.prototype.head=$n.prototype.first,$n.prototype.select=$n.prototype.filter,$n.prototype.tail=$n.prototype.rest,$n}var w,b="3.7.0",x=1,A=2,j=4,k=8,O=16,E=32,I=64,R=128,C=256,S=30,W="...",T=150,U=16,N=0,F=1,$=2,L="Expected a function",B="__lodash_placeholder__",z="[object Arguments]",M="[object Array]",D="[object Boolean]",P="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Y="[object Object]",Z="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/[.*+?^${}()|[\]\/\\]/g,bn=RegExp(wn.source),xn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,En=/^\[object .+?Constructor\]$/,In=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Rn=/($^)/,Cn=/['\n\r\u2028\u2029\\]/g,Sn=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),Wn=" \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",Tn="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout document isFinite parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap window".split(" "),Un={};

Un[X]=Un[H]=Un[Q]=Un[nn]=Un[tn]=Un[rn]=Un[en]=Un[un]=Un[on]=true,Un[z]=Un[M]=Un[J]=Un[D]=Un[P]=Un[q]=Un[K]=Un["[object Map]"]=Un[V]=Un[Y]=Un[Z]=Un["[object Set]"]=Un[G]=Un["[object WeakMap]"]=false;var Nn={};Nn[z]=Nn[M]=Nn[J]=Nn[D]=Nn[P]=Nn[X]=Nn[H]=Nn[Q]=Nn[nn]=Nn[tn]=Nn[V]=Nn[Y]=Nn[Z]=Nn[G]=Nn[rn]=Nn[en]=Nn[un]=Nn[on]=true,Nn[q]=Nn[K]=Nn["[object Map]"]=Nn["[object Set]"]=Nn["[object WeakMap]"]=false;var Fn={leading:false,maxWait:0,trailing:false},$n={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A",
"\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u",
"\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Bn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},zn={"function":true,object:true},Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Dn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,Pn=zn[typeof module]&&module&&!module.nodeType&&module,qn=zn[typeof self]&&self&&self.Object&&self,Kn=zn[typeof window]&&window&&window.Object&&window,Vn=Pn&&Pn.exports===Dn&&Dn,Yn=Dn&&Pn&&typeof global=="object"&&global&&global.Object&&global||Kn!==(this&&this.window)&&Kn||qn||this,Zn=m();

typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, define(function(){return Zn})):Dn&&Pn?Vn?(Pn.exports=Zn)._=Zn:Dn._=Zn:Yn._=Zn}).call(this);</script>
      
<script>
Benchmark.prototype.setup = function() {
  var shuff = _.shuffle(_.sample(_.range(1000000),10000));
    	var target = _.sample(shuff);
  
      var niels = [];
  
    	var a1 = _.map(shuff, function(id) {
  niels.push(id);
    		return {
    			id: id,
    			name: 'name'+id
    		};
    	});
  
    	var a2 = _.reduce(shuff, function(r, id) {
    		r[id] = {
    			id: id,
    			name: 'name'+id
    		};
    		return r;
    	}, []);
  
    	var o = _.reduce(shuff, function(r, id) {
    		r[id] = {
    			id: id,
    			name: 'name'+id
    		};
    		return r;
    	}, {});

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Object by Key
var result = o[target];
pending…
Holey Array by Index
var result = a2[target];
pending…
Manual Array Lookup
for (var i = 0; i < a1.length; i++) {
  if (a1[i].id = target){
    result = a1[i];
    break;
  }
}
pending…
IndexOf
var result = a1[niels.indexOf(target)];
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL.

0 Comments