(function(){function H(b){for(var d=-1,a=b.length,c=Array(a);++d<a;)c[d]=b[d];return c}function F(b,d){var a=-1,c=b.length-d;if(0>=c)return[];for(var e=Array(c);++a<c;)e[a]=b[a+d];return e}function M(b){for(var d=-1,a=b.length,c=-1,e=[];++d<a;){var f=b[d];f&&(e[++c]=f)}return e}function ya(b){for(var d=-1,a=b.length,c=Array(a),e=a;++d<a;)c[--e]=b[d];return c}function B(b,d){for(var a=-1,c=b.length;++a<c;)d(b[a],a);return b}function R(b,d){for(var a=b.length;a--;)d(b[a],a);return b}function C(b,d,
a){a=a||Object.keys(b);for(var c=-1,e=a.length;++c<e;){var f=a[c];d(b[f],f)}return b}function G(b,d){for(var a=-1;++a<b;)d(a)}function za(b,d){for(var a=b.length,c=-1;++c<a;)if(!d(b[c]))return!1;return!0}function J(b){for(var d=b.length,a=-1,c=Array(d);++a<d;)c[a]=b[a];return c}function I(b){for(var d=Object.keys(b),a=d.length,c=-1,e={};++c<a;){var f=d[c];e[f]=b[f]}return e}function ca(b,d){for(var a=-1,c=b.length,e=Array(c);++a<c;)e[a]=(b[a]||{})[d];return e}function da(b,d,a,c,e){function f(b,a){r(b,
t(a,b))}function u(b,a){r(b,a,t(a,b))}function n(b){r(b,t(l++,b))}function q(b,a){r(b,a,t(l++,b))}function h(b,c){var d=!1;return function(f){if(d)throw Error("Callback was already called.");d=!0;!!f===e&&(g[b]=c);0===--m&&a(M(g))}}function k(b,c){var d=!1;return function(f,l){if(d)throw Error("Callback was already called.");d=!0;f?(a(f,M(g)),a=p):(!!l===e&&(g[b]=c),0===--m&&a(void 0,M(g)))}}a=a||p;var m,g,l=0,r=c?d.bind(c):d,t=(c=2===a.length)?k:h;if(Array.isArray(b)){m=b.length;if(0===m)return c?
a(void 0,[]):a([]);g=Array(m);B(b,3===d.length?u:f)}else if(b&&"object"===typeof b){var v=Object.keys(b);m=v.length;if(0===m)return c?a(void 0,[]):a([]);g=Array(m);C(b,3===d.length?q:n,v)}else return c?a(void 0,[]):a([])}function ea(b,d,a,c,e){function f(){w=!1;l=b[x];O(l,N)}function u(){w=!1;l=b[x];O(l,x,N)}function n(){w=!1;g=r[x];l=b[g];O(l,N)}function q(){w=!1;g=r[x];l=b[g];O(l,g,N)}function h(b){if(w)throw Error("Callback was already called.");w=!0;!!b===e&&(v[++y]=l);if(++x===m)return a(v);
t()}function k(b,c){if(w)throw Error("Callback was already called.");w=!0;if(b)a(b,v),a=p;else{!!c===e&&(v[++y]=l);if(++x===m)return a(void 0,v);t()}}a=a||p;var m,g,l,r,t,v,w,x=0,y=-1,D=2===a.length,N=D?k:h,O=c?d.bind(c):d;if(Array.isArray(b)){m=b.length;if(0===m)return D?a(void 0,[]):a([]);t=3===d.length?u:f}else if(b&&"object"===typeof b){r=Object.keys(b);m=r.length;if(0===m)return D?a(void 0,[]):a([]);t=3===d.length?q:n}else return D?a(void 0,[]):a([]);v=Array(m);t()}function fa(b,d,a,c,e,f){function u(){var a=
w++;if(!(a>=l)){var c=b[a];y(c,D(c,a))}}function n(){var a=w++;if(!(a>=l)){var c=b[a];y(c,a,D(c,a))}}function q(){var a=w++;if(!(a>=l)){var c=b[r[a]];y(c,D(c,a))}}function h(){var a=w++;if(!(a>=l)){var c=r[a],d=b[c];y(d,c,D(d,a))}}function k(b,a){var d=!1;return function(e){if(d)throw Error("Callback was already called.");d=!0;!!e===f&&(v[a]=b);++x===l&&c(M(v));t()}}function m(b,a){var d=!1;return function(e,g){if(d)throw Error("Callback was already called.");d=!0;if(e)c(e,M(v)),c=p;else{!!g===f&&
(v[a]=b);if(++x===l)return c(void 0,M(v));t()}}}c=c||p;var g=2===c.length;if(isNaN(d)||1>d)return g?c(void 0,[]):c([]);var l,r,t,v,w=0,x=0,y=e?a.bind(e):a,D=g?m:k;if(Array.isArray(b)){l=b.length;if(0===l)return g?c(void 0,[]):c([]);t=3===a.length?n:u}else if(b&&"object"===typeof b){r=Object.keys(b);l=r.length;if(0===l)return g?c(void 0,[]):c([]);t=3===a.length?h:q}else return g?c(void 0,[]):c([]);v=Array(l);G(d>l?l:d,t)}function z(b){var d=!1;return function(a,c){if(d)throw Error("Callback was already called.");
d=!0;b(a,c)}}function S(b,d,a,c){function e(b){h(b,z(u))}function f(b,a){h(b,a,z(u))}function u(b,c){b?(a(b),a=p):++q===n?(a(),a=p):!1===c&&(a(),a=p)}a=a||p;var n,q=0,h=c?d.bind(c):d;if(Array.isArray(b)){n=b.length;if(0===n)return a();B(b,3===d.length?f:e)}else if(b&&"object"===typeof b){n=Object.keys(b).length;if(0===n)return a();C(b,3===d.length?f:e)}else a()}function T(b,d,a,c){function e(){g=!1;r(b[l],q)}function f(){g=!1;r(b[l],l,q)}function u(){g=!1;r(b[k[l]],q)}function n(){g=!1;var a=k[l];
r(b[a],a,q)}function q(b,c){if(g)throw Error("Callback was already called.");g=!0;if(b)return a(b);if(++l===h||!1===c)return a();m()}a=a||p;var h,k,m,g,l=0,r=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===h)return a();m=3===d.length?f:e}else if(b&&"object"===typeof b){k=Object.keys(b);h=k.length;if(0===h)return a();m=3===d.length?n:u}else return a();m()}function ga(b,d,a,c,e){function f(){var a=l++;a>=k||t(b[a],z(h))}function u(){var a=l++;a>=k||t(b[a],a,z(h))}function n(){var a=l++;a>=k||t(b[m[a]],
z(h))}function q(){var a=l++;a>=k||(a=m[a],t(b[a],a,z(h)))}function h(b,a){b?(c(b),c=p):++r===k?(c(),c=p):!1===a?(c(),c=p):g()}c=c||p;if(isNaN(d)||1>d)return c();var k,m,g,l=0,r=0,t=e?a.bind(e):a;if(Array.isArray(b)){k=b.length;if(0===k)return c();g=3===a.length?u:f}else if(b&&"object"===typeof b){m=Object.keys(b);k=m.length;if(0===k)return c();g=3===a.length?q:n}else return c();G(d>k?k:d,g)}function ha(b,d,a,c){function e(b,a){g(b,q(a))}function f(b,a){g(b,a,q(a))}function u(b){g(b,q(m++))}function n(b,
a){g(b,a,q(m++))}function q(b){var c=!1;return function(d,e){if(c)throw Error("Callback was already called.");c=!0;k[b]=e;d?(a(d,J(k)),a=p):0===--h&&(a(void 0,k),a=p)}}a=a||p;var h,k,m=0,g=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===h)return a(void 0,[]);k=Array(h);B(b,3===d.length?f:e)}else if(b&&"object"===typeof b){c=Object.keys(b);h=c.length;if(0===h)return a(void 0,[]);k=Array(h);C(b,3===d.length?n:u,c)}else a(void 0,[])}function ia(b,d,a,c){function e(){l=!1;t(b[r],q)}function f(){l=
!1;t(b[r],r,q)}function u(){l=!1;t(b[k[r]],q)}function n(){l=!1;var a=k[r];t(b[a],a,q)}function q(b,c){if(l)throw Error("Callback was already called.");l=!0;m[r]=c;b?(a(b,J(m)),a=p):++r===h?(a(void 0,m),a=p):g()}a=a||p;var h,k,m,g,l,r=0,t=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===h)return a(void 0,[]);g=3===d.length?f:e}else if(b&&"object"===typeof b){k=Object.keys(b);h=k.length;if(0===h)return a(void 0,[]);g=3===d.length?n:u}else return a(void 0,[]);m=Array(h);g()}function ja(b,d,a,c,
e){function f(){var a=r++;a>=k||v(b[a],h(a))}function u(){var a=r++;a>=k||v(b[a],a,h(a))}function n(){var a=r++;a>=k||v(b[m[a]],h(a))}function q(){var a=r++;if(!(a>=k)){var c=m[a];v(b[c],c,h(a))}}function h(a){var b=!1;return function(d,e){if(b)throw Error("Callback was already called.");b=!0;g[a]=e;d?(c(d,J(g)),c=p):++t===k?(c(void 0,g),c=p):l()}}c=c||p;if(isNaN(d)||1>d)return c(void 0,[]);var k,m,g,l,r=0,t=0,v=e?a.bind(e):a;if(Array.isArray(b)){k=b.length;if(0===k)return c(void 0,[]);l=3===a.length?
u:f}else if(b&&"object"===typeof b){m=Object.keys(b);k=m.length;if(0===k)return c(void 0,[]);l=3===a.length?q:n}else return c(void 0,[]);g=Array(k);G(d>k?k:d,l)}function ka(b,d,a,c){da(b,d,a,c,!0)}function la(b,d,a,c){ea(b,d,a,c,!0)}function ma(b,d,a,c,e){fa(b,d,a,c,e,!0)}function U(b,d,a,c,e){function f(a){m(a,g(a))}function u(a,b){m(a,b,g(a))}function n(b){var c=!1;return function(d){if(c)throw Error("Callback was already called.");c=!0;!!d===k?(a(b),a=p):0===--h&&(a(),a=p)}}function q(b){var c=
!1;return function(d,e){if(c)throw Error("Callback was already called.");c=!0;d?(a(d),a=p):!!e===k?(a(void 0,b),a=p):0===--h&&(a(),a=p)}}a=a||p;var h,k=!e,m=c?d.bind(c):d,g=2===a.length?q:n;if(Array.isArray(b)){h=b.length;if(0===h)return a();B(b,3===d.length?u:f)}else if(b&&"object"===typeof b){c=Object.keys(b);h=c.length;if(0===h)return a();C(b,3===d.length?u:f,c)}else a()}function V(b,d,a,c,e){function f(){r=!1;g=b[t];x(g,w)}function u(){r=!1;g=b[t];x(g,t,w)}function n(){r=!1;g=b[y[t]];x(g,w)}function q(){r=
!1;var a=y[t];g=b[a];x(g,a,w)}function h(b){if(r)throw Error("Callback was already called.");r=!0;if(!!b===v)return a(g);if(++t===m)return a();l()}function k(b,c){if(r)throw Error("Callback was already called.");r=!0;if(b)return a(b);if(!!c===v)return a(void 0,g);if(++t===m)return a();l()}a=a||p;var m,g,l,r,t=0,v=!e,w=2===a.length?k:h,x=c?d.bind(c):d;if(Array.isArray(b)){m=b.length;if(0===m)return a();l=3===d.length?u:f}else if(b&&"object"===typeof b){var y=Object.keys(b);m=y.length;if(0===m)return a();
l=3===d.length?q:n}else return a();l()}function W(b,d,a,c,e,f){function u(){var a=r++;a>=g||(a=b[a],x(a,w(a)))}function n(){var a=r++;if(!(a>=g)){var c=b[a];x(c,a,w(c))}}function q(){var a=r++;a>=g||(a=b[y[a]],x(a,w(a)))}function h(){var a=r++;if(!(a>=g)){var a=y[a],c=b[a];x(c,a,w(c))}}function k(a){var b=!1;return function(d){if(b)throw Error("Callback was already called.");b=!0;!!d===v?(c(a),c=p):++t===g?(c(),c=p):l()}}function m(a){var b=!1;return function(d,e){if(b)throw Error("Callback was already called.");
b=!0;d?(c(d),c=p):!!e===v?(c(void 0,a),c=p):++t===g?(c(),c=p):l()}}c=c||p;if(isNaN(d)||1>d)return c();var g,l,r=0,t=0,v=!f,w=2===c.length?m:k,x=e?a.bind(e):a;if(Array.isArray(b)){g=b.length;if(0===g)return c();l=3===a.length?n:u}else if(b&&"object"===typeof b){var y=Object.keys(b);g=y.length;if(0===g)return c();l=3===a.length?h:q}else return c();G(d>g?g:d,l)}function P(b,d,a,c,e){function f(a){l=!1;t(a,b[r],h)}function u(a){l=!1;t(a,b[r],r,h)}function n(a){l=!1;t(a,b[m[r]],h)}function q(a){l=!1;var c=
m[r];t(a,b[c],c,h)}function h(a,b){if(l)throw Error("Callback was already called.");l=!0;if(a)return c(a,b);if(++r===k)return c(void 0,b);g(b)}c=c||p;var k,m,g,l,r=0,t=e?a.bind(e):a;if(Array.isArray(b)){k=b.length;if(0===k)return c(void 0,d);g=4===a.length?u:f}else if(b&&"object"===typeof b){m=Object.keys(b);k=m.length;if(0===k)return c(void 0,d);g=4===a.length?q:n}else return c(void 0,d);g(d)}function na(b,d,a,c,e){function f(a){l=!1;var c=b[--k];r(a,c,h)}function u(a){l=!1;var c=--k;r(a,b[c],c,
h)}function n(a){l=!1;var c=m[--k];r(a,b[c],h)}function q(a){l=!1;var c=m[--k];r(a,b[c],c,h)}function h(a,b){if(l)throw Error("Callback was already called.");l=!0;if(a)return c(a,b);if(0===k)return c(void 0,b);g(b)}c=c||p;var k,m,g,l,r=e?a.bind(e):a;if(Array.isArray(b)){k=b.length;if(!k)return c(void 0,d);g=4===a.length?u:f}else if(b&&"object"===typeof b){m=Object.keys(b);k=m.length;if(!k)return c(void 0,d);g=4===a.length?q:n}else return c(void 0,d);g(d)}function X(b){function d(a,b,d,q){b=c(b,q);
ia(a,b,e(d))}function a(a,b,d,q,h){d=c(d,h);ja(a,b,d,e(q))}function c(a,b){function c(a,b){e(a,function(c,d){c?(b(c),b=p):b(void 0,{value:a,criteria:d})})}function d(a,b,c){e(a,b,function(b,d){b?(c(b),c=p):c(void 0,{value:a,criteria:d})})}var e=b?a.bind(b):a;return 3===a.length?d:c}function e(a){return function(b,c){b?(a(b),a=p):(c.sort(function(a,b){return a.criteria<b.criteria?-1:1}),a(void 0,ca(c,"value")))}}switch(b){case "series":return d;case "limit":return a;default:return function(a,b,d,q){b=
c(b,q);ha(a,b,e(d))}}}function oa(b,d,a,c){function e(b){a(!!b)}function f(b,c){a(b,!!c)}a=a||p;U(b,d,2===a.length?f:e,c)}function pa(b,d,a,c){function e(b){a(!b)}function f(b,c){a(b,!c)}a=a||p;U(b,d,2===a.length?f:e,c,!0)}function qa(b,d,a){function c(a,b){a(f(b))}function e(b,c){b.call(a,f(c))}function f(a){var b=!1;return function(c,e){if(b)throw Error("Callback was already called.");b=!0;c?(d(c,n),d=p):(n[a]=2>=arguments.length?e:F(arguments,1),0===--u&&(d(void 0,n),d=p))}}d=d||p;var u,n;if(Array.isArray(b)){u=
b.length;if(0===u)return d(void 0,[]);n=Array(u);B(b,a?e:c)}else if(b&&"object"===typeof b){var q=Object.keys(b);u=q.length;if(0===u)return d(void 0,{});n={};C(b,a?e:c,q)}else d()}function ra(b,d,a){function c(){l=!1;h=r;b[r](n)}function e(){l=!1;h=r;b[r].call(a,n)}function f(){l=!1;h=k[r];b[h](n)}function u(){l=!1;h=k[r];b[h].call(a,n)}function n(a,b){if(l)throw Error("Callback was already called.");l=!0;if(a)return d(a,m);m[h]=2>=arguments.length?b:F(arguments,1);if(++r===q)return d(void 0,m);g()}
d=d||p;var q,h,k,m,g,l,r=0;if(Array.isArray(b)){q=b.length;if(0===q)return d(void 0,[]);m=Array(q);g=a?e:c}else if(b&&"object"===typeof b){k=Object.keys(b);q=k.length;if(0===q)return d(void 0,{});m={};g=a?u:f}else return d();g()}function Y(b,d,a,c){function e(){var a=g++;if(!(a>=h))b[a](q(a))}function f(){var a=g++;a>=h||b[a].call(c,q(a))}function u(){var a=g++;a>=h||(a=r[a],b[a](q(a)))}function n(){var a=g++;a>=h||(a=r[a],b[a].call(c,q(a)))}function q(b){var c=!1;return function(d,e){if(c)throw Error("Callback was already called.");
c=!0;if(d)a(d,k),a=p;else{k[b]=2>=arguments.length?e:F(arguments,1);if(++l===h)return a(void 0,k);m()}}}a=a||p;var h,k,m,g=0,l=0;if(Array.isArray(b)){h=b.length;if(0===h)return a(void 0,[]);k=Array(h);m=c?f:e}else if(b&&"object"===typeof b){var r=Object.keys(b);h=r.length;if(0===h)return a(void 0,{});k={};m=c?n:u}else return a();G(d>h?h:d,m)}function sa(){var b=arguments;return function(){var d=this,a=H(arguments),c=a.pop();P(b,a,function(a,b,c){a.push(function(a){var b=F(arguments,1);c(a,b)});b.apply(d,
a)},function(a,b){b=Array.isArray(b)?b:[b];b.unshift(a);c.apply(d,b)})}}function ta(b){var d="series"===b?T:S;return function(a){var b=function(){var b=this,c=H(arguments),e=c.pop()||p;return d(a,function(a,d){a.apply(b,c.concat(d))},e)};if(1<arguments.length){var e=F(arguments,1);return b.apply(this,e)}return b}}function ua(b,d,a){function c(a,b,c){f.started=!0;var d=Array.isArray(a)?a:[a];a&&d.length?(c="function"===typeof c?c:p,B(d,function(a){f.tasks.push({task:a,priority:b,callback:c});f.tasks.sort(function(a,
b){return a.priority<b.priority?-1:1});"function"===typeof f.saturated&&f.length()===f.concurrency&&f.saturated();E.nextTick(f.process)})):f.idle()&&E.nextTick(function(){"function"===typeof f.drain&&f.drain()})}var e=0,f={tasks:[],concurrency:d||1,saturated:p,empty:p,drain:p,started:!1,paused:!1,push:function(a,b,d){c(a,b,d)},kill:function(){f.drain=p;f.tasks=[]},process:function(){function a(){e--;b.callback&&b.callback.apply(b,H(arguments));"function"===typeof f.drain&&f.idle()&&f.drain();f.process()}
if(!(f.paused||e>=f.concurrency)&&f.length()){var b=f.tasks.shift();"function"!==typeof f.empty||f.length()||f.empty();e++;(f._thisArg?f._worker.bind(f._thisArg):f._worker)(b.task,z(a))}},length:function(){return f.tasks.length},running:function(){return e},idle:function(){return 0===f.length()+e},pause:function(){f.paused=!0},resume:function(){!1!==f.paused&&(f.paused=!1,G(f.concurrency,function(){E.setImmediate(f.process)}))},_worker:b,_thisArg:a};return f}function va(b,d,a,c){function e(c,d){if(f)throw Error("Callback was already called.");
f=!0;u[n]=d;if(c)return a(c);if(++n===b)return a(void 0,u);f=!1;q(n,e)}a=a||p;b=+b;if(isNaN(b)||1>b)return a(void 0,[]);var f,u=Array(b),n=0,q=c?d.bind(c):d;f=!1;q(n,e)}function Z(b){function d(a){if(K[typeof console])if(a)console.error&&console.error(a);else if(console[b]){var c=F(arguments,1);B(c,function(a){console[b](a)})}}return function(a){var b=F(arguments,1);b.push(d);a.apply(null,b)}}function A(b,d){this._emitter=b||ra;this._limit=d||4;this._events={}}function wa(b){b=b||p;if(b.ONCE===aa)return b;
var d=function(a){if(b.length)return b(a);b();a()};d.func=b;return d}function xa(b){b=b||p;var d=function(a){if(b.length)return b(a);b();a()};d.func=b;d.ONCE=aa;return d}var L=this,Aa=L&&L.async,p=function(){},K={"function":!0,object:!0},Q,ba;(function(){K[typeof process]&&process.nextTick?(Q=process.nextTick,ba=K[typeof setImmediate]?function(b){setImmediate(b)}:Q):ba=Q=K[typeof setImmediate]?function(b){setImmediate(b)}:function(b){setTimeout(b,0)}})();var E={VERSION:"1.0.1",each:S,eachSeries:T,
eachLimit:ga,forEach:S,forEachSeries:T,forEachLimit:ga,map:ha,mapSeries:ia,mapLimit:ja,mapValues:function(b,d,a,c){function e(a,b){m(a,q(b))}function f(a,b){m(a,b,q(b))}function u(a,b){m(a,q(b))}function n(a,b){m(a,b,q(b))}function q(b){var c=!1;return function(d,e){if(c)throw Error("Callback was already called.");c=!0;k[b]=e;d?(a(d,I(k)),a=p):0===--h&&(a(void 0,k),a=p)}}a=a||p;var h,k={},m=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===h)return a(void 0,k);B(b,3===d.length?f:e)}else if(b&&
"object"===typeof b){c=Object.keys(b);h=c.length;if(0===h)return a(void 0,k);C(b,3===d.length?n:u,c)}else a(void 0,k)},mapValuesSeries:function(b,d,a,c){function e(){l=!1;k=t;v(b[t],q)}function f(){l=!1;k=t;v(b[t],t,q)}function u(){l=!1;k=m[t];v(b[k],q)}function n(){l=!1;k=m[t];v(b[k],k,q)}function q(b,c){if(l)throw Error("Callback was already called.");l=!0;r[k]=c;b?(a(b,I(r)),a=p):++t===h?(a(void 0,r),a=p):g()}a=a||p;var h,k,m,g,l,r={},t=0,v=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===
h)return a(void 0,{});g=3===d.length?f:e}else if(b&&"object"===typeof b){m=Object.keys(b);h=m.length;if(0===h)return a(void 0,{});g=3===d.length?n:u}else return a(void 0,{});g()},mapValuesLimit:function(b,d,a,c,e){function f(){var a=r++;a>=k||v(b[a],h(a))}function u(){var a=r++;a>=k||v(b[a],a,h(a))}function n(){var a=r++;a>=k||(a=m[a],v(b[a],h(a)))}function q(){var a=r++;a>=k||(a=m[a],v(b[a],a,h(a)))}function h(a){var b=!1;return function(d,e){if(b)throw Error("Callback was already called.");b=!0;
l[a]=e;d?(c(d,I(l)),c=p):++t===k?(c(void 0,l),c=p):g()}}c=c||p;if(isNaN(d)||1>d)return c(void 0,[]);var k,m,g,l={},r=0,t=0,v=e?a.bind(e):a;if(Array.isArray(b)){k=b.length;if(0===k)return c(void 0,l);g=3===a.length?u:f}else if(b&&"object"===typeof b){m=Object.keys(b);k=m.length;if(0===k)return c(void 0,l);g=3===a.length?q:n}else return c(void 0,l);G(d>k?k:d,g)},filter:ka,filterSeries:la,filterLimit:ma,select:ka,selectSeries:la,selectLimit:ma,reject:function(b,d,a,c){da(b,d,a,c,!1)},rejectSeries:function(b,
d,a,c){ea(b,d,a,c,!1)},rejectLimit:function(b,d,a,c,e){fa(b,d,a,c,e,!1)},detect:U,detectSeries:V,detectLimit:W,pick:function(b,d,a,c){function e(a,b){k(a,m(b,a))}function f(a,b){k(a,b,m(b,a))}function u(b,c){var d=!1;return function(e){if(d)throw Error("Callback was already called.");d=!0;e&&(h[b]=c);0===--q&&a(h)}}function n(b,c){var d=!1;return function(e,f){if(d)throw Error("Callback was already called.");d=!0;e?(a(e,h),a=p):(f&&(h[b]=c),0===--q&&a(void 0,h))}}a=a||p;var q,h={},k=c?d.bind(c):d,
m=(c=2===a.length)?n:u;if(Array.isArray(b)){q=b.length;if(0===q)return c?a(void 0,{}):a({});B(b,3===d.length?f:e)}else if(b&&"object"===typeof b){var g=Object.keys(b);q=g.length;if(0===q)return c?a(void 0,{}):a({});C(b,3===d.length?f:e,g)}else return c?a(void 0,{}):a({})},pickSeries:function(b,d,a,c){function e(){t=!1;m=w;g=b[w];D(g,y)}function f(){t=!1;m=w;g=b[w];D(g,w,y)}function u(){t=!1;m=l[w];g=b[m];D(g,y)}function n(){t=!1;m=l[w];g=b[m];D(g,m,y)}function q(b){if(t)throw Error("Callback was already called.");
t=!0;b&&(v[m]=g);if(++w===k)return a(v);r()}function h(b,c){if(t)throw Error("Callback was already called.");t=!0;if(b)a(b,v),a=p;else{c&&(v[m]=g);if(++w===k)return a(void 0,v);r()}}a=a||p;var k,m,g,l,r,t,v={},w=0,x=2===a.length,y=x?h:q,D=c?d.bind(c):d;if(Array.isArray(b)){k=b.length;if(0===k)return x?a(void 0,{}):a({});r=3===d.length?f:e}else if(b&&"object"===typeof b){l=Object.keys(b);k=l.length;if(0===k)return x?a(void 0,{}):a({});v={};r=3===d.length?n:u}else return x?a(void 0,{}):a({});r()},pickLimit:function(b,
d,a,c,e){function f(){var a=v++;if(!(a>=g)){var c=b[a];y(c,x(c,a))}}function u(){var a=v++;if(!(a>=g)){var c=b[a];y(c,a,x(c,a))}}function n(){var a=v++;if(!(a>=g)){var a=l[a],c=b[a];y(c,x(c,a))}}function q(){var a=v++;if(!(a>=g)){var a=l[a],c=b[a];y(c,a,x(c,a))}}function h(a,b){var d=!1;return function(e){if(d)throw Error("Callback was already called.");d=!0;e&&(t[b]=a);if(++w===g)return c(t);r()}}function k(a,b){var d=!1;return function(e,f){if(d)throw Error("Callback was already called.");d=!0;
if(e)c(e,I(t)),c=p;else{f&&(t[b]=a);if(++w===g)return c(void 0,t);r()}}}c=c||p;var m=2===c.length;if(isNaN(d)||1>d)return m?c(void 0,{}):c({});var g,l,r,t={},v=0,w=0,x=m?k:h,y=e?a.bind(e):a;if(Array.isArray(b)){g=b.length;if(0===g)return m?c(void 0,{}):c({});r=3===a.length?u:f}else if(b&&"object"===typeof b){l=Object.keys(b);g=l.length;if(0===g)return m?c(void 0,{}):c({});r=3===a.length?q:n}else return m?c(void 0,{}):c({});G(d>g?g:d,r)},reduce:P,inject:P,foldl:P,reduceRight:na,foldr:na,transform:function(b,
d,a,c,e){function f(a){k(h,a,z(n))}function u(a,b){k(h,a,b,z(n))}function n(b,c){b?(a(b,Array.isArray(h)?J(h):I(h)),a=p):0===--q?(a(void 0,h),a=p):!1===c&&(a(void 0,Array.isArray(h)?J(h):I(h)),a=p)}a=a||p;var q,h,k=e?d.bind(e):d;if(Array.isArray(b)){q=b.length;h=void 0!==c?c:[];if(0===q)return a(void 0,h);B(b,4===d.length?u:f)}else if(b&&"object"===typeof b){q=Object.keys(b).length;h=void 0!==c?c:{};if(0===q)return a(void 0,h);C(b,4===d.length?u:f)}else a(void 0,{})},transformSeries:function(b,d,
a,c,e){function f(){g=!1;v(l,b[t],h)}function u(){g=!1;v(l,b[t],t,h)}function n(){g=!1;v(l,b[w[t]],h)}function q(){g=!1;var a=w[t];v(l,b[a],a,h)}function h(b,c){if(g)throw Error("Callback was already called.");g=!0;if(b)return a(b,l);if(++t===k||!1===c)return a(void 0,l);m()}a=a||p;var k,m,g,l,r=Array.isArray(b),t=0,v=e?d.bind(e):d;if(r){k=b.length;l=void 0!==c?c:[];if(0===k)return a(void 0,l);m=4===d.length?u:f}else if(b&&"object"===typeof b){var w=Object.keys(b);k=w.length;l=void 0!==c?c:{};if(0===
k)return a(void 0,l);m=4===d.length?q:n}else return a(void 0,{});m()},transformLimit:function(b,d,a,c,e,f){function u(){var a=t++;a>=l||w(g,b[a],z(k))}function n(){var a=t++;a>=l||w(g,b[a],a,z(k))}function q(){var a=t++;a>=l||w(g,b[x[a]],z(k))}function h(){var a=t++;a>=l||(a=x[a],w(g,b[a],a,z(k)))}function k(a,b){a?(c(a,Array.isArray(g)?J(g):I(g)),c=p):++v===l?(c(void 0,g),c=p):!1===b?(c(void 0,Array.isArray(g)?J(g):I(g)),c=p):r()}c=c||p;var m=Array.isArray(b),g=void 0!==e?e:m?[]:{};if(isNaN(d)||
1>d)return c(void 0,g);var l,r,t=0,v=0,w=f?a.bind(f):a;if(m){l=b.length;if(0===l)return c(void 0,g);r=4===a.length?n:u}else if(b&&"object"===typeof b){var x=Object.keys(b);l=x.length;if(0===l)return c(void 0,g);r=4===a.length?h:q}else return c(void 0,g);G(d>l?l:d,r)},sortBy:X(),sortBySeries:X("series"),sortByLimit:X("limit"),some:oa,someSeries:function(b,d,a,c){function e(b){a(!!b)}function f(b,c){a(b,!!c)}a=a||p;V(b,d,2===a.length?f:e,c)},someLimit:function(b,d,a,c,e){function f(a){c(!!a)}function u(a,
b){c(a,!!b)}c=c||p;W(b,d,a,2===c.length?u:f,e)},any:oa,every:pa,all:pa,everySeries:function(b,d,a,c){function e(b){a(!b)}function f(b,c){a(b,!c)}a=a||p;V(b,d,2===a.length?f:e,c,!0)},everyLimit:function(b,d,a,c,e){function f(a){c(!a)}function u(a,b){c(a,!b)}c=c||p;W(b,d,a,2===c.length?u:f,e,!0)},concat:function(b,d,a,c){function e(a){h(a,z(u))}function f(a,b){h(a,b,z(u))}function u(b,c){void 0!==c&&Array.prototype.push.apply(q,Array.isArray(c)?c:[c]);b?(a(b,J(q)),a=p):0===--n&&(a(void 0,q),a=p)}a=
a||p;var n,q=[],h=c?d.bind(c):d;if(Array.isArray(b)){n=b.length;if(0===n)return a(void 0,q);B(b,3===d.length?f:e)}else if(b&&"object"===typeof b){n=Object.keys(b).length;if(0===n)return a(void 0,q);C(b,3===d.length?f:e)}else a(void 0,q)},concatSeries:function(b,d,a,c){function e(){g=!1;t(b[r],q)}function f(){g=!1;t(b[r],r,q)}function u(){g=!1;t(b[k[r]],q)}function n(){g=!1;var a=k[r];t(b[a],a,q)}function q(b,c){if(g)throw Error("Callback was already called.");g=!0;c&&Array.prototype.push.apply(l,
Array.isArray(c)?c:[c]);if(b)return a(b,l);if(++r===h)return a(void 0,l);m()}a=a||p;var h,k,m,g,l=[],r=0,t=c?d.bind(c):d;if(Array.isArray(b)){h=b.length;if(0===h)return a(void 0,l);m=3===d.length?f:e}else if(b&&"object"===typeof b){k=Object.keys(b);h=k.length;if(0===h)return a(void 0,l);m=3===d.length?n:u}else return a(void 0,l);m()},concatLimit:function(b,d,a,c,e){function f(){var a=l++;a>=m||t(b[a],z(h))}function u(){var a=l++;a>=m||t(b[a],a,z(h))}function n(){var a=l++;a>=m||t(b[v[a]],z(h))}function q(){var a=
l++;a>=m||(a=v[a],t(b[a],a,z(h)))}function h(a,b){b&&Array.prototype.push.apply(k,Array.isArray(b)?b:[b]);a?(c(a,k),c=p):++r===m?(c(void 0,k),c=p):g()}c=c||p;var k=[];if(isNaN(d)||1>d)return c(void 0,k);var m,g,l=0,r=0,t=e?a.bind(e):a;if(Array.isArray(b)){m=b.length;if(0===m)return c(void 0,k);g=3===a.length?u:f}else if(b&&"object"===typeof b){var v=Object.keys(b);m=v.length;if(0===m)return c(void 0,k);g=3===a.length?q:n}else return c(void 0,k);G(d>m?m:d,g)},parallel:qa,series:ra,parallelLimit:Y,
waterfall:function(b,d){function a(){f=!1;var a=b[u];switch(n.length){case 0:return a(c);case 1:return a(n[0],c);case 2:return a(n[0],n[1],c);case 3:return a(n[0],n[1],n[2],c);case 4:return a(n[0],n[1],n[2],n[3],c);case 5:return a(n[0],n[1],n[2],n[3],n[4],c);default:return n.push(c),a.apply(null,n)}}function c(b){if(f)throw Error("Callback was already called.");f=!0;if(b)return d(b);if(++u===e)return d.apply(null,H(arguments));n=F(arguments,1);a()}d=d||p;if(!Array.isArray(b))return d(Error("First argument to waterfall must be an array of functions"));
var e=b.length;if(0===e)return d();var f,u=0,n=[];a()},whilst:function(b,d,a,c){function e(){b()?f(function(b){if(b)return a(b);e()}):a()}a=a||p;var f=c?d.bind(c):d;e()},doWhilst:function(b,d,a,c){function e(){f(function(b){if(b)return a(b);d.apply(c,F(arguments,1))?e():a()})}a=a||p;var f=c?b.bind(c):b;e()},until:function(b,d,a,c){function e(){b()?a():f(function(b){if(b)return a(b);e()})}a=a||p;var f=c?d.bind(c):d;e()},doUntil:function(b,d,a,c){function e(){f(function(b){if(b)return a(b);d.apply(c,
F(arguments,1))?a():e()})}a=a||p;var f=c?b.bind(c):b;e()},forever:function(b,d,a){function c(){e(function(a){if(a)return d(a);c()})}d=d||p;var e=a?b.bind(a):b;c()},compose:function(){return sa.apply(null,ya(arguments))},seq:sa,applyEach:ta(),applyEachSeries:ta("series"),queue:function(b,d,a){function c(a,b,c){e.started=!0;var d=Array.isArray(a)?a:[a];a&&d.length?(b="function"===typeof b?b:null,B(d,function(a){a={task:a,callback:b};c?e.tasks.unshift(a):e.tasks.push(a);"function"===typeof e.saturated&&
e.length()===e.concurrency&&e.saturated();E.nextTick(e.process)})):e.idle()&&E.nextTick(function(){"function"===typeof e.drain&&e.drain()})}var e=ua(b,d,a);e.unshift=function(a,b){c(a,b,!0)};e.push=function(a,b){c(a,b)};return e},priorityQueue:ua,cargo:function(b,d){var a=!1,c={tasks:[],payload:d,saturated:p,empty:p,drain:p,drained:!0,push:function(a,b){a=Array.isArray(a)?a:[a];b="function"===typeof b?b:p;B(a,function(a){c.tasks.push({data:a,callback:b});c.drained=!1;"function"===typeof c.saturated&&
c.length()===c.payload&&c.saturated()});E.nextTick(c.process)},process:function(){if(!a)if(c.length()){var e="number"===typeof c.payload?c.tasks.splice(0,d):c.tasks,f=ca(e,"data");c.length()||"function"!==typeof c.empty||c.empty();a=!0;b(f,function(){a=!1;var b=H(arguments);B(e,function(a){a.callback&&a.callback.apply(null,b)});c.process()})}else"function"!==typeof c.drain||c.drained||c.drain(),c.drained=!0},length:function(){return c.tasks.length},running:function(){return a}};return c},auto:function(b,
d){function a(a){u.unshift(a)}function c(){f--;B(u.slice(0),function(a){a()})}d=d?z(d):p;var e=Object.keys(b),f=e.length;if(!f)return d();var u=[],n={};a(function(){f||d(void 0,n)});C(b,function(b,e){function f(a){var b=F(arguments,1);1>=b.length&&(b=b[0]);if(a){var g=I(n);g[e]=b;d(a,g);d=p}else n[e]=b,E.nextTick(c)}function m(){return!n.hasOwnProperty(e)&&za(r,function(a){return n.hasOwnProperty(a)})}function g(){if(m()){var a;a:{a=-1;for(var b=u.length;++a<b;)if(u[a]===g)break a;a=void 0}0<=a&&
u.splice(a,1);t(f,n)}}b=Array.isArray(b)?b:[b];var l=b.length,r=b.slice(0,l-1),t=b[l-1];if(m())return t(f,n);a(g)},e)},retry:function(b,d,a){function c(c,f){a=c||a||p;var u,n;va(b,function(a,c){d(function(d,e){u=d;n=e;if(!d)return c(!0);c(d&&a===b-1)},f)},function(){a(u,n)})}"function"===typeof b&&(a=d,d=b,b=5);b=parseInt(b,10)||5;return"function"===typeof a?c():c},iterator:function(b){function d(e){var f=function(){a&&b[c[e]||e].apply(null,H(arguments));return f.next()};f.next=function(){return e<
a-1?d(e+1):null};return f}var a=0,c=[];Array.isArray(b)?a=b.length:(c=Object.keys(b),a=c.length);return d(0)},apply:function(b){var d=F(arguments,1);return function(){return b.apply(this,Array.prototype.concat.apply(d,H(arguments)))}},nextTick:Q,setImmediate:ba,times:function(b,d,a,c){function e(c){var d=!1;return function(e,k){if(d)throw Error("Callback was already called.");d=!0;f[c]=k;e?(a(e),a=p):0===--b&&a(void 0,f)}}a=a||p;b=+b;if(isNaN(b)||1>b)return a(void 0,[]);var f=Array(b),u=c?d.bind(c):
d;G(b,function(a){u(a,e(a))})},timesSeries:va,timesLimit:function(b,d,a,c,e){function f(){var a=q++;a>=b||k(a,u(a))}function u(a){var d=!1;return function(e,k){if(d)throw Error("Callback was already called.");d=!0;n[a]=k;e?(c(e),c=p):++h===b?(c(void 0,n),c=p):f()}}c=c||p;b=+b;if(isNaN(b)||1>b||isNaN(d)||1>d)return c(void 0,[]);var n=Array(b),q=0,h=0,k=e?a.bind(e):a;G(d>b?b:d,f)},memoize:function(b,d,a){d=d||function(a){return a};var c={},e={},f=function(){function f(){var b=H(arguments);c[h]=b;var d=
e[h];delete e[h];for(var g=-1,l=d.length;++g<l;)d[g].apply(a,b)}var n=H(arguments),q=n.pop(),h=d.apply(null,n);if(c.hasOwnProperty(h))E.nextTick(function(){q.apply(a,c[h])});else{if(e.hasOwnProperty(h))return e[h].push(q);e[h]=[q];n.push(f);b.apply(a,n)}};f.memo=c;f.unmemoized=b;return f},unmemoize:function(b){return function(){return(b.unmemoized||b).apply(null,arguments)}},log:Z("log"),dir:Z("dir"),createLogger:Z,noConflict:function(){L.async=Aa;return E},eventEmitter:function(b){b=b||{};var d=
b.limit;return b.parallel&&!d?new A(qa):b.parallel||b.parallelLimit?new A(Y,d):new A(b.emitter)},EventEmitter:A};K[typeof define]&&define&&define.amd?define([],function(){return E}):K[typeof module]&&module&&module.exports?module.exports=E:L&&K[typeof L.async]?L.neo_async=E:L.async=E;var aa={__ONCE__:!0};A.prototype.getListeners=function(b){function d(a){a=a||[];var b=Array(a.length);B(a,function(a,c){b[c]=a.func});return b}var a=this._events;if(b)return d(a[b]);var c={};C(a,function(a,b){c[b]=d(a)});
return c};A.prototype.addListener=function d(a,c){var e=this;if("object"===typeof a)return C(a,function(a,c){d.call(e,c,a)}),e;e._events[a]=e._events[a]||[];Array.isArray(c)?B(c,function(c){e._events[a].push(wa(c))}):e._events[a].push(wa(c));return e};A.prototype.addOnceListener=function a(c,e){var f=this;if("object"===typeof c)return C(c,function(c,e){a.call(f,e,c)}),f;Array.isArray(e)?B(e,function(a,c){e[c]=xa(a)}):e=xa(e);return f.addListener(c,e)};A.prototype.removeListener=function c(e,f){var p=
this;if("object"===typeof e)return C(e,function(e,f){c.call(p,f,e)}),p;var n=p._events[e]||[];if(!n.length)return p;if(Array.isArray(f))return R(f,function(f){c.call(p,f,e)}),p;R(n,function(c,e){c.func===f&&n.splice(e,1)});return p};A.prototype.removeEvent=function(c){c?(this._events[c]||[]).length&&delete this._events[c]:this._events={};return this};A.prototype.emit=function(c,e,f){function u(c,f){if(c)return e(c);R(n,function(c,e){c.ONCE===aa&&n.splice(e,1)});e(void 0,f)}e=e||p;var n=this._events[c]||
[];if(!n.length)return e(),this;c=this._emitter;c=f?c.bind(f):c;c===Y?c(n,this._limit,u):c(n,u);return this};A.prototype.on=A.prototype.addListener;A.prototype.once=A.prototype.addOnceListener;A.prototype.off=A.prototype.removeListener;A.prototype.removeAllListener=A.prototype.removeEvent;A.prototype.trigger=A.prototype.emit}).call(this);
