code:
(function(N,O){"object"===typeof exports&&"undefined"!==typeof module?O(exports):"function"===typeof define&&define.amd?define(["exports"],O):N.async?O(N.neo_async=N.neo_async||{}):O(N.async=N.async||{})})(this,function(N){function O(a){var c=function(a){var d=J(arguments,1);setTimeout(function(){a.apply(null,d)})};T="function"===typeof setImmediate?setImmediate:c;"object"===typeof process&&"function"===typeof process.nextTick?(D=/^v0.10/.test(process.version)?T:process.nextTick,ba=/^v0/.test(process.version)?
T:process.nextTick):ba=D=T;!1===a&&(D=function(a){a()})}function H(a){for(var c=-1,b=a.length,d=Array(b);++c<b;)d[c]=a[c];return d}function J(a,c){var b=-1,d=a.length-c;if(0>=d)return[];for(var e=Array(d);++b<d;)e[b]=a[b+c];return e}function L(a){for(var c=F(a),b=c.length,d=-1,e={};++d<b;){var f=c[d];e[f]=a[f]}return e}function U(a){for(var c=-1,b=a.length,d=[];++c<b;){var e=a[c];e&&(d[d.length]=e)}return d}function Za(a){for(var c=-1,b=a.length,d=Array(b),e=b;++c<b;)d[--e]=a[c];return d}function $a(a,
c){for(var b=-1,d=a.length;++b<d;)if(a[b]===c)return!1;return!0}function Q(a,c){for(var b=-1,d=a.length;++b<d;)c(a[b],b);return a}function W(a,c,b){for(var d=-1,e=b.length;++d<e;){var f=b[d];c(a[f],f)}return a}function K(a,c){for(var b=-1;++b<a;)c(b)}function P(a,c){var b=a.length,d=Array(b),e;for(e=0;e<b;e++)d[e]=e;ca(c,0,b-1,d);for(var f=Array(b),g=0;g<b;g++)e=d[g],f[g]=void 0===e?a[g]:a[e];return f}function ca(a,c,b,d){if(c!==b){for(var e=c;++e<=b&&a[c]===a[e];){var f=e-1;if(d[f]>d[e]){var g=d[f];
d[f]=d[e];d[e]=g}}if(!(e>b)){for(var l,e=a[a[c]>a[e]?c:e],f=c,g=b;f<=g;){for(l=f;f<g&&a[f]<e;)f++;for(;g>=l&&a[g]>=e;)g--;if(f>g)break;var q=a;l=d;var s=f++,h=g--,k=q[s];q[s]=q[h];q[h]=k;q=l[s];l[s]=l[h];l[h]=q}e=f;ca(a,c,e-1,d);ca(a,e,b,d)}}}function S(a){var c=[];Q(a,function(a){a!==w&&(C(a)?X.apply(c,a):c.push(a))});return c}function da(a,c,b){var d=-1,e=a.length;if(3===c.length)for(;++d<e;)c(a[d],d,b(d));else for(;++d<e;)c(a[d],b(d))}function ra(a,c,b,d){var e,f=-1,g=d.length;if(3===c.length)for(;++f<
g;)e=d[f],c(a[e],e,b(f));else for(;++f<g;)c(a[d[f]],b(f))}function sa(a,c,b){var d=0,e=a[z]();if(3===c.length)for(;!1===(a=e.next()).done;)c(a.value,d,b(d++));else for(;!1===(a=e.next()).done;)c(a.value,b(d++));return d}function ea(a,c,b){var d,e=-1,f=a.length;if(3===c.length)for(;++e<f;)d=a[e],c(d,e,b(d));else for(;++e<f;)d=a[e],c(d,b(d))}function fa(a,c,b,d){var e,f,g=-1,l=d.length;if(3===c.length)for(;++g<l;)e=d[g],f=a[e],c(f,e,b(f));else for(;++g<l;)f=a[d[g]],c(f,b(f))}function ga(a,c,b){var d,
e=0;a=a[z]();if(3===c.length)for(;!1===(d=a.next()).done;)d=d.value,c(d,e++,b(d));else for(;!1===(d=a.next()).done;)e++,d=d.value,c(d,b(d));return e}function V(a,c,b){var d,e=-1,f=a.length;if(3===c.length)for(;++e<f;)d=a[e],c(d,e,b(e,d));else for(;++e<f;)d=a[e],c(d,b(e,d))}function ha(a,c,b,d){var e,f,g=-1,l=d.length;if(3===c.length)for(;++g<l;)e=d[g],f=a[e],c(f,e,b(g,f));else for(;++g<l;)f=a[d[g]],c(f,b(g,f))}function ia(a,c,b){var d,e=0;a=a[z]();if(3===c.length)for(;!1===(d=a.next()).done;)d=d.value,
c(d,e,b(e++,d));else for(;!1===(d=a.next()).done;)d=d.value,c(d,b(e++,d));return e}function ta(a,c,b,d){var e,f,g=-1,l=d.length;if(3===c.length)for(;++g<l;)e=d[g],f=a[e],c(f,e,b(e,f));else for(;++g<l;)e=d[g],f=a[e],c(f,b(e,f))}function ua(a,c,b){var d,e=0;a=a[z]();if(3===c.length)for(;!1===(d=a.next()).done;)d=d.value,c(d,e,b(e++,d));else for(;!1===(d=a.next()).done;)d=d.value,c(d,b(e++,d));return e}function E(a){return function(c,b){var d=a;a=A;d(c,b)}}function I(a){return function(c,b){var d=a;
a=w;d(c,b)}}function va(a,c,b,d){var e,f;d?(e=Array,f=H):(e=function(){return{}},f=L);return function(d,l,q){function s(a){return function(b,d){null===a&&A();b?(a=null,q=I(q),q(b,f(m))):(m[a]=d,a=null,++r===h&&q(null,m))}}q=q||w;var h,k,m,r=0;C(d)?(h=d.length,m=e(h),a(d,l,s)):d&&(z&&d[z]?(m=e(0),(h=b(d,l,s))&&h===r&&q(null,m)):"object"===typeof d&&(k=F(d),h=k.length,m=e(h),c(d,l,s,k)));h||q(null,e())}}function wa(a,c,b,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&A();c?
(a=null,g=I(g),g(c)):(!!e===d&&(h[a]=b),a=null,++k===q&&g(null,U(h)))}}g=g||w;var q,s,h,k=0;C(e)?(q=e.length,h=Array(q),a(e,f,l)):e&&(z&&e[z]?(h=[],(q=b(e,f,l))&&q===k&&g(null,U(h))):"object"===typeof e&&(s=F(e),q=s.length,h=Array(q),c(e,f,l,s)));if(!q)return g(null,[])}}function xa(a){return function(c,b,d){function e(){r=c[x];b(r,h)}function f(){r=c[x];b(r,x,h)}function g(){u=p.next();r=u.value;u.done?d(null,y):b(r,h)}function l(){u=p.next();r=u.value;u.done?d(null,y):b(r,x,h)}function q(){m=n[x];
r=c[m];b(r,h)}function s(){m=n[x];r=c[m];b(r,m,h)}function h(b,c){b?d(b):(!!c===a&&(y[y.length]=r),++x===k?(v=A,d(null,y)):t?D(v):(t=!0,v()),t=!1)}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x=0,y=[];C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null,[]);v()}}function ya(a){return function(c,b,d,e){function f(){r=B++;r<m&&(p=c[r],d(p,k(p,r)))}function g(){r=B++;r<m&&(p=c[r],d(p,r,k(p,r)))}
function l(){t=v.next();!1===t.done?(p=t.value,d(p,k(p,B++))):R===B&&d!==w&&(d=w,e(null,U(y)))}function q(){t=v.next();!1===t.done?(p=t.value,d(p,B,k(p,B++))):R===B&&d!==w&&(d=w,e(null,U(y)))}function s(){r=B++;r<m&&(p=c[u[r]],d(p,k(p,r)))}function h(){r=B++;r<m&&(n=u[r],p=c[n],d(p,n,k(p,r)))}function k(b,d){return function(c,f){null===d&&A();c?(d=null,x=w,e=I(e),e(c)):(!!f===a&&(y[d]=b),d=null,++R===m?(e=E(e),e(null,U(y))):G?D(x):(G=!0,x()),G=!1)}}e=e||w;var m,r,n,p,u,v,t,x,y,G=!1,B=0,R=0;C(c)?(m=
c.length,x=3===d.length?g:f):c&&(z&&c[z]?(m=Infinity,y=[],v=c[z](),x=3===d.length?q:l):"object"===typeof c&&(u=F(c),m=u.length,x=3===d.length?h:s));if(!m||isNaN(b)||1>b)return e(null,[]);y=y||Array(m);K(b>m?m:b,x)}}function Y(a,c,b){function d(){c(a[v],s)}function e(){c(a[v],v,s)}function f(){n=r.next();n.done?b(null):c(n.value,s)}function g(){n=r.next();n.done?b(null):c(n.value,v,s)}function l(){c(a[m[v]],s)}function q(){k=m[v];c(a[k],k,s)}function s(a,d){a?b(a):++v===h||!1===d?(p=A,b(null)):u?D(p):
(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null);p()}function Z(a,c,b,d){function e(){x<k&&b(a[x++],h)}function f(){m=x++;m<k&&b(a[m],m,h)}function g(){u=p.next();!1===u.done?(x++,b(u.value,h)):y===x&&b!==w&&(b=w,d(null))}function l(){u=p.next();!1===u.done?b(u.value,x++,h):y===x&&b!==w&&(b=w,d(null))}function q(){x<k&&b(a[n[x++]],
h)}function s(){m=x++;m<k&&(r=n[m],b(a[r],r,h))}function h(a,c){a||!1===c?(v=w,d=I(d),d(a)):++y===k?(b=w,v=A,d=E(d),d(null)):t?D(v):(t=!0,v());t=!1}d=d||w;var k,m,r,n,p,u,v,t=!1,x=0,y=0;if(C(a))k=a.length,v=3===b.length?f:e;else if(a)if(z&&a[z])k=Infinity,p=a[z](),v=3===b.length?l:g;else if("object"===typeof a)n=F(a),k=n.length,v=3===b.length?s:q;else return d(null);if(!k||isNaN(c)||1>c)return d(null);K(c>k?k:c,v)}function za(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next();
n.done?b(null,p):c(n.value,s)}function g(){n=r.next();n.done?b(null,p):c(n.value,t,s)}function l(){c(a[m[t]],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(u=A,b=E(b),b(a,H(p))):(p[t]=d,++t===h?(u=A,b(null,p),b=A):v?D(u):(v=!0,u()),v=!1)}b=b||w;var h,k,m,r,n,p,u,v=!1,t=0;C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,p=[],r=a[z](),u=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,u=3===c.length?q:l));if(!h)return b(null,[]);p=p||Array(h);u()}function Aa(a,c,b,d){return function(e,
f,g){function l(a){var b=!1;return function(c,e){b&&A();b=!0;c?(g=I(g),g(c)):!!e===d?(g=I(g),g(null,a)):++h===q&&g(null)}}g=g||w;var q,s,h=0;C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));q||g(null)}}function Ba(a){return function(c,b,d){function e(){r=c[x];b(r,h)}function f(){r=c[x];b(r,x,h)}function g(){u=p.next();r=u.value;u.done?d(null):b(r,h)}function l(){u=p.next();r=u.value;u.done?d(null):b(r,x,h)}function q(){r=c[n[x]];
b(r,h)}function s(){m=n[x];r=c[m];b(r,m,h)}function h(b,c){b?d(b):!!c===a?(v=A,d(null,r)):++x===k?(v=A,d(null)):t?D(v):(t=!0,v());t=!1}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null);v()}}function Ca(a){return function(c,b,d,e){function f(){r=G++;r<m&&(p=c[r],d(p,k(p)))}function g(){r=G++;r<m&&(p=c[r],d(p,r,k(p)))}function l(){t=v.next();
!1===t.done?(G++,p=t.value,d(p,k(p))):B===G&&d!==w&&(d=w,e(null))}function q(){t=v.next();!1===t.done?(p=t.value,d(p,G++,k(p))):B===G&&d!==w&&(d=w,e(null))}function s(){r=G++;r<m&&(p=c[u[r]],d(p,k(p)))}function h(){G<m&&(n=u[G++],p=c[n],d(p,n,k(p)))}function k(b){var d=!1;return function(c,f){d&&A();d=!0;c?(x=w,e=I(e),e(c)):!!f===a?(x=w,e=I(e),e(null,b)):++B===m?e(null):y?D(x):(y=!0,x());y=!1}}e=e||w;var m,r,n,p,u,v,t,x,y=!1,G=0,B=0;C(c)?(m=c.length,x=3===d.length?g:f):c&&(z&&c[z]?(m=Infinity,v=c[z](),
x=3===d.length?q:l):"object"===typeof c&&(u=F(c),m=u.length,x=3===d.length?h:s));if(!m||isNaN(b)||1>b)return e(null);K(b>m?m:b,x)}}function Da(a,c,b,d){return function(e,f,g){function l(a,b){return function(c,e){null===a&&A();c?(a=null,g=I(g),g(c,L(k))):(!!e===d&&(k[a]=b),a=null,++h===q&&g(null,k))}}g=g||w;var q,s,h=0,k={};C(e)?(q=e.length,a(e,f,l)):e&&(z&&e[z]?(q=b(e,f,l))&&q===h&&g(null,k):"object"===typeof e&&(s=F(e),q=s.length,c(e,f,l,s)));if(!q)return g(null,{})}}function Ea(a){return function(c,
b,d){function e(){m=y;r=c[y];b(r,h)}function f(){m=y;r=c[y];b(r,y,h)}function g(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,h)}function l(){m=y;u=p.next();r=u.value;u.done?d(null,x):b(r,m,h)}function q(){m=n[y];r=c[m];b(r,h)}function s(){m=n[y];r=c[m];b(r,m,h)}function h(b,c){b?d(b,x):(!!c===a&&(x[m]=r),++y===k?(v=A,d(null,x)):t?D(v):(t=!0,v()),t=!1)}d=E(d||w);var k,m,r,n,p,u,v,t=!1,x={},y=0;C(c)?(k=c.length,v=3===b.length?f:e):c&&(z&&c[z]?(k=Infinity,p=c[z](),v=3===b.length?l:g):"object"===typeof c&&
(n=F(c),k=n.length,v=3===b.length?s:q));if(!k)return d(null,{});v()}}function Fa(a){return function(c,b,d,e){function f(){r=B++;r<m&&(p=c[r],d(p,k(p,r)))}function g(){r=B++;r<m&&(p=c[r],d(p,r,k(p,r)))}function l(){t=v.next();!1===t.done?(p=t.value,d(p,k(p,B++))):R===B&&d!==w&&(d=w,e(null,G))}function q(){t=v.next();!1===t.done?(p=t.value,d(p,B,k(p,B++))):R===B&&d!==w&&(d=w,e(null,G))}function s(){B<m&&(n=u[B++],p=c[n],d(p,k(p,n)))}function h(){B<m&&(n=u[B++],p=c[n],d(p,n,k(p,n)))}function k(b,d){return function(c,
f){null===d&&A();c?(d=null,x=w,e=I(e),e(c,L(G))):(!!f===a&&(G[d]=b),d=null,++R===m?(x=A,e=E(e),e(null,G)):y?D(x):(y=!0,x()),y=!1)}}e=e||w;var m,r,n,p,u,v,t,x,y=!1,G={},B=0,R=0;C(c)?(m=c.length,x=3===d.length?g:f):c&&(z&&c[z]?(m=Infinity,v=c[z](),x=3===d.length?q:l):"object"===typeof c&&(u=F(c),m=u.length,x=3===d.length?h:s));if(!m||isNaN(b)||1>b)return e(null,{});K(b>m?m:b,x)}}function $(a,c,b,d){function e(d){b(d,a[t],h)}function f(d){b(d,a[t],t,h)}function g(a){p=n.next();p.done?d(null,a):b(a,p.value,
h)}function l(a){p=n.next();p.done?d(null,a):b(a,p.value,t,h)}function q(d){b(d,a[r[t]],h)}function s(d){m=r[t];b(d,a[m],m,h)}function h(a,c){a?d(a,c):++t===k?(b=A,d(null,c)):v?D(function(){u(c)}):(v=!0,u(c));v=!1}d=E(d||w);var k,m,r,n,p,u,v=!1,t=0;C(a)?(k=a.length,u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,u=4===b.length?s:q));if(!k)return d(null,c);u(c)}function Ga(a,c,b,d){function e(d){b(d,a[--s],q)}function f(d){b(d,a[--s],
s,q)}function g(d){b(d,a[m[--s]],q)}function l(d){k=m[--s];b(d,a[k],k,q)}function q(a,b){a?d(a,b):0===s?(u=A,d(null,b)):v?D(function(){u(b)}):(v=!0,u(b));v=!1}d=E(d||w);var s,h,k,m,r,n,p,u,v=!1;if(C(a))s=a.length,u=4===b.length?f:e;else if(a)if(z&&a[z]){p=[];r=a[z]();for(h=-1;!1===(n=r.next()).done;)p[++h]=n.value;a=p;s=p.length;u=4===b.length?f:e}else"object"===typeof a&&(m=F(a),s=m.length,u=4===b.length?l:g);if(!s)return d(null,c);u(c)}function Ha(a,c,b){b=b||w;ja(a,c,function(a,c){if(a)return b(a);
b(null,!!c)})}function Ia(a,c,b){b=b||w;ka(a,c,function(a,c){if(a)return b(a);b(null,!!c)})}function Ja(a,c,b,d){d=d||w;la(a,c,b,function(a,b){if(a)return d(a);d(null,!!b)})}function Ka(a,c){return C(a)?0===a.length?(c(null),!1):!0:(c(Error("First argument to waterfall must be an array of functions")),!1)}function ma(a,c,b){switch(c.length){case 0:case 1:return a(b);case 2:return a(c[1],b);case 3:return a(c[1],c[2],b);case 4:return a(c[1],c[2],c[3],b);case 5:return a(c[1],c[2],c[3],c[4],b);case 6:return a(c[1],
c[2],c[3],c[4],c[5],b);default:return c=J(c,1),c.push(b),a.apply(null,c)}}function La(a,c){function b(b,h){if(b)q=A,c=E(c),c(b);else if(++d===f){q=A;var k=c;c=A;2===arguments.length?k(b,h):k.apply(null,H(arguments))}else g=a[d],l=arguments,e?D(q):(e=!0,q()),e=!1}c=c||w;if(Ka(a,c)){var d=0,e=!1,f=a.length,g=a[d],l=[],q=function(){switch(g.length){case 0:try{b(null,g())}catch(a){b(a)}break;case 1:return g(b);case 2:return g(l[1],b);case 3:return g(l[1],l[2],b);case 4:return g(l[1],l[2],l[3],b);case 5:return g(l[1],
l[2],l[3],l[4],b);default:return l=J(l,1),l[g.length-1]=b,g.apply(null,l)}};q()}}function Ma(){var a=H(arguments);return function(){var c=this,b=H(arguments),d=b[b.length-1];"function"===typeof d?b.pop():d=w;$(a,b,function(a,b,d){a.push(function(a){var b=J(arguments,1);d(a,b)});b.apply(c,a)},function(a,b){b=C(b)?b:[b];b.unshift(a);d.apply(c,b)})}}function Na(a){return function(c){var b=function(){var b=this,d=H(arguments),g=d.pop()||w;return a(c,function(a,c){a.apply(b,d.concat([c]))},g)};if(1<arguments.length){var d=
J(arguments,1);return b.apply(this,d)}return b}}function M(){this.tail=this.head=null;this.length=0}function na(a,c,b,d){function e(a){a={data:a,callback:m};r?n._tasks.unshift(a):n._tasks.push(a);D(n.process)}function f(a,b,d){if(null==b)b=w;else if("function"!==typeof b)throw Error("task callback must be a function");n.started=!0;var c=C(a)?a:[a];void 0!==a&&c.length?(r=d,m=b,Q(c,e),m=void 0):n.idle()&&D(n.drain)}function g(a,b){var d=!1;return function(c,e){d&&A();d=!0;h--;for(var f,g=-1,m=k.length,
q=-1,l=b.length,n=2<arguments.length,r=n&&H(arguments);++q<l;){for(f=b[q];++g<m;)k[g]===f&&(0===g?k.shift():k.splice(g,1),g=m,m--);g=-1;n?f.callback.apply(f,r):f.callback(c,e);c&&a.error(c,f.data)}h<=a.concurrency-a.buffer&&a.unsaturated();0===a._tasks.length+h&&a.drain();a.process()}}function l(){for(;!n.paused&&h<n.concurrency&&n._tasks.length;){var a=n._tasks.shift();h++;k.push(a);0===n._tasks.length&&n.empty();h===n.concurrency&&n.saturated();var b=g(n,[a]);c(a.data,b)}}function q(){for(;!n.paused&&
h<n.concurrency&&n._tasks.length;){for(var a=n._tasks.splice(n.payload||n._tasks.length),b=-1,d=a.length,e=Array(d);++b<d;)e[b]=a[b].data;h++;X.apply(k,a);0===n._tasks.length&&n.empty();h===n.concurrency&&n.saturated();a=g(n,a);c(e,a)}}function s(){D(n.process)}if(void 0===b)b=1;else if(isNaN(b)||1>b)throw Error("Concurrency must not be zero");var h=0,k=[],m,r,n={_tasks:new M,concurrency:b,payload:d,saturated:w,unsaturated:w,buffer:b/4,empty:w,drain:w,error:w,started:!1,paused:!1,push:function(a,
b){f(a,b)},kill:function(){n.drain=w;n._tasks.empty()},unshift:function(a,b){f(a,b,!0)},remove:function(a){n._tasks.remove(a)},process:a?l:q,length:function(){return n._tasks.length},running:function(){return h},workersList:function(){return k},idle:function(){return 0===n.length()+h},pause:function(){n.paused=!0},resume:function(){!1!==n.paused&&(n.paused=!1,K(n.concurrency<n._tasks.length?n.concurrency:n._tasks.length,s))},_worker:c};return n}function Oa(a,c,b){function d(){if(0===s.length&&0===
q){if(0!==g)throw Error("async.auto task has cyclic dependencies");return b(null,l)}for(;s.length&&q<c&&b!==w;){q++;var a=s.shift();if(0===a[1])a[0](a[2]);else a[0](l,a[2])}}function e(a){Q(h[a]||[],function(a){a()});d()}"function"===typeof c&&(b=c,c=null);var f=F(a),g=f.length,l={};if(0===g)return b(null,l);var q=0,s=new M,h=Object.create(null);b=E(b||w);c=c||g;W(a,function(a,d){function c(a,f){null===d&&A();f=2>=arguments.length?f:J(arguments,1);if(a){q=g=0;s.length=0;var k=L(l);k[d]=f;d=null;var h=
b;b=w;h(a,k)}else q--,g--,l[d]=f,e(d),d=null}function n(){0===--v&&s.push([p,u,c])}var p,u;if(C(a)){var v=a.length-1;p=a[v];u=v;if(0===v)s.push([p,u,c]);else for(var t=-1;++t<v;){var x=a[t];if($a(f,x))throw t="async.auto task `"+d+"` has non-existent dependency `"+x+"` in "+a.join(", "),Error(t);var y=h[x];y||(y=h[x]=[]);y.push(n)}}else p=a,u=0,s.push([p,u,c])},f);d()}function ab(a){a=a.toString().replace(bb,"");a=(a=a.match(cb)[2].replace(" ",""))?a.split(db):[];return a=a.map(function(a){return a.replace(eb,
"").trim()})}function oa(a,c,b){function d(a,e){if(++s===g||!a||q&&!q(a)){if(2>=arguments.length)return b(a,e);var f=H(arguments);return b.apply(null,f)}c(d)}function e(){c(f)}function f(a,d){if(++s===g||!a||q&&!q(a)){if(2>=arguments.length)return b(a,d);var c=H(arguments);return b.apply(null,c)}setTimeout(e,l(s))}var g,l,q,s=0;if(3>arguments.length&&"function"===typeof a)b=c||w,c=a,a=null,g=5;else switch(b=b||w,typeof a){case "object":"function"===typeof a.errorFilter&&(q=a.errorFilter);var h=a.interval;
switch(typeof h){case "function":l=h;break;case "string":case "number":l=(h=+h)?function(){return h}:function(){return 0}}g=+a.times||5;break;case "number":g=a||5;break;case "string":g=+a||5;break;default:throw Error("Invalid arguments for async.retry");}if("function"!==typeof c)throw Error("Invalid arguments for async.retry");l?c(f):c(d)}function Pa(a){return function(){var c=H(arguments),b=c.pop(),d;try{d=a.apply(this,c)}catch(e){return b(e)}d&&"function"===typeof d.then?d.then(function(a){try{b(null,
a)}catch(d){D(Qa,d)}},function(a){a=a&&a.message?a:Error(a);try{b(a,void 0)}catch(d){D(Qa,d)}}):b(null,d)}}function Qa(a){throw a;}function Ra(a){return function(){function c(a,d){if(a)return b(null,{error:a});2<arguments.length&&(d=J(arguments,1));b(null,{value:d})}var b;switch(arguments.length){case 1:return b=arguments[0],a(c);case 2:return b=arguments[1],a(arguments[0],c);default:var d=H(arguments),e=d.length-1;b=d[e];d[e]=c;a.apply(this,d)}}}function pa(a){function c(b){if("object"===typeof console)if(b)console.error&&
console.error(b);else if(console[a]){var d=J(arguments,1);Q(d,function(b){console[a](b)})}}return function(a){var d=J(arguments,1);d.push(c);a.apply(null,d)}}var w=function(){},A=function(){throw Error("Callback was already called.");},C=Array.isArray,F=Object.keys,X=Array.prototype.push,z="function"===typeof Symbol&&Symbol.iterator,D,ba,T;O();var aa=function(a,c,b){return function(d,e,f){function g(a,b){a?(f=I(f),f(a)):++s===l?f(null):!1===b&&(f=I(f),f(null))}f=I(f||w);var l,q,s=0;C(d)?(l=d.length,
a(d,e,g)):d&&(z&&d[z]?(l=b(d,e,g))&&l===s&&f(null):"object"===typeof d&&(q=F(d),l=q.length,c(d,e,g,q)));l||f(null)}}(function(a,c,b){var d=-1,e=a.length;if(3===c.length)for(;++d<e;)c(a[d],d,E(b));else for(;++d<e;)c(a[d],E(b))},function(a,c,b,d){var e,f=-1,g=d.length;if(3===c.length)for(;++f<g;)e=d[f],c(a[e],e,E(b));else for(;++f<g;)c(a[d[f]],E(b))},function(a,c,b){a=a[z]();var d=0,e;if(3===c.length)for(;!1===(e=a.next()).done;)c(e.value,d++,E(b));else for(;!1===(e=a.next()).done;)d++,c(e.value,E(b));
return d}),Sa=va(da,ra,sa,!0),fb=va(da,function(a,c,b,d){var e,f=-1,g=d.length;if(3===c.length)for(;++f<g;)e=d[f],c(a[e],e,b(e));else for(;++f<g;)e=d[f],c(a[e],b(e))},function(a,c,b){var d=0,e=a[z]();if(3===c.length)for(;!1===(a=e.next()).done;)c(a.value,d,b(d++));else for(;!1===(a=e.next()).done;)c(a.value,b(d++));return d},!1),Ta=wa(V,ha,ia,!0),Ua=xa(!0),Va=ya(!0),gb=wa(V,ha,ia,!1),hb=xa(!1),ib=ya(!1),ja=Aa(ea,fa,ga,!0),ka=Ba(!0),la=Ca(!0),Wa=function(a,c,b){var d=Aa(a,c,b,!1);return function(a,
b,c){c=c||w;d(a,b,function(a,b){if(a)return c(a);c(null,!b)})}}(ea,fa,ga),Xa=function(){var a=Ba(!1);return function(c,b,d){d=d||w;a(c,b,function(a,b){if(a)return d(a);d(null,!b)})}}(),Ya=function(){var a=Ca(!1);return function(c,b,d,e){e=e||w;a(c,b,d,function(a,b){if(a)return e(a);e(null,!b)})}}(),jb=Da(V,ta,ua,!0),kb=Ea(!0),lb=Fa(!0),mb=Da(V,ta,ua,!1),nb=Ea(!1),ob=Fa(!1),pb=function(a,c,b){return function(d,e,f,g){function l(a,b){a?(g=I(g),g(a,C(h)?H(h):L(h))):++k===q?g(null,h):!1===b&&(g=I(g),
g(null,C(h)?H(h):L(h)))}3===arguments.length&&(g=f,f=e,e=void 0);g=g||w;var q,s,h,k=0;C(d)?(q=d.length,h=void 0!==e?e:[],a(d,h,f,l)):d&&(z&&d[z]?(h=void 0!==e?e:{},(q=b(d,h,f,l))&&q===k&&g(null,h)):"object"===typeof d&&(s=F(d),q=s.length,h=void 0!==e?e:{},c(d,h,f,l,s)));q||g(null,void 0!==e?e:h||{})}}(function(a,c,b,d){var e=-1,f=a.length;if(4===b.length)for(;++e<f;)b(c,a[e],e,E(d));else for(;++e<f;)b(c,a[e],E(d))},function(a,c,b,d,e){var f,g=-1,l=e.length;if(4===b.length)for(;++g<l;)f=e[g],b(c,a[f],
f,E(d));else for(;++g<l;)b(c,a[e[g]],E(d))},function(a,c,b,d){var e=0,f=a[z]();if(4===b.length)for(;!1===(a=f.next()).done;)b(c,a.value,e++,E(d));else for(;!1===(a=f.next()).done;)e++,b(c,a.value,E(d));return e}),qb=function(a,c,b){return function(d,e,f){function g(a,b){var d=!1;q[a]=b;return function(b,c){d&&A();d=!0;s[a]=c;b?(f=I(f),f(b)):++h===l&&f(null,P(q,s))}}f=f||w;var l,q,s,h=0;if(C(d))l=d.length,q=Array(l),s=Array(l),a(d,e,g);else if(d)if(z&&d[z])q=[],s=[],(l=b(d,e,g))&&l===h&&f(null,P(q,
s));else if("object"===typeof d){var k=F(d);l=k.length;q=Array(l);s=Array(l);c(d,e,g,k)}l||f(null,[])}}(V,ha,ia),rb=function(a,c,b){return function(d,e,f){function g(a){return function(b,d){null===a&&A();if(b)a=null,f=I(f),Q(q,function(a,b){void 0===a&&(q[b]=w)}),f(b,S(q));else{switch(arguments.length){case 0:case 1:q[a]=w;break;case 2:q[a]=d;break;default:q[a]=J(arguments,1)}a=null;++s===l&&f(null,S(q))}}}f=f||w;var l,q,s=0;if(C(d))l=d.length,q=Array(l),a(d,e,g);else if(d)if(z&&d[z])q=[],(l=b(d,
e,g))&&l===s&&f(null,q);else if("object"===typeof d){var h=F(d);l=h.length;q=Array(l);c(d,e,g,h)}l||f(null,[])}}(da,ra,sa),sb=function(a,c,b){return function(d,e,f){function g(a){var b=!1;return function(d,c){b&&A();b=!0;if(d)f=I(f),f(d,L(s));else{var e=s[c];e?e.push(a):s[c]=[a];++q===l&&f(null,s)}}}f=f||w;var l,q=0,s={};if(C(d))l=d.length,a(d,e,g);else if(d)if(z&&d[z])(l=b(d,e,g))&&l===q&&f(null,s);else if("object"===typeof d){var h=F(d);l=h.length;c(d,e,g,h)}l||f(null,{})}}(ea,fa,ga),tb=function(a,
c){return function(b,d){function e(a){return function(b,c){null===a&&A();b?(a=null,d=I(d),d(b,l)):(l[a]=2>=arguments.length?c:J(arguments,1),a=null,++q===f&&d(null,l))}}d=d||w;var f,g,l,q=0;C(b)?(f=b.length,l=Array(f),a(b,e)):b&&"object"===typeof b&&(g=F(b),f=g.length,l={},c(b,e,g));f||d(null,l)}}(function(a,c){for(var b=-1,d=a.length;++b<d;)a[b](c(b))},function(a,c,b){for(var d,e=-1,f=b.length;++e<f;)d=b[e],a[d](c(d))}),ub=Na(Sa),vb=Na(za),wb=pa("log"),xb=pa("dir"),qa={VERSION:"2.6.2",each:aa,eachSeries:Y,
eachLimit:Z,forEach:aa,forEachSeries:Y,forEachLimit:Z,eachOf:aa,eachOfSeries:Y,eachOfLimit:Z,forEachOf:aa,forEachOfSeries:Y,forEachOfLimit:Z,map:Sa,mapSeries:za,mapLimit:function(a,c,b,d){function e(){m=y++;m<k&&b(a[m],h(m))}function f(){m=y++;m<k&&b(a[m],m,h(m))}function g(){u=p.next();!1===u.done?b(u.value,h(y++)):G===y&&b!==w&&(b=w,d(null,v))}function l(){u=p.next();!1===u.done?b(u.value,y,h(y++)):G===y&&b!==w&&(b=w,d(null,v))}function q(){m=y++;m<k&&b(a[n[m]],h(m))}function s(){m=y++;m<k&&(r=
n[m],b(a[r],r,h(m)))}function h(a){return function(b,c){null===a&&A();b?(a=null,t=w,d=I(d),d(b,H(v))):(v[a]=c,a=null,++G===k?(t=A,d(null,v),d=A):x?D(t):(x=!0,t()),x=!1)}}d=d||w;var k,m,r,n,p,u,v,t,x=!1,y=0,G=0;C(a)?(k=a.length,t=3===b.length?f:e):a&&(z&&a[z]?(k=Infinity,v=[],p=a[z](),t=3===b.length?l:g):"object"===typeof a&&(n=F(a),k=n.length,t=3===b.length?s:q));if(!k||isNaN(c)||1>c)return d(null,[]);v=v||Array(k);K(c>k?k:c,t)},mapValues:fb,mapValuesSeries:function(a,c,b){function d(){k=t;c(a[t],
s)}function e(){k=t;c(a[t],t,s)}function f(){k=t;n=r.next();n.done?b(null,v):c(n.value,s)}function g(){k=t;n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){k=m[t];c(a[k],s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){a?(p=A,b=E(b),b(a,L(v))):(v[k]=d,++t===h?(p=A,b(null,v),b=A):u?D(p):(u=!0,p()),u=!1)}b=b||w;var h,k,m,r,n,p,u=!1,v={},t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));
if(!h)return b(null,v);p()},mapValuesLimit:function(a,c,b,d){function e(){m=y++;m<k&&b(a[m],h(m))}function f(){m=y++;m<k&&b(a[m],m,h(m))}function g(){u=p.next();!1===u.done?b(u.value,h(y++)):G===y&&b!==w&&(b=w,d(null,x))}function l(){u=p.next();!1===u.done?b(u.value,y,h(y++)):G===y&&b!==w&&(b=w,d(null,x))}function q(){m=y++;m<k&&(r=n[m],b(a[r],h(r)))}function s(){m=y++;m<k&&(r=n[m],b(a[r],r,h(r)))}function h(a){return function(b,c){null===a&&A();b?(a=null,v=w,d=I(d),d(b,L(x))):(x[a]=c,a=null,++G===
k?d(null,x):t?D(v):(t=!0,v()),t=!1)}}d=d||w;var k,m,r,n,p,u,v,t=!1,x={},y=0,G=0;C(a)?(k=a.length,v=3===b.length?f:e):a&&(z&&a[z]?(k=Infinity,p=a[z](),v=3===b.length?l:g):"object"===typeof a&&(n=F(a),k=n.length,v=3===b.length?s:q));if(!k||isNaN(c)||1>c)return d(null,x);K(c>k?k:c,v)},filter:Ta,filterSeries:Ua,filterLimit:Va,select:Ta,selectSeries:Ua,selectLimit:Va,reject:gb,rejectSeries:hb,rejectLimit:ib,detect:ja,detectSeries:ka,detectLimit:la,find:ja,findSeries:ka,findLimit:la,pick:jb,pickSeries:kb,
pickLimit:lb,omit:mb,omitSeries:nb,omitLimit:ob,reduce:$,inject:$,foldl:$,reduceRight:Ga,foldr:Ga,transform:pb,transformSeries:function(a,c,b,d){function e(){b(v,a[x],h)}function f(){b(v,a[x],x,h)}function g(){p=n.next();p.done?d(null,v):b(v,p.value,h)}function l(){p=n.next();p.done?d(null,v):b(v,p.value,x,h)}function q(){b(v,a[r[x]],h)}function s(){m=r[x];b(v,a[m],m,h)}function h(a,b){a?d(a,v):++x===k||!1===b?(u=A,d(null,v)):t?D(u):(t=!0,u());t=!1}3===arguments.length&&(d=b,b=c,c=void 0);d=E(d||
w);var k,m,r,n,p,u,v,t=!1,x=0;C(a)?(k=a.length,v=void 0!==c?c:[],u=4===b.length?f:e):a&&(z&&a[z]?(k=Infinity,n=a[z](),v=void 0!==c?c:{},u=4===b.length?l:g):"object"===typeof a&&(r=F(a),k=r.length,v=void 0!==c?c:{},u=4===b.length?s:q));if(!k)return d(null,void 0!==c?c:v||{});u()},transformLimit:function(a,c,b,d,e){function f(){r=A++;r<m&&d(x,a[r],E(k))}function g(){r=A++;r<m&&d(x,a[r],r,E(k))}function l(){v=u.next();!1===v.done?(A++,d(x,v.value,E(k))):B===A&&d!==w&&(d=w,e(null,x))}function q(){v=u.next();
!1===v.done?d(x,v.value,A++,E(k)):B===A&&d!==w&&(d=w,e(null,x))}function s(){r=A++;r<m&&d(x,a[p[r]],E(k))}function h(){r=A++;r<m&&(n=p[r],d(x,a[n],n,E(k)))}function k(a,b){a||!1===b?(t=w,e(a||null,C(x)?H(x):L(x)),e=w):++B===m?(d=w,e(null,x)):y?D(t):(y=!0,t());y=!1}4===arguments.length&&(e=d,d=b,b=void 0);e=e||w;var m,r,n,p,u,v,t,x,y=!1,A=0,B=0;C(a)?(m=a.length,x=void 0!==b?b:[],t=4===d.length?g:f):a&&(z&&a[z]?(m=Infinity,u=a[z](),x=void 0!==b?b:{},t=4===d.length?q:l):"object"===typeof a&&(p=F(a),
m=p.length,x=void 0!==b?b:{},t=4===d.length?h:s));if(!m||isNaN(c)||1>c)return e(null,void 0!==b?b:x||{});K(c>m?m:c,t)},sortBy:qb,sortBySeries:function(a,c,b){function d(){m=a[y];c(m,s)}function e(){m=a[y];c(m,y,s)}function f(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,s)}function g(){p=n.next();if(p.done)return b(null,P(u,v));m=p.value;u[y]=m;c(m,y,s)}function l(){m=a[r[y]];u[y]=m;c(m,s)}function q(){k=r[y];m=a[k];u[y]=m;c(m,k,s)}function s(a,d){v[y]=d;a?b(a):++y===h?(t=A,b(null,
P(u,v))):x?D(t):(x=!0,t());x=!1}b=E(b||w);var h,k,m,r,n,p,u,v,t,x=!1,y=0;C(a)?(h=a.length,u=a,v=Array(h),t=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,u=[],v=[],n=a[z](),t=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=Array(h),v=Array(h),t=3===c.length?q:l));if(!h)return b(null,[]);t()},sortByLimit:function(a,c,b,d){function e(){B<k&&(n=a[B],b(n,h(n,B++)))}function f(){m=B++;m<k&&(n=a[m],b(n,m,h(n,m)))}function g(){t=v.next();!1===t.done?(n=t.value,p[B]=n,b(n,h(n,B++))):E===B&&b!==w&&
(b=w,d(null,P(p,x)))}function l(){t=v.next();!1===t.done?(n=t.value,p[B]=n,b(n,B,h(n,B++))):E===B&&b!==w&&(b=w,d(null,P(p,x)))}function q(){B<k&&(n=a[u[B]],p[B]=n,b(n,h(n,B++)))}function s(){B<k&&(r=u[B],n=a[r],p[B]=n,b(n,r,h(n,B++)))}function h(a,b){var c=!1;return function(a,e){c&&A();c=!0;x[b]=e;a?(y=w,d(a),d=w):++E===k?d(null,P(p,x)):G?D(y):(G=!0,y());G=!1}}d=d||w;var k,m,r,n,p,u,v,t,x,y,G=!1,B=0,E=0;C(a)?(k=a.length,p=a,y=3===b.length?f:e):a&&(z&&a[z]?(k=Infinity,v=a[z](),p=[],x=[],y=3===b.length?
l:g):"object"===typeof a&&(u=F(a),k=u.length,p=Array(k),y=3===b.length?s:q));if(!k||isNaN(c)||1>c)return d(null,[]);x=x||Array(k);K(c>k?k:c,y)},some:Ha,someSeries:Ia,someLimit:Ja,any:Ha,anySeries:Ia,anyLimit:Ja,every:Wa,everySeries:Xa,everyLimit:Ya,all:Wa,allSeries:Xa,allLimit:Ya,concat:rb,concatSeries:function(a,c,b){function d(){c(a[t],s)}function e(){c(a[t],t,s)}function f(){n=r.next();n.done?b(null,v):c(n.value,s)}function g(){n=r.next();n.done?b(null,v):c(n.value,t,s)}function l(){c(a[m[t]],
s)}function q(){k=m[t];c(a[k],k,s)}function s(a,d){C(d)?X.apply(v,d):2<=arguments.length&&X.apply(v,J(arguments,1));a?b(a,v):++t===h?(p=A,b(null,v)):u?D(p):(u=!0,p());u=!1}b=E(b||w);var h,k,m,r,n,p,u=!1,v=[],t=0;C(a)?(h=a.length,p=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,r=a[z](),p=3===c.length?g:f):"object"===typeof a&&(m=F(a),h=m.length,p=3===c.length?q:l));if(!h)return b(null,v);p()},concatLimit:function(a,c,b,d){function e(){t<k&&b(a[t],h(t++))}function f(){t<k&&b(a[t],t,h(t++))}function g(){n=
r.next();!1===n.done?b(n.value,h(t++)):x===t&&b!==w&&(b=w,d(null,S(u)))}function l(){n=r.next();!1===n.done?b(n.value,t,h(t++)):x===t&&b!==w&&(b=w,d(null,S(u)))}function q(){t<k&&b(a[y[t]],h(t++))}function s(){t<k&&(m=y[t],b(a[m],m,h(t++)))}function h(a){return function(b,c){null===a&&A();if(b)a=null,p=w,d=I(d),Q(u,function(a,b){void 0===a&&(u[b]=w)}),d(b,S(u));else{switch(arguments.length){case 0:case 1:u[a]=w;break;case 2:u[a]=c;break;default:u[a]=J(arguments,1)}a=null;++x===k?(p=A,d(null,S(u)),
d=A):v?D(p):(v=!0,p());v=!1}}}d=d||w;var k,m,r,n,p,u,v=!1,t=0,x=0;if(C(a))k=a.length,p=3===b.length?f:e;else if(a)if(z&&a[z])k=Infinity,u=[],r=a[z](),p=3===b.length?l:g;else if("object"===typeof a){var y=F(a);k=y.length;p=3===b.length?s:q}if(!k||isNaN(c)||1>c)return d(null,[]);u=u||Array(k);K(c>k?k:c,p)},groupBy:sb,groupBySeries:function(a,c,b){function d(){m=a[t];c(m,s)}function e(){m=a[t];c(m,t,s)}function f(){p=n.next();m=p.value;p.done?b(null,x):c(m,s)}function g(){p=n.next();m=p.value;p.done?
b(null,x):c(m,t,s)}function l(){m=a[r[t]];c(m,s)}function q(){k=r[t];m=a[k];c(m,k,s)}function s(a,d){if(a)u=A,b=E(b),b(a,L(x));else{var c=x[d];c?c.push(m):x[d]=[m];++t===h?(u=A,b(null,x)):v?D(u):(v=!0,u());v=!1}}b=E(b||w);var h,k,m,r,n,p,u,v=!1,t=0,x={};C(a)?(h=a.length,u=3===c.length?e:d):a&&(z&&a[z]?(h=Infinity,n=a[z](),u=3===c.length?g:f):"object"===typeof a&&(r=F(a),h=r.length,u=3===c.length?q:l));if(!h)return b(null,x);u()},groupByLimit:function(a,c,b,d){function e(){y<k&&(n=a[y++],b(n,h(n)))}
function f(){m=y++;m<k&&(n=a[m],b(n,m,h(n)))}function g(){v=u.next();!1===v.done?(y++,n=v.value,b(n,h(n))):E===y&&b!==w&&(b=w,d(null,B))}function l(){v=u.next();!1===v.done?(n=v.value,b(n,y++,h(n))):E===y&&b!==w&&(b=w,d(null,B))}function q(){y<k&&(n=a[p[y++]],b(n,h(n)))}function s(){y<k&&(r=p[y++],n=a[r],b(n,r,h(n)))}function h(a){var b=!1;return function(c,e){b&&A();b=!0;if(c)t=w,d=I(d),d(c,L(B));else{var f=B[e];f?f.push(a):B[e]=[a];++E===k?d(null,B):x?D(t):(x=!0,t());x=!1}}}d=d||w;var k,m,r,n,p,
u,v,t,x=!1,y=0,E=0,B={};C(a)?(k=a.length,t=3===b.length?f:e):a&&(z&&a[z]?(k=Infinity,u=a[z](),t=3===b.length?l:g):"object"===typeof a&&(p=F(a),k=p.length,t=3===b.length?s:q));if(!k||isNaN(c)||1>c)return d(null,B);K(c>k?k:c,t)},parallel:tb,series:function(a,c){function b(){g=k;a[k](e)}function d(){g=l[k];a[g](e)}function e(a,b){a?(s=A,c=E(c),c(a,q)):(q[g]=2>=arguments.length?b:J(arguments,1),++k===f?(s=A,c(null,q)):h?D(s):(h=!0,s()),h=!1)}c=c||w;var f,g,l,q,s,h=!1,k=0;if(C(a))f=a.length,q=Array(f),
s=b;else if(a&&"object"===typeof a)l=F(a),f=l.length,q={},s=d;else return c(null);if(!f)return c(null,q);s()},parallelLimit:function(a,c,b){function d(){l=r++;if(l<g)a[l](f(l))}function e(){r<g&&(q=s[r++],a[q](f(q)))}function f(a){return function(d,c){null===a&&A();d?(a=null,k=w,b=I(b),b(d,h)):(h[a]=2>=arguments.length?c:J(arguments,1),a=null,++n===g?b(null,h):m?D(k):(m=!0,k()),m=!1)}}b=b||w;var g,l,q,s,h,k,m=!1,r=0,n=0;C(a)?(g=a.length,h=Array(g),k=d):a&&"object"===typeof a&&(s=F(a),g=s.length,h=
{},k=e);if(!g||isNaN(c)||1>c)return b(null,h);K(c>g?g:c,k)},tryEach:function(a,c){function b(){a[q](e)}function d(){a[g[q]](e)}function e(a,b){a?++q===f?c(a):l():2>=arguments.length?c(null,b):c(null,J(arguments,1))}c=c||w;var f,g,l,q=0;C(a)?(f=a.length,l=b):a&&"object"===typeof a&&(g=F(a),f=g.length,l=d);if(!f)return c(null);l()},waterfall:function(a,c){function b(){ma(e,f,d(e))}function d(h){return function(k,m){void 0===h&&(c=w,A());h=void 0;k?(g=c,c=A,g(k)):++q===s?(g=c,c=A,2>=arguments.length?
g(k,m):g.apply(null,H(arguments))):(l?(f=arguments,e=a[q]||A,D(b)):(l=!0,ma(a[q]||A,arguments,d(q))),l=!1)}}c=c||w;if(Ka(a,c)){var e,f,g,l,q=0,s=a.length;ma(a[0],[],d(0))}},angelFall:La,angelfall:La,whilst:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?d():b(null,e):(e=J(arguments,1),a.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;a()?d():b(null)},doWhilst:function(a,c,b){function d(){g?D(e):(g=!0,
a(f));g=!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?d():b(null,e):(e=J(arguments,1),c.apply(null,e)?d():b.apply(null,[null].concat(e)))}b=b||w;var g=!1;e()},until:function(a,c,b){function d(){g?D(e):(g=!0,c(f));g=!1}function e(){c(f)}function f(c,e){if(c)return b(c);2>=arguments.length?a(e)?b(null,e):d():(e=J(arguments,1),a.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;a()?b(null):d()},doUntil:function(a,c,b){function d(){g?D(e):(g=!0,a(f));g=
!1}function e(){a(f)}function f(a,e){if(a)return b(a);2>=arguments.length?c(e)?b(null,e):d():(e=J(arguments,1),c.apply(null,e)?b.apply(null,[null].concat(e)):d())}b=b||w;var g=!1;e()},during:function(a,c,b){function d(a,d){if(a)return b(a);d?c(e):b(null)}function e(c){if(c)return b(c);a(d)}b=b||w;a(d)},doDuring:function(a,c,b){function d(d,c){if(d)return b(d);c?a(e):b(null)}function e(a,e){if(a)return b(a);switch(arguments.length){case 0:case 1:c(d);break;case 2:c(e,d);break;default:var l=J(arguments,
1);l.push(d);c.apply(null,l)}}b=b||w;d(null,!0)},forever:function(a,c){function b(){a(d)}function d(a){if(a){if(c)return c(a);throw a;}e?D(b):(e=!0,b());e=!1}var e=!1;b()},compose:function(){return Ma.apply(null,Za(arguments))},seq:Ma,applyEach:ub,applyEachSeries:vb,queue:function(a,c){return na(!0,a,c)},priorityQueue:function(a,c){var b=na(!0,a,c);b.push=function(a,c,f){b.started=!0;c=c||0;var g=C(a)?a:[a],l=g.length;if(void 0===a||0===l)b.idle()&&D(b.drain);else{f="function"===typeof f?f:w;for(a=
b._tasks.head;a&&c>=a.priority;)a=a.next;for(;l--;){var q={data:g[l],priority:c,callback:f};a?b._tasks.insertBefore(a,q):b._tasks.push(q);D(b.process)}}};delete b.unshift;return b},cargo:function(a,c){return na(!1,a,1,c)},auto:Oa,autoInject:function(a,c,b){var d={};W(a,function(a,b){var c,l=a.length;if(C(a)){if(0===l)throw Error("autoInject task functions require explicit parameters.");c=H(a);l=c.length-1;a=c[l];if(0===l){d[b]=a;return}}else{if(1===l){d[b]=a;return}c=ab(a);if(0===l&&0===c.length)throw Error("autoInject task functions require explicit parameters.");
l=c.length-1}c[l]=function(b,d){switch(l){case 1:a(b[c[0]],d);break;case 2:a(b[c[0]],b[c[1]],d);break;case 3:a(b[c[0]],b[c[1]],b[c[2]],d);break;default:for(var f=-1;++f<l;)c[f]=b[c[f]];c[f]=d;a.apply(null,c)}};d[b]=c},F(a));Oa(d,c,b)},retry:oa,retryable:function(a,c){c||(c=a,a=null);return function(){function b(a){c(a)}function d(a){c(g[0],a)}function e(a){c(g[0],g[1],a)}var f,g=H(arguments),l=g.length-1,q=g[l];switch(c.length){case 1:f=b;break;case 2:f=d;break;case 3:f=e;break;default:f=function(a){g[l]=
a;c.apply(null,g)}}a?oa(a,f,q):oa(f,q)}},iterator:function(a){function c(e){var f=function(){b&&a[d[e]||e].apply(null,H(arguments));return f.next()};f.next=function(){return e<b-1?c(e+1):null};return f}var b=0,d=[];C(a)?b=a.length:(d=F(a),b=d.length);return c(0)},times:function(a,c,b){function d(c){return function(d,l){null===c&&A();e[c]=l;c=null;d?(b(d),b=w):0===--a&&b(null,e)}}b=b||w;a=+a;if(isNaN(a)||1>a)return b(null,[]);var e=Array(a);K(a,function(a){c(a,d(a))})},timesSeries:function(a,c,b){function d(){c(l,
e)}function e(c,e){f[l]=e;c?(b(c),b=A):++l>=a?(b(null,f),b=A):g?D(d):(g=!0,d());g=!1}b=b||w;a=+a;if(isNaN(a)||1>a)return b(null,[]);var f=Array(a),g=!1,l=0;d()},timesLimit:function(a,c,b,d){function e(){var c=q++;c<a&&b(c,f(c))}function f(b){return function(c,f){null===b&&A();g[b]=f;b=null;c?(d(c),d=w):++s>=a?(d(null,g),d=A):l?D(e):(l=!0,e());l=!1}}d=d||w;a=+a;if(isNaN(a)||1>a||isNaN(c)||1>c)return d(null,[]);var g=Array(a),l=!1,q=0,s=0;K(c>a?a:c,e)},race:function(a,c){c=I(c||w);var b,d,e=-1;if(C(a))for(b=
a.length;++e<b;)a[e](c);else if(a&&"object"===typeof a)for(d=F(a),b=d.length;++e<b;)a[d[e]](c);else return c(new TypeError("First argument to race must be a collection of functions"));b||c(null)},apply:function(a){switch(arguments.length){case 0:case 1:return a;case 2:return a.bind(null,arguments[1]);case 3:return a.bind(null,arguments[1],arguments[2]);case 4:return a.bind(null,arguments[1],arguments[2],arguments[3]);case 5:return a.bind(null,arguments[1],arguments[2],arguments[3],arguments[4]);default:var c=
arguments.length,b=0,d=Array(c);for(d[b]=null;++b<c;)d[b]=arguments[b];return a.bind.apply(a,d)}},nextTick:ba,setImmediate:T,memoize:function(a,c){c=c||function(a){return a};var b={},d={},e=function(){function e(a){var c=H(arguments);a||(b[q]=c);var f=d[q];delete d[q];for(var g=-1,l=f.length;++g<l;)f[g].apply(null,c)}var g=H(arguments),l=g.pop(),q=c.apply(null,g);if(b.hasOwnProperty(q))D(function(){l.apply(null,b[q])});else{if(d.hasOwnProperty(q))return d[q].push(l);d[q]=[l];g.push(e);a.apply(null,
g)}};e.memo=b;e.unmemoized=a;return e},unmemoize:function(a){return function(){return(a.unmemoized||a).apply(null,arguments)}},ensureAsync:function(a){return function(){var c=H(arguments),b=c.length-1,d=c[b],e=!0;c[b]=function(){var a=H(arguments);e?D(function(){d.apply(null,a)}):d.apply(null,a)};a.apply(this,c);e=!1}},constant:function(){var a=[null].concat(H(arguments));return function(c){c=arguments[arguments.length-1];c.apply(this,a)}},asyncify:Pa,wrapSync:Pa,log:wb,dir:xb,reflect:Ra,reflectAll:function(a){function c(a,
c){b[c]=Ra(a)}var b,d;C(a)?(b=Array(a.length),Q(a,c)):a&&"object"===typeof a&&(d=F(a),b={},W(a,c,d));return b},timeout:function(a,c,b){function d(){var c=Error('Callback function "'+(a.name||"anonymous")+'" timed out.');c.code="ETIMEDOUT";b&&(c.info=b);l=null;g(c)}function e(){null!==l&&(f(g,H(arguments)),clearTimeout(l))}function f(a,b){switch(b.length){case 0:a();break;case 1:a(b[0]);break;case 2:a(b[0],b[1]);break;default:a.apply(null,b)}}var g,l;return function(){l=setTimeout(d,c);var b=H(arguments),
s=b.length-1;g=b[s];b[s]=e;f(a,b)}},createLogger:pa,safe:function(){O();return N},fast:function(){O(!1);return N}};N["default"]=qa;W(qa,function(a,c){N[c]=a},F(qa));M.prototype._removeLink=function(a){var c=a.prev,b=a.next;c?c.next=b:this.head=b;b?b.prev=c:this.tail=c;a.prev=null;a.next=null;this.length--;return a};M.prototype.empty=M;M.prototype._setInitial=function(a){this.length=1;this.head=this.tail=a};M.prototype.insertBefore=function(a,c){c.prev=a.prev;c.next=a;a.prev?a.prev.next=c:this.head=
c;a.prev=c;this.length++};M.prototype.unshift=function(a){this.head?this.insertBefore(this.head,a):this._setInitial(a)};M.prototype.push=function(a){var c=this.tail;c?(a.prev=c,a.next=c.next,this.tail=a,c.next=a,this.length++):this._setInitial(a)};M.prototype.shift=function(){return this.head&&this._removeLink(this.head)};M.prototype.splice=function(a){for(var c,b=[];a--&&(c=this.shift());)b.push(c);return b};M.prototype.remove=function(a){for(var c=this.head;c;)a(c)&&this._removeLink(c),c=c.next;
return this};var cb=/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,db=/,/,eb=/(=.+)?(\s*)$/,bb=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm});

