!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.async=n.async||{})}(this,function(n){"use strict";function t(n,t){t|=0;for(var e=Math.max(n.length-t,0),r=Array(e),u=0;u-1&&n%1==0&&n<=At}function d(n){return null!=n&&v(n.length)&&!y(n)}function m(){}function g(n){return function(){if(null!==n){var t=n;n=null,t.apply(this,arguments)}}}function b(n,t){for(var e=-1,r=Array(n);++e-1&&n%1==0&&nu?0:u+t),e=e>u?u:e,e<0&&(e+=u),u=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(u);++r=r?n:Z(n,t,e)}function tn(n,t){for(var e=n.length;e--&&J(t,n[e],0)>-1;);return e}function en(n,t){for(var e=-1,r=n.length;++e-1;);return e}function rn(n){return n.split("")}function un(n){return Je.test(n)}function on(n){return n.match(hr)||[]}function cn(n){return un(n)?on(n):rn(n)}function fn(n){return null==n?"":Y(n)}function an(n,t,e){if(n=fn(n),n&&(e||void 0===t))return n.replace(yr,"");if(!n||!(t=Y(t)))return n;var r=cn(n),u=cn(t),o=en(r,u),i=tn(r,u)+1;return nn(r,o,i).join("")}function ln(n){return n=n.toString().replace(gr,""),n=n.match(vr)[2].replace(" ",""),n=n?n.split(dr):[],n=n.map(function(n){return an(n.replace(mr,""))})}function sn(n,t){var e={};N(n,function(n,t){function r(t,e){var r=K(u,function(n){return t[n]});r.push(e),a(n).apply(null,r)}var u,o=f(n),i=!o&&1===n.length||o&&0===n.length;if(Pt(n))u=n.slice(0,-1),n=n[n.length-1],e[t]=u.concat(u.length>0?r:n);else if(i)e[t]=n;else{if(u=ln(n),0===n.length&&!o&&0===u.length)throw new Error("autoInject task functions require explicit parameters.");o||u.pop(),e[t]=u.concat(r)}}),qe(e,t)}function pn(){this.head=this.tail=null,this.length=0}function hn(n,t){n.length=1,n.head=n.tail=t}function yn(n,t,e){function r(n,t,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");if(l.started=!0,Pt(n)||(n=[n]),0===n.length&&l.idle())return at(function(){l.drain()});for(var r=0,u=n.length;r=0&&c.splice(o,1),u.callback.apply(u,arguments),null!=t&&l.error(t,u.data)}i<=l.concurrency-l.buffer&&l.unsaturated(),l.idle()&&l.drain(),l.process()}}if(null==t)t=1;else if(0===t)throw new Error("Concurrency must not be zero");var o=a(n),i=0,c=[],f=!1,l={_tasks:new pn,concurrency:t,payload:e,saturated:m,unsaturated:m,buffer:t/4,empty:m,drain:m,error:m,started:!1,paused:!1,push:function(n,t){r(n,!1,t)},kill:function(){l.drain=m,l._tasks.empty()},unshift:function(n,t){r(n,!0,t)},remove:function(n){l._tasks.remove(n)},process:function(){if(!f){for(f=!0;!l.paused&&i2&&(o=t(arguments,1)),u[e]=o,r(n)})},function(n){r(n,u)})}function Dn(n,t){qn(Fe,n,t)}function Rn(n,t,e){qn(z(t),n,e)}function Cn(n,t){if(t=g(t||m),!Pt(n))return t(new TypeError("First argument to race must be an array of functions"));if(!n.length)return t();for(var e=0,r=n.length;er?1:0}var u=a(t);Ie(n,function(n,t){u(n,function(e,r){return e?t(e):void t(null,{value:n,criteria:r})})},function(n,t){return n?e(n):void e(null,K(t.sort(r),Fn("value")))})}function Xn(n,t,e){var r=a(n);return it(function(u,o){function i(){var t=n.name||"anonymous",r=new Error('Callback function "'+t+'" timed out.');r.code="ETIMEDOUT",e&&(r.info=e),f=!0,o(r)}var c,f=!1;u.push(function(){f||(o.apply(null,arguments),clearTimeout(c))}),c=setTimeout(i,t),r.apply(null,u)})}function Yn(n,t,e,r){for(var u=-1,o=tu(nu((t-n)/(e||1)),0),i=Array(o);o--;)i[r?o:++u]=n,n+=e;return i}function Zn(n,t,e,r){var u=a(e);Me(Yn(0,n,1),t,u,r)}function nt(n,t,e,r){arguments.length<=3&&(r=e,e=t,t=Pt(n)?[]:{}),r=g(r||m);var u=a(e);Fe(n,function(n,e,r){u(t,n,e,r)},function(n){r(n,t)})}function tt(n,e){var r,u=null;e=e||m,Fr(n,function(n,e){a(n)(function(n,o){r=arguments.length>2?t(arguments,1):o,u=n,e(!n)})},function(){e(u,r)})}function et(n){return function(){return(n.unmemoized||n).apply(null,arguments)}}function rt(n,e,r){r=U(r||m);var u=a(e);if(!n())return r(null);var o=function(e){if(e)return r(e);if(n())return u(o);var i=t(arguments,1);r.apply(null,[null].concat(i))};u(o)}function ut(n,t,e){rt(function(){return!n.apply(this,arguments)},t,e)}var ot,it=function(n){return function(){var e=t(arguments),r=e.pop();n.call(this,e,r)}},ct="function"==typeof setImmediate&&setImmediate,ft="object"==typeof process&&"function"==typeof process.nextTick;ot=ct?setImmediate:ft?process.nextTick:r;var at=u(ot),lt="function"==typeof Symbol,st="object"==typeof global&&global&&global.Object===Object&&global,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=st||pt||Function("return this")(),yt=ht.Symbol,vt=Object.prototype,dt=vt.hasOwnProperty,mt=vt.toString,gt=yt?yt.toStringTag:void 0,bt=Object.prototype,jt=bt.toString,St="[object Null]",kt="[object Undefined]",Lt=yt?yt.toStringTag:void 0,Ot="[object AsyncFunction]",wt="[object Function]",xt="[object GeneratorFunction]",Et="[object Proxy]",At=9007199254740991,Tt={},Bt="function"==typeof Symbol&&Symbol.iterator,Ft=function(n){return Bt&&n[Bt]&&n[Bt]()},It="[object Arguments]",_t=Object.prototype,Mt=_t.hasOwnProperty,Ut=_t.propertyIsEnumerable,zt=S(function(){return arguments}())?S:function(n){return j(n)&&Mt.call(n,"callee")&&!Ut.call(n,"callee")},Pt=Array.isArray,Vt="object"==typeof n&&n&&!n.nodeType&&n,qt=Vt&&"object"==typeof module&&module&&!module.nodeType&&module,Dt=qt&&qt.exports===Vt,Rt=Dt?ht.Buffer:void 0,Ct=Rt?Rt.isBuffer:void 0,$t=Ct||k,Wt=9007199254740991,Nt=/^(?:0|[1-9]\d*)$/,Qt="[object Arguments]",Gt="[object Array]",Ht="[object Boolean]",Jt="[object Date]",Kt="[object Error]",Xt="[object Function]",Yt="[object Map]",Zt="[object Number]",ne="[object Object]",te="[object RegExp]",ee="[object Set]",re="[object String]",ue="[object WeakMap]",oe="[object ArrayBuffer]",ie="[object DataView]",ce="[object Float32Array]",fe="[object Float64Array]",ae="[object Int8Array]",le="[object Int16Array]",se="[object Int32Array]",pe="[object Uint8Array]",he="[object Uint8ClampedArray]",ye="[object Uint16Array]",ve="[object Uint32Array]",de={};de[ce]=de[fe]=de[ae]=de[le]=de[se]=de[pe]=de[he]=de[ye]=de[ve]=!0,de[Qt]=de[Gt]=de[oe]=de[Ht]=de[ie]=de[Jt]=de[Kt]=de[Xt]=de[Yt]=de[Zt]=de[ne]=de[te]=de[ee]=de[re]=de[ue]=!1;var me="object"==typeof n&&n&&!n.nodeType&&n,ge=me&&"object"==typeof module&&module&&!module.nodeType&&module,be=ge&&ge.exports===me,je=be&&st.process,Se=function(){try{return je&&je.binding("util")}catch(n){}}(),ke=Se&&Se.isTypedArray,Le=ke?w(ke):O,Oe=Object.prototype,we=Oe.hasOwnProperty,xe=Object.prototype,Ee=A(Object.keys,Object),Ae=Object.prototype,Te=Ae.hasOwnProperty,Be=V(P,1/0),Fe=function(n,t,e){var r=d(n)?q:Be;r(n,a(t),e)},Ie=D(R),_e=l(Ie),Me=C(R),Ue=V(Me,1),ze=l(Ue),Pe=function(n){var e=t(arguments,1);return function(){var r=t(arguments);return n.apply(null,e.concat(r))}},Ve=W(),qe=function(n,e,r){function u(n,t){j.push(function(){f(n,t)})}function o(){if(0===j.length&&0===v)return r(null,y);for(;j.length&&v2&&(u=t(arguments,1)),e){var o={};N(y,function(n,t){o[t]=n}),o[n]=u,d=!0,b=Object.create(null),r(e,o)}else y[n]=u,c(n)});v++;var o=a(e[e.length-1]);e.length>1?o(y,u):o(u)}}function l(){for(var n,t=0;S.length;)n=S.pop(),t++,$(s(n),function(n){0===--k[n]&&S.push(n)});if(t!==h)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function s(t){var e=[];return N(n,function(n,r){Pt(n)&&J(n,t,0)>=0&&e.push(r)}),e}"function"==typeof e&&(r=e,e=null),r=g(r||m);var p=B(n),h=p.length;if(!h)return r(null);e||(e=h);var y={},v=0,d=!1,b=Object.create(null),j=[],S=[],k={};N(n,function(t,e){if(!Pt(t))return u(e,[t]),void S.push(e);var r=t.slice(0,t.length-1),o=r.length;return 0===o?(u(e,t),void S.push(e)):(k[e]=o,void $(r,function(c){if(!n[c])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+c+"` in "+r.join(", "));i(c,function(){o--,0===o&&u(e,t)})}))}),l(),o()},De="[object Symbol]",Re=1/0,Ce=yt?yt.prototype:void 0,$e=Ce?Ce.toString:void 0,We="\\ud800-\\udfff",Ne="\\u0300-\\u036f\\ufe20-\\ufe23",Qe="\\u20d0-\\u20f0",Ge="\\ufe0e\\ufe0f",He="\\u200d",Je=RegExp("["+He+We+Ne+Qe+Ge+"]"),Ke="\\ud800-\\udfff",Xe="\\u0300-\\u036f\\ufe20-\\ufe23",Ye="\\u20d0-\\u20f0",Ze="\\ufe0e\\ufe0f",nr="["+Ke+"]",tr="["+Xe+Ye+"]",er="\\ud83c[\\udffb-\\udfff]",rr="(?:"+tr+"|"+er+")",ur="[^"+Ke+"]",or="(?:\\ud83c[\\udde6-\\uddff]){2}",ir="[\\ud800-\\udbff][\\udc00-\\udfff]",cr="\\u200d",fr=rr+"?",ar="["+Ze+"]?",lr="(?:"+cr+"(?:"+[ur,or,ir].join("|")+")"+ar+fr+")*",sr=ar+fr+lr,pr="(?:"+[ur+tr+"?",tr,or,ir,nr].join("|")+")",hr=RegExp(er+"(?="+er+")|"+pr+sr,"g"),yr=/^\s+|\s+$/g,vr=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,dr=/,/,mr=/(=.+)?(\s*)$/,gr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;pn.prototype.removeLink=function(n){return n.prev?n.prev.next=n.next:this.head=n.next,n.next?n.next.prev=n.prev:this.tail=n.prev,n.prev=n.next=null,this.length-=1,n},pn.prototype.empty=function(){for(;this.head;)this.shift();return this},pn.prototype.insertAfter=function(n,t){t.prev=n,t.next=n.next,n.next?n.next.prev=t:this.tail=t,n.next=t,this.length+=1},pn.prototype.insertBefore=function(n,t){t.prev=n.prev,t.next=n,n.prev?n.prev.next=t:this.head=t,n.prev=t,this.length+=1},pn.prototype.unshift=function(n){this.head?this.insertBefore(this.head,n):hn(this,n)},pn.prototype.push=function(n){this.tail?this.insertAfter(this.tail,n):hn(this,n)},pn.prototype.shift=function(){return this.head&&this.removeLink(this.head)},pn.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},pn.prototype.toArray=function(){for(var n=Array(this.length),t=this.head,e=0;e=u.priority;)u=u.next;for(var o=0,i=n.length;o