license: mit


code:
'use strict';

module.exports = require('./async').asyncify;


code:
'use strict';

module.exports = require('./async').auto;


code:
'use strict';

module.exports = require('./async').autoInject;


code:
'use strict';

module.exports = require('./async').cargo;


code:
'use strict';

module.exports = require('./async').compose;


code:
'use strict';

module.exports = require('./async').concat;


code:
'use strict';

module.exports = require('./async').concatLimit;


code:
'use strict';

module.exports = require('./async').concatSeries;


code:
'use strict';

module.exports = require('./async').constant;


code:
'use strict';

module.exports = require('./async').createLogger;


code:
'use strict';

module.exports = require('./async').detect;


code:
'use strict';

module.exports = require('./async').detectLimit;


code:
'use strict';

module.exports = require('./async').detectSeries;


code:
'use strict';

module.exports = require('./async').dir;


code:
'use strict';

module.exports = require('./async').doDuring;


code:
'use strict';

module.exports = require('./async').doUntil;


code:
'use strict';

module.exports = require('./async').doWhilst;


code:
'use strict';

module.exports = require('./async').during;


code:
'use strict';

module.exports = require('./async').each;


code:
'use strict';

module.exports = require('./async').eachLimit;


code:
'use strict';

module.exports = require('./async').eachOf;


code:
'use strict';

module.exports = require('./async').eachOfLimit;


code:
'use strict';

module.exports = require('./async').eachOfSeries;


code:
'use strict';

module.exports = require('./async').eachSeries;


code:
'use strict';

module.exports = require('./async').ensureAsync;


code:
'use strict';

module.exports = require('./async').every;


code:
'use strict';

module.exports = require('./async').everyLimit;


code:
'use strict';

module.exports = require('./async').everySeries;


code:
'use strict';

module.exports = require('./async').fast;


code:
'use strict';

module.exports = require('./async').filter;


code:
'use strict';

module.exports = require('./async').filterLimit;


code:
'use strict';

module.exports = require('./async').filterSeries;


code:
'use strict';

module.exports = require('./async').find;


code:
'use strict';

module.exports = require('./async').findLimit;


code:
'use strict';

module.exports = require('./async').findSeries;


code:
'use strict';

module.exports = require('./async').foldl;


code:
'use strict';

module.exports = require('./async').foldr;


code:
'use strict';

module.exports = require('./async').forEach;


code:
'use strict';

module.exports = require('./async').forEachLimit;


code:
'use strict';

module.exports = require('./async').forEachOf;


code:
'use strict';

module.exports = require('./async').forEachOfLimit;


code:
'use strict';

module.exports = require('./async').forEachOfSeries;


code:
'use strict';

module.exports = require('./async').forEachSeries;


code:
'use strict';

module.exports = require('./async').forever;


code:
'use strict';

module.exports = require('./async').groupBy;


code:
'use strict';

module.exports = require('./async').groupByLimit;


code:
'use strict';

module.exports = require('./async').groupBySeries;


code:
'use strict';

module.exports = require('./async').inject;


code:
'use strict';

module.exports = require('./async').iterator;


code:
'use strict';

module.exports = require('./async').log;


code:
'use strict';

module.exports = require('./async').map;


code:
'use strict';

module.exports = require('./async').mapLimit;


code:
'use strict';

module.exports = require('./async').mapSeries;


code:
'use strict';

module.exports = require('./async').mapValues;


code:
'use strict';

module.exports = require('./async').mapValuesLimit;


code:
'use strict';

module.exports = require('./async').mapValuesSeries;


code:
'use strict';

module.exports = require('./async').memoize;


code:
'use strict';

module.exports = require('./async').nextTick;


code:
'use strict';

module.exports = require('./async').omit;


code:
'use strict';

module.exports = require('./async').omitLimit;


code:
'use strict';

module.exports = require('./async').omitSeries;


neo-async

description: Neo-Async is a drop-in replacement for Async, it almost fully covers its functionality and runs faster

license: MIT

keywords: async util

type: git

*.{js,ts}:
prettier --write
git add


code:
'use strict';

module.exports = require('./async').parallel;


code:
'use strict';

module.exports = require('./async').parallelLimit;


code:
'use strict';

module.exports = require('./async').pick;


code:
'use strict';

module.exports = require('./async').pickLimit;


code:
'use strict';

module.exports = require('./async').pickSeries;


code:
'use strict';

module.exports = require('./async').priorityQueue;


code:
'use strict';

module.exports = require('./async').queue;


code:
'use strict';

module.exports = require('./async').race;


code:
'use strict';

module.exports = require('./async').reduce;


code:
'use strict';

module.exports = require('./async').reduceRight;


code:
'use strict';

module.exports = require('./async').reflect;


code:
'use strict';

module.exports = require('./async').reflectAll;


code:
'use strict';

module.exports = require('./async').reject;


code:
'use strict';

module.exports = require('./async').rejectLimit;


code:
'use strict';

module.exports = require('./async').rejectSeries;


code:
'use strict';

module.exports = require('./async').retry;


code:
'use strict';

module.exports = require('./async').retryable;


code:
'use strict';

module.exports = require('./async').safe;


code:
'use strict';

module.exports = require('./async').select;


code:
'use strict';

module.exports = require('./async').selectLimit;


code:
'use strict';

module.exports = require('./async').selectSeries;


code:
'use strict';

module.exports = require('./async').seq;


code:
'use strict';

module.exports = require('./async').series;


code:
'use strict';

module.exports = require('./async').setImmediate;


code:
'use strict';

module.exports = require('./async').some;


code:
'use strict';

module.exports = require('./async').someLimit;


code:
'use strict';

module.exports = require('./async').someSeries;


code:
'use strict';

module.exports = require('./async').sortBy;


code:
'use strict';

module.exports = require('./async').sortByLimit;


code:
'use strict';

module.exports = require('./async').sortBySeries;


code:
'use strict';

module.exports = require('./async').timeout;


code:
'use strict';

module.exports = require('./async').times;


code:
'use strict';

module.exports = require('./async').timesLimit;


code:
'use strict';

module.exports = require('./async').timesSeries;


code:
'use strict';

module.exports = require('./async').transform;


code:
'use strict';

module.exports = require('./async').transformLimit;


code:
'use strict';

module.exports = require('./async').transformSeries;


code:
'use strict';

module.exports = require('./async').tryEach;


code:
'use strict';

module.exports = require('./async').unmemoize;


code:
'use strict';

module.exports = require('./async').until;


code:
'use strict';

module.exports = require('./async').waterfall;


code:
'use strict';

module.exports = require('./async').whilst;


code:
'use strict';

module.exports = require('./async').wrapSync;


code:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.0.5] - 2018-08-25

### Changed

- Removed `prepublish` script from `package.json`

## [1.0.4] - 2017-08-08

### New

- Added a changelog

### Changed

- Ignore `yarn.lock` and `package-lock.json` files


code:
# nice-try

[![Travis Build Status](https://travis-ci.org/electerious/nice-try.svg?branch=master)](https://travis-ci.org/electerious/nice-try) [![AppVeyor Status](https://ci.appveyor.com/api/projects/status/8tqb09wrwci3xf8l?svg=true)](https://ci.appveyor.com/project/electerious/nice-try) [![Coverage Status](https://coveralls.io/repos/github/electerious/nice-try/badge.svg?branch=master)](https://coveralls.io/github/electerious/nice-try?branch=master) [![Dependencies](https://david-dm.org/electerious/nice-try.svg)](https://david-dm.org/electerious/nice-try#info=dependencies) [![Greenkeeper badge](https://badges.greenkeeper.io/electerious/nice-try.svg)](https://greenkeeper.io/)

A function that tries to execute a function and discards any error that occurs.

## Install

```
npm install nice-try
```

## Usage

```js
const niceTry = require('nice-try')

niceTry(() => JSON.parse('true')) // true
niceTry(() => JSON.parse('truee')) // undefined
niceTry() // undefined
niceTry(true) // undefined
```

## API

### Parameters

- `fn` `{Function}` Function that might or might not throw an error.

### Returns

- `{?*}` Return-value of the function when no error occurred.


nice-try

description: Tries to execute a function and discards any error that occurs

keywords: try catch error

coveralls: nyc report --reporter=text-lcov | coveralls

test: nyc node_modules/mocha/bin/_mocha


code:
'use strict'

/**
 * Tries to execute a function and discards any error that occurs.
 * @param {Function} fn - Function that might or might not throw an error.
 * @returns {?*} Return-value of the function when no error occurred.
 */
module.exports = function(fn) {

	try { return fn() } catch (e) {}

}


code:
# No Case

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Bundle size][bundlephobia-image]][bundlephobia-url]

> Transform into a lower cased string with spaces between words.

## Installation

```
npm install no-case --save
```

## Usage

```js
import { noCase } from "no-case";

noCase("string"); //=> "string"
noCase("dot.case"); //=> "dot case"
noCase("PascalCase"); //=> "pascal case"
noCase("version 1.2.10"); //=> "version 1 2 10"
```

The function also accepts [`options`](https://github.com/blakeembrey/change-case#options).

## License

MIT

[npm-image]: https://img.shields.io/npm/v/no-case.svg?style=flat
[npm-url]: https://npmjs.org/package/no-case
[downloads-image]: https://img.shields.io/npm/dm/no-case.svg?style=flat
[downloads-url]: https://npmjs.org/package/no-case
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/no-case.svg
[bundlephobia-url]: https://bundlephobia.com/result?p=no-case


code:
export interface Options {
    splitRegexp?: RegExp | RegExp[];
    stripRegexp?: RegExp | RegExp[];
    delimiter?: string;
    transform?: (part: string, index: number, parts: string[]) => string;
}
/**
 * Normalize the string into something other libraries can manipulate easier.
 */
export declare function noCase(input: string, options?: Options): string;


code:
import { lowerCase } from "lower-case";
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
// Remove all non-word characters.
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
/**
 * Normalize the string into something other libraries can manipulate easier.
 */
export function noCase(input, options) {
    if (options === void 0) { options = {}; }
    var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    // Trim the delimiter from around the output string.
    while (result.charAt(start) === "\0")
        start++;
    while (result.charAt(end - 1) === "\0")
        end--;
    // Transform each token independently.
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
}
/**
 * Replace `re` in the input string with the replacement value.
 */
function replace(input, re, value) {
    if (re instanceof RegExp)
        return input.replace(re, value);
    return re.reduce(function (input, re) { return input.replace(re, value); }, input);
}
//# sourceMappingURL=index.js.map


code:
import { noCase } from ".";
var TEST_CASES = [
    // Single words.
    ["test", "test"],
    ["TEST", "test"],
    // Camel case.
    ["testString", "test string"],
    ["testString123", "test string123"],
    ["testString_1_2_3", "test string 1 2 3"],
    ["x_256", "x 256"],
    ["anHTMLTag", "an html tag"],
    ["ID123String", "id123 string"],
    ["Id123String", "id123 string"],
    ["foo bar123", "foo bar123"],
    ["a1bStar", "a1b star"],
    // Constant case.
    ["CONSTANT_CASE ", "constant case"],
    ["CONST123_FOO", "const123 foo"],
    // Random cases.
    ["FOO_bar", "foo bar"],
    ["XMLHttpRequest", "xml http request"],
    ["IQueryAArgs", "i query a args"],
    // Non-alphanumeric separators.
    ["dot.case", "dot case"],
    ["path/case", "path case"],
    ["snake_case", "snake case"],
    ["snake_case123", "snake case123"],
    ["snake_case_123", "snake case 123"],
    // Punctuation.
    ['"quotes"', "quotes"],
    // Space between number parts.
    ["version 0.45.0", "version 0 45 0"],
    ["version 0..78..9", "version 0 78 9"],
    ["version 4_99/4", "version 4 99 4"],
    // Whitespace.
    ["  test  ", "test"],
    // Number string input.
    ["something_2014_other", "something 2014 other"],
    // https://github.com/blakeembrey/change-case/issues/21
    ["amazon s3 data", "amazon s3 data"],
    ["foo_13_bar", "foo 13 bar"],
    // Customization.
    ["camel2019", "camel 2019", { splitRegexp: /([a-z])([A-Z0-9])/g }],
    ["minifyURLs", "minify urls", { splitRegexp: /([a-z])([A-Z0-9])/g }],
];
describe("no case", function () {
    var _loop_1 = function (input, result, options) {
        it(input + " -> " + result, function () {
            expect(noCase(input, options)).toEqual(result);
        });
    };
    for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
        var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1], options = _a[2];
        _loop_1(input, result, options);
    }
});
//# sourceMappingURL=index.spec.js.map


code:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.noCase = void 0;
var lower_case_1 = require("lower-case");
// Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
// Remove all non-word characters.
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
/**
 * Normalize the string into something other libraries can manipulate easier.
 */
function noCase(input, options) {
    if (options === void 0) { options = {}; }
    var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lower_case_1.lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
    var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
    var start = 0;
    var end = result.length;
    // Trim the delimiter from around the output string.
    while (result.charAt(start) === "\0")
        start++;
    while (result.charAt(end - 1) === "\0")
        end--;
    // Transform each token independently.
    return result.slice(start, end).split("\0").map(transform).join(delimiter);
}
exports.noCase = noCase;
/**
 * Replace `re` in the input string with the replacement value.
 */
function replace(input, re, value) {
    if (re instanceof RegExp)
        return input.replace(re, value);
    return re.reduce(function (input, re) { return input.replace(re, value); }, input);
}
//# sourceMappingURL=index.js.map


code:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require(".");
var TEST_CASES = [
    // Single words.
    ["test", "test"],
    ["TEST", "test"],
    // Camel case.
    ["testString", "test string"],
    ["testString123", "test string123"],
    ["testString_1_2_3", "test string 1 2 3"],
    ["x_256", "x 256"],
    ["anHTMLTag", "an html tag"],
    ["ID123String", "id123 string"],
    ["Id123String", "id123 string"],
    ["foo bar123", "foo bar123"],
    ["a1bStar", "a1b star"],
    // Constant case.
    ["CONSTANT_CASE ", "constant case"],
    ["CONST123_FOO", "const123 foo"],
    // Random cases.
    ["FOO_bar", "foo bar"],
    ["XMLHttpRequest", "xml http request"],
    ["IQueryAArgs", "i query a args"],
    // Non-alphanumeric separators.
    ["dot.case", "dot case"],
    ["path/case", "path case"],
    ["snake_case", "snake case"],
    ["snake_case123", "snake case123"],
    ["snake_case_123", "snake case 123"],
    // Punctuation.
    ['"quotes"', "quotes"],
    // Space between number parts.
    ["version 0.45.0", "version 0 45 0"],
    ["version 0..78..9", "version 0 78 9"],
    ["version 4_99/4", "version 4 99 4"],
    // Whitespace.
    ["  test  ", "test"],
    // Number string input.
    ["something_2014_other", "something 2014 other"],
    // https://github.com/blakeembrey/change-case/issues/21
    ["amazon s3 data", "amazon s3 data"],
    ["foo_13_bar", "foo 13 bar"],
    // Customization.
    ["camel2019", "camel 2019", { splitRegexp: /([a-z])([A-Z0-9])/g }],
    ["minifyURLs", "minify urls", { splitRegexp: /([a-z])([A-Z0-9])/g }],
];
describe("no case", function () {
    var _loop_1 = function (input, result, options) {
        it(input + " -> " + result, function () {
            expect(_1.noCase(input, options)).toEqual(result);
        });
    };
    for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
        var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1], options = _a[2];
        _loop_1(input, result, options);
    }
});
//# sourceMappingURL=index.spec.js.map


no-case

description: Transform into a lower cased string with spaces between words

files: dist/ dist.es2015/ LICENSE

lint: tslint "src/**/*" --project tsconfig.json

build: rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json

specs: jest --coverage

test: npm run build && npm run lint && npm run specs

size: size-limit

prepare: npm run build

keywords: no case space lower convert transform

\.tsx?$: ts-jest

moduleFileExtensions: ts tsx js jsx json node


code:
node-fetch
==========

[![npm version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![coverage status][codecov-image]][codecov-url]
[![install size][install-size-image]][install-size-url]
[![Discord][discord-image]][discord-url]

A light-weight module that brings `window.fetch` to Node.js

(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567))

[![Backers][opencollective-image]][opencollective-url]

- [Motivation](#motivation)
- [Features](#features)
- [Difference from client-side fetch](#difference-from-client-side-fetch)
- [Installation](#installation)
- [Loading and configuring the module](#loading-and-configuring-the-module)
- [Common Usage](#common-usage)
    - [Plain text or HTML](#plain-text-or-html)
    - [JSON](#json)
    - [Simple Post](#simple-post)
    - [Post with JSON](#post-with-json)
    - [Post with form parameters](#post-with-form-parameters)
    - [Handling exceptions](#handling-exceptions)
    - [Handling client and server errors](#handling-client-and-server-errors)
- [Advanced Usage](#advanced-usage)
    - [Streams](#streams)
    - [Buffer](#buffer)
    - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data)
    - [Extract Set-Cookie Header](#extract-set-cookie-header)
    - [Post data using a file stream](#post-data-using-a-file-stream)
    - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart)
    - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal)
- [API](#api)
    - [fetch(url[, options])](#fetchurl-options)
    - [Options](#options)
    - [Class: Request](#class-request)
    - [Class: Response](#class-response)
    - [Class: Headers](#class-headers)
    - [Interface: Body](#interface-body)
    - [Class: FetchError](#class-fetcherror)
- [License](#license)
- [Acknowledgement](#acknowledgement)

## Motivation

Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime.

See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side).

## Features

- Stay consistent with `window.fetch` API.
- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences.
- Use native promise but allow substituting it with [insert your favorite promise library].
- Use native Node streams for body on both request and response.
- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically.
- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting.

## Difference from client-side fetch

- See [Known Differences](LIMITS.md) for details.
- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue.
- Pull requests are welcomed too!

## Installation

Current stable release (`2.x`)

```sh
$ npm install node-fetch
```

## Loading and configuring the module
We suggest you load the module via `require` until the stabilization of ES modules in node:
```js
const fetch = require('node-fetch');
```

If you are using a Promise library other than native, set it through `fetch.Promise`:
```js
const Bluebird = require('bluebird');

fetch.Promise = Bluebird;
```

## Common Usage

NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences.

#### Plain text or HTML
```js
fetch('https://github.com/')
    .then(res => res.text())
    .then(body => console.log(body));
```

#### JSON

```js

fetch('https://api.github.com/users/github')
    .then(res => res.json())
    .then(json => console.log(json));
```

#### Simple Post
```js
fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' })
    .then(res => res.json()) // expecting a json response
    .then(json => console.log(json));
```

#### Post with JSON

```js
const body = { a: 1 };

fetch('https://httpbin.org/post', {
        method: 'post',
        body:    JSON.stringify(body),
        headers: { 'Content-Type': 'application/json' },
    })
    .then(res => res.json())
    .then(json => console.log(json));
```

#### Post with form parameters
`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods.

NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such:

```js
const { URLSearchParams } = require('url');

const params = new URLSearchParams();
params.append('a', 1);

fetch('https://httpbin.org/post', { method: 'POST', body: params })
    .then(res => res.json())
    .then(json => console.log(json));
```

#### Handling exceptions
NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information.

Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md)  for more details.

```js
fetch('https://domain.invalid/')
    .catch(err => console.error(err));
```

#### Handling client and server errors
It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses:

```js
function checkStatus(res) {
    if (res.ok) { // res.status >= 200 && res.status < 300
        return res;
    } else {
        throw MyCustomError(res.statusText);
    }
}

fetch('https://httpbin.org/status/400')
    .then(checkStatus)
    .then(res => console.log('will not get here...'))
```

## Advanced Usage

#### Streams
The "Node.js way" is to use streams when possible:

```js
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
    .then(res => {
        const dest = fs.createWriteStream('./octocat.png');
        res.body.pipe(dest);
    });
```

In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch
errors -- the longer a response runs, the more likely it is to encounter an error.

```js
const fetch = require('node-fetch');
const response = await fetch('https://httpbin.org/stream/3');
try {
	for await (const chunk of response.body) {
		console.dir(JSON.parse(chunk.toString()));
	}
} catch (err) {
	console.error(err.stack);
}
```

In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams
did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors
directly from the stream and wait on it response to fully close.

```js
const fetch = require('node-fetch');
const read = async body => {
    let error;
    body.on('error', err => {
        error = err;
    });
    for await (const chunk of body) {
        console.dir(JSON.parse(chunk.toString()));
    }
    return new Promise((resolve, reject) => {
        body.on('close', () => {
            error ? reject(error) : resolve();
        });
    });
};
try {
    const response = await fetch('https://httpbin.org/stream/3');
    await read(response.body);
} catch (err) {
    console.error(err.stack);
}
```

#### Buffer
If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API)

```js
const fileType = require('file-type');

fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
    .then(res => res.buffer())
    .then(buffer => fileType(buffer))
    .then(type => { /* ... */ });
```

#### Accessing Headers and other Meta data
```js
fetch('https://github.com/')
    .then(res => {
        console.log(res.ok);
        console.log(res.status);
        console.log(res.statusText);
        console.log(res.headers.raw());
        console.log(res.headers.get('content-type'));
    });
```

#### Extract Set-Cookie Header

Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API.

```js
fetch(url).then(res => {
    // returns an array of values, instead of a string of comma-separated values
    console.log(res.headers.raw()['set-cookie']);
});
```

#### Post data using a file stream

```js
const { createReadStream } = require('fs');

const stream = createReadStream('input.txt');

fetch('https://httpbin.org/post', { method: 'POST', body: stream })
    .then(res => res.json())
    .then(json => console.log(json));
```

#### Post with form-data (detect multipart)

```js
const FormData = require('form-data');

const form = new FormData();
form.append('a', 1);

fetch('https://httpbin.org/post', { method: 'POST', body: form })
    .then(res => res.json())
    .then(json => console.log(json));

// OR, using custom headers
// NOTE: getHeaders() is non-standard API

const form = new FormData();
form.append('a', 1);

const options = {
    method: 'POST',
    body: form,
    headers: form.getHeaders()
}

fetch('https://httpbin.org/post', options)
    .then(res => res.json())
    .then(json => console.log(json));
```

#### Request cancellation with AbortSignal

> NOTE: You may cancel streamed requests only on Node >= v8.0.0

You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller).

An example of timing out a request after 150ms could be achieved as the following:

```js
import AbortController from 'abort-controller';

const controller = new AbortController();
const timeout = setTimeout(
  () => { controller.abort(); },
  150,
);

fetch(url, { signal: controller.signal })
  .then(res => res.json())
  .then(
    data => {
      useData(data)
    },
    err => {
      if (err.name === 'AbortError') {
        // request was aborted
      }
    },
  )
  .finally(() => {
    clearTimeout(timeout);
  });
```

See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples.

## API

### fetch(url[, options])

- `url` A string representing the URL for fetching
- `options` [Options](#fetch-options) for the HTTP(S) request
- Returns: Promise<[Response](#class-response)>

Perform an HTTP(S) fetch.

`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`.

### Options

The default values are shown after each option key.

```js
{
    // These properties are part of the Fetch Standard
    method: 'GET',
    headers: {},        // request headers. format is the identical to that accepted by the Headers constructor (see below)
    body: null,         // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream
    redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect
    signal: null,       // pass an instance of AbortSignal to optionally abort requests

    // The following properties are node-fetch extensions
    follow: 20,         // maximum redirect count. 0 to not follow redirect
    timeout: 0,         // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead.
    compress: true,     // support gzip/deflate content encoding. false to disable
    size: 0,            // maximum response body size in bytes. 0 to disable
    agent: null         // http(s).Agent instance or function that returns an instance (see below)
}
```

##### Default Headers

If no values are set, the following request headers will be sent automatically:

Header              | Value
------------------- | --------------------------------------------------------
`Accept-Encoding`   | `gzip,deflate` _(when `options.compress === true`)_
`Accept`            | `*/*`
`Content-Length`    | _(automatically calculated, if possible)_
`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_
`User-Agent`        | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)`

Note: when `body` is a `Stream`, `Content-Length` is not set automatically.

##### Custom Agent

The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following:

- Support self-signed certificate
- Use only IPv4 or IPv6
- Custom DNS Lookup

See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information.

If no agent is specified, the default agent provided by Node.js is used. Note that [this changed in Node.js 19](https://github.com/nodejs/node/blob/4267b92604ad78584244488e7f7508a690cb80d0/lib/_http_agent.js#L564) to have `keepalive` true by default. If you wish to enable `keepalive` in an earlier version of Node.js, you can override the agent as per the following code sample.

In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol.

```js
const httpAgent = new http.Agent({
    keepAlive: true
});
const httpsAgent = new https.Agent({
    keepAlive: true
});

const options = {
    agent: function (_parsedURL) {
        if (_parsedURL.protocol == 'http:') {
            return httpAgent;
        } else {
            return httpsAgent;
        }
    }
}
```

### Class: Request

An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface.

Due to the nature of Node.js, the following properties are not implemented at this moment:

- `type`
- `destination`
- `referrer`
- `referrerPolicy`
- `mode`
- `credentials`
- `cache`
- `integrity`
- `keepalive`

The following node-fetch extension properties are provided:

- `follow`
- `compress`
- `counter`
- `agent`

See [options](#fetch-options) for exact meaning of these extensions.

#### new Request(input[, options])

*(spec-compliant)*

- `input` A string representing a URL, or another `Request` (which will be cloned)
- `options` [Options][#fetch-options] for the HTTP(S) request

Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).

In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object.

### Class: Response

An HTTP(S) response. This class implements the [Body](#iface-body) interface.

The following properties are not implemented in node-fetch at this moment:

- `Response.error()`
- `Response.redirect()`
- `type`
- `trailer`

#### new Response([body[, options]])

*(spec-compliant)*

- `body` A `String` or [`Readable` stream][node-readable]
- `options` A [`ResponseInit`][response-init] options dictionary

Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response).

Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly.

#### response.ok

*(spec-compliant)*

Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300.

#### response.redirected

*(spec-compliant)*

Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0.

### Class: Headers

This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented.

#### new Headers([init])

*(spec-compliant)*

- `init` Optional argument to pre-fill the `Headers` object

Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object.

```js
// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class

const meta = {
  'Content-Type': 'text/xml',
  'Breaking-Bad': '<3'
};
const headers = new Headers(meta);

// The above is equivalent to
const meta = [
  [ 'Content-Type', 'text/xml' ],
  [ 'Breaking-Bad', '<3' ]
];
const headers = new Headers(meta);

// You can in fact use any iterable objects, like a Map or even another Headers
const meta = new Map();
meta.set('Content-Type', 'text/xml');
meta.set('Breaking-Bad', '<3');
const headers = new Headers(meta);
const copyOfHeaders = new Headers(headers);
```

### Interface: Body

`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes.

The following methods are not yet implemented in node-fetch at this moment:

- `formData()`

#### body.body

*(deviation from spec)*

* Node.js [`Readable` stream][node-readable]

Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable].

#### body.bodyUsed

*(spec-compliant)*

* `Boolean`

A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again.

#### body.arrayBuffer()
#### body.blob()
#### body.json()
#### body.text()

*(spec-compliant)*

* Returns: Promise

Consume the body and return a promise that will resolve to one of these formats.

#### body.buffer()

*(node-fetch extension)*

* Returns: Promise<Buffer>

Consume the body and return a promise that will resolve to a Buffer.

#### body.textConverted()

*(node-fetch extension)*

* Returns: Promise<String>

Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible.

(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.)

### Class: FetchError

*(node-fetch extension)*

An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info.

### Class: AbortError

*(node-fetch extension)*

An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info.

## Acknowledgement

Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference.

`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr).

## License

MIT

[npm-image]: https://flat.badgen.net/npm/v/node-fetch
[npm-url]: https://www.npmjs.com/package/node-fetch
[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch
[travis-url]: https://travis-ci.org/bitinn/node-fetch
[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master
[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch
[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square
[discord-url]: https://discord.gg/Zxbndcm
[opencollective-image]: https://opencollective.com/node-fetch/backers.svg
[opencollective-url]: https://opencollective.com/node-fetch
[whatwg-fetch]: https://fetch.spec.whatwg.org/
[response-init]: https://fetch.spec.whatwg.org/#responseinit
[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md
[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md


code:
"use strict";

// ref: https://github.com/tc39/proposal-global
var getGlobal = function () {
	// the only reliable means to get the global object is
	// `Function('return this')()`
	// However, this causes CSP violations in Chrome apps.
	if (typeof self !== 'undefined') { return self; }
	if (typeof window !== 'undefined') { return window; }
	if (typeof global !== 'undefined') { return global; }
	throw new Error('unable to locate global object');
}

var globalObject = getGlobal();

module.exports = exports = globalObject.fetch;

// Needed for TypeScript and Webpack.
if (globalObject.fetch) {
	exports.default = globalObject.fetch.bind(globalObject);
}

exports.Headers = globalObject.Headers;
exports.Request = globalObject.Request;
exports.Response = globalObject.Response;