web-documentation 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/deploy.js +1 -1
- package/package.json +1 -1
- package/source/deploy.ts +5 -2
package/build/deploy.js
CHANGED
|
@@ -10,7 +10,7 @@ var t,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toS
|
|
|
10
10
|
*/
|
|
11
11
|
e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected path to be a string");if("\\"===e||"/"===e)return"/";var r=e.length;if(r<=1)return e;var n="";if(r>4&&"\\"===e[3]){var i=e[2];"?"!==i&&"."!==i||"\\\\"!==e.slice(0,2)||(e=e.slice(2),n="//")}var o=e.split(/[/\\]+/);return!1!==t&&""===o[o.length-1]&&o.pop(),n+o.join("/")}},(e,t,r)=>{const n=r(131),i=r(96),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},(e,t)=>{
|
|
12
12
|
/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
|
|
13
|
-
var r;r=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],u=r[6],c=r[7],f=r[8],d=r[9],h=r[10],p=r[11],_=r[12],b=r[13],y=r[14];e.table=t,e.bstr=function(e,r){for(var n=~r,i=0,o=e.length;i<o;)n=n>>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var m=~r,g=e.length-15,v=0;v<g;)m=y[e[v++]^255&m]^b[e[v++]^m>>8&255]^_[e[v++]^m>>16&255]^p[e[v++]^m>>>24]^h[e[v++]]^d[e[v++]]^f[e[v++]]^c[e[v++]]^u[e[v++]]^l[e[v++]]^s[e[v++]]^a[e[v++]]^o[e[v++]]^i[e[v++]]^n[e[v++]]^t[e[v++]];for(g+=15;v<g;)m=m>>>8^t[255&(m^e[v++])];return~m},e.str=function(e,r){for(var n=~r,i=0,o=e.length,a=0,s=0;i<o;)(a=e.charCodeAt(i++))<128?n=n>>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(t):r({})},(e,t,r)=>{var n=r(78);e.exports=function(e,t,r,i,o){var a=n(e,t,r,i,o);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(109).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(41).Buffer,i=r(24);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},(e,t,r)=>{const n=r(134),i=r(101),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},(e,t,r)=>{const n={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{e.exports=r(39).constants||n}catch{e.exports=n}},(e,t,r)=>{var n=r(111),i=r(112);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return r&&i(a,r.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(24),i=r(179);function o(e,t,r){e[t]=function(){return delete e[t],r.apply(this,arguments),this[t].apply(this,arguments)}}function a(e,t){if(!(this instanceof a))return new a(e,t);i.call(this,t),o(this,"_read",(function(){var r=e.call(this,t),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this,t),o(this,"_write",(function(){var r=e.call(this,t),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}e.exports={Readable:a,Writable:s},n.inherits(a,i),n.inherits(s,i)},e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},(e,t,r)=>{e.exports=r(7).EventEmitter},(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},(e,t,r)=>{e.exports=o;var n=r(85),i=Object.create(r(42));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(34),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(2),{promisify:{custom:s}}=r(13),{streamReturningOperators:l,promiseReturningOperators:u}=r(180),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(9),f=r(86),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(45),{pipeline:p}=r(56),{destroyer:_}=r(30),b=r(21),y=r(91),m=r(18),g=e.exports=r(57).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(43);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(58),g.Duplex=r(25),g.Transform=r(90),g.PassThrough=r(89),g.pipeline=p;const{addAbortSignal:v}=r(44);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(2),{Buffer:s}=r(0),{inspect:l}=r(13);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(18),p=r(21),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(9),{destroyer:m}=r(30),g=r(25),v=r(43),w=r(58),{createDeferredPromise:S}=r(13),E=r(88),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(2);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(3),{promisify:{custom:s}}=r(14),{streamReturningOperators:l,promiseReturningOperators:u}=r(181),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(10),f=r(92),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(48),{pipeline:p}=r(59),{destroyer:_}=r(31),b=r(22),y=r(96),m=r(19),g=e.exports=r(60).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(46);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(61),g.Duplex=r(26),g.Transform=r(95),g.PassThrough=r(94),g.pipeline=p;const{addAbortSignal:v}=r(47);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(3),{Buffer:s}=r(0),{inspect:l}=r(14);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(19),p=r(22),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(10),{destroyer:m}=r(31),g=r(26),v=r(46),w=r(61),{createDeferredPromise:S}=r(14),E=r(93),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(3);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(4),{promisify:{custom:s}}=r(15),{streamReturningOperators:l,promiseReturningOperators:u}=r(182),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(11),f=r(97),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(51),{pipeline:p}=r(62),{destroyer:_}=r(32),b=r(23),y=r(101),m=r(20),g=e.exports=r(63).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(49);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(64),g.Duplex=r(27),g.Transform=r(100),g.PassThrough=r(99),g.pipeline=p;const{addAbortSignal:v}=r(50);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(4),{Buffer:s}=r(0),{inspect:l}=r(15);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(20),p=r(23),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(11),{destroyer:m}=r(32),g=r(27),v=r(49),w=r(64),{createDeferredPromise:S}=r(15),E=r(98),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(4);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Writable:n,Readable:i,getStreamError:o}=r(102),a=r(103),s=r(55),l=r(145),u=s.alloc(0);class c{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return 0===this._buffered?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(0===e)return u;let t=this._next(e);if(e===t.byteLength)return t;const r=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),r.push(t);return s.concat(r)}_next(e){const t=this.queue.peek(),r=t.byteLength-this._offset;if(e>=r){const e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}}class f extends i{constructor(e,t,r){super(),this.header=t,this.offset=r,this._parent=e}_read(e){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(o(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}}class d extends n{constructor(e){super(e),e||(e={}),this._buffer=new c,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=h,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e)return this.destroy(e),void this._continueWrite(e);this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=l.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),0===this._header.size||"directory"===this._header.type?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=l.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=l.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=l.decodePax(e);break;case"pax-header":this._pax=null===this._paxGlobal?l.decodePax(e):Object.assign({},this._paxGlobal,l.decodePax(e))}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);const e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){const e=this._buffer.shiftFirst(this._missing);if(null===e)return!1;this._missing-=e.byteLength;const t=this._stream.push(e);return 0===this._missing?(this._stream.push(null),t&&this._stream._detach(),t&&!1===this._locked):t}_createStream(){return new f(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;)if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}const e=this._buffer.shiftFirst(this._missing);null!==e&&(this._missing-=e.byteLength)}else{if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(e){const t=this._callback;this._callback=h,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=0===this._missing&&0===this._buffer.buffered,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(o(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,r=null,n=null,i=null;const o=this;return this.on("entry",(function(e,o,a){i=a,o.on("error",h),t?(t({value:o,done:!1}),t=r=null):n=o})),this.on("error",(t=>{e=t})),this.on("close",(function(){if(a(e),!t)return;e?r(e):t({value:void 0,done:!0});t=r=null})),{[Symbol.asyncIterator](){return this},next:()=>new Promise(s),return:()=>l(null),throw:e=>l(e)};function a(e){if(!i)return;const t=i;i=null,t(e)}function s(i,s){return e?s(e):n?(i({value:n,done:!1}),void(n=null)):(t=i,r=s,a(null),void(o._finished&&t&&(t({value:void 0,done:!0}),t=r=null)))}function l(e){return o.destroy(e),a(e),new Promise(((t,r)=>{if(o.destroyed)return t({value:void 0,done:!0});o.once("close",(function(){e?r(e):t({value:void 0,done:!0})}))}))}}}function h(){}function p(e){return(e&=511)&&512-e}e.exports=function(e){return new d(e)}},e=>{e.exports="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e)},e=>{e.exports=class{constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){const e=this.buffer[this.btm];if(void 0!==e)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}}},e=>{function t(e){return e.length}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r},write:function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);for(let t=0;t<o;t++)e[n+t]=r.charCodeAt(t);return o}}},e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256);for(let e=0;e<64;e++)r[t.charCodeAt(e)]=e;function n(e){let t=e.length;return 61===e.charCodeAt(t-1)&&t--,t>1&&61===e.charCodeAt(t-1)&&t--,3*t>>>2}r[45]=62,r[95]=63,e.exports={byteLength:n,toString:function(e){const r=e.byteLength;let n="";for(let i=0;i<r;i+=3)n+=t[e[i]>>2]+t[(3&e[i])<<4|e[i+1]>>4]+t[(15&e[i+1])<<2|e[i+2]>>6]+t[63&e[i+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n},write:function(e,t,i=0,o=n(t)){const a=Math.min(o,e.byteLength-i);for(let n=0,i=0;i<a;n+=4){const o=r[t.charCodeAt(n)],a=r[t.charCodeAt(n+1)],s=r[t.charCodeAt(n+2)],l=r[t.charCodeAt(n+3)];e[i++]=o<<2|a>>4,e[i++]=(15&a)<<4|s>>2,e[i++]=(3&s)<<6|63&l}return a}}},e=>{function t(e){return e.length>>>1}function r(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:void 0}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;e=new DataView(e.buffer,e.byteOffset,t);let r="",n=0;for(let i=t-t%4;n<i;n+=4)r+=e.getUint32(n).toString(16).padStart(8,"0");for(;n<t;n++)r+=e.getUint8(n).toString(16).padStart(2,"0");return r},write:function(e,n,i=0,o=t(n)){const a=Math.min(o,e.byteLength-i);for(let t=0;t<a;t++){const o=r(n.charCodeAt(2*t)),a=r(n.charCodeAt(2*t+1));if(void 0===o||void 0===a)return e.subarray(0,t);e[i+t]=o<<4|a}return a}}},e=>{function t(e){let t=0;for(let r=0,n=e.length;r<n;r++){const i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){const n=e.charCodeAt(r+1);if(n>=56320&&n<=57343){t+=4,r++;continue}}t+=i<=127?1:i<=2047?2:3}return t}let r,n;if("undefined"!=typeof TextDecoder){const e=new TextDecoder;r=function(t){return e.decode(t)}}else r=function(e){const t=e.byteLength;let r="",n=0;for(;n<t;){let i=e[n];if(i<=127){r+=String.fromCharCode(i),n++;continue}let o=0,a=0;if(i<=223?(o=1,a=31&i):i<=239?(o=2,a=15&i):i<=244&&(o=3,a=7&i),t-n-o>0){let t=0;for(;t<o;)i=e[n+t+1],a=a<<6|63&i,t+=1}else a=65533,o=t-n;r+=String.fromCodePoint(a),n+=o+1}return r};if("undefined"!=typeof TextEncoder){const e=new TextEncoder;n=function(r,n,i=0,o=t(n)){const a=Math.min(o,r.byteLength-i);return e.encodeInto(n,r.subarray(i,i+a)),a}}else n=function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);e=e.subarray(n,n+o);let a=0,s=0;for(;a<r.length;){const t=r.codePointAt(a);if(t<=127){e[s++]=t,a++;continue}let n=0,i=0;for(t<=2047?(n=6,i=192):t<=65535?(n=12,i=224):t<=2097151&&(n=18,i=240),e[s++]=i|t>>n,n-=6;n>=0;)e[s++]=128|t>>n&63,n-=6;a+=t>=65536?2:1}return o};e.exports={byteLength:t,toString:r,write:n}},e=>{function t(e){return 2*e.length}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;let r="";for(let n=0;n<t-1;n+=2)r+=String.fromCharCode(e[n]+256*e[n+1]);return r},write:function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);let a=o;for(let t=0;t<r.length&&!((a-=2)<0);++t){const i=r.charCodeAt(t),o=i>>8,a=i%256;e[n+2*t]=a,e[n+2*t+1]=o}return o}}},(e,t,r)=>{const n=r(55),i="0".charCodeAt(0),o=n.from([117,115,116,97,114,0]),a=n.from([i,i]),s=n.from([117,115,116,97,114,32]),l=n.from([32,0]),u=257,c=263;function f(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n}function d(e){let t=256;for(let r=0;r<148;r++)t+=e[r];for(let r=156;r<512;r++)t+=e[r];return t}function h(e,t){return(e=e.toString(8)).length>t?"7777777777777777777".slice(0,t)+" ":"0000000000000000000".slice(0,t-e.length)+e+" "}function p(e,t,r){if(128&(e=e.subarray(t,t+r))[t=0])return function(e){let t;if(128===e[0])t=!0;else{if(255!==e[0])return null;t=!1}const r=[];let n;for(n=e.length-1;n>0;n--){const i=e[n];t?r.push(i):r.push(255-i)}let i=0;const o=r.length;for(n=0;n<o;n++)i+=r[n]*Math.pow(256,n);return t?i:-1*i}(e);{for(;t<e.length&&32===e[t];)t++;const r=(i=f(e,32,t,e.length),o=e.length,a=e.length,"number"!=typeof i?a:(i=~~i)>=o?o:i>=0||(i+=o)>=0?i:0);for(;t<r&&0===e[t];)t++;return r===t?0:parseInt(n.toString(e.subarray(t,r)),8)}var i,o,a}function _(e,t,r,i){return n.toString(e.subarray(t,f(e,0,t,t+r)),i)}function b(e){const t=n.byteLength(e);let r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e}t.decodeLongPath=function(e,t){return _(e,0,e.length,t)},t.encodePax=function(e){let t="";e.name&&(t+=b(" path="+e.name+"\n")),e.linkname&&(t+=b(" linkpath="+e.linkname+"\n"));const r=e.pax;if(r)for(const e in r)t+=b(" "+e+"="+r[e]+"\n");return n.from(t)},t.decodePax=function(e){const t={};for(;e.length;){let r=0;for(;r<e.length&&32!==e[r];)r++;const i=parseInt(n.toString(e.subarray(0,r)),10);if(!i)return t;const o=n.toString(e.subarray(r+1,i-1)),a=o.indexOf("=");if(-1===a)return t;t[o.slice(0,a)]=o.slice(a+1),e=e.subarray(i)}return t},t.encode=function(e){const t=n.alloc(512);let r=e.name,s="";if(5===e.typeflag&&"/"!==r[r.length-1]&&(r+="/"),n.byteLength(r)!==r.length)return null;for(;n.byteLength(r)>100;){const e=r.indexOf("/");if(-1===e)return null;s+=s?"/"+r.slice(0,e):r.slice(0,e),r=r.slice(e+1)}return n.byteLength(r)>100||n.byteLength(s)>155||e.linkname&&n.byteLength(e.linkname)>100?null:(n.write(t,r),n.write(t,h(4095&e.mode,6),100),n.write(t,h(e.uid,6),108),n.write(t,h(e.gid,6),116),function(e,t,r){e.toString(8).length>11?function(e,t,r){t[r]=128;for(let n=11;n>0;n--)t[r+n]=255&e,e=Math.floor(e/256)}(e,t,r):n.write(t,h(e,11),r)}(e.size,t,124),n.write(t,h(e.mtime.getTime()/1e3|0,11),136),t[156]=i+function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(e.type),e.linkname&&n.write(t,e.linkname,157),n.copy(o,t,u),n.copy(a,t,263),e.uname&&n.write(t,e.uname,265),e.gname&&n.write(t,e.gname,297),n.write(t,h(e.devmajor||0,6),329),n.write(t,h(e.devminor||0,6),337),s&&n.write(t,s,345),n.write(t,h(d(t),6),148),t)},t.decode=function(e,t,r){let a=0===e[156]?0:e[156]-i,f=_(e,0,100,t);const h=p(e,100,8),b=p(e,108,8),y=p(e,116,8),m=p(e,124,12),g=p(e,136,12),v=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(a),w=0===e[157]?null:_(e,157,100,t),S=_(e,265,32),E=_(e,297,32),x=p(e,329,8),A=p(e,337,8),O=d(e);if(256===O)return null;if(O!==p(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(function(e){return n.equals(o,e.subarray(u,263))}(e))e[345]&&(f=_(e,345,155,t)+"/"+f);else if(function(e){return n.equals(s,e.subarray(u,263))&&n.equals(l,e.subarray(c,265))}(e));else if(!r)throw new Error("Invalid tar header: unknown format.");return 0===a&&f&&"/"===f[f.length-1]&&(a=5),{name:f,mode:h,uid:b,gid:y,size:m,mtime:new Date(1e3*g),type:v,linkname:w,uname:S,gname:E,devmajor:x,devminor:A,pax:null}}},(e,t,r)=>{const{Readable:n,Writable:i,getStreamError:o}=r(102),a=r(55),s=r(121),l=r(145),u=a.alloc(1024);class c extends i{constructor(e,t,r){super({mapWritable:p,eagerOpen:!0}),this.written=0,this.header=t,this._callback=r,this._linkname=null,this._isLinkname="symlink"===t.type&&!t.linkname,this._isVoid="file"!==t.type&&"contiguous-file"!==t.type,this._finished=!1,this._pack=e,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(null===this._callback)return;const t=this._callback;this._callback=null,t(e)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);const e=this._openCallback;if(this._openCallback=null,null!==e){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){return this._isLinkname?(this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null)):this._isVoid?e.byteLength>0?t(new Error("No body allowed for this entry")):t():(this.written+=e.byteLength,this._pack.push(e)?t():void(this._pack._drain=t))}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),h(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return o(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}}class f extends n{constructor(e){super(e),this._drain=d,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");"function"==typeof t&&(r=t,t=null),r||(r=d),e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=function(e){switch(e&s.S_IFMT){case s.S_IFBLK:return"block-device";case s.S_IFCHR:return"character-device";case s.S_IFDIR:return"directory";case s.S_IFIFO:return"fifo";case s.S_IFLNK:return"symlink"}return"file"}(e.mode)),e.mode||(e.mode="directory"===e.type?493:420),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof t&&(t=a.from(t));const n=new c(this,e,r);return a.isBuffer(t)?(e.size=t.byteLength,n.write(t),n.end(),n):(n._isVoid,n)}finalize(){this._stream||this._pending.length>0?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(u),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){const t=l.encode(e);if(t)return void this.push(t)}this._encodePax(e)}_encodePax(e){const t=l.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(l.encode(r)),this.push(t),h(this,t.byteLength),r.size=e.size,r.type=e.type,this.push(l.encode(r))}_doDrain(){const e=this._drain;this._drain=d,e()}_predestroy(){const e=o(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){const t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}}function d(){}function h(e,t){(t&=511)&&e.push(u.subarray(0,512-t))}function p(e){return a.isBuffer(e)?e:a.from(e)}e.exports=function(e){return new f(e)}},(e,t,r)=>{const n=r(16);function i(){if(!(this instanceof i))return new i;n.Transform.call(this)}r(24).inherits(i,n.Transform),i.prototype._transform=function(e,t,r){r()},e.exports=i},(e,t,r)=>{const n=r(16),i=r(65),o=r(104),a=r(67);e.exports=function(e,t){const r=n.PassThrough({objectMode:!0}),s=n.PassThrough(),l=n.Transform({objectMode:!0}),u=e instanceof RegExp?e:e&&new RegExp(e);let c;l._transform=function(e,t,r){if(c||u&&!u.exec(e.path))return e.autodrain(),r();c=!0,f.emit("entry",e),e.on("error",(function(e){s.emit("error",e)})),e.pipe(s).on("error",(function(e){r(e)})).on("finish",(function(e){r(null,e)}))},r.pipe(i(t)).on("error",(function(e){s.emit("error",e)})).pipe(l).on("error",Object).on("finish",(function(){c?s.end():s.emit("error",new Error("PATTERN_NOT_FOUND"))}));const f=o(r,s);return f.buffer=function(){return a(s)},f}},(e,t,r)=>{e.exports=function(e){e.path=o.resolve(o.normalize(e.path));const t=new n(e),r=new a.Writable({objectMode:!0});r._write=async function(t,r,n){const a=o.join(e.path,t.path.replace(/\\/g,"/"));if(0!=a.indexOf(e.path))return n();if("Directory"==t.type)return await i.ensureDir(a),n();await i.ensureDir(o.dirname(a));const s=e.getWriter?e.getWriter({path:a}):i.createWriteStream(a);t.pipe(s).on("error",n).on("close",n)};const l=s(t,r);return t.once("crx-header",(function(e){l.crxHeader=e})),t.pipe(r).on("finish",(function(){l.emit("close")})),l.promise=function(){return new Promise((function(e,t){l.on("close",e),l.on("error",t)}))},l};const n=r(65),i=r(105),o=r(6),a=r(16),s=r(104)},(e,t,r)=>{var n=r(188),i=process.cwd,o=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return o||(o=i.call(process)),o};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var s=process.chdir;process.chdir=function(e){o=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}e.exports=function(e){n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?i&&i(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,r){var i,o=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0;try{i=e.fchmodSync(o,r),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}}(e);e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,(function(t,n){t?o&&o(t):e.futimes(n,r,i,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lutimesSync=function(t,r,i){var o,a=e.openSync(t,n.O_SYMLINK),s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===a&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(l){if(l&&("EACCES"===l.code||"EPERM"===l.code||"EBUSY"===l.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(l)}))}),a),void(a<100&&(a+=10));i&&i(l)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){u(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!u(e))throw e}}:t}function i(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){u(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function o(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!u(e))throw e}}:t}function s(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function l(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function u(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var l;if(s&&"function"==typeof s){var u=0;l=function(c,f,d){if(c&&"EAGAIN"===c.code&&u<10)return u++,t.call(e,r,n,i,o,a,l);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,l)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c}},(e,t,r)=>{var n=r(16).Stream;e.exports=function(e){return{ReadStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var o=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var a=Object.keys(i),s=0,l=a.length;s<l;s++){var u=a[s];this[u]=i[u]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){o._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()}))},WriteStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var l=o[a];this[l]=i[l]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},e=>{e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})),r};var t=Object.getPrototypeOf||function(e){return e.__proto__}},(e,t,r)=>{const n=r(8),i=r(6),{mkdirs:o}=r(17),{pathExists:a}=r(28),{utimesMillis:s}=r(106),l=r(33);async function u(e,t,r){return!r.filter||r.filter(e,t)}async function c(e,t,r,o){const a=o.dereference?n.stat:n.lstat,s=await a(t);if(s.isDirectory())return async function(e,t,r,o,a){t||await n.mkdir(o);const s=await n.readdir(r);await Promise.all(s.map((async e=>{const t=i.join(r,e),n=i.join(o,e);if(!await u(t,n,a))return;const{destStat:s}=await l.checkPaths(t,n,"copy",a);return c(s,t,n,a)}))),t||await n.chmod(o,e.mode)}(s,e,t,r,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return async function(e,t,r,i,o){if(!t)return f(e,r,i,o);if(o.overwrite)return await n.unlink(i),f(e,r,i,o);if(o.errorOnExist)throw new Error(`'${i}' already exists`)}(s,e,t,r,o);if(s.isSymbolicLink())return async function(e,t,r,o){let a=await n.readlink(t);o.dereference&&(a=i.resolve(process.cwd(),a));if(!e)return n.symlink(a,r);let s=null;try{s=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(a,r);throw e}o.dereference&&(s=i.resolve(process.cwd(),s));if(l.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(l.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await n.unlink(r),n.symlink(a,r)}(e,t,r,o);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await s(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:s}=await l.checkPaths(e,t,"copy",r);if(await l.checkParentPaths(e,n,t,"copy"),!await u(e,t,r))return;const f=i.dirname(t);await a(f)||await o(f),await c(s,e,t,r)}},(e,t,r)=>{const n=r(29),i=r(6),o=r(17).mkdirsSync,a=r(106).utimesMillisSync,s=r(33);function l(e,t,r,o){const a=(o.dereference?n.statSync:n.lstatSync)(t);if(a.isDirectory())return function(e,t,r,i,o){return t?f(r,i,o):function(e,t,r,i){return n.mkdirSync(r),f(t,r,i),c(r,e)}(e.mode,r,i,o)}(a,e,t,r,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return function(e,t,r,i,o){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),u(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,o):u(e,r,i,o)}(a,e,t,r,o);if(a.isSymbolicLink())return function(e,t,r,o){let a=n.readlinkSync(t);o.dereference&&(a=i.resolve(process.cwd(),a));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(a,r);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),s.isSrcSubdir(a,e))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${e}'.`);if(s.isSrcSubdir(e,a))throw new Error(`Cannot overwrite '${e}' with '${a}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(a,r)}return n.symlinkSync(a,r)}(e,t,r,o);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function u(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){c(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);a(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),c(r,e.mode)}function c(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const o=i.join(t,e),a=i.join(r,e);if(n.filter&&!n.filter(o,a))return;const{destStat:u}=s.checkPathsSync(o,a,"copy",n);return l(u,o,a,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:a,destStat:u}=s.checkPathsSync(e,t,"copy",r);if(s.checkParentPathsSync(e,a,t,"copy"),r.filter&&!r.filter(e,t))return;const c=i.dirname(t);return n.existsSync(c)||o(c),l(u,e,t,r)}},(e,t,r)=>{const n=r(5).fromPromise,i=r(8),o=r(6),a=r(17),s=r(53),l=n((async function(e){let t;try{t=await i.readdir(e)}catch{return a.mkdirs(e)}return Promise.all(t.map((t=>s.remove(o.join(e,t)))))}));function u(e){let t;try{t=i.readdirSync(e)}catch{return a.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t),s.removeSync(t)}))}e.exports={emptyDirSync:u,emptydirSync:u,emptyDir:l,emptydir:l}},(e,t,r)=>{const{createFile:n,createFileSync:i}=r(157),{createLink:o,createLinkSync:a}=r(158),{createSymlink:s,createSymlinkSync:l}=r(159);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:o,createLinkSync:a,ensureLink:o,ensureLinkSync:a,createSymlink:s,createSymlinkSync:l,ensureSymlink:s,ensureSymlinkSync:l}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),a=r(17);e.exports={createFile:n((async function(e){let t;try{t=await o.stat(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);let n=null;try{n=await o.stat(r)}catch(t){if("ENOENT"===t.code)return await a.mkdirs(r),void await o.writeFile(e,"");throw t}n.isDirectory()?await o.writeFile(e,""):await o.readdir(r)})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{o.statSync(r).isDirectory()||o.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;a.mkdirsSync(r)}o.writeFileSync(e,"")}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),a=r(17),{pathExists:s}=r(28),{areIdentical:l}=r(33);e.exports={createLink:n((async function(e,t){let r,n;try{r=await o.lstat(t)}catch{}try{n=await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&l(n,r))return;const u=i.dirname(t);await s(u)||await a.mkdirs(u),await o.link(e,t)})),createLinkSync:function(e,t){let r;try{r=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(r&&l(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return o.existsSync(n)||a.mkdirsSync(n),o.linkSync(e,t)}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),{mkdirs:a,mkdirsSync:s}=r(17),{symlinkPaths:l,symlinkPathsSync:u}=r(160),{symlinkType:c,symlinkTypeSync:f}=r(161),{pathExists:d}=r(28),{areIdentical:h}=r(33);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await o.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([o.stat(e),o.stat(t)]);if(h(r,n))return}const s=await l(e,t);e=s.toDst;const u=await c(s.toCwd,r),f=i.dirname(t);return await d(f)||await a(f),o.symlink(e,t,u)})),createSymlinkSync:function(e,t,r){let n;try{n=o.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=o.statSync(e),n=o.statSync(t);if(h(r,n))return}const a=u(e,t);e=a.toDst,r=f(a.toCwd,r);const l=i.dirname(t);return o.existsSync(l)||s(l),o.symlinkSync(e,t,r)}}},(e,t,r)=>{const n=r(6),i=r(8),{pathExists:o}=r(28),a=r(5).fromPromise;e.exports={symlinkPaths:a((async function(e,t){if(n.isAbsolute(e)){try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),a=n.join(r,e);if(await o(a))return{toCwd:a,toDst:e};try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!i.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),o=n.join(r,e);if(i.existsSync(o))return{toCwd:o,toDst:e};if(!i.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},(e,t,r)=>{const n=r(8),i=r(5).fromPromise;e.exports={symlinkType:i((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(163);i.outputJson=n(r(165)),i.outputJsonSync=r(166),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},(e,t,r)=>{const n=r(164);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},(e,t,r)=>{let n;try{n=r(29)}catch(e){n=r(39)}const i=r(5),{stringify:o,stripBom:a}=r(71);const s={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;let s,l=await i.fromCallback(r.readFile)(e,t);l=a(l);try{s=JSON.parse(l,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return s})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=a(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const a=r.fs||n,s=o(t,r);await i.fromCallback(a.writeFile)(e,s,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,a=o(t,r);return i.writeFileSync(e,a,r)}};e.exports=s},(e,t,r)=>{const{stringify:n}=r(71),{outputFile:i}=r(72);e.exports=async function(e,t,r={}){const o=n(t,r);await i(e,o,r)}},(e,t,r)=>{const{stringify:n}=r(71),{outputFileSync:i}=r(72);e.exports=function(e,t,r){const o=n(t,r);i(e,o,r)}},(e,t,r)=>{const n=r(5).fromPromise;e.exports={move:n(r(168)),moveSync:r(169)}},(e,t,r)=>{const n=r(8),i=r(6),{copy:o}=r(70),{remove:a}=r(53),{mkdirp:s}=r(17),{pathExists:l}=r(28),u=r(33);e.exports=async function(e,t,r={}){const c=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:d=!1}=await u.checkPaths(e,t,"move",r);await u.checkParentPaths(e,f,t,"move");const h=i.dirname(t);return i.parse(h).root!==h&&await s(h),async function(e,t,r,i){if(!i)if(r)await a(t);else if(await l(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await o(e,t,n),a(e)}(e,t,r)}}(e,t,c,d)}},(e,t,r)=>{const n=r(29),i=r(6),o=r(70).copySync,a=r(53).removeSync,s=r(17).mkdirpSync,l=r(33);function u(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return o(e,t,n),a(e)}(e,t,r)}}e.exports=function(e,t,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:c,isChangingCase:f=!1}=l.checkPathsSync(e,t,"move",r);return l.checkParentPathsSync(e,c,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||s(i.dirname(t)),function(e,t,r,i){if(i)return u(e,t,r);if(r)return a(t),u(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return u(e,t,r)}(e,t,o,f)}},(e,t,r)=>{const n=r(29),i=r(171),o=r(16);e.exports={buffer:function(e,t){return i({stream:function(t,r){const n=o.PassThrough(),i=r?t+r:void 0;return n.end(e.slice(t,i)),n},size:function(){return Promise.resolve(e.length)}},t)},file:function(e,t){return i({stream:function(t,r){const i=r?t+r:void 0;return n.createReadStream(e,{start:t,end:i})},size:function(){return new Promise((function(t,r){n.stat(e,(function(e,n){e?r(e):t(n.size)}))}))}},t)},url:function(e,t,r){if("string"==typeof t&&(t={url:t}),!t.url)throw"URL missing";t.headers=t.headers||{};const n={stream:function(r,n){const i=Object.create(t),o=n?r+n:"";return i.headers=Object.create(t.headers),i.headers.range="bytes="+r+"-"+o,e(i)},size:function(){return new Promise((function(r,n){const i=e(t);i.on("response",(function(e){i.abort(),e.headers["content-length"]?r(e.headers["content-length"]):n(new Error("Missing content length header"))})).on("error",n)}))}};return i(n,r)},s3:function(e,t,r){return i({size:function(){return new Promise((function(r,n){e.headObject(t,(function(e,t){e?n(e):r(t.ContentLength)}))}))},stream:function(r,n){const i={};for(const e in t)i[e]=t[e];const o=n?r+n:"";return i.Range="bytes="+r+"-"+o,e.getObject(i).createReadStream()}},r)},s3_v3:function(e,t,n){const{GetObjectCommand:a,HeadObjectCommand:s}=r(192);return i({size:async()=>{const r=await e.send(new s({Bucket:t.Bucket,Key:t.Key}));return r.ContentLength?r.ContentLength:0},stream:(r,n)=>{const i=o.PassThrough(),s=n?r+n:"";return e.send(new a({Bucket:t.Bucket,Key:t.Key,Range:`bytes=${r}-${s}`})).then((e=>{e.Body.pipe(i)})).catch((e=>{i.emit("error",e)})),i}},n)},custom:function(e,t){return i(e,t)}}},(e,t,r)=>{const n=r(66),i=r(172),o=r(67),a=r(68),s=r(6),l=r(105),u=r(69),c=r(52),f=r(175),d=Buffer.alloc(4);d.writeUInt32LE(101010256,0),e.exports=function(e,t){const r=n(),h=n(),p=t&&t.tailSize||80;let _,b,y,m;return t&&t.crx&&(b=function(e){const t=e.stream(0).pipe(n());return t.pull(4).then((function(e){if(875721283===e.readUInt32LE(0)){let e;return t.pull(12).then((function(t){e=c.parse(t,[["version",4],["pubKeyLength",4],["signatureLength",4]])})).then((function(){return t.pull(e.pubKeyLength+e.signatureLength)})).then((function(t){return e.publicKey=t.slice(0,e.pubKeyLength),e.signature=t.slice(e.pubKeyLength),e.size=16+e.pubKeyLength+e.signatureLength,e}))}}))}(e)),e.size().then((function(t){return _=t,e.stream(Math.max(0,t-p)).on("error",(function(e){r.emit("error",e)})).pipe(r),r.pull(d)})).then((function(){return f.props({directory:r.pull(22),crxHeader:b})})).then((function(t){const i=t.directory;if(y=t.crxHeader&&t.crxHeader.size||0,m=c.parse(i,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),65535==m.diskNumber||65535==m.numberOfRecords||4294967295==m.offsetToStartOfCentralDirectory){const t=20,i=_-(p-r.match+t),o=n();return e.stream(i).pipe(o),o.pull(t).then((function(t){return function(e,t){const r=c.parse(t,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(117853008!=r.signature)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16));const i=n();return e.stream(r.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}(e,t)})).then((function(e){m=function(e){const t=c.parse(e,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(101075792!=t.signature)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16));return t}(e)}))}m.offsetToStartOfCentralDirectory+=y})).then((function(){if(m.commentLength)return r.pull(m.commentLength).then((function(e){m.comment=e.toString("utf8")}))})).then((function(){return e.stream(m.offsetToStartOfCentralDirectory).pipe(h),m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return e.path=s.resolve(s.normalize(e.path)),m.files.then((function(t){return f.map(t,(async function(t){const r=s.join(e.path,t.path);if(0!=r.indexOf(e.path))return;if("Directory"==t.type)return void await l.ensureDir(r);await l.ensureDir(s.dirname(r));const n=e.getWriter?e.getWriter({path:r}):l.createWriteStream(r);return new Promise((function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)}))}),{concurrency:e.concurrency>1?e.concurrency:1})}))},m.files=f.mapSeries(Array(m.numberOfRecords),(function(){return h.pull(46).then((function(r){const n=c.parse(r,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return n.offsetToLocalFileHeader+=y,n.lastModifiedDateTime=u(n.lastModifiedDate,n.lastModifiedTime),h.pull(n.fileNameLength).then((function(e){return n.pathBuffer=e,n.path=e.toString("utf8"),n.isUnicode=!!(2048&n.flags),h.pull(n.extraFieldLength)})).then((function(e){return n.extra=a(e,n),h.pull(n.fileCommentLength)})).then((function(r){n.comment=r,n.type=0===n.uncompressedSize&&/[/\\]$/.test(n.path)?"Directory":"File";const a=t&&t.padding||1e3;return n.stream=function(t){const r=30+a+(n.extraFieldLength||0)+(n.fileNameLength||0)+n.compressedSize;return i(e,n.offsetToLocalFileHeader,t,n,r)},n.buffer=function(e){return o(n.stream(e))},n}))}))})),f.props(m)}))}},(e,t,r)=>{const n=r(173),i=r(66),o=r(16),a=r(80),s=r(68),l=r(69),u=r(52);e.exports=function(e,t,r,c,f){const d=i(),h=o.PassThrough(),p=e.stream(t,f);return p.pipe(d).on("error",(function(e){h.emit("error",e)})),h.vars=d.pull(30).then((function(e){let t=u.parse(e,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return t.lastModifiedDateTime=l(t.lastModifiedDate,t.lastModifiedTime),d.pull(t.fileNameLength).then((function(e){return t.fileName=e.toString("utf8"),d.pull(t.extraFieldLength)})).then((function(e){let i;return t.extra=s(e,t),c&&c.compressedSize&&(t=c),1&t.flags&&(i=d.pull(12).then((function(e){if(!r)throw new Error("MISSING_PASSWORD");const i=n();String(r).split("").forEach((function(e){i.update(e)}));for(let t=0;t<e.length;t++)e[t]=i.decryptByte(e[t]);t.decrypt=i,t.compressedSize-=12;const o=8&t.flags?t.lastModifiedTime>>8&255:t.crc32>>24&255;if(e[11]!==o)throw new Error("BAD_PASSWORD");return t}))),Promise.resolve(i).then((function(){return h.emit("vars",t),t}))}))})),h.vars.then((function(e){const t=!(8&e.flags)||e.compressedSize>0;let r;const n=e.compressionMethod?a.createInflateRaw():o.PassThrough();t?(h.size=e.uncompressedSize,r=e.compressedSize):(r=Buffer.alloc(4),r.writeUInt32LE(134695760,0));let i=d.stream(r);e.decrypt&&(i=i.pipe(e.decrypt.stream())),i.pipe(n).on("error",(function(e){h.emit("error",e)})).pipe(h).on("finish",(function(){p.destroy?p.destroy():p.abort?p.abort():p.close?p.close():p.push?p.push():console.log("warning - unable to close stream")}))})).catch((function(e){h.emit("error",e)})),h}},(e,t,r)=>{const n=r(174);let i,o=r(16);function a(e,t){i||function(){let e,t,r;for(i=[],t=0;t<256;t++){for(e=t,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>=1;i[t]=e>>>0}}(),e.charCodeAt&&(e=e.charCodeAt(0));return(t.readUInt32BE()>>8&16777215^i[255&(t.readUInt32BE()^e>>>0)])>>>0}function s(e,t){const r=65535&e,n=65535&t;return(((e>>16&65535)*n+r*(t>>16&65535)&65535)<<16>>>0)+r*n}function l(){if(!(this instanceof l))return new l;this.key0=Buffer.allocUnsafe(4),this.key1=Buffer.allocUnsafe(4),this.key2=Buffer.allocUnsafe(4),this.key0.writeUInt32BE(305419896,0),this.key1.writeUInt32BE(591751049,0),this.key2.writeUInt32BE(878082192,0)}o.Writable&&o.Writable.prototype.destroy||(o=r(54)),l.prototype.update=function(e){this.key0.writeUInt32BE(a(e,this.key0)),this.key1.writeUInt32BE((255&this.key0.readUInt32BE())+this.key1.readUInt32BE()>>>0);const t=new n(s(this.key1.readUInt32BE(),134775813)+1&4294967295),r=Buffer.alloc(8);t.copy(r,0),r.copy(this.key1,0,4,8),this.key2.writeUInt32BE(a((this.key1.readUInt32BE()>>24&255)>>>0,this.key2))},l.prototype.decryptByte=function(e){const t=(2|this.key2.readUInt32BE())>>>0;return e^=s(t,1^t)>>8&255,this.update(e),e},l.prototype.stream=function(){const e=o.Transform(),t=this;return e._transform=function(e,r,n){for(let r=0;r<e.length;r++)e[r]=t.decryptByte(e[r]);this.push(e),n()},e},e.exports=l},e=>{for(var t=4294967296,r=[],n=0;n<256;n++)r[n]=(n>15?"":"0")+n.toString(16);var i=e.exports=function(e,t){e instanceof Buffer?(this.buffer=e,this.offset=t||0):"[object Uint8Array]"==Object.prototype.toString.call(e)?(this.buffer=new Buffer(e),this.offset=t||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};i.MAX_INT=Math.pow(2,53),i.MIN_INT=-Math.pow(2,53),i.prototype={constructor:i,_2scomp:function(){for(var e=this.buffer,t=this.offset,r=1,n=t+7;n>=t;n--){var i=(255^e[n])+r;e[n]=255&i,r=i>>8}},setValue:function(e,r){var n=!1;if(1==arguments.length)if("number"==typeof e){if(n=e<0,r=(e=Math.abs(e))%t,(e/=t)>t)throw new RangeError(e+" is outside Int64 range");e|=0}else{if("string"!=typeof e)throw new Error(e+" must be a Number or String");r=(e=(e+"").replace(/^0x/,"")).substr(-8),e=e.length>8?e.substr(0,e.length-8):"",e=parseInt(e,16),r=parseInt(r,16)}for(var i=this.buffer,o=this.offset,a=7;a>=0;a--)i[o+a]=255&r,r=4==a?e:r>>>8;n&&this._2scomp()},toNumber:function(e){for(var t=this.buffer,r=this.offset,n=128&t[r],o=0,a=1,s=7,l=1;s>=0;s--,l*=256){var u=t[r+s];n&&(a=(u=(255^u)+a)>>8,u&=255),o+=u*l}return!e&&o>=i.MAX_INT?n?-1/0:1/0:n?-o:o},valueOf:function(){return this.toNumber(!1)},toString:function(e){return this.valueOf().toString(e||10)},toOctetString:function(e){for(var t=new Array(8),n=this.buffer,i=this.offset,o=0;o<8;o++)t[o]=r[n[i+o]];return t.join(e||"")},toBuffer:function(e){if(e&&0===this.offset)return this.buffer;var t=new Buffer(8);return this.buffer.copy(t,0,this.offset,this.offset+8),t},copy:function(e,t){this.buffer.copy(e,t||0,this.offset,this.offset+8)},compare:function(e){if((128&this.buffer[this.offset])!=(128&e.buffer[e.offset]))return e.buffer[e.offset]-this.buffer[this.offset];for(var t=0;t<8;t++)if(this.buffer[this.offset+t]!==e.buffer[e.offset+t])return this.buffer[this.offset+t]-e.buffer[e.offset+t];return 0},equals:function(e){return 0===this.compare(e)},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}},(e,t,r)=>{e.exports=function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){var r=t[a][1][e];return i(r||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){var n;try{throw new Error}catch(e){n=e}var i=e("./schedule"),o=e("./queue");function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function s(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function u(e){this._normalQueue._pushOne(e),this._queueTick()}function c(e){for(;e.length()>0;)f(e)}function f(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}a.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},a.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.prototype.invokeLater=s,a.prototype.invoke=l,a.prototype.settlePromises=u,a.prototype._drainQueues=function(){c(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,c(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,t.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(e,t,r){t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var u=r(o),c=new e(t);c._propagateFrom(this,1);var f=this._target();if(c._setBoundTo(u),u instanceof e){var d={promiseRejectionQueued:!1,promise:c,target:f,bindingPromise:u};f._then(t,a,void 0,c,d),u._then(s,l,void 0,c,d),c._setOnCancel(u)}else c._resolveCallback(f);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(e){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=e("./promise")();o.noConflict=i,t.exports=o},{"./promise":22}],5:[function(e,t,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var r,n=e("./util"),i=n.canEvaluate;function o(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function a(e){return o(e,this.pop()).apply(e,this)}function s(e){return e[this]}function l(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(a,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=l;else if(i){var n=r(e);t=null!==n?n:s}else t=s;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=a(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),l.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),l.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=e("./es5").keys,i=r.tryCatch,o=r.errorObj;function a(e,a,s){return function(l){var u=s._boundValue();e:for(var c=0;c<e.length;++c){var f=e[c];if(f===Error||null!=f&&f.prototype instanceof Error){if(l instanceof f)return i(a).call(u,l)}else if("function"==typeof f){var d=i(f).call(u,l);if(d===o)return d;if(d)return i(a).call(u,l)}else if(r.isObject(l)){for(var h=n(f),p=0;p<h.length;++p){var _=h[p];if(f[_]!=l[_])continue e}return i(a).call(u,l)}}return t}}return a}},{"./es5":13,"./util":36}],8:[function(e,t,r){t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(t)return new n}function o(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,i=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=i,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){t.exports=function(t,r,n,i){var o,a,s,l,u=t._async,c=e("./errors").Warning,f=e("./util"),d=e("./es5"),h=f.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,b=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,g=!1,v=!(0==f.env("BLUEBIRD_DEBUG")),w=!(0==f.env("BLUEBIRD_WARNINGS")||!v&&!f.env("BLUEBIRD_WARNINGS")),S=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!v&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}l=function(t){e.push(t),setTimeout(r,1)},d.defineProperty(t,"_unhandledRejectionCheck",{value:r}),d.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),l(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){ee("rejectionHandled",o,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),ee("unhandledRejection",a,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,r){return q(e,t,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=f.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();o=f.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(u.haveItemsQueued()&&!ce.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ce.longStackTraces&&ne()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;ce.longStackTraces=!0,x=function(){if(u.haveItemsQueued()&&!ce.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ce.longStackTraces=!1},t.prototype._captureStackTrace=B,t.prototype._attachExtraTrace=$,t.prototype._dereferenceTrace=z,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return ce.longStackTraces&&ne()};var A={unhandledrejection:{before:function(){var e=f.global.onunhandledrejection;return f.global.onunhandledrejection=null,e},after:function(e){f.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=f.global.onrejectionhandled;return f.global.onrejectionhandled=null,e},after:function(e){f.global.onrejectionhandled=e}}},O=function(){var e=function(e,t){if(!e)return!f.global.dispatchEvent(t);var r;try{return r=e.before(),!f.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return d.defineProperty(n,"promise",{value:r.promise}),d.defineProperty(n,"reason",{value:r.reason}),e(A[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,d.defineProperty(n,"promise",{value:r.promise}),d.defineProperty(n,"reason",{value:r.reason}),e(A[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(A[t],n)})}catch(e){}return function(){return!1}}(),R=f.isNode?function(){return process.emit.apply(process,arguments)}:f.global?function(e){var t="on"+e.toLowerCase(),r=f.global[t];return!!r&&(r.apply(f.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function T(e,t){return{promise:t}}var k={promiseCreated:T,promiseFulfilled:T,promiseRejected:T,promiseResolved:T,promiseCancelled:T,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:T},P=function(e){var t=!1;try{t=R.apply(null,arguments)}catch(e){u.throwLater(e),t=!0}var r=!1;try{r=O(e,k[e].apply(null,arguments))}catch(e){u.throwLater(e),r=!0}return r||t};function C(){return!1}function M(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+f.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function I(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?f.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function L(){return this._onCancelField}function D(e){this._onCancelField=e}function N(){this._cancellationParent=void 0,this._onCancelField=void 0}function j(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}function F(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;ce.warnings=!!r,E=ce.warnings,f.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ce.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=N,t.prototype._propagateFrom=j,t.prototype._onCancel=L,t.prototype._setOnCancel=D,t.prototype._attachCancellationCallback=I,t.prototype._execute=M,U=j,ce.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!ce.monitoring?(ce.monitoring=!0,t.prototype._fireEvent=P):!e.monitoring&&ce.monitoring&&(ce.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&f.nodeSupportsAsyncResource){var o=ce.asyncHooks,a=!!e.asyncHooks;o!==a&&(ce.asyncHooks=a,a?n():i())}return t},t.prototype._fireEvent=C,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var U=F;function W(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function B(){this._trace=new le(this._peekContext())}function $(e,t){if(h(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=J(e);f.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),f.notEnumerableProp(e,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function H(e,t,r,n,i){if(void 0===e&&null!==t&&E){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=Q(s),u=l.length-1;u>=0;--u){var c=l[u];if(!_.test(c)){var f=c.match(b);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(l.length>0){var d=l[0];for(u=0;u<s.length;++u)if(s[u]===d){u>0&&(a="\n"+s[u-1]);break}}}var h="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(h,!0,t)}}function V(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),q(r)}function q(e,r,n){if(ce.warnings){var i,o=new c(e);if(r)n._attachExtraTrace(o);else if(ce.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var a=J(o);o.stack=a.message+"\n"+a.stack.join("\n")}P("warning",o)||Z(o,"",!0)}}function G(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}function K(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}function Y(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,o=t[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(s=a;s>=0;--s){var l=n[s];if(t[i]!==l)break;t.pop(),i--}t=n}}function Q(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||y.test(n),o=i&&ie(n);i&&!o&&(g&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function X(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||y.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function J(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?X(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:Q(t)}}function Z(e,t,r){if("undefined"!=typeof console){var n;if(f.isObject(e)){var i=e.stack;n=t+m(i,e)}else n=t+String(e);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function ee(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){u.throwLater(e)}"unhandledRejection"===e?P(e,r,n)||i||Z(r,"Unhandled rejection "):P(e,n)}function te(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():f.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+re(t)+">, no stack trace)"}function re(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}function ne(){return"function"==typeof ue}var ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function ae(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function se(e,t){if(ne()){for(var r,n,i=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),a=-1,s=-1,l=0;l<i.length;++l)if(u=ae(i[l])){r=u.fileName,a=u.line;break}for(l=0;l<o.length;++l){var u;if(u=ae(o[l])){n=u.fileName,s=u.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(ie=function(e){if(p.test(e))return!0;var t=ae(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}}function le(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ue(this,le),t>32&&this.uncycle()}f.inherits(le,Error),r.CapturedTrace=le,le.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<e;++n){var a=r[t[n].stack];if(void 0!==a&&a!==n){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;a<e-1?(s._parent=t[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var l=s._length+1,u=n-2;u>=0;--u)t[u]._length=l,l++;return}}}},le.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=J(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(Q(i.stack.split("\n"))),i=i._parent;Y(n),K(n),f.notEnumerableProp(e,"stack",G(r,n)),f.notEnumerableProp(e,"__stackCleaned__",!0)}};var ue=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():te(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,m=t;var r=Error.captureStackTrace;return ie=function(e){return p.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=e,m=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(m=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?te(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(e){console.warn(e)},f.isNode&&process.stderr.isTTY?s=function(e,t){var r=t?"[33m":"[31m";console.warn(r+e+"[0m\n")}:f.isNode||"string"!=typeof(new Error).stack||(s=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ce={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return S&&t.longStackTraces(),{asyncHooks:function(){return ce.asyncHooks},longStackTraces:function(){return ce.longStackTraces},warnings:function(){return ce.warnings},cancellation:function(){return ce.cancellation},monitoring:function(){return ce.monitoring},propagateFromFunction:function(){return U},boundValueFunction:function(){return W},checkForgottenReturns:H,setBounds:se,warn:q,deprecated:V,CapturedTrace:le,fireDomEvent:O,fireGlobalEvent:R}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}function o(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=o}},{}],12:[function(e,t,r){var n,i,o=e("./es5"),a=o.freeze,s=e("./util"),l=s.inherits,u=s.notEnumerableProp;function c(e,t){function r(n){if(!(this instanceof r))return new r(n);u(this,"message","string"==typeof n?n:t),u(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}var f=c("Warning","warning"),d=c("CancellationError","cancellation error"),h=c("TimeoutError","timeout error"),p=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b<_.length;++b)"function"==typeof Array.prototype[_[b]]&&(p.prototype[_[b]]=Array.prototype[_[b]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(e){if(!(this instanceof m))return new m(e);u(this,"name","OperationalError"),u(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(u(this,"message",e.message),u(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=e+i[o];t+=(n=i.join("\n"))+"\n"}return y--,t},l(m,Error);var g=Error.__BluebirdErrorTypes__;g||(g=a({CancellationError:d,TimeoutError:h,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:i,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(e){var t=[];for(var r in e)i.call(e,r)&&t.push(r);return t},l=function(e,t){return{value:e[t]}},u=function(e,t,r){return e[t]=r.value,e},c=function(e){return e},f=function(e){try{return Object(e).constructor.prototype}catch(e){return a}},d=function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}};t.exports={isArray:d,keys:s,names:s,defineProperty:u,getDescriptor:l,freeze:c,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},{}],15:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.CancellationError,a=i.errorObj,s=e("./catch_filter")(n);function l(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function u(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return h.call(this,this.promise._target()._settledValue())}function d(e){if(!c(this,e))return a.e=e,a}function h(e){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),e);if(l===n)return l;if(void 0!==l){i._setReturnedNonUndefined();var h=r(l,i);if(h instanceof t){if(null!=this.cancelPromise){if(h._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),a.e=p,a}h.isPending()&&h._attachCancellationCallback(new u(this))}return h._then(f,d,void 0,this,void 0)}}}return i.isRejected()?(c(this),a.e=e,a):(c(this),e)}return l.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new l(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,h,h)},t.prototype.tap=function(e){return this._passThrough(e,1,h)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,h);var n,o=new Array(r-1),a=0;for(n=0;n<r-1;++n){var l=arguments[n];if(!i.isObject(l))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(l)));o[a++]=l}o.length=a;var u=arguments[n];return this._passThrough(s(o,u,this),1,void 0,h)},l}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./errors").TypeError,l=e("./util"),u=l.errorObj,c=l.tryCatch,f=[];function d(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=c(r[o])(e);if(n._popContext(),a===u){n._pushContext();var s=t.reject(u.e);return n._popContext(),s}var l=i(a,n);if(l instanceof t)return l}return null}function h(e,r,i,o){if(a.cancellation()){var s=new t(n),l=this._finallyPromise=new t(n);this._promise=s.lastly((function(){return l})),s._captureStackTrace(),s._setOnCancel(this)}else(this._promise=new t(n))._captureStackTrace();this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(h,o),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=c(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=c(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var r=this._promise;if(e===u)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=d(o,this._yieldHandlers,this._promise))){var a=(o=o._target())._bitField;50397184&a?33554432&a?t._async.invoke(this._promiseFulfilled,this,o._value()):16777216&a?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=h,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=t,o._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+l.classString(e));f.push(e)},t.spawn=function(e){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(e,this),i=n.promise();return n._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util");a.canEvaluate,a.tryCatch,a.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=s.tryCatch,u=s.errorObj,c=t._async;function f(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var l=0;l<e.length;++l){var u=e[l];u instanceof t&&u.suppressUnhandledRejections()}}function d(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+s.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(i.concurrency)));a=i.concurrency}return new f(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var f=this._promise,d=this._callback,h=f._boundValue();f._pushContext();var p=l(d).call(h,e,r,o),_=f._popContext();if(a.checkForgottenReturns(p,_,null!==s?"Promise.filter":"Promise.map",f),p===u)return this._reject(p.e),!0;var b=i(p,this._promise);if(b instanceof t){var y=(b=b._target())._bitField;if(!(50397184&y))return c>=1&&this._inFlight++,n[r]=b,b._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(b._reason()),!0):(this._cancel(),!0);p=b._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,o=0;o<r;++o)e[o]&&(n[i++]=t[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return d(this,e,t,null)},t.map=function(e,t,r,n){return d(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var i=s(e).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+a.classString(e));var n,l=new t(r);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];n=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else n=s(e)();var f=l._popContext();return o.checkForgottenReturns(n,f,"Promise.try",l),l._resolveFromSyncValue(n),l},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,a=e("./es5");function s(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}var l=/^(?:name|message|stack|cause)$/;function u(e){var t;if(s(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=a.keys(e),i=0;i<r.length;++i){var u=r[i];l.test(u)||(t[u]=e[u])}return t}return n.markAsOriginatingFromRejection(e),e}function c(e,t){return function(r,n){if(null!==e){if(r){var o=u(i(r));e._attachExtraTrace(o),e._reject(o)}else if(t){var a=[].slice.call(arguments,1);e._fulfill(a)}else e._fulfill(n);e=null}}}t.exports=c},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=t._async,i=r.tryCatch,o=r.errorObj;function a(e,t){var a=this;if(!r.isArray(e))return s.call(a,e,t);var l=i(t).apply(a._boundValue(),[null].concat(e));l===o&&n.throwLater(l.e)}function s(e,t){var r=this._boundValue(),a=void 0===e?i(t).call(r,null):i(t).call(r,null,e);a===o&&n.throwLater(a.e)}function l(e,t){var r=this;if(!e){var a=new Error(e+"");a.cause=e,e=a}var s=i(t).call(r._boundValue(),e);s===o&&n.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=s;void 0!==t&&Object(t).spread&&(r=a),this._then(r,l,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){t.exports=function(){var r=function(){return new v("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new N.PromiseInspection(this._target())},i=function(e){return N.reject(new v(e))};function o(){}var a={},s=e("./util");s.setReflectHandler(n);var l=function(){var e=process.domain;return void 0===e?null:e},u=function(){return null},c=function(){return{domain:l(),async:null}},f=s.isNode&&s.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,d=function(){return{domain:l(),async:new f("Bluebird::Promise")}},h=s.isNode?c:u;s.notEnumerableProp(N,"_getContext",h);var p=function(){h=d,s.notEnumerableProp(N,"_getContext",d)},_=function(){h=c,s.notEnumerableProp(N,"_getContext",c)},b=e("./es5"),y=e("./async"),m=new y;b.defineProperty(N,"_async",{value:m});var g=e("./errors"),v=N.TypeError=g.TypeError;N.RangeError=g.RangeError;var w=N.CancellationError=g.CancellationError;N.TimeoutError=g.TimeoutError,N.OperationalError=g.OperationalError,N.RejectionError=g.OperationalError,N.AggregateError=g.AggregateError;var S=function(){},E={},x={},A=e("./thenables")(N,S),O=e("./promise_array")(N,S,A,i,o),R=e("./context")(N),T=R.create,k=e("./debuggability")(N,R,p,_),P=(k.CapturedTrace,e("./finally")(N,A,x)),C=e("./catch_filter")(x),M=e("./nodeback"),I=s.errorObj,L=s.tryCatch;function D(e,t){if(null==e||e.constructor!==N)throw new v("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new v("expecting a function but got "+s.classString(t))}function N(e){e!==S&&D(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function j(e){this.promise._resolveCallback(e)}function F(e){this.promise._rejectCallback(e,!1)}function U(e){var t=new N(S);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return N.prototype.toString=function(){return"[object Promise]"},N.prototype.caught=N.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),o=0;for(r=0;r<t-1;++r){var a=arguments[r];if(!s.isObject(a))return i("Catch statement predicate: expecting an object but got "+s.classString(a));n[o++]=a}if(n.length=o,"function"!=typeof(e=arguments[r]))throw new v("The last argument to .catch() must be a function, got "+s.toString(e));return this.then(void 0,C(n,e,this))}return this.then(void 0,e)},N.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},N.prototype.then=function(e,t){if(k.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+s.classString(e);arguments.length>1&&(r+=", "+s.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},N.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},N.prototype.spread=function(e){return"function"!=typeof e?i("expecting a function but got "+s.classString(e)):this.all()._then(e,void 0,void 0,E,void 0)},N.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},N.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new O(this).promise()},N.prototype.error=function(e){return this.caught(s.originatesFromRejection,e)},N.getNewLibraryCopy=t.exports,N.is=function(e){return e instanceof N},N.fromNode=N.fromCallback=function(e){var t=new N(S);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=L(e)(M(t,r));return n===I&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},N.all=function(e){return new O(e).promise()},N.cast=function(e){var t=A(e);return t instanceof N||((t=new N(S))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},N.resolve=N.fulfilled=N.cast,N.reject=N.rejected=function(e){var t=new N(S);return t._captureStackTrace(),t._rejectCallback(e,!0),t},N.setScheduler=function(e){if("function"!=typeof e)throw new v("expecting a function but got "+s.classString(e));return m.setScheduler(e)},N.prototype._then=function(e,t,r,n,i){var o=void 0!==i,a=o?i:new N(S),l=this._target(),u=l._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&u?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c=h();if(50397184&u){var f,d,p=l._settlePromiseCtx;33554432&u?(d=l._rejectionHandler0,f=e):16777216&u?(d=l._fulfillmentHandler0,f=t,l._unsetRejectionIsUnhandled()):(p=l._settlePromiseLateCancellationObserver,d=new w("late cancellation observer"),l._attachExtraTrace(d),f=t),m.invoke(p,l,{handler:s.contextBind(c,f),promise:a,receiver:n,value:d})}else l._addCallbacks(e,t,a,n,c);return a},N.prototype._length=function(){return 65535&this._bitField},N.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},N.prototype._isFollowing=function(){return!(67108864&~this._bitField)},N.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},N.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},N.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},N.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},N.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},N.prototype._isFinal=function(){return(4194304&this._bitField)>0},N.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},N.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},N.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},N.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},N.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},N.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==a)return void 0===t&&this._isBound()?this._boundValue():t},N.prototype._promiseAt=function(e){return this[4*e-4+2]},N.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},N.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},N.prototype._boundValue=function(){},N.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(t,r,n,i,null)},N.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=a),this._addCallbacks(r,n,i,o,null)},N.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=s.contextBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=s.contextBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=s.contextBind(i,e)),"function"==typeof t&&(this[a+1]=s.contextBind(i,t))}return this._setLength(o+1),o},N.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},N.prototype._resolveCallback=function(e,t){if(!(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=A(e,this);if(!(n instanceof N))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var a=new w("late cancellation observer");i._attachExtraTrace(a),this._reject(a)}else{var s=this._length();s>0&&i._migrateCallback0(this);for(var l=1;l<s;++l)i._migrateCallbackAt(this,l);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},N.prototype._rejectCallback=function(e,t,r){var n=s.ensureErrorObject(e),i=n===e;if(!i&&!r&&k.warnings()){var o="a promise was rejected with a non-error: "+s.classString(e);this._warn(o,!0)}this._attachExtraTrace(n,!!t&&i),this._reject(e)},N.prototype._resolveFromExecutor=function(e){if(e!==S){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},N.prototype._settlePromiseFromHandler=function(e,t,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),t===E?r&&"number"==typeof r.length?o=L(e).apply(this._boundValue(),r):(o=I).e=new v("cannot .spread() a non-array: "+s.classString(r)):o=L(e).call(t,r);var a=n._popContext();65536&(i=n._bitField)||(o===x?n._reject(r):o===I?n._rejectCallback(o.e,!1):(k.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},N.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},N.prototype._followee=function(){return this._rejectionHandler0},N.prototype._setFollowee=function(e){this._rejectionHandler0=e},N.prototype._settlePromise=function(e,t,r,i){var a=e instanceof N,s=this._bitField,l=!!(134217728&s);65536&s?(a&&e._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=e,L(t).call(r,i)===I&&e._reject(I.e)):t===n?e._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(e):a||e instanceof O?e._cancel():r.cancel()):"function"==typeof t?a?(l&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof o?r._isResolved()||(33554432&s?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):a&&(l&&e._setAsyncGuaranteed(),33554432&s?e._fulfill(i):e._reject(i))},N.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,i=e.value;"function"==typeof t?r instanceof N?this._settlePromiseFromHandler(t,n,i,r):t.call(n,i,r):r instanceof N&&r._reject(i)},N.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},N.prototype._settlePromise0=function(e,t,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,i,t)},N.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},N.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(134217728&t?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},N.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return m.fatalError(e,s.isNode);(65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},N.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(16842752&e){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},N.prototype._settledValue=function(){var e=this._bitField;return 33554432&e?this._rejectionHandler0:16777216&e?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&b.defineProperty(N.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),N.defer=N.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new N(S),resolve:j,reject:F}},s.notEnumerableProp(N,"_makeSelfResolutionError",r),e("./method")(N,S,A,i,k),e("./bind")(N,S,A,k),e("./cancel")(N,O,i,k),e("./direct_resolve")(N),e("./synchronous_inspection")(N),e("./join")(N,O,A,S,m),N.Promise=N,N.version="3.7.2",e("./call_get.js")(N),e("./generators.js")(N,i,S,A,o,k),e("./map.js")(N,O,i,A,S,k),e("./nodeify.js")(N),e("./promisify.js")(N,S),e("./props.js")(N,O,A,i),e("./race.js")(N,S,A,i),e("./reduce.js")(N,O,i,A,S,k),e("./settle.js")(N,O,k),e("./some.js")(N,O,i),e("./timers.js")(N,S,k),e("./using.js")(N,i,A,T,S,k),e("./any.js")(N),e("./each.js")(N,S),e("./filter.js")(N,S),s.toFastProperties(N),s.toFastProperties(N.prototype),U({a:1}),U({b:2}),U({c:3}),U(1),U((function(){})),U(void 0),U(!1),U(new N(S)),k.setBounds(y.firstLineError,s.lastLineError),N}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util");function s(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function l(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(l,o),l.prototype.length=function(){return this._length},l.prototype.promise=function(){return this._promise},l.prototype._init=function e(r,o){var l=n(this._values,this._promise);if(l instanceof t){var u=(l=l._target())._bitField;if(this._values=l,!(50397184&u))return this._promise._setAsyncGuaranteed(),l._then(e,this._reject,void 0,this,o);if(!(33554432&u))return 16777216&u?this._reject(l._reason()):this._cancel();l=l._value()}if(null!==(l=a.asArray(l)))0!==l.length?this._iterate(l):-5===o?this._resolveEmptyArray():this._resolve(s(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(l)).reason();this._promise._rejectCallback(c,!1)}},l.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var l=n(e[s],i);a=l instanceof t?(l=l._target())._bitField:null,o?null!==a&&l.suppressUnhandledRejections():null!==a?50397184&a?o=33554432&a?this._promiseFulfilled(l._value(),s):16777216&a?this._promiseRejected(l._reason(),s):this._promiseCancelled(s):(l._proxy(this,s),this._values[s]=l):o=this._promiseFulfilled(l,s)}o||i._setAsyncGuaranteed()},l.prototype._isResolved=function(){return null===this._values},l.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},l.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},l.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},l.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},l.prototype._promiseCancelled=function(){return this._cancel(),!0},l.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},l.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},l.prototype.shouldCopyValues=function(){return!0},l.prototype.getActualLength=function(e){return e},l}},{"./util":36}],24:[function(e,t,r){t.exports=function(t,r){var n={},i=e("./util"),o=e("./nodeback"),a=i.withAppended,s=i.maybeWrapAsError,l=i.canEvaluate,u=e("./errors").TypeError,c="Async",f={__isPromisified__:!0},d=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function p(e){return!d.test(e)}function _(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function b(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return!!n&&_(n)}function y(e,t,r){for(var n=0;n<e.length;n+=2){var i=e[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<e.length;a+=2)if(e[a]===o)throw new u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}function m(e,t,r,n){for(var o=i.inheritedDataKeys(e),a=[],s=0;s<o.length;++s){var l=o[s],u=e[l],c=n===h||h(l,u,e);"function"!=typeof u||_(u)||b(e,l,t)||!n(l,u,e,c)||a.push(l,u)}return y(a,t,r),a}var g,v=function(e){return e.replace(/([$])/,"\\$")};function w(e,l,u,c,f,d){var h=function(){return this}(),p=e;function _(){var i=l;l===n&&(i=this);var u=new t(r);u._captureStackTrace();var c="string"==typeof p&&this!==h?this[p]:e,f=o(u,d);try{c.apply(i,a(arguments,f))}catch(e){u._rejectCallback(s(e),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"==typeof p&&(e=c),i.notEnumerableProp(_,"__isPromisified__",!0),_}var S=l?g:w;function E(e,t,r,o,a){for(var s=new RegExp(v(t)+"$"),l=m(e,t,s,r),u=0,c=l.length;u<c;u+=2){var f=l[u],d=l[u+1],h=f+t;if(o===S)e[h]=S(f,n,f,d,t,a);else{var p=o(d,(function(){return S(f,n,f,d,t,a)}));i.notEnumerableProp(p,"__isPromisified__",!0),e[h]=p}}return i.toFastProperties(e),e}function x(e,t,r){return S(e,t,void 0,e,null,r)}t.promisify=function(e,t){if("function"!=typeof e)throw new u("expecting a function but got "+i.classString(e));if(_(e))return e;var r=x(e,void 0===(t=Object(t)).context?n:t.context,!!t.multiArgs);return i.copyDescriptors(e,r,p),r},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n=c);var o=t.filter;"function"!=typeof o&&(o=h);var a=t.promisifier;if("function"!=typeof a&&(a=S),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(e),l=0;l<s.length;++l){var f=e[s[l]];"constructor"!==s[l]&&i.isClass(f)&&(E(f.prototype,n,o,a,r),E(f,n,o,a,r))}return E(e,n,o,a,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){t.exports=function(t,r,n,i){var o,a=e("./util"),s=a.isObject,l=e("./es5");"function"==typeof Map&&(o=Map);var u=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),c=function(e){for(var t=new o,r=e.length/2|0,n=0;n<r;++n){var i=e[r+n],a=e[n];t.set(i,a)}return t};function f(e){var t,r=!1;if(void 0!==o&&e instanceof o)t=u(e),r=!0;else{var n=l.keys(e),i=n.length;t=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];t[a]=e[s],t[a+i]=s}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function d(e){var r,o=n(e);return s(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(f,r),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return d(this)},t.props=function(e){return d(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){function n(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},i.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,n(this,0,this,t,this._front+this._length&t-1)},t.exports=i},{}],27:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),a=function(e){return e.then((function(t){return s(t,e)}))};function s(e,s){var l=n(e);if(l instanceof t)return a(l);if(null===(e=o.asArray(e)))return i("expecting an array or an iterable object but got "+o.classString(e));var u=new t(r);void 0!==s&&u._propagateFrom(s,3);for(var c=u._fulfill,f=u._reject,d=0,h=e.length;d<h;++d){var p=e[d];(void 0!==p||d in e)&&t.cast(p)._then(c,f,void 0,u,null)}return u}t.race=function(e){return s(e,void 0)},t.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=s.tryCatch;function u(e,r,n,i){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function f(e,t,r,i){return"function"!=typeof t?n("expecting a function but got "+s.classString(t)):new u(e,t,r,i).promise()}function d(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(h,void 0,void 0,this,void 0)):h.call(this,r)}function h(e){var r,n=this.array,i=n._promise,o=l(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var s=i._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}s.inherits(u,r),u.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},u.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},u.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},u.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var a=e[o];a instanceof t&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var s={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(d,void 0,void 0,s,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(e,t){return f(this,e,t,null)},t.reduce=function(e,t,r,n){return f(e,t,r,n)}}},{"./util":36}],29:[function(e,t,n){var i,o=e("./util"),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var l=r.g.setImmediate,u=process.nextTick;i=o.isRecentNode?function(e){l.call(r.g,e)}:function(e){u.call(process,e)}}else if("function"==typeof s&&"function"==typeof s.resolve){var c=s.resolve();i=function(e){c.then(e)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:a:function(){var e=document.createElement("div"),t={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){e.classList.toggle("foo"),r=!1})).observe(n,t);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(e,t),i()}}();t.exports=i},{"./util":36}],30:[function(e,t,r){t.exports=function(t,r,n){var i=t.PromiseInspection;function o(e){this.constructor$(e)}e("./util").inherits(o,r),o.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.allSettled=function(e){return new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,a=e("./errors").AggregateError,s=i.isArray,l={};function u(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new u(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(u,r),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(e){this._howMany=e},u.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},u.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new a,t=this.length();t<this._values.length;++t)this._values[t]!==l&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(e){this._values.push(e)},u.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return c(e,t)},t.prototype.some=function(e){return c(this,e)},t._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(e,t,r){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return!!(33554432&this._bitField)},o=t.prototype.isRejected=function(){return!!(16777216&this._bitField)},a=t.prototype.isPending=function(){return!(50397184&this._bitField)},s=t.prototype.isResolved=function(){return!!(50331648&this._bitField)};t.prototype.isCancelled=function(){return!!(8454144&this._bitField)},e.prototype.__isCancelled=function(){return!(65536&~this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return!!(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject;function a(e,n){if(o(e)){if(e instanceof t)return e;var a=l(e);if(a===i){n&&n._pushContext();var s=t.reject(a.e);return n&&n._popContext(),s}if("function"==typeof a)return c(e)?(s=new t(r),e._then(s._fulfill,s._reject,void 0,s,null),s):f(e,a,n)}return e}function s(e){return e.then}function l(e){try{return s(e)}catch(e){return i.e=e,i}}var u={}.hasOwnProperty;function c(e){try{return u.call(e,"_promise0")}catch(e){return!1}}function f(e,o,a){var s=new t(r),l=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,c=n.tryCatch(o).call(e,f,d);function f(e){s&&(s._resolveCallback(e),s=null)}function d(e){s&&(s._rejectCallback(e,u,!0),s=null)}return u=!1,s&&c===i&&(s._rejectCallback(c.e,!0,!0),s=null),l}return a}},{"./util":36}],34:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function a(e){this.handle=e}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,i){var o,l;return void 0!==i?(o=t.resolve(i)._then(s,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),l=setTimeout((function(){o._fulfill()}),+e),n.cancellation()&&o._setOnCancel(new a(l)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return l(e,this)};var u=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};function c(e){return clearTimeout(this.handle),e}function f(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var r,i;e=+e;var o=new a(setTimeout((function(){r.isPending()&&u(r,t,i)}),e));return n.cancellation()?(i=this.then(),(r=i._then(c,f,void 0,o,void 0))._setOnCancel(o)):r=this._then(c,f,void 0,o,void 0),r}}},{"./util":36}],35:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=e("./errors").TypeError,u=e("./util").inherits,c=s.errorObj,f=s.tryCatch,d={};function h(e){setTimeout((function(){throw e}),0)}function p(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function _(e,r){var i=0,a=e.length,s=new t(o);function l(){if(i>=a)return s._fulfill();var o=p(e[i++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return h(e)}if(o instanceof t)return o._then(l,h,null,null,null)}l()}return l(),s}function b(e,t,r){this._data=e,this._promise=t,this._context=r}function y(e,t,r){this.constructor$(e,t,r)}function m(e){return b.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}b.prototype.data=function(){return this._data},b.prototype.promise=function(){return this._promise},b.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():d},b.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==d?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},b.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},u(y,b),y.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var i,o=arguments[e-1];if("function"!=typeof o)return r("expecting a function but got "+s.classString(o));var l=!0;2===e&&Array.isArray(arguments[0])?(e=(i=arguments[0]).length,l=!1):(i=arguments,e--);for(var u=new g(e),d=0;d<e;++d){var h=i[d];if(b.isDisposer(h)){var p=h;(h=h.promise())._setDisposable(p)}else{var y=n(h);y instanceof t&&(h=y._then(m,null,null,{resources:u,index:d},void 0))}u[d]=h}var v=new Array(u.length);for(d=0;d<v.length;++d)v[d]=t.resolve(u[d]).reflect();var w=t.all(v).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();e[t]=r.value()}S._pushContext(),o=f(o);var n=l?o.apply(void 0,e):o(e),i=S._popContext();return a.checkForgottenReturns(n,i,"Promise.using",S),n})),S=w.lastly((function(){var e=new t.PromiseInspection(w);return _(u,e)}));return u.promise=S,S._setOnCancel(u),S},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new y(e,this,i());throw new l}}},{"./errors":12,"./util":36}],36:[function(e,t,n){var i,o=e("./es5"),a="undefined"==typeof navigator,s={e:{}},l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0!==this?this:null;function u(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return s.e=e,s}}function c(e){return i=e,u}var f=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function d(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function h(e){return"function"==typeof e||"object"==typeof e&&null!==e}function p(e){return d(e)?new Error(O(e)):e}function _(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=e[r];return i[r]=t,i}function b(e,t,r){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(e,t,r){if(d(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,n),e}function m(e){throw e}var g=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(o.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],i=Object.create(null);null!=e&&!t(e);){var a;try{a=r(e)}catch(e){return n}for(var s=0;s<a.length;++s){var l=a[s];if(!i[l]){i[l]=!0;var u=Object.getOwnPropertyDescriptor(e,l);null!=u&&null==u.get&&null==u.set&&n.push(l)}}e=o.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var i=[];e:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<e.length;++a)if(n.call(e[a],o))continue e;i.push(o)}return i}}(),v=/this\s*\.\s*\S+\s*=/;function w(e){try{if("function"==typeof e){var t=o.names(e.prototype),r=o.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=v.test(e+"")&&o.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function S(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return E.test(e)}function A(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function O(e){try{return e+""}catch(e){return"[no string representation]"}}function R(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function T(e){try{y(e,"isOperational",!0)}catch(e){}}function k(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function P(e){return R(e)&&o.propertyIsWritable(e,"stack")}var C="stack"in new Error?function(e){return P(e)?e:new Error(O(e))}:function(e){if(P(e))return e;try{throw new Error(O(e))}catch(e){return e}};function M(e){return{}.toString.call(e)}function I(e,t,r){for(var n=o.names(e),i=0;i<n.length;++i){var a=n[i];if(r(a))try{o.defineProperty(t,a,o.getDescriptor(e,a))}catch(e){}}}var L=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};L=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?D(e):null}}var N,j="undefined"!=typeof process&&"[object process]"===M(process).toLowerCase(),F="undefined"!=typeof process&&void 0!==process.env;function U(e){return F?process.env[e]:void 0}function W(){if("function"==typeof Promise)try{if("[object Promise]"===M(new Promise((function(){}))))return Promise}catch(e){}}function B(e,t){if(null===e||"function"!=typeof t||t===N)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}var $,z={setReflectHandler:function(e){N=e},isClass:w,isIdentifier:x,inheritedDataKeys:g,getDataPropertyOrDefault:b,thrower:m,isArray:o.isArray,asArray:L,notEnumerableProp:y,isPrimitive:d,isObject:h,isError:R,canEvaluate:a,errorObj:s,tryCatch:c,inherits:f,withAppended:_,maybeWrapAsError:p,toFastProperties:S,filledRange:A,toString:O,canAttachTrace:P,ensureErrorObject:C,originatesFromRejection:k,markAsOriginatingFromRejection:T,classString:M,copyDescriptors:I,isNode:j,hasEnvVariables:F,env:U,global:l,getNativePromise:W,contextBind:B};z.isRecentNode=z.isNode&&(process.versions&&process.versions.node?$=process.versions.node.split(".").map(Number):process.version&&($=process.version.split(".").map(Number)),0===$[0]&&$[1]>10||$[0]>0),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(e){z.lastLineError=e}t.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},(e,t,r)=>{var n=r(41).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=a(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=a(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t);var i=r(73),o=r.n(i),a=r(76),s=r.n(a),l=r(81),u=r.n(l),c=r(178),f=r(184),d=r(107),h=r(39),p=r(185),_=r(186),b=r(6),y=r(187);function z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"==typeof e)return V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var m=new d.Logger({name:"web-documentation.deploy",level:"debug"}),g=(0,b.resolve)("./build/"),v=(0,b.resolve)("./data/"),w=["apiDocumentation/","api/"],S="${name}/${version}/",E=(0,b.join)(v,"distributionBundle.zip"),x=(0,b.join)(v,"distributionBundle"),A=[],O={module:{preprocessor:{ejs:{options:{locals:{__evaluate__:"parameters"}}}}},offline:null},R="",T="web-documentation",k="https://github.com/thaibault/"+T+".git",P={name:"__dummy__",version:"1.0.0"},C=!1,M=function(){var e=s()(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t={}),r=o()({directory:!1,encoding:"utf8",extension:"",prefix:"DW"},t),e.next=1,(0,p.mkdtemp)((0,b.join)((0,_.tmpdir)(),r.prefix),r.encoding);case 1:if(n=e.sent,!r.directory){e.next=2;break}return e.abrupt("return",n);case 2:return e.abrupt("return",(0,b.join)(n,""+r.prefix+r.extension));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e,t){return void 0===t&&(t={}),(0,f.execSync)(e,o()({encoding:"utf-8",shell:"/bin/bash"},t))},L=function(){try{return I.apply(void 0,arguments),!0}catch(e){return!1}},D=function(){var e=s()(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){var n=[];t.on("data",(function(e){return n.push(e)})),t.on("end",(function(){e(Buffer.concat(n))})),t.on("error",(function(e){r(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=s()(u().mark((function e(t,r){var n,i,a,s,l,c,f,_,v,A,T,k,D,N,j,W,B,$,H,V,q,G,K,Y,Q,X,J,Z,ee,te,re;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.info("Generate document website artefacts."),!r){e.next=5;break}return m.info("Prepare distribution files."),n=(0,b.join)(t,(0,b.relative)("./",g),(0,b.relative)("./",E)),e.next=1,(0,p.mkdir)((0,b.dirname)(n),{recursive:!0});case 1:return e.next=2,(0,p.copyFile)(r,n);case 2:return e.next=3,(0,p.rm)(r);case 3:return i=(0,b.join)(t,(0,b.relative)("./",g),(0,b.relative)("./",x)),e.next=4,(0,p.mkdir)(i,{recursive:!0});case 4:return e.next=5,new Promise((function(e,t){(0,h.createReadStream)(n).pipe((0,y.Extract)({path:i})).on("close",(function(){e()})).on("error",(function(e){t(e)}))}));case 5:return m.info("Prepare favicon file."),a="favicon.png",e.next=6,(0,d.isFile)(a);case 6:if(!e.sent){e.next=7;break}return e.next=7,(0,p.copyFile)(a,t+"/source/image/favicon.ico");case 7:for(m.info("Render html."),s={},l=0,c=Object.entries(P.documentationWebsite||{});l<c.length;l++)f=c[l],_=f[0],v=f[1],s[(0,d.camelCaseToDelimited)(_).toUpperCase()]=v;if(!s.TAGLINE&&P.description&&(s.TAGLINE=P.description),!s.NAME&&P.name&&(s.NAME=P.name),m.debug('Found parameters "'+(0,d.represent)(s)+'" to render.'),A=null,!C){e.next=9;break}return A=w[1]+S,e.next=8,(0,d.isDirectory)(A);case 8:if(e.sent){e.next=9;break}A=w[1];case 9:return Y=o(),Q={},X=s,J=R,Z=A,e.next=10,(0,d.isFile)(E);case 10:if(!e.sent){e.next=11;break}ee=(0,b.relative)("./",E),e.next=12;break;case 11:ee=null;case 12:for(s=Y(Q,X,{CONTENT:J,API_DOCUMENTATION_PATH:Z,DISTRIBUTION_BUNDLE_FILE_PATH:ee}),T=0,k=Object.entries(s);T<k.length;T++)D=k[T],N=D[0],"string"==typeof(j=D[1])&&(s[N]=j.replace("!","#%%%#"));return W=JSON.stringify((0,d.evaluateDynamicData)(O,o()({parameters:s},P))),e.next=13,M({extension:".json"});case 13:return B=e.sent,e.next=14,(0,p.writeFile)(B,W);case 14:if(!($=(0,d.evaluate)("`yarn build:web '{__reference__: \"${parametersFilePath}\"}'`",o()({parameters:s,parametersFilePath:B},P))).error){e.next=15;break}throw new Error($.error);case 15:return H=$.result,m.debug('Use final parameters "'+W+'".'),m.info('Run "'+H+'".'),m.debug(I(H,{cwd:t})),e.next=16,(0,p.rm)(B);case 16:return te=z,e.next=17,(0,p.readdir)("./");case 17:V=te(e.sent);case 18:if((q=V()).done){e.next=22;break}if(G=q.value,re=[(0,b.resolve)(t),(0,b.resolve)(w[1])].includes((0,b.resolve)(G))){e.next=20;break}return e.next=19,F(G);case 19:re=e.sent;case 20:if(re){e.next=21;break}return e.next=21,(0,p.rm)(G,{recursive:!0});case 21:e.next=18;break;case 22:return m.info("Copy all build artefacts."),K=(0,b.join)(t,(0,b.relative)("./",g)),e.next=23,(0,d.walkDirectoryRecursively)(K,(function(e){return U(K,"./",e)}));case 23:return e.next=24,(0,p.rm)(t,{recursive:!0});case 24:L("git config user.email")||m.debug(I('git config user.email "github_actor@example.com"')),L("git config user.name")||m.debug(I('git config user.name "github_actor"')),m.debug(I("git add --all")),m.debug(I('git commit --message "Update project homepage content." --all')),m.debug(I("git push")),m.debug(I("git checkout main"));case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=s()(u().mark((function e(){var t,r,n,i,o,a,l,f,_,y,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P.scripts&&(P.scripts["build:bundle:compatible"]||P.scripts["build:bundle"]||P.scripts.build)&&(t="yarn "+(P.scripts["build:bundle:compatible"]?"build:bundle:compatible":P.scripts["build:bundle"]?"build:bundle":"build"),m.info('Build distribution bundle via "'+t+'".'),m.debug(I(t))),m.info("Pack to a zip archive."),e.next=1,M({extension:".zip"});case 1:if(r=e.sent,n=P.files||[],P.main&&n.push(P.main),0!==n.length){e.next=2;break}return e.abrupt("return",null);case 2:return i=function(){var e=s()(u().mark((function e(t){var r,n,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=u().mark((function e(){var t,n,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.value,t=(0,b.resolve)(t),e.next=1,F(t);case 1:if(e.sent){e.next=6;break}return e.next=2,(0,d.isDirectory)(t);case 2:if(!e.sent){e.next=5;break}return n=r,o=i,e.next=3,(0,p.readdir)(t);case 3:return e.next=4,o(e.sent.map((function(e){return(0,b.resolve)(t,e)})));case 4:r=n.concat.call(n,e.sent),e.next=6;break;case 5:m.debug('Add "'+t+'" to distribution bundle.'),r.push(t);case 6:case"end":return e.stop()}}),e)})),o=z(t);case 1:if((a=o()).done){e.next=3;break}return e.delegateYield(n(),"t0",2);case 2:e.next=1;break;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),(o=new c.SJ({zlib:{level:9}})).pipe((0,h.createWriteStream)(r)),a=new Promise((function(e,t){o.on("error",(function(e){t(e)})),o.on("warning",(function(e){m.warn(e)})),o.on("progress",(function(t){var r=t.entries;r.total===r.processed&&e()}))})),y=z,e.next=3,i(n);case 3:l=y(e.sent);case 4:if((f=l()).done){e.next=7;break}return _=f.value,g=o,e.next=5,D((0,h.createReadStream)(_));case 5:g.append.call(g,e.sent,{name:(0,b.relative)("./",_)});case 6:e.next=4;break;case 7:return e.next=8,o.finalize();case 8:return e.next=9,a;case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=s()(u().mark((function e(t){var r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,b.basename)(t,(0,b.extname)(t)).startsWith(".")&&!(0,b.basename)(t).startsWith(".yarn")||"dummyDocumentation"===(0,b.basename)(t,(0,b.extname)(t))){e.next=3;break}return e.next=1,(0,d.isDirectory)(t);case 1:if(!(i=e.sent)){e.next=2;break}i=["node_modules","build"].includes((0,b.basename)(t));case 2:n=i;case 3:if(r=n){e.next=6;break}return e.next=4,(0,d.isFile)(t);case 4:if(!(o=e.sent)){e.next=5;break}o="params.json"===(0,b.basename)(t);case 5:r=o;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=s()(u().mark((function e(t,r,n){var i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,F(n.path);case 1:if(o=e.sent){e.next=2;break}o="readme.md"===(0,b.basename)(n.name);case 2:if(!o){e.next=3;break}return e.abrupt("return",!1);case 3:if(r=(0,b.join)(r,(0,b.relative)(t,n.path)),m.debug('Copy "'+n.path+'" to "'+r+'".'),null==(i=n.stats)||!i.isFile()){e.next=5;break}return e.next=4,(0,p.copyFile)(n.path,r);case 4:e.next=6;break;case 5:return e.next=6,(0,p.mkdir)(r);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=s()(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,F(t.path);case 1:if(!e.sent){e.next=2;break}return e.abrupt("return",!1);case 2:if("readme"!==(0,b.basename)(t.name,(0,b.extname)(t.name))){e.next=4;break}return m.info('Handle "'+t.path+'".'),R&&(R+="\n"),r=R,e.next=3,(0,p.readFile)(t.path,"utf8");case 3:R=r+=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=s()(u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=A;case 1:if(!(t<r.length)){e.next=3;break}return n=r[t],e.next=2,(0,p.rm)(n,{recursive:!0});case 2:t++,e.next=1;break;case 3:if(i=(0,b.resolve)(w[1]),!(o=C)){e.next=5;break}return e.next=4,(0,d.isDirectory)(i);case 4:o=!e.sent;case 5:if(!o){e.next=6;break}I("git checkout '"+i+"'");case 6:I("git branch").includes("* main")||m.debug(I("git checkout main"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=s()(u().mark((function e(){var t,r,n,i,a,s,l,c,f,h,_,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!I("git branch --all").includes("gh-pages")){m.debug(I("git fetch --all"));try{m.debug(I("git checkout package.json"))}catch(e){}m.debug(I("git checkout gh-pages"))}if(I("git branch").includes("* main")||m.debug(I("git checkout main")),m.debug(I("git pull")),!I("git branch").includes("* main")||!I("git branch --all").includes("gh-pages")){e.next=28;break}if(P=(0,d.optionalRequire)((0,b.resolve)("./package.json"))||P,!(t=(0,d.evaluate)("`"+S+"`",P)).error){e.next=1;break}throw new Error(t.error);case 1:return S=t.result,m.info("Read and Compile all markdown files and transform to html."),e.next=2,(0,d.walkDirectoryRecursively)("./",W);case 2:return r=null,e.prev=3,e.next=4,j();case 4:r=e.sent,e.next=6;break;case 5:e.prev=5,h=e.catch(3),m.error("Error occurred during building distribution bundle:",h),process.exitCode=1;case 6:if(!(_=r)){e.next=8;break}return e.next=7,(0,d.isFile)(r);case 7:_=e.sent;case 8:if(!_){e.next=11;break}return n=(0,b.join)(v,(0,b.basename)(r)),e.next=9,(0,p.mkdir)(v,{recursive:!0});case 9:return e.next=10,(0,p.copyFile)(r,n);case 10:A.push(n);case 11:if(C=!!P.scripts&&Object.prototype.hasOwnProperty.call(P.scripts,"document"))try{m.debug(I("yarn document"))}catch(e){C=!1}return m.debug(I("git checkout gh-pages")),m.debug(I("git pull")),i=(0,b.resolve)(w[1]),e.next=12,(0,d.isDirectory)(i);case 12:if(!e.sent){e.next=13;break}return e.next=13,(0,p.rm)(i,{recursive:!0});case 13:return e.next=14,(0,d.isDirectory)(w[0]);case 14:if(!e.sent){e.next=16;break}return e.next=15,(0,p.rename)((0,b.resolve)(w[0]),i);case 15:A.push(i);case 16:return e.next=17,M({directory:!0,prefix:T});case 17:if(a=e.sent,s=(0,b.resolve)("../"+T),!(y=true)){e.next=19;break}return e.next=18,(0,d.isDirectory)(s);case 18:y=e.sent;case 19:if(!y){e.next=21;break}return m.info("Copy local existing "+T+"."),e.next=20,(0,d.walkDirectoryRecursively)(s,(function(e){return U(s,a,e)}));case 20:e.next=22;break;case 21:m.info("No local existing "+T+" found","getting it remotely."),m.debug(I("unset GIT_WORK_TREE; git clone '"+k+"'",{cwd:a})),a=(0,b.resolve)(a,T);case 22:return m.debug(I("corepack enable",{cwd:a})),m.debug(I("corepack install",{cwd:a})),m.debug(I("yarn install",{cwd:a,env:o()({},process.env,{NODE_ENV:"debug"})})),m.debug(I("yarn clear",{cwd:a})),e.next=23,N(a,r);case 23:l=0,c=[i,v,a];case 24:if(!(l<c.length)){e.next=27;break}return f=c[l],e.next=25,(0,d.isDirectory)(f);case 25:if(!e.sent){e.next=26;break}return e.next=26,(0,p.rm)(f,{recursive:!0});case 26:l++,e.next=24;break;case 27:case 28:case"end":return e.stop()}}),e,null,[[3,5]])})));return function(){return e.apply(this,arguments)}}();try{await $()}catch(q){throw await B(),q}n()}catch(G){n(G)}}),1)},(e,t,r)=>{r.d(t,{SJ:()=>vr});var n=r(39);function i(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}var o=r(7);const a=(e,t,r)=>{const n=e instanceof RegExp?s(e,r):e,i=t instanceof RegExp?s(t,r):t,o=null!==n&&null!=i&&l(n,i,r);return o&&{start:o[0],end:o[1],pre:r.slice(0,o[0]),body:r.slice(o[0]+n.length,o[1]),post:r.slice(o[1]+i.length)}},s=(e,t)=>{const r=t.match(e);return r?r[0]:null},l=(e,t,r)=>{let n,i,o,a,s,l=r.indexOf(e),u=r.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(n=[],o=r.length;c>=0&&!s;){if(c===l)n.push(c),l=r.indexOf(e,c+1);else if(1===n.length){const e=n.pop();void 0!==e&&(s=[e,u])}else i=n.pop(),void 0!==i&&i<o&&(o=i,a=u),u=r.indexOf(t,c+1);c=l<u&&l>=0?l:u}n.length&&void 0!==a&&(s=[o,a])}return s},u="\0SLASH"+Math.random()+"\0",c="\0OPEN"+Math.random()+"\0",f="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0",p=new RegExp(u,"g"),_=new RegExp(c,"g"),b=new RegExp(f,"g"),y=new RegExp(d,"g"),m=new RegExp(h,"g"),g=/\\\\/g,v=/\\{/g,w=/\\}/g,S=/\\,/g,E=/\\\./g,x=1e5;function A(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function O(e){return e.replace(p,"\\").replace(_,"{").replace(b,"}").replace(y,",").replace(m,".")}function R(e){if(!e)return[""];const t=[],r=a("{","}",e);if(!r)return e.split(",");const{pre:n,body:i,post:o}=r,s=n.split(",");s[s.length-1]+="{"+i+"}";const l=R(o);return o.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function T(e,t={}){if(!e)return[];const{max:r=x}=t;return"{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2)),I(function(e){return e.replace(g,u).replace(v,c).replace(w,f).replace(S,d).replace(E,h)}(e),r,!0).map(O)}function k(e){return"{"+e+"}"}function P(e){return/^-?0\d/.test(e)}function C(e,t){return e<=t}function M(e,t){return e>=t}function I(e,t,r){const n=[],i=a("{","}",e);if(!i)return[e];const o=i.pre,s=i.post.length?I(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let e=0;e<s.length&&e<t;e++){const t=o+"{"+i.body+"}"+s[e];n.push(t)}else{const a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),u=a||l,c=i.body.indexOf(",")>=0;if(!u&&!c)return i.post.match(/,(?!,).*\}/)?I(e=i.pre+"{"+i.body+f+i.post,t,!0):[e];let d,h;if(u)d=i.body.split(/\.\./);else if(d=R(i.body),1===d.length&&void 0!==d[0]&&(d=I(d[0],t,!1).map(k),1===d.length))return s.map((e=>i.pre+d[0]+e));if(u&&void 0!==d[0]&&void 0!==d[1]){const e=A(d[0]),t=A(d[1]),r=Math.max(d[0].length,d[1].length);let n=3===d.length&&void 0!==d[2]?Math.max(Math.abs(A(d[2])),1):1,i=C;t<e&&(n*=-1,i=M);const o=d.some(P);h=[];for(let a=e;i(a,t);a+=n){let e;if(l)e=String.fromCharCode(a),"\\"===e&&(e="");else if(e=String(a),o){const t=r-e.length;if(t>0){const r=new Array(t+1).join("0");e=a<0?"-"+r+e.slice(1):r+e}}h.push(e)}}else{h=[];for(let e=0;e<d.length;e++)h.push.apply(h,I(d[e],t,!1))}for(let e=0;e<h.length;e++)for(let i=0;i<s.length&&n.length<t;i++){const t=o+h[e]+s[i];(!r||u||t)&&n.push(t)}}return n}const L=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},D={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},N=e=>e.replace(/[[\]\\-]/g,"\\$&"),j=e=>e.join(""),F=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const n=[],i=[];let o=r+1,a=!1,s=!1,l=!1,u=!1,c=r,f="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==r+1){if("]"===t&&a&&!l){c=o+1;break}if(a=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[a,l,u]]of Object.entries(D))if(e.startsWith(t,o)){if(f)return["$.",!1,e.length-r,!0];o+=t.length,u?i.push(a):n.push(a),s=s||l;continue e}l=!1,f?(t>f?n.push(N(f)+"-"+N(t)):t===f&&n.push(N(t)),f="",o++):e.startsWith("-]",o+1)?(n.push(N(t+"-")),o+=2):e.startsWith("-",o+1)?(f=t,o+=2):(n.push(N(t)),o++)}else l=!0,o++}else u=!0,o++}if(c<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(0===i.length&&1===n.length&&/^\\?.$/.test(n[0])&&!u){const e=2===n[0].length?n[0].slice(-1):n[0];return[(d=e,d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,c-r,!1]}var d;const h="["+(u?"^":"")+j(n)+"]",p="["+(u?"":"^")+j(i)+"]";return[n.length&&i.length?"("+h+"|"+p+")":n.length?h:p,s,c-r,!0]},U=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var W;const B=new Set(["!","?","+","*","@"]),$=e=>B.has(e),z=e=>$(e.type),H=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),V=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),q=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),G=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),K="(?!\\.)",Y=new Set(["[","."]),Q=new Set(["..","."]),X=new Set("().*{}+?[]^$\\!"),J="[^/]",Z=J+"*?",ee=J+"+?";let te=0;class re{type;#e;#t;#r=!1;#n=[];#i;#o;#a;#s=!1;#l;#u;#c=!1;id=++te;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#n.length,parts:this.#n}}constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#a=this.#e===this?[]:this.#e.#a,"!"!==e||this.#e.#s||this.#a.push(this),this.#o=this.#i?this.#i.#n.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(const e of this.#n)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#n.map((e=>String(e))).join("|")+")":this.#u=this.#n.map((e=>String(e))).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;let e;for(this.toString(),this.#s=!0;e=this.#a.pop();){if("!"!==e.type)continue;let t=e,r=t.#i;for(;r;){for(let n=t.#o+1;!r.type&&n<r.#n.length;n++)for(const t of e.#n){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#n[n])}t=r,r=t.#i}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof W&&t.#i===this))throw new Error("invalid part: "+t);this.#n.push(t)}}toJSON(){const e=null===this.type?this.#n.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#n.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&"!"===this.#i?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#o)return!0;const e=this.#i;for(let t=0;t<this.#o;t++){const r=e.#n[t];if(!(r instanceof W&&"!"===r.type))return!1}return!0}isEnd(){if(this.#e===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const e=this.#i?this.#i.#n.length:0;return this.#o===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new W(this.type,e);for(const e of this.#n)t.copyIn(e);return t}static#d(e,t,r,n,i){const o=n.maxExtglobRecursion??2;let a=!1,s=!1,l=-1,u=!1;if(null===t.type){let c=r,f="";for(;c<e.length;){const r=e.charAt(c++);if(a||"\\"===r){a=!a,f+=r;continue}if(s){c===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||c===l+2&&u||(s=!1),f+=r;continue}if("["===r){s=!0,l=c,u=!1,f+=r;continue}if(!n.noext&&$(r)&&"("===e.charAt(c)&&i<=o){t.push(f),f="";const o=new W(r,t);c=W.#d(e,o,c,n,i+1),t.push(o)}else f+=r}return t.push(f),c}let c=r+1,f=new W(null,t);const d=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(a||"\\"===r){a=!a,h+=r;continue}if(s){c===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||c===l+2&&u||(s=!1),h+=r;continue}if("["===r){s=!0,l=c,u=!1,h+=r;continue}if(!n.noext&&$(r)&&"("===e.charAt(c)&&(i<=o||t&&t.#h(r))){const o=t&&t.#h(r)?0:1;f.push(h),h="";const a=new W(r,f);f.push(a),c=W.#d(e,a,c,n,i+o)}else if("|"!==r){if(")"===r)return""===h&&0===t.#n.length&&(t.#c=!0),f.push(h),h="",t.push(...d,f),c;h+=r}else f.push(h),h="",d.push(f),f=new W(null,t)}return t.type=null,t.#t=void 0,t.#n=[e.substring(r-1)],c}#p(e){return this.#_(e,V)}#_(e,t=H){if(!e||"object"!=typeof e||null!==e.type||1!==e.#n.length||null===this.type)return!1;const r=e.#n[0];return!(!r||"object"!=typeof r||null===r.type)&&this.#h(r.type,t)}#h(e,t=q){return!!t.get(this.type)?.includes(e)}#b(e,t){const r=e.#n[0],n=new W(null,r,this.options);n.#n.push(""),r.push(n),this.#y(e,t)}#y(e,t){const r=e.#n[0];this.#n.splice(t,1,...r.#n);for(const e of r.#n)"object"==typeof e&&(e.#i=this);this.#u=void 0}#m(e){const t=G.get(this.type);return!!t?.has(e)}#g(e){if(!e||"object"!=typeof e||null!==e.type||1!==e.#n.length||null===this.type||1!==this.#n.length)return!1;const t=e.#n[0];return!(!t||"object"!=typeof t||null===t.type)&&this.#m(t.type)}#v(e){const t=G.get(this.type),r=e.#n[0],n=t?.get(r.type);if(!n)return!1;this.#n=r.#n;for(const e of this.#n)"object"==typeof e&&(e.#i=this);this.type=n,this.#u=void 0,this.#c=!1}static fromGlob(e,t={}){const r=new W(null,void 0,t);return W.#d(e,r,0,t,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#t||this.#l.nocase&&!this.#l.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#l.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#l}toRegExpSource(e){const t=e??!!this.#l.dot;if(this.#e===this&&(this.#w(),this.#f()),!z(this)){const r=this.isStart()&&this.isEnd()&&!this.#n.some((e=>"string"!=typeof e)),n=this.#n.map((t=>{const[n,i,o,a]="string"==typeof t?W.#S(t,this.#t,r):t.toRegExpSource(e);return this.#t=this.#t||o,this.#r=this.#r||a,n})).join("");let i="";if(this.isStart()&&"string"==typeof this.#n[0]){if(!(1===this.#n.length&&Q.has(this.#n[0]))){const r=Y,o=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),a=!t&&!e&&r.has(n.charAt(0));i=o?"(?!(?:^|/)\\.\\.?(?:$|/))":a?K:""}}let o="";this.isEnd()&&this.#e.#s&&"!"===this.#i?.type&&(o="(?:$|\\/)");return[i+n+o,U(n),this.#t=!!this.#t,this.#r]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#E(t);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const e=this.toString(),t=this;return t.#n=[e],t.type=null,t.#t=void 0,[e,U(this.toString()),!1,!1]}let o=!r||e||t?"":this.#E(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let a="";if("!"===this.type&&this.#c)a=(this.isStart()&&!t?K:"")+ee;else{a=n+i+("!"===this.type?"))"+(!this.isStart()||t||e?"":K)+Z+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`)}return[a,U(i),this.#t=!!this.#t,this.#r]}#w(){if(z(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#n.length;e++){const r=this.#n[e];"object"==typeof r&&(r.#w(),this.#_(r)?(t=!1,this.#y(r,e)):this.#p(r)?(t=!1,this.#b(r,e)):this.#g(r)&&(t=!1,this.#v(r)))}}while(!t&&++e<10)}else for(const e of this.#n)"object"==typeof e&&e.#w();this.#u=void 0}#E(e){return this.#n.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#r=this.#r||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#S(e,t,r=!1){let n=!1,i="",o=!1,a=!1;for(let s=0;s<e.length;s++){const l=e.charAt(s);if(n)n=!1,i+=(X.has(l)?"\\":"")+l;else if("*"!==l)if(a=!1,"\\"!==l){if("["===l){const[r,n,a,l]=F(e,s);if(a){i+=r,o=o||n,s+=a-1,t=t||l;continue}}"?"!==l?i+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=J,t=!0)}else s===e.length-1?i+="\\\\":n=!0;else{if(a)continue;a=!0,i+=r&&/^[*]+$/.test(e)?ee:Z,t=!0}}return[i,U(e),!!t,o]}}W=re;const ne=(e,t,r={})=>(L(t),!(!r.nocomment&&"#"===t.charAt(0))&&new ke(t,r).match(e)),ie=/^\*+([^+@!?*[(]*)$/,oe=e=>t=>!t.startsWith(".")&&t.endsWith(e),ae=e=>t=>t.endsWith(e),se=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),le=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ue=/^\*+\.\*+$/,ce=e=>!e.startsWith(".")&&e.includes("."),fe=e=>"."!==e&&".."!==e&&e.includes("."),de=/^\.\*+$/,he=e=>"."!==e&&".."!==e&&e.startsWith("."),pe=/^\*+$/,_e=e=>0!==e.length&&!e.startsWith("."),be=e=>0!==e.length&&"."!==e&&".."!==e,ye=/^\?+([^+@!?*[(]*)?$/,me=([e,t=""])=>{const r=Se([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},ge=([e,t=""])=>{const r=Ee([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},ve=([e,t=""])=>{const r=Ee([e]);return t?e=>r(e)&&e.endsWith(t):r},we=([e,t=""])=>{const r=Se([e]);return t?e=>r(e)&&e.endsWith(t):r},Se=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},Ee=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},xe="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";ne.sep="win32"===xe?{sep:"\\"}.sep:{sep:"/"}.sep;const Ae=Symbol("globstar **");ne.GLOBSTAR=Ae;ne.filter=(e,t={})=>r=>ne(r,e,t);const Oe=(e,t={})=>Object.assign({},e,t);ne.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return ne;const t=ne;return Object.assign(((r,n,i={})=>t(r,n,Oe(e,i))),{Minimatch:class extends t.Minimatch{constructor(t,r={}){super(t,Oe(e,r))}static defaults(r){return t.defaults(Oe(e,r)).Minimatch}},AST:class extends t.AST{constructor(t,r,n={}){super(t,r,Oe(e,n))}static fromGlob(r,n={}){return t.AST.fromGlob(r,Oe(e,n))}},unescape:(r,n={})=>t.unescape(r,Oe(e,n)),escape:(r,n={})=>t.escape(r,Oe(e,n)),filter:(r,n={})=>t.filter(r,Oe(e,n)),defaults:r=>t.defaults(Oe(e,r)),makeRe:(r,n={})=>t.makeRe(r,Oe(e,n)),braceExpand:(r,n={})=>t.braceExpand(r,Oe(e,n)),match:(r,n,i={})=>t.match(r,n,Oe(e,i)),sep:t.sep,GLOBSTAR:Ae})};const Re=(e,t={})=>(L(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:T(e,{max:t.braceExpandMax}));ne.braceExpand=Re;ne.makeRe=(e,t={})=>new ke(e,t).makeRe();ne.match=(e,t,r={})=>{const n=new ke(t,r);return e=e.filter((e=>n.match(e))),n.options.nonull&&!e.length&&e.push(t),e};const Te=/[?*]|[+@!]\(.*?\)|\[|\]/;class ke{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){L(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||xe,this.isWindows="win32"===this.platform;this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&Te.test(e[2])||Te.test(e[3])),r=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(r)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,n),this.set=n.filter((e=>-1===e.indexOf(!1))),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const t of e)for(let e=0;e<t.length;e++)"**"===t[e]&&(t[e]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let r=t;for(;"**"===e[r+1];)r++;r!==t&&e.splice(t,r-t)}return e}))}levelOneOptimize(e){return e.map((e=>0===(e=e.reduce(((e,t)=>{const r=e[e.length-1];return"**"===t&&"**"===r?e:".."===t&&r&&".."!==r&&"."!==r&&"**"!==r?(e.pop(),e):(e.push(t),e)}),[])).length?[""]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const n=e[r];1===r&&""===n&&""===e[0]||("."!==n&&""!==n||(t=!0,e.splice(r,1),r--))}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let r=0;for(;-1!==(r=e.indexOf("..",r+1));){const n=e[r-1];!n||"."===n||".."===n||"**"===n||this.isWindows&&/^[a-z]:$/i.test(n)||(t=!0,e.splice(r-1,2),r-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let n=-1;for(;-1!==(n=r.indexOf("**",n+1));){let i=n;for(;"**"===r[i+1];)i++;i>n&&r.splice(n+1,i-n);let o=r[n+1];const a=r[n+2],s=r[n+3];if(".."!==o)continue;if(!a||"."===a||".."===a||!s||"."===s||".."===s)continue;t=!0,r.splice(n,1);const l=r.slice(0);l[n]="**",e.push(l),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){const n=r[e];1===e&&""===n&&""===r[0]||("."!==n&&""!==n||(t=!0,r.splice(e,1),e--))}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(t=!0,r.pop())}let i=0;for(;-1!==(i=r.indexOf("..",i+1));){const e=r[i-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===i&&"**"===r[i+1]?["."]:[];r.splice(i-1,2,...e),0===r.length&&r.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){const n=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(n){e[t]=[],e[r]=n;break}}return e.filter((e=>e.length))}partsMatch(e,t,r=!1){let n=0,i=0,o=[],a="";for(;n<e.length&&i<t.length;)if(e[n]===t[i])o.push("b"===a?t[i]:e[n]),n++,i++;else if(r&&"**"===e[n]&&t[i]===e[n+1])o.push(e[n]),n++;else if(r&&"**"===t[i]&&e[n]===t[i+1])o.push(t[i]),i++;else if("*"!==e[n]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i]){if("*"!==t[i]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===a)return!1;a="b",o.push(t[i]),n++,i++}else{if("b"===a)return!1;a="a",o.push(e[n]),n++,i++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let n=0,i=0;if(this.isWindows){const r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),a="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=o?3:r?0:void 0,l=!a&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:a?0:void 0;if("number"==typeof s&&"number"==typeof l){const[r,o]=[e[s],t[l]];r.toLowerCase()===o.toLowerCase()&&(t[l]=r,i=l,n=s)}}const{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Ae)?this.#x(e,t,r,n,i):this.#A(e,t,r,n,i)}#x(e,t,r,n,i){const o=t.indexOf(Ae,i),a=t.lastIndexOf(Ae),[s,l,u]=r?[t.slice(i,o),t.slice(o+1),[]]:[t.slice(i,o),t.slice(o+1,a),t.slice(a+1)];if(s.length){const t=e.slice(n,n+s.length);if(!this.#A(t,s,r,0,0))return!1;n+=s.length,i+=s.length}let c=0;if(u.length){if(u.length+n>e.length)return!1;let t=e.length-u.length;if(this.#A(e,u,r,t,0))c=u.length;else{if(""!==e[e.length-1]||n+u.length===e.length)return!1;if(t--,!this.#A(e,u,r,t,0))return!1;c=u.length+1}}if(!l.length){let t=!!c;for(let r=n;r<e.length-c;r++){const n=String(e[r]);if(t=!0,"."===n||".."===n||!this.options.dot&&n.startsWith("."))return!1}return r||t}const f=[[[],0]];let d=f[0],h=0;const p=[0];for(const e of l)e===Ae?(p.push(h),d=[[],0],f.push(d)):(d[0].push(e),h++);let _=f.length-1;const b=e.length-c;for(const e of f)e[1]=b-(p[_--]+e[0].length);return!!this.#O(e,f,n,0,r,0,!!c)}#O(e,t,r,n,i,o,a){const s=t[n];if(!s){for(let t=r;t<e.length;t++){a=!0;const r=e[t];if("."===r||".."===r||!this.options.dot&&r.startsWith("."))return!1}return a}const[l,u]=s;for(;r<=u;){if(this.#A(e.slice(0,r+l.length),l,i,r,0)&&o<this.maxGlobstarRecursion){const s=this.#O(e,t,r+l.length,n+1,i,o+1,a);if(!1!==s)return s}const s=e[r];if("."===s||".."===s||!this.options.dot&&s.startsWith("."))return!1;r++}return i||null}#A(e,t,r,n,i){let o,a,s,l;for(o=n,a=i,l=e.length,s=t.length;o<l&&a<s;o++,a++){this.debug("matchOne loop");let r,n=t[a],i=e[o];if(this.debug(t,n,i),!1===n||n===Ae)return!1;if("string"==typeof n?(r=i===n,this.debug("string match",n,i,r)):(r=n.test(i),this.debug("pattern match",n,i,r)),!r)return!1}if(o===l&&a===s)return!0;if(o===l)return r;if(a===s)return o===l-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return Re(this.pattern,this.options)}parse(e){L(e);const t=this.options;if("**"===e)return Ae;if(""===e)return"";let r,n=null;(r=e.match(pe))?n=t.dot?be:_e:(r=e.match(ie))?n=(t.nocase?t.dot?le:se:t.dot?ae:oe)(r[1]):(r=e.match(ye))?n=(t.nocase?t.dot?ge:me:t.dot?ve:we)(r):(r=e.match(ue))?n=t.dot?fe:ce:(r=e.match(de))&&(n=he);const i=re.fromGlob(e,this.options).toMMPattern();return n&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(t.nocase?["i"]:[]);let i=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))n.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===Ae?Ae:e._src}));t.forEach(((e,n)=>{const i=t[n+1],o=t[n-1];e===Ae&&o!==Ae&&(void 0===o?void 0!==i&&i!==Ae?t[n+1]="(?:\\/|"+r+"\\/)?"+i:t[n]=r:void 0===i?t[n-1]=o+"(?:\\/|\\/"+r+")?":i!==Ae&&(t[n-1]=o+"(?:\\/|\\/"+r+"\\/)"+i,t[n+1]=Ae))}));const i=t.filter((e=>e!==Ae));if(this.partial&&i.length>=1){const e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return i.join("/")})).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+a+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(const e of i){let i=n;r.matchBase&&1===e.length&&(i=[o]);if(this.matchOne(i,e,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return ne.defaults(e).Minimatch}}ne.AST=re,ne.Minimatch=ke,ne.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),ne.unescape=U;var Pe=r(6);function Ce(e,t){return new Promise((r=>{(t?n.stat:n.lstat)(e,((n,i)=>{if(n)if("ENOENT"===n.code)r(t?Ce(e,!1):null);else r(null);else r(i)}))}))}async function*Me(e,t,r,i,o,a){let s=await function(e,t){return new Promise(((r,i)=>{n.readdir(e,{withFileTypes:!0},((e,n)=>{if(e)switch(e.code){case"ENOTDIR":t?i(e):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(e)}else r(n)}))}))}(t+e,a);for(const n of s){const a=e+"/"+n.name,s=a.slice(1),l=t+"/"+s;let u=n;(i||r)&&(u=await Ce(l,r)??u),u.isDirectory()?o(s)||(yield{relative:s,absolute:l,stat:u},yield*Me(a,t,r,i,o,!1)):yield{relative:s,absolute:l,stat:u}}}var Ie=class extends o.EventEmitter{options;matchers;ignoreMatchers;skipMatchers;paused;aborted;inactive;iterator;constructor(e,t,r){if(super(),"function"==typeof t&&(r=t,t=void 0),this.options=function(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}(t||{}),this.matchers=[],this.options.pattern){const e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map((e=>new ke(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase})))}if(this.ignoreMatchers=[],this.options.ignore){const e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map((e=>new ke(e,{dot:!0})))}if(this.skipMatchers=[],this.options.skip){const e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map((e=>new ke(e,{dot:!0})))}if(this.iterator=async function*(e,t,r,n){yield*Me("",e,t,r,n,!0)}((0,Pe.resolve)(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r){const e=r,t=[];this.on("match",(e=>t.push(this.options.absolute?e.absolute:e.relative))),this.on("error",(t=>e(t))),this.on("end",(()=>e(null,t)))}setTimeout((()=>this._next()))}_shouldSkipDirectory(e){return this.skipMatchers.some((t=>t.match(e)))}_fileMatches(e,t){const r=e+(t?"/":"");return(0===this.matchers.length||this.matchers.some((e=>e.match(r))))&&!this.ignoreMatchers.some((e=>e.match(r)))&&(!this.options.nodir||!t)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then((e=>{if(e.done)this.emit("end");else{const t=e.value.stat.isDirectory();if(this._fileMatches(e.value.relative,t)){let r=e.value.relative,n=e.value.absolute;this.options.mark&&t&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:e.value.stat}):this.emit("match",{relative:r,absolute:n})}this._next()}})).catch((e=>{this.abort(),this.emit("error",e),e.code||this.options.silent||console.error(e)}))}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};const Le=(e,t,r)=>new Ie(e,t,r);Le.ReaddirGlob=Ie;var De=Le,Ne=r(123);function je(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}var Fe="function"==typeof queueMicrotask&&queueMicrotask,Ue="function"==typeof setImmediate&&setImmediate,We="object"==typeof process&&"function"==typeof process.nextTick;function Be(e){setTimeout(e,0)}function $e(e){return(t,...r)=>e((()=>t(...r)))}var ze=$e(Fe?queueMicrotask:Ue?setImmediate:We?process.nextTick:Be);function He(e){return Ge(e)?function(...t){const r=t.pop();return Ve(e.apply(this,t),r)}:je((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return Ve(n,r);r(null,n)}))}function Ve(e,t){return e.then((e=>{qe(t,null,e)}),(e=>{qe(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function qe(e,t,r){try{e(t,r)}catch(e){ze((e=>{throw e}),e)}}function Ge(e){return"AsyncFunction"===e[Symbol.toStringTag]}function Ke(e){if("function"!=typeof e)throw new Error("expected a function");return Ge(e)?He(e):e}function Ye(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function Qe(e){return function(t,...r){return Ye((function(n){var i=this;return e(t,((e,t)=>{Ke(e).apply(i,r.concat(t))}),n)}))}}function Xe(e,t,r,n){t=t||[];var i=[],o=0,a=Ke(r);return e(t,((e,t,r)=>{var n=o++;a(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function Je(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}var Ze={};function et(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function tt(e){if(Je(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}function rt(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function nt(e,t,r,n){let i=!1,o=!1,a=!1,s=0,l=0;function u(){s>=t||a||i||(a=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(a=!1,t)return i=!0,void(s<=0&&n(null));s++,r(e,l,c),l++,u()}})).catch(f))}function c(e,t){if(s-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===Ze||i&&s<=0?(i=!0,n(null)):void u()}function f(e){o||(a=!1,i=!0,n(e))}u()}var it=e=>(t,r,n)=>{if(n=et(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return nt(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return nt(t[Symbol.asyncIterator](),e,r,n);var i=tt(t),o=!1,a=!1,s=0,l=!1;function u(e,t){if(!a)if(s-=1,e)o=!0,n(e);else if(!1===e)o=!0,a=!0;else{if(t===Ze||o&&s<=0)return o=!0,n(null);l||c()}}function c(){for(l=!0;s<e&&!o;){var t=i();if(null===t)return o=!0,void(s<=0&&n(null));s+=1,r(t.value,t.key,rt(u))}l=!1}c()};var ot=Ye((function(e,t,r,n){return it(t)(e,Ke(r),n)}),4);function at(e,t,r){r=et(r);var n=0,i=0,{length:o}=e,a=!1;function s(e,t){!1===e&&(a=!0),!0!==a&&(e?r(e):++i!==o&&t!==Ze||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,rt(s))}function st(e,t,r){return ot(e,1/0,t,r)}var lt=Ye((function(e,t,r){return(Je(e)?at:st)(e,Ke(t),r)}),3);var ut=Ye((function(e,t,r){return Xe(lt,e,t,r)}),3);Qe(ut);var ct=Ye((function(e,t,r){return ot(e,1,t,r)}),3);var ft=Ye((function(e,t,r){return Xe(ct,e,t,r)}),3);Qe(ft);Symbol("promiseCallback");class dt{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):ht(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):ht(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function ht(e,t){e.length=1,e.head=e.tail=t}function pt(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=Ke(e),i=0,o=[];const a={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function s(e,t){return e?t?void(a[e]=a[e].filter((e=>e!==t))):a[e]=[]:Object.keys(a).forEach((e=>a[e]=[]))}function l(e,...t){a[e].forEach((e=>e(...t)))}var u=!1;function c(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function a(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}_.started=!0;var s=_._createTaskItem(e,r?a:n||a);if(t?_._tasks.unshift(s):_._tasks.push(s),u||(u=!0,ze((()=>{u=!1,_.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...r){i-=1;for(var n=0,a=e.length;n<a;n++){var s=e[n],u=o.indexOf(s);0===u?o.shift():u>0&&o.splice(u,1),s.callback(t,...r),null!=t&&l("error",t,s.data)}i<=_.concurrency-_.buffer&&l("unsaturated"),_.idle()&&l("drain"),_.process()}}function d(e){return!(0!==e.length||!_.idle())&&(ze((()=>l("drain"))),!0)}const h=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,t){const r=(...n)=>{s(e,r),t(...n)};a[e].push(r)}(e,((e,n)=>{if(e)return r(e);t(n)}))}));s(e),function(e,t){a[e].push(t)}(e,t)};var p=!1,_={_tasks:new dt,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*_._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!1,!1,t)))}return c(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!1,!0,t)))}return c(e,!1,!0,t)},kill(){s(),_._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!0,!1,t)))}return c(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!0,!0,t)))}return c(e,!0,!0,t)},remove(e){_._tasks.remove(e)},process(){if(!p){for(p=!0;!_.paused&&i<_.concurrency&&_._tasks.length;){var e=[],t=[],r=_._tasks.length;_.payload&&(r=Math.min(r,_.payload));for(var a=0;a<r;a++){var s=_._tasks.shift();e.push(s),o.push(s),t.push(s.data)}i+=1,0===_._tasks.length&&l("empty"),i===_.concurrency&&l("saturated");var u=rt(f(e));n(t,u)}p=!1}},length:()=>_._tasks.length,running:()=>i,workersList:()=>o,idle:()=>_._tasks.length+i===0,pause(){_.paused=!0},resume(){!1!==_.paused&&(_.paused=!1,ze(_.process))}};return Object.defineProperties(_,{saturated:{writable:!1,value:h("saturated")},unsaturated:{writable:!1,value:h("unsaturated")},empty:{writable:!1,value:h("empty")},drain:{writable:!1,value:h("drain")},error:{writable:!1,value:h("error")}}),_}Ye((function(e,t,r,n){n=et(n);var i=Ke(r);return ct(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);var _t=Ye((function(e,t,r,n){return Xe(it(t),e,r,n)}),4);var bt=Ye((function(e,t,r,n){var i=Ke(r);return _t(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);Ye((function(e,t,r){return bt(e,1/0,t,r)}),3);Ye((function(e,t,r){return bt(e,1,t,r)}),3);function yt(e,t){return(r,n,i,o)=>{var a,s=!1;const l=Ke(i);r(n,((r,n,i)=>{l(r,((n,o)=>n||!1===n?i(n):e(o)&&!a?(s=!0,a=t(!0,r),i(null,Ze)):void i()))}),(e=>{if(e)return o(e);o(null,s?a:t(!1))}))}}Ye((function(e,t,r){return yt((e=>e),((e,t)=>t))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt((e=>e),((e,t)=>t))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt((e=>e),((e,t)=>t))(it(1),e,t,r)}),3);function mt(e){return(t,...r)=>Ke(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}mt("dir");Ye((function(e,t,r){r=rt(r);var n,i=Ke(e),o=Ke(t);function a(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,s))}function s(e,t){return e?r(e):!1!==e?t?void i(a):r(null,...n):void 0}return s(null,!0)}),3);function gt(e){return(t,r,n)=>e(t,n)}Ye((function(e,t,r){return lt(e,gt(Ke(t)),r)}),3);var vt=Ye((function(e,t,r,n){return it(t)(e,gt(Ke(r)),n)}),4);var wt=Ye((function(e,t,r){return vt(e,1,t,r)}),3);function St(e){return Ge(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?ze((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}Ye((function(e,t,r){return yt((e=>!e),(e=>!e))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt((e=>!e),(e=>!e))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt((e=>!e),(e=>!e))(ct,e,t,r)}),3);function Et(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function xt(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function At(e,t,r,n){return(Je(t)?Et:xt)(e,t,Ke(r),n)}Ye((function(e,t,r){return At(lt,e,t,r)}),3);Ye((function(e,t,r,n){return At(it(t),e,r,n)}),4);Ye((function(e,t,r){return At(ct,e,t,r)}),3);Ye((function(e,t){var r=rt(t),n=Ke(St(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2);Ye((function(e,t,r,n){var i=Ke(r);return _t(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:a}=t[o],{val:s}=t[o];i.call(r,a)?r[a].push(s):r[a]=[s]}return n(e,r)}))}),4);mt("log");Ye((function(e,t,r,n){n=et(n);var i={},o=Ke(r);return it(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);$e(We?process.nextTick:Ue?setImmediate:Be),Ye(((e,t,r)=>{var n=Je(t)?[]:{};e(t,((e,t,r)=>{Ke(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function Ot(e,t){var r=Ke(e);return pt(((e,t)=>{r(e[0],t)}),t,1)}Symbol.iterator;Ye((function(e,t){if(t=et(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)Ke(e[r])(t)}),2);function Rt(e,t,r,n){const i=Ke(r);return At(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}Ye((function(e,t,r){return Rt(lt,e,t,r)}),3);Ye((function(e,t,r,n){return Rt(it(t),e,r,n)}),4);Ye((function(e,t,r){return Rt(ct,e,t,r)}),3);Ye((function(e,t,r){return yt(Boolean,(e=>e))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt(Boolean,(e=>e))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt(Boolean,(e=>e))(ct,e,t,r)}),3);Ye((function(e,t,r){var n=Ke(t);return ut(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);Ye((function(e,t){var r,n=null;return wt(e,((e,t)=>{Ke(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));Ye((function(e,t,r){r=rt(r);var n=Ke(t),i=Ke(e),o=[];function a(e,...t){if(e)return r(e);o=t,!1!==e&&i(s)}function s(e,t){return e?r(e):!1!==e?t?void n(a):r(null,...o):void 0}return i(s)}),3);Ye((function(e,t){if(t=et(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){Ke(e[r++])(...t,rt(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));var Tt=r(24);const kt={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function Pt(e,t){Error.captureStackTrace(this,this.constructor),this.message=kt[e]||e,this.code=e,this.data=t}Tt.inherits(Pt,Error);var Ct=r(110),Mt=r(113);function It(e){return"/"!==e.slice(-1)?e+"/":e}const{ReaddirGlob:Lt}=De,Dt="win32"===process.platform;class Nt extends Ct.Transform{_supportsDirectory=!1;_supportsSymlink=!1;constructor(e){super(e={highWaterMark:1048576,statConcurrency:4,...e}),this.options=e,this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=Ot(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=Ot(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]}_abort(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()}_append(e,t){let r={source:null,filepath:e};(t=t||{}).name||(t.name=e),t.sourcePath=e,r.data=t,this._entriesCount++,t.stats&&t.stats instanceof n.Stats?(r=this._updateQueueTaskWithStats(r,t.stats),r&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(r))):this._statQueue.push(r)}_finalize(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)}_maybeFinalize(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))}_moduleAppend(e,t,r){this._state.aborted?r():this._module.append(e,t,function(e){if(this._task=null,this._state.aborted)this._shutdown();else{if(e)return this.emit("error",e),void setImmediate(r);this.emit("entry",t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))}_moduleFinalize(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new Pt("NOENDMETHOD"))}_modulePipe(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0}_moduleUnpipe(){this._module.unpipe(this),this._state.modulePiped=!1}_normalizeEntryData(e,t){e={type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1,...e},t&&!1===e.stats&&(e.stats=t);let r="directory"===e.type;var n,i;return e.name&&("string"==typeof e.prefix&&""!==e.prefix&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=(n=e.name,Mt(n,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")),"symlink"!==e.type&&"/"===e.name.slice(-1)?(r=!0,e.type="directory"):r&&(e.name+="/")),"number"==typeof e.mode?e.mode&=Dt?511:4095:e.stats&&null===e.mode?(e.mode=Dt?511&e.stats.mode:4095&e.stats.mode,Dt&&r&&(e.mode=493)):null===e.mode&&(e.mode=r?493:420),e.stats&&null===e.date?e.date=e.stats.mtime:e.date=((i=(i=e.date)||new Date)instanceof Date||(i="string"==typeof i?new Date(i):new Date),i),e}_onModuleError(e){this.emit("error",e)}_onQueueDrain(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()}_onQueueTask(e,t){const r=()=>{e.data.callback&&e.data.callback(),t()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=e,this._moduleAppend(e.source,e.data,r))}_onStatQueueTask(e,t){this._state.finalizing||this._state.finalized||this._state.aborted?t():(0,n.lstat)(e.filepath,function(r,n){if(this._state.aborted)setImmediate(t);else{if(r)return this._entriesCount--,this.emit("warning",r),void setImmediate(t);(e=this._updateQueueTaskWithStats(e,n))&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(e)),setImmediate(t)}}.bind(this))}_shutdown(){this._moduleUnpipe(),this.end()}_transform(e,t,r){e&&(this._pointer+=e.length),r(null,e)}_updateQueueTaskWithStats(e,t){if(t.isFile())e.data.type="file",e.data.sourceType="stream",e.source=new Ne.Readable((function(){return(0,n.createReadStream)(e.filepath)}));else if(t.isDirectory()&&this._supportsDirectory)e.data.name=It(e.data.name),e.data.type="directory",e.data.sourcePath=It(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else{if(!t.isSymbolicLink()||!this._supportsSymlink)return t.isDirectory()?this.emit("warning",new Pt("DIRECTORYNOTSUPPORTED",e.data)):t.isSymbolicLink()?this.emit("warning",new Pt("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new Pt("ENTRYNOTSUPPORTED",e.data)),null;{const t=(0,n.readlinkSync)(e.filepath),r=(0,Pe.dirname)(e.filepath);e.data.type="symlink",e.data.linkname=(0,Pe.relative)(r,(0,Pe.resolve)(r,t)),e.data.sourceType="buffer",e.source=Buffer.concat([])}}return e.data=this._normalizeEntryData(e.data,t),e}abort(){return this._state.aborted||this._state.finalized||this._abort(),this}append(e,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof(t=this._normalizeEntryData(t)).name||0===t.name.length)return this.emit("error",new Pt("ENTRYNAMEREQUIRED")),this;if("directory"===t.type&&!this._supportsDirectory)return this.emit("error",new Pt("DIRECTORYNOTSUPPORTED",{name:t.name})),this;if(e=function(e){return null===e?Buffer.alloc(0):"string"==typeof e?Buffer.from(e):i(e)?e.pipe(new Ct.PassThrough):e}(e),Buffer.isBuffer(e))t.sourceType="buffer";else{if(!i(e))return this.emit("error",new Pt("INPUTSTEAMBUFFERREQUIRED",{name:t.name})),this;t.sourceType="stream"}return this._entriesCount++,this._queue.push({data:t,source:e}),this}directory(e,t,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new Pt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===t?t="":"string"!=typeof t&&(t=e);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});const i=De(e,{stat:!0,dot:!0});return i.on("error",function(e){this.emit("error",e)}.bind(this)),i.on("match",function(o){i.pause();let a=!1,s=Object.assign({},r);s.name=o.relative,s.prefix=t,s.stats=o.stat,s.callback=i.resume.bind(i);try{if(n)if(s=n(s),!1===s)a=!0;else if("object"!=typeof s)throw new Pt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}catch(e){return void this.emit("error",e)}a?i.resume():this._append(o.absolute,s)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}file(e,t){return this._state.finalize||this._state.aborted?(this.emit("error",new Pt("QUEUECLOSED")),this):"string"!=typeof e||0===e.length?(this.emit("error",new Pt("FILEFILEPATHREQUIRED")),this):(this._append(e,t),this)}glob(e,t,r){this._pending++,t={stat:!0,pattern:e,...t};const n=new Lt(t.cwd||".",t);return n.on("error",function(e){this.emit("error",e)}.bind(this)),n.on("match",function(e){n.pause();const t=Object.assign({},r);t.callback=n.resume.bind(n),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}finalize(){if(this._state.aborted){var e=new Pt("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var t=new Pt("FINALIZING");return this.emit("error",t),Promise.reject(t)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise((function(e,t){var n;r._module.on("end",(function(){n||e()})),r._module.on("error",(function(e){n=!0,t(e)}))}))}symlink(e,t,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new Pt("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new Pt("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._supportsSymlink)return this.emit("error",new Pt("SYMLINKNOTSUPPORTED",{filepath:e})),this;var n={type:"symlink"};return n.name=e.replace(/\\/g,"/"),n.linkname=t.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this}pointer(){return this._pointer}}class jt{getName(){}getSize(){}getLastModifiedDate(){}isDirectory(){}}function Ft(e,t){var r=(t=t||!1)?e.getFullYear():e.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(t?e.getMonth():e.getUTCMonth())+1<<21|(t?e.getDate():e.getUTCDate())<<16|(t?e.getHours():e.getUTCHours())<<11|(t?e.getMinutes():e.getUTCMinutes())<<5|(t?e.getSeconds():e.getUTCSeconds())/2}function Ut(e){return new Date(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1)}function Wt(e){var t=Buffer.alloc(8);return t.writeUInt32LE(e%4294967296,0),t.writeUInt32LE(e/4294967296|0,4),t}function Bt(e){var t=Buffer.alloc(2);return t.writeUInt16LE((65535&e)>>>0,0),t}function $t(e,t){return e.readUInt16LE(t)}function zt(e){var t=Buffer.alloc(4);return t.writeUInt32LE((4294967295&e)>>>0,0),t}class Ht{constructor(){return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this}encode(){return Bt((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))}static parse(e,t){var r=$t(e,t),n=new Ht;return n.useDataDescriptor(!!(8&r)),n.useUTF8ForNames(!!(2048&r)),n.useStrongEncryption(!!(64&r)),n.useEncryption(!!(1&r)),n.setSlidingDictionarySize(2&r?8192:4096),n.setNumberOfShannonFanoTrees(4&r?3:2),n}setNumberOfShannonFanoTrees(e){this.numberOfShannonFanoTrees=e}getNumberOfShannonFanoTrees(){return this.numberOfShannonFanoTrees}setSlidingDictionarySize(e){this.slidingDictionarySize=e}getSlidingDictionarySize(){return this.slidingDictionarySize}useDataDescriptor(e){this.descriptor=e}usesDataDescriptor(){return this.descriptor}useEncryption(e){this.encryption=e}usesEncryption(){return this.encryption}useStrongEncryption(e){this.strongEncryption=e}usesStrongEncryption(){return this.strongEncryption}useUTF8ForNames(e){this.utf8=e}usesUTF8ForNames(){return this.utf8}}const Vt=61440,qt=40960,Gt=Buffer.alloc(0),Kt=Buffer.from(Array(2)),Yt=Buffer.from(Array(4)),Qt=67324752,Xt=134695760,Jt=33639248,Zt=101010256,er=101075792,tr=117853008,rr=65535,nr=4294967295;class ir extends jt{constructor(e){super(),this.platform=0,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new Ht,this.crc=0,this.time=-1,this.minver=10,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)}getCentralDirectoryExtra(){return this.getExtra()}getComment(){return null!==this.comment?this.comment:""}getCompressedSize(){return this.csize}getCrc(){return this.crc}getExternalAttributes=function(){return this.exattr};getExtra(){return null!==this.extra?this.extra:Gt}getGeneralPurposeBit(){return this.gpb}getInternalAttributes(){return this.inattr}getLastModifiedDate(){return this.getTime()}getLocalFileDataExtra(){return this.getExtra()}getMethod(){return this.method}getName(){return this.name}getPlatform(){return this.platform}getSize(){return this.size}getTime(){return-1!==this.time?Ut(this.time):-1}getTimeDos(){return-1!==this.time?this.time:0}getUnixMode(){return 3!==this.platform?0:this.getExternalAttributes()>>16&65535}getVersionNeededToExtract(){return this.minver}setComment(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e}setCompressedSize(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e}setCrc(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e}setExternalAttributes(e){this.exattr=e>>>0}setExtra(e){this.extra=e}setGeneralPurposeBit(e){if(!(e instanceof Ht))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e}setInternalAttributes(e){this.inattr=e}setMethod(e){if(e<0)throw new Error("invalid entry compression method");this.method=e}setName(e,t=!1){e=Mt(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),t&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e}setPlatform(e){this.platform=e}setSize(e){if(e<0)throw new Error("invalid entry size");this.size=e}setTime(e,t){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=Ft(e,t)}setUnixMode(e){var t=0;t|=(e|=this.isDirectory()?16384:32768)<<16|(this.isDirectory()?16:32),this.setExternalAttributes(t),this.mode=4095&e,this.platform=3}setVersionNeededToExtract(e){this.minver=e}isDirectory(){return"/"===this.getName().slice(-1)}isUnixSymlink(){return(this.getUnixMode()&Vt)===qt}isZip64(){return this.csize>nr||this.size>nr}}var or=r(114);r(16);function ar(e){if(null===e)return Buffer.alloc(0);if("string"==typeof e)return Buffer.from(e);if(i(e)&&!e._readableState){var t=new or.PassThrough;return e.pipe(t),t}return e}class sr extends or.Transform{constructor(e){super(e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}}_appendBuffer(e,t,r){}_appendStream(e,t,r){}_emitErrorCallback=function(e){e&&this.emit("error",e)};_finish(e){}_normalizeEntry(e){}_transform(e,t,r){r(null,e)}entry(e,t,r){if(t=t||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),e instanceof jt)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,t=ar(t),Buffer.isBuffer(t))this._appendBuffer(e,t,r);else{if(!i(t))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(e,t,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))}finish(){this._archive.processing?this._archive.finish=!0:this._finish()}getBytesWritten(){return this.offset}write(e,t){return e&&(this.offset+=e.length),super.write(e,t)}}var lr=r(115),ur=r(120);class cr extends ur.Transform{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,t,r){e&&(this.checksum=lr.buf(e,this.checksum)>>>0,this.rawSize+=e.length),r(null,e)}digest(e){const t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}var fr=r(80);class dr extends fr.DeflateRaw{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,t){return e&&(this.compressedSize+=e.length),super.push(e,t)}_transform(e,t,r){e&&(this.checksum=lr.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,t,r)}digest(e){const t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}}class hr extends sr{constructor(e){const t=("object"!=typeof(r=e)&&(r={}),"object"!=typeof r.zlib&&(r.zlib={}),"number"!=typeof r.zlib.level&&(r.zlib.level=1),r.forceZip64=!!r.forceZip64,r.forceLocalTime=!!r.forceLocalTime,r);var r;super(t),this.options=t,this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}}_afterAppend(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()}_appendBuffer(e,t,r){0===t.length&&e.setMethod(0);var n=e.getMethod();return 0===n&&(e.setSize(t.length),e.setCompressedSize(t.length),e.setCrc(lr.buf(t)>>>0)),this._writeLocalFileHeader(e),0===n?(this.write(t),this._afterAppend(e),void r(null,e)):8===n?void this._smartStream(e,r).end(t):void r(new Error("compression method "+n+" not implemented"))}_appendStream(e,t,r){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(20),this._writeLocalFileHeader(e);var n=this._smartStream(e,r);t.once("error",(function(e){n.emit("error",e),n.end()})),t.pipe(n)}_finish(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()}_normalizeEntry(e){-1===e.getMethod()&&e.setMethod(8),8===e.getMethod()&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(20)),-1===e.getTime()&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}}_smartStream(e,t){var r=8===e.getMethod()?new dr(this.options.zlib):new cr,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);e.setCrc(i),e.setSize(r.size()),e.setCompressedSize(r.size(!0)),this._afterAppend(e),t(n,e)}.bind(this)),r.once("error",(function(e){n=e})),r.pipe(this,{end:!1}),r}_writeCentralDirectoryEnd(){var e=this._entries.length,t=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(e=rr,t=nr,r=nr),this.write(zt(Zt)),this.write(Kt),this.write(Kt),this.write(Bt(e)),this.write(Bt(e)),this.write(zt(t)),this.write(zt(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(Bt(i)),this.write(n)}_writeCentralDirectoryZip64(){this.write(zt(er)),this.write(Wt(44)),this.write(Bt(45)),this.write(Bt(45)),this.write(Yt),this.write(Yt),this.write(Wt(this._entries.length)),this.write(Wt(this._entries.length)),this.write(Wt(this._archive.centralLength)),this.write(Wt(this._archive.centralOffset)),this.write(zt(tr)),this.write(Yt),this.write(Wt(this._archive.centralOffset+this._archive.centralLength)),this.write(zt(1))}_writeCentralFileHeader(e){var t=e.getGeneralPurposeBit(),r=e.getMethod(),n=e._offsets.file,i=e.getSize(),o=e.getCompressedSize();if(e.isZip64()||n>nr){i=nr,o=nr,n=nr,e.setVersionNeededToExtract(45);var a=Buffer.concat([Bt(1),Bt(24),Wt(e.getSize()),Wt(e.getCompressedSize()),Wt(e._offsets.file)],28);e.setExtra(a)}this.write(zt(Jt)),this.write(Bt(e.getPlatform()<<8|45)),this.write(Bt(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(Bt(r)),this.write(zt(e.getTimeDos())),this.write(zt(e.getCrc())),this.write(zt(o)),this.write(zt(i));var s=e.getName(),l=e.getComment(),u=e.getCentralDirectoryExtra();t.usesUTF8ForNames()&&(s=Buffer.from(s),l=Buffer.from(l)),this.write(Bt(s.length)),this.write(Bt(u.length)),this.write(Bt(l.length)),this.write(Kt),this.write(Bt(e.getInternalAttributes())),this.write(zt(e.getExternalAttributes())),this.write(zt(n)),this.write(s),this.write(u),this.write(l)}_writeDataDescriptor(e){this.write(zt(Xt)),this.write(zt(e.getCrc())),e.isZip64()?(this.write(Wt(e.getCompressedSize())),this.write(Wt(e.getSize()))):(this.write(zt(e.getCompressedSize())),this.write(zt(e.getSize())))}_writeLocalFileHeader(e){var t=e.getGeneralPurposeBit(),r=e.getMethod(),n=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(t.useDataDescriptor(!0),e.setVersionNeededToExtract(45)),t.usesUTF8ForNames()&&(n=Buffer.from(n)),e._offsets.file=this.offset,this.write(zt(Qt)),this.write(Bt(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(Bt(r)),this.write(zt(e.getTimeDos())),e._offsets.data=this.offset,t.usesDataDescriptor()?(this.write(Yt),this.write(Yt),this.write(Yt)):(this.write(zt(e.getCrc())),this.write(zt(e.getCompressedSize())),this.write(zt(e.getSize()))),this.write(Bt(n.length)),this.write(Bt(i.length)),this.write(n),this.write(i),e._offsets.contents=this.offset}getComment(e){return null!==this._archive.comment?this._archive.comment:""}isZip64(){return this._archive.forceZip64||this._entries.length>rr||this._archive.centralLength>nr||this._archive.centralOffset>nr}setComment(e){this._archive.comment=e}}
|
|
13
|
+
var r;r=function(e){e.version="1.2.2";var t=function(){for(var e=0,t=new Array(256),r=0;256!=r;++r)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=r)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[r]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),r=function(e){var t=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=e[n];for(n=0;256!=n;++n)for(r=e[n],t=256+n;t<4096;t+=256)r=i[t]=r>>>8^e[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(t),n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],u=r[6],c=r[7],f=r[8],d=r[9],h=r[10],p=r[11],_=r[12],b=r[13],y=r[14];e.table=t,e.bstr=function(e,r){for(var n=~r,i=0,o=e.length;i<o;)n=n>>>8^t[255&(n^e.charCodeAt(i++))];return~n},e.buf=function(e,r){for(var m=~r,g=e.length-15,v=0;v<g;)m=y[e[v++]^255&m]^b[e[v++]^m>>8&255]^_[e[v++]^m>>16&255]^p[e[v++]^m>>>24]^h[e[v++]]^d[e[v++]]^f[e[v++]]^c[e[v++]]^u[e[v++]]^l[e[v++]]^s[e[v++]]^a[e[v++]]^o[e[v++]]^i[e[v++]]^n[e[v++]]^t[e[v++]];for(g+=15;v<g;)m=m>>>8^t[255&(m^e[v++])];return~m},e.str=function(e,r){for(var n=~r,i=0,o=e.length,a=0,s=0;i<o;)(a=e.charCodeAt(i++))<128?n=n>>>8^t[255&(n^a)]:a<2048?n=(n=n>>>8^t[255&(n^(192|a>>6&31))])>>>8^t[255&(n^(128|63&a))]:a>=55296&&a<57344?(a=64+(1023&a),s=1023&e.charCodeAt(i++),n=(n=(n=(n=n>>>8^t[255&(n^(240|a>>8&7))])>>>8^t[255&(n^(128|a>>2&63))])>>>8^t[255&(n^(128|s>>6&15|(3&a)<<4))])>>>8^t[255&(n^(128|63&s))]):n=(n=(n=n>>>8^t[255&(n^(224|a>>12&15))])>>>8^t[255&(n^(128|a>>6&63))])>>>8^t[255&(n^(128|63&a))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(t):r({})},(e,t,r)=>{var n=r(78);e.exports=function(e,t,r,i,o){var a=n(e,t,r,i,o);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(109).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(41).Buffer,i=r(24);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},(e,t,r)=>{const n=r(134),i=r(101),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},(e,t,r)=>{const n={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{e.exports=r(39).constants||n}catch{e.exports=n}},(e,t,r)=>{var n=r(111),i=r(112);e.exports=function(e,t,r){if(n())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return r&&i(a,r.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,r)=>{var n=r(24),i=r(179);function o(e,t,r){e[t]=function(){return delete e[t],r.apply(this,arguments),this[t].apply(this,arguments)}}function a(e,t){if(!(this instanceof a))return new a(e,t);i.call(this,t),o(this,"_read",(function(){var r=e.call(this,t),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function s(e,t){if(!(this instanceof s))return new s(e,t);i.call(this,t),o(this,"_write",(function(){var r=e.call(this,t),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}e.exports={Readable:a,Writable:s},n.inherits(a,i),n.inherits(s,i)},e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},(e,t,r)=>{e.exports=r(7).EventEmitter},(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},(e,t,r)=>{e.exports=o;var n=r(85),i=Object.create(r(42));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(34),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(2),{promisify:{custom:s}}=r(13),{streamReturningOperators:l,promiseReturningOperators:u}=r(180),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(9),f=r(86),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(45),{pipeline:p}=r(56),{destroyer:_}=r(30),b=r(21),y=r(91),m=r(18),g=e.exports=r(57).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(43);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(58),g.Duplex=r(25),g.Transform=r(90),g.PassThrough=r(89),g.pipeline=p;const{addAbortSignal:v}=r(44);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(2),{Buffer:s}=r(0),{inspect:l}=r(13);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(18),p=r(21),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(9),{destroyer:m}=r(30),g=r(25),v=r(43),w=r(58),{createDeferredPromise:S}=r(13),E=r(88),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(2);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(3),{promisify:{custom:s}}=r(14),{streamReturningOperators:l,promiseReturningOperators:u}=r(181),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(10),f=r(92),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(48),{pipeline:p}=r(59),{destroyer:_}=r(31),b=r(22),y=r(96),m=r(19),g=e.exports=r(60).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(46);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(61),g.Duplex=r(26),g.Transform=r(95),g.PassThrough=r(94),g.pipeline=p;const{addAbortSignal:v}=r(47);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(3),{Buffer:s}=r(0),{inspect:l}=r(14);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(19),p=r(22),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(10),{destroyer:m}=r(31),g=r(26),v=r(46),w=r(61),{createDeferredPromise:S}=r(14),E=r(93),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(3);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Buffer:n}=r(0),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:a}=r(4),{promisify:{custom:s}}=r(15),{streamReturningOperators:l,promiseReturningOperators:u}=r(182),{codes:{ERR_ILLEGAL_CONSTRUCTOR:c}}=r(11),f=r(97),{setDefaultHighWaterMark:d,getDefaultHighWaterMark:h}=r(51),{pipeline:p}=r(62),{destroyer:_}=r(32),b=r(23),y=r(101),m=r(20),g=e.exports=r(63).Stream;g.isDestroyed=m.isDestroyed,g.isDisturbed=m.isDisturbed,g.isErrored=m.isErrored,g.isReadable=m.isReadable,g.isWritable=m.isWritable,g.Readable=r(49);for(const w of o(l)){const S=l[w];function E(...e){if(new.target)throw c();return g.Readable.from(a(S,this,e))}i(E,"name",{__proto__:null,value:S.name}),i(E,"length",{__proto__:null,value:S.length}),i(g.Readable.prototype,w,{__proto__:null,value:E,enumerable:!1,configurable:!0,writable:!0})}for(const x of o(u)){const A=u[x];function O(...e){if(new.target)throw c();return a(A,this,e)}i(O,"name",{__proto__:null,value:A.name}),i(O,"length",{__proto__:null,value:A.length}),i(g.Readable.prototype,x,{__proto__:null,value:O,enumerable:!1,configurable:!0,writable:!0})}g.Writable=r(64),g.Duplex=r(27),g.Transform=r(100),g.PassThrough=r(99),g.pipeline=p;const{addAbortSignal:v}=r(50);g.addAbortSignal=v,g.finished=b,g.destroy=_,g.compose=f,g.setDefaultHighWaterMark=d,g.getDefaultHighWaterMark=h,i(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(p,s,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(b,s,{__proto__:null,enumerable:!0,get:()=>y.finished}),g.Stream=g,g._isUint8Array=function(e){return e instanceof Uint8Array},g._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},(e,t,r)=>{const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:a}=r(4),{Buffer:s}=r(0),{inspect:l}=r(15);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(o(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}o(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return l(this,{...t,depth:0,customInspect:!1})}}},(e,t,r)=>{const n=r(1),i=r(0),{isReadable:o,isWritable:a,isIterable:s,isNodeStream:l,isReadableNodeStream:u,isWritableNodeStream:c,isDuplexNodeStream:f,isReadableStream:d,isWritableStream:h}=r(20),p=r(23),{AbortError:_,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:y}}=r(11),{destroyer:m}=r(32),g=r(27),v=r(49),w=r(64),{createDeferredPromise:S}=r(15),E=r(98),x=globalThis.Blob||i.Blob,A=void 0!==x?function(e){return e instanceof x}:function(e){return!1},O=globalThis.AbortController||r(12).AbortController,{FunctionPrototypeCall:R}=r(4);class T extends g{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function k(e){const t=e.readable&&"function"!=typeof e.readable.read?v.wrap(e.readable):e.readable,r=e.writable;let n,i,s,l,u,c=!!o(t),f=!!a(r);function d(e){const t=l;l=null,t?t(e):e&&u.destroy(e)}return u=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:c,writable:f}),f&&(p(r,(e=>{f=!1,e&&m(t,e),d(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),c&&(p(t,(e=>{c=!1,e&&m(t,e),d(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,o){e||null===l||(e=new _),s=null,n=null,i=null,null===l?o(e):(l=o,m(r,e),m(t,e))},u}e.exports=function e(t,r){if(f(t))return t;if(u(t))return k({readable:t});if(c(t))return k({writable:t});if(l(t))return k({writable:!1,readable:!1});if(d(t))return k({readable:v.fromWeb(t)});if(h(t))return k({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:o,destroy:a}=function(e){let{promise:t,resolve:r}=S();const i=new O,o=i.signal,a=e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:a,cb:s}=await e;if(n.nextTick(s),a)return;if(o.aborted)throw new _(void 0,{cause:o.reason});({promise:t,resolve:r}=S()),yield i}}(),{signal:o});return{value:a,write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return E(T,e,{objectMode:!0,write:i,final:o,destroy:a});const l=null==e?void 0:e.then;if("function"==typeof l){let t;const r=R(l,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{m(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:a})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(A(t))return e(t.arrayBuffer());if(s(t))return E(T,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return T.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){return k({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?c(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0})}const i=null==t?void 0:t.then;if("function"==typeof i){let e;return R(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{m(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new b(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},(e,t,r)=>{const{Writable:n,Readable:i,getStreamError:o}=r(102),a=r(103),s=r(55),l=r(145),u=s.alloc(0);class c{constructor(){this.buffered=0,this.shifted=0,this.queue=new a,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return 0===this._buffered?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(0===e)return u;let t=this._next(e);if(e===t.byteLength)return t;const r=[t];for(;(e-=t.byteLength)>0;)t=this._next(e),r.push(t);return s.concat(r)}_next(e){const t=this.queue.peek(),r=t.byteLength-this._offset;if(e>=r){const e=this._offset?t.subarray(this._offset,t.byteLength):t;return this.queue.shift(),this._offset=0,this.buffered-=r,this.shifted+=r,e}return this.buffered-=e,this.shifted+=e,t.subarray(this._offset,this._offset+=e)}}class f extends i{constructor(e,t,r){super(),this.header=t,this.offset=r,this._parent=e}_read(e){0===this.header.size&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(o(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=p(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}}class d extends n{constructor(e){super(e),e||(e={}),this._buffer=new c,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=h,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e)return this.destroy(e),void this._continueWrite(e);this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=l.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),0===this._header.size||"directory"===this._header.type?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=l.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=l.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=l.decodePax(e);break;case"pax-header":this._pax=null===this._paxGlobal?l.decodePax(e):Object.assign({},this._paxGlobal,l.decodePax(e))}}_consumeLongHeader(){this._longHeader=!1,this._missing=p(this._header.size);const e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(e){return this._continueWrite(e),!1}return!0}_consumeStream(){const e=this._buffer.shiftFirst(this._missing);if(null===e)return!1;this._missing-=e.byteLength;const t=this._stream.push(e);return 0===this._missing?(this._stream.push(null),t&&this._stream._detach(),t&&!1===this._locked):t}_createStream(){return new f(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;)if(this._missing>0){if(null!==this._stream){if(!1===this._consumeStream())return;continue}if(!0===this._longHeader){if(this._missing>this._buffer.buffered)break;if(!1===this._consumeLongHeader())return!1;continue}const e=this._buffer.shiftFirst(this._missing);null!==e&&(this._missing-=e.byteLength)}else{if(this._buffer.buffered<512)break;if(null!==this._stream||!1===this._consumeHeader())return}this._continueWrite(null)}_continueWrite(e){const t=this._callback;this._callback=h,t(e)}_write(e,t){this._callback=t,this._buffer.push(e),this._update()}_final(e){this._finished=0===this._missing&&0===this._buffer.buffered,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(o(this)),e(null)}[Symbol.asyncIterator](){let e=null,t=null,r=null,n=null,i=null;const o=this;return this.on("entry",(function(e,o,a){i=a,o.on("error",h),t?(t({value:o,done:!1}),t=r=null):n=o})),this.on("error",(t=>{e=t})),this.on("close",(function(){if(a(e),!t)return;e?r(e):t({value:void 0,done:!0});t=r=null})),{[Symbol.asyncIterator](){return this},next:()=>new Promise(s),return:()=>l(null),throw:e=>l(e)};function a(e){if(!i)return;const t=i;i=null,t(e)}function s(i,s){return e?s(e):n?(i({value:n,done:!1}),void(n=null)):(t=i,r=s,a(null),void(o._finished&&t&&(t({value:void 0,done:!0}),t=r=null)))}function l(e){return o.destroy(e),a(e),new Promise(((t,r)=>{if(o.destroyed)return t({value:void 0,done:!0});o.once("close",(function(){e?r(e):t({value:void 0,done:!0})}))}))}}}function h(){}function p(e){return(e&=511)&&512-e}e.exports=function(e){return new d(e)}},e=>{e.exports="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e)},e=>{e.exports=class{constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return void 0===this.buffer[this.top]&&(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){const e=this.buffer[this.btm];if(void 0!==e)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return void 0===this.buffer[this.btm]}}},e=>{function t(e){return e.length}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r},write:function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);for(let t=0;t<o;t++)e[n+t]=r.charCodeAt(t);return o}}},e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(256);for(let e=0;e<64;e++)r[t.charCodeAt(e)]=e;function n(e){let t=e.length;return 61===e.charCodeAt(t-1)&&t--,t>1&&61===e.charCodeAt(t-1)&&t--,3*t>>>2}r[45]=62,r[95]=63,e.exports={byteLength:n,toString:function(e){const r=e.byteLength;let n="";for(let i=0;i<r;i+=3)n+=t[e[i]>>2]+t[(3&e[i])<<4|e[i+1]>>4]+t[(15&e[i+1])<<2|e[i+2]>>6]+t[63&e[i+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n},write:function(e,t,i=0,o=n(t)){const a=Math.min(o,e.byteLength-i);for(let n=0,i=0;i<a;n+=4){const o=r[t.charCodeAt(n)],a=r[t.charCodeAt(n+1)],s=r[t.charCodeAt(n+2)],l=r[t.charCodeAt(n+3)];e[i++]=o<<2|a>>4,e[i++]=(15&a)<<4|s>>2,e[i++]=(3&s)<<6|63&l}return a}}},e=>{function t(e){return e.length>>>1}function r(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:void 0}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;e=new DataView(e.buffer,e.byteOffset,t);let r="",n=0;for(let i=t-t%4;n<i;n+=4)r+=e.getUint32(n).toString(16).padStart(8,"0");for(;n<t;n++)r+=e.getUint8(n).toString(16).padStart(2,"0");return r},write:function(e,n,i=0,o=t(n)){const a=Math.min(o,e.byteLength-i);for(let t=0;t<a;t++){const o=r(n.charCodeAt(2*t)),a=r(n.charCodeAt(2*t+1));if(void 0===o||void 0===a)return e.subarray(0,t);e[i+t]=o<<4|a}return a}}},e=>{function t(e){let t=0;for(let r=0,n=e.length;r<n;r++){const i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){const n=e.charCodeAt(r+1);if(n>=56320&&n<=57343){t+=4,r++;continue}}t+=i<=127?1:i<=2047?2:3}return t}let r,n;if("undefined"!=typeof TextDecoder){const e=new TextDecoder;r=function(t){return e.decode(t)}}else r=function(e){const t=e.byteLength;let r="",n=0;for(;n<t;){let i=e[n];if(i<=127){r+=String.fromCharCode(i),n++;continue}let o=0,a=0;if(i<=223?(o=1,a=31&i):i<=239?(o=2,a=15&i):i<=244&&(o=3,a=7&i),t-n-o>0){let t=0;for(;t<o;)i=e[n+t+1],a=a<<6|63&i,t+=1}else a=65533,o=t-n;r+=String.fromCodePoint(a),n+=o+1}return r};if("undefined"!=typeof TextEncoder){const e=new TextEncoder;n=function(r,n,i=0,o=t(n)){const a=Math.min(o,r.byteLength-i);return e.encodeInto(n,r.subarray(i,i+a)),a}}else n=function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);e=e.subarray(n,n+o);let a=0,s=0;for(;a<r.length;){const t=r.codePointAt(a);if(t<=127){e[s++]=t,a++;continue}let n=0,i=0;for(t<=2047?(n=6,i=192):t<=65535?(n=12,i=224):t<=2097151&&(n=18,i=240),e[s++]=i|t>>n,n-=6;n>=0;)e[s++]=128|t>>n&63,n-=6;a+=t>=65536?2:1}return o};e.exports={byteLength:t,toString:r,write:n}},e=>{function t(e){return 2*e.length}e.exports={byteLength:t,toString:function(e){const t=e.byteLength;let r="";for(let n=0;n<t-1;n+=2)r+=String.fromCharCode(e[n]+256*e[n+1]);return r},write:function(e,r,n=0,i=t(r)){const o=Math.min(i,e.byteLength-n);let a=o;for(let t=0;t<r.length&&!((a-=2)<0);++t){const i=r.charCodeAt(t),o=i>>8,a=i%256;e[n+2*t]=a,e[n+2*t+1]=o}return o}}},(e,t,r)=>{const n=r(55),i="0".charCodeAt(0),o=n.from([117,115,116,97,114,0]),a=n.from([i,i]),s=n.from([117,115,116,97,114,32]),l=n.from([32,0]),u=257,c=263;function f(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n}function d(e){let t=256;for(let r=0;r<148;r++)t+=e[r];for(let r=156;r<512;r++)t+=e[r];return t}function h(e,t){return(e=e.toString(8)).length>t?"7777777777777777777".slice(0,t)+" ":"0000000000000000000".slice(0,t-e.length)+e+" "}function p(e,t,r){if(128&(e=e.subarray(t,t+r))[t=0])return function(e){let t;if(128===e[0])t=!0;else{if(255!==e[0])return null;t=!1}const r=[];let n;for(n=e.length-1;n>0;n--){const i=e[n];t?r.push(i):r.push(255-i)}let i=0;const o=r.length;for(n=0;n<o;n++)i+=r[n]*Math.pow(256,n);return t?i:-1*i}(e);{for(;t<e.length&&32===e[t];)t++;const r=(i=f(e,32,t,e.length),o=e.length,a=e.length,"number"!=typeof i?a:(i=~~i)>=o?o:i>=0||(i+=o)>=0?i:0);for(;t<r&&0===e[t];)t++;return r===t?0:parseInt(n.toString(e.subarray(t,r)),8)}var i,o,a}function _(e,t,r,i){return n.toString(e.subarray(t,f(e,0,t,t+r)),i)}function b(e){const t=n.byteLength(e);let r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e}t.decodeLongPath=function(e,t){return _(e,0,e.length,t)},t.encodePax=function(e){let t="";e.name&&(t+=b(" path="+e.name+"\n")),e.linkname&&(t+=b(" linkpath="+e.linkname+"\n"));const r=e.pax;if(r)for(const e in r)t+=b(" "+e+"="+r[e]+"\n");return n.from(t)},t.decodePax=function(e){const t={};for(;e.length;){let r=0;for(;r<e.length&&32!==e[r];)r++;const i=parseInt(n.toString(e.subarray(0,r)),10);if(!i)return t;const o=n.toString(e.subarray(r+1,i-1)),a=o.indexOf("=");if(-1===a)return t;t[o.slice(0,a)]=o.slice(a+1),e=e.subarray(i)}return t},t.encode=function(e){const t=n.alloc(512);let r=e.name,s="";if(5===e.typeflag&&"/"!==r[r.length-1]&&(r+="/"),n.byteLength(r)!==r.length)return null;for(;n.byteLength(r)>100;){const e=r.indexOf("/");if(-1===e)return null;s+=s?"/"+r.slice(0,e):r.slice(0,e),r=r.slice(e+1)}return n.byteLength(r)>100||n.byteLength(s)>155||e.linkname&&n.byteLength(e.linkname)>100?null:(n.write(t,r),n.write(t,h(4095&e.mode,6),100),n.write(t,h(e.uid,6),108),n.write(t,h(e.gid,6),116),function(e,t,r){e.toString(8).length>11?function(e,t,r){t[r]=128;for(let n=11;n>0;n--)t[r+n]=255&e,e=Math.floor(e/256)}(e,t,r):n.write(t,h(e,11),r)}(e.size,t,124),n.write(t,h(e.mtime.getTime()/1e3|0,11),136),t[156]=i+function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(e.type),e.linkname&&n.write(t,e.linkname,157),n.copy(o,t,u),n.copy(a,t,263),e.uname&&n.write(t,e.uname,265),e.gname&&n.write(t,e.gname,297),n.write(t,h(e.devmajor||0,6),329),n.write(t,h(e.devminor||0,6),337),s&&n.write(t,s,345),n.write(t,h(d(t),6),148),t)},t.decode=function(e,t,r){let a=0===e[156]?0:e[156]-i,f=_(e,0,100,t);const h=p(e,100,8),b=p(e,108,8),y=p(e,116,8),m=p(e,124,12),g=p(e,136,12),v=function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(a),w=0===e[157]?null:_(e,157,100,t),S=_(e,265,32),E=_(e,297,32),x=p(e,329,8),A=p(e,337,8),O=d(e);if(256===O)return null;if(O!==p(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(function(e){return n.equals(o,e.subarray(u,263))}(e))e[345]&&(f=_(e,345,155,t)+"/"+f);else if(function(e){return n.equals(s,e.subarray(u,263))&&n.equals(l,e.subarray(c,265))}(e));else if(!r)throw new Error("Invalid tar header: unknown format.");return 0===a&&f&&"/"===f[f.length-1]&&(a=5),{name:f,mode:h,uid:b,gid:y,size:m,mtime:new Date(1e3*g),type:v,linkname:w,uname:S,gname:E,devmajor:x,devminor:A,pax:null}}},(e,t,r)=>{const{Readable:n,Writable:i,getStreamError:o}=r(102),a=r(55),s=r(121),l=r(145),u=a.alloc(1024);class c extends i{constructor(e,t,r){super({mapWritable:p,eagerOpen:!0}),this.written=0,this.header=t,this._callback=r,this._linkname=null,this._isLinkname="symlink"===t.type&&!t.linkname,this._isVoid="file"!==t.type&&"contiguous-file"!==t.type,this._finished=!1,this._pack=e,this._openCallback=null,null===this._pack._stream?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(null===this._callback)return;const t=this._callback;this._callback=null,t(e)}_continueOpen(){null===this._pack._stream&&(this._pack._stream=this);const e=this._openCallback;if(this._openCallback=null,null!==e){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,t){return this._isLinkname?(this._linkname=this._linkname?a.concat([this._linkname,e]):e,t(null)):this._isVoid?e.byteLength>0?t(new Error("No body allowed for this entry")):t():(this.written+=e.byteLength,this._pack.push(e)?t():void(this._pack._drain=t))}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?a.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),h(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return o(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}}class f extends n{constructor(e){super(e),this._drain=d,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,t,r){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");"function"==typeof t&&(r=t,t=null),r||(r=d),e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=function(e){switch(e&s.S_IFMT){case s.S_IFBLK:return"block-device";case s.S_IFCHR:return"character-device";case s.S_IFDIR:return"directory";case s.S_IFIFO:return"fifo";case s.S_IFLNK:return"symlink"}return"file"}(e.mode)),e.mode||(e.mode="directory"===e.type?493:420),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof t&&(t=a.from(t));const n=new c(this,e,r);return a.isBuffer(t)?(e.size=t.byteLength,n.write(t),n.end(),n):(n._isVoid,n)}finalize(){this._stream||this._pending.length>0?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(u),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){const t=l.encode(e);if(t)return void this.push(t)}this._encodePax(e)}_encodePax(e){const t=l.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(l.encode(r)),this.push(t),h(this,t.byteLength),r.size=e.size,r.type=e.type,this.push(l.encode(r))}_doDrain(){const e=this._drain;this._drain=d,e()}_predestroy(){const e=o(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){const t=this._pending.shift();t.destroy(e),t._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}}function d(){}function h(e,t){(t&=511)&&e.push(u.subarray(0,512-t))}function p(e){return a.isBuffer(e)?e:a.from(e)}e.exports=function(e){return new f(e)}},(e,t,r)=>{const n=r(16);function i(){if(!(this instanceof i))return new i;n.Transform.call(this)}r(24).inherits(i,n.Transform),i.prototype._transform=function(e,t,r){r()},e.exports=i},(e,t,r)=>{const n=r(16),i=r(65),o=r(104),a=r(67);e.exports=function(e,t){const r=n.PassThrough({objectMode:!0}),s=n.PassThrough(),l=n.Transform({objectMode:!0}),u=e instanceof RegExp?e:e&&new RegExp(e);let c;l._transform=function(e,t,r){if(c||u&&!u.exec(e.path))return e.autodrain(),r();c=!0,f.emit("entry",e),e.on("error",(function(e){s.emit("error",e)})),e.pipe(s).on("error",(function(e){r(e)})).on("finish",(function(e){r(null,e)}))},r.pipe(i(t)).on("error",(function(e){s.emit("error",e)})).pipe(l).on("error",Object).on("finish",(function(){c?s.end():s.emit("error",new Error("PATTERN_NOT_FOUND"))}));const f=o(r,s);return f.buffer=function(){return a(s)},f}},(e,t,r)=>{e.exports=function(e){e.path=o.resolve(o.normalize(e.path));const t=new n(e),r=new a.Writable({objectMode:!0});r._write=async function(t,r,n){const a=o.join(e.path,t.path.replace(/\\/g,"/"));if(0!=a.indexOf(e.path))return n();if("Directory"==t.type)return await i.ensureDir(a),n();await i.ensureDir(o.dirname(a));const s=e.getWriter?e.getWriter({path:a}):i.createWriteStream(a);t.pipe(s).on("error",n).on("close",n)};const l=s(t,r);return t.once("crx-header",(function(e){l.crxHeader=e})),t.pipe(r).on("finish",(function(){l.emit("close")})),l.promise=function(){return new Promise((function(e,t){l.on("close",e),l.on("error",t)}))},l};const n=r(65),i=r(105),o=r(6),a=r(16),s=r(104)},(e,t,r)=>{var n=r(188),i=process.cwd,o=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return o||(o=i.call(process)),o};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var s=process.chdir;process.chdir=function(e){o=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}e.exports=function(e){n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,(function(t,n){t?i&&i(t):e.fchmod(n,r,(function(t){e.close(n,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,r){var i,o=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0;try{i=e.fchmodSync(o,r),a=!1}finally{if(a)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}}(e);e.lutimes||function(e){n.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,(function(t,n){t?o&&o(t):e.futimes(n,r,i,(function(t){e.close(n,(function(e){o&&o(t||e)}))}))}))},e.lutimesSync=function(t,r,i){var o,a=e.openSync(t,n.O_SYMLINK),s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=r(e.chmodSync),e.fchmodSync=r(e.fchmodSync),e.lchmodSync=r(e.lchmodSync),e.stat=s(e.stat),e.fstat=s(e.fstat),e.lstat=s(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===a&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function r(r,n,i){var o=Date.now(),a=0;t(r,n,(function s(l){if(l&&("EACCES"===l.code||"EPERM"===l.code||"EBUSY"===l.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(n,(function(e,o){e&&"ENOENT"===e.code?t(r,n,s):i(l)}))}),a),void(a<100&&(a+=10));i&&i(l)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.rename));function t(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){u(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function r(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!u(e))throw e}}:t}function i(t){return t?function(r,n,i,o){return t.call(e,r,n,i,(function(e){u(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function o(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!u(e))throw e}}:t}function s(t){return t?function(r,n,i){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,o):t.call(e,r,o)}:t}function l(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}:t}function u(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function r(r,n,i,o,a,s){var l;if(s&&"function"==typeof s){var u=0;l=function(c,f,d){if(c&&"EAGAIN"===c.code&&u<10)return u++,t.call(e,r,n,i,o,a,l);s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,l)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,r,n,i,o){for(var a=0;;)try{return c.call(e,t,r,n,i,o)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}});var c}},(e,t,r)=>{var n=r(16).Stream;e.exports=function(e){return{ReadStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var o=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var a=Object.keys(i),s=0,l=a.length;s<l;s++){var u=a[s];this[u]=i[u]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){o._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()}))},WriteStream:function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var l=o[a];this[l]=i[l]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},e=>{e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var r={__proto__:t(e)};else r=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})),r};var t=Object.getPrototypeOf||function(e){return e.__proto__}},(e,t,r)=>{const n=r(8),i=r(6),{mkdirs:o}=r(17),{pathExists:a}=r(28),{utimesMillis:s}=r(106),l=r(33);async function u(e,t,r){return!r.filter||r.filter(e,t)}async function c(e,t,r,o){const a=o.dereference?n.stat:n.lstat,s=await a(t);if(s.isDirectory())return async function(e,t,r,o,a){t||await n.mkdir(o);const s=await n.readdir(r);await Promise.all(s.map((async e=>{const t=i.join(r,e),n=i.join(o,e);if(!await u(t,n,a))return;const{destStat:s}=await l.checkPaths(t,n,"copy",a);return c(s,t,n,a)}))),t||await n.chmod(o,e.mode)}(s,e,t,r,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return async function(e,t,r,i,o){if(!t)return f(e,r,i,o);if(o.overwrite)return await n.unlink(i),f(e,r,i,o);if(o.errorOnExist)throw new Error(`'${i}' already exists`)}(s,e,t,r,o);if(s.isSymbolicLink())return async function(e,t,r,o){let a=await n.readlink(t);o.dereference&&(a=i.resolve(process.cwd(),a));if(!e)return n.symlink(a,r);let s=null;try{s=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(a,r);throw e}o.dereference&&(s=i.resolve(process.cwd(),s));if(l.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(l.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await n.unlink(r),n.symlink(a,r)}(e,t,r,o);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await s(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:s}=await l.checkPaths(e,t,"copy",r);if(await l.checkParentPaths(e,n,t,"copy"),!await u(e,t,r))return;const f=i.dirname(t);await a(f)||await o(f),await c(s,e,t,r)}},(e,t,r)=>{const n=r(29),i=r(6),o=r(17).mkdirsSync,a=r(106).utimesMillisSync,s=r(33);function l(e,t,r,o){const a=(o.dereference?n.statSync:n.lstatSync)(t);if(a.isDirectory())return function(e,t,r,i,o){return t?f(r,i,o):function(e,t,r,i){return n.mkdirSync(r),f(t,r,i),c(r,e)}(e.mode,r,i,o)}(a,e,t,r,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return function(e,t,r,i,o){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),u(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,o):u(e,r,i,o)}(a,e,t,r,o);if(a.isSymbolicLink())return function(e,t,r,o){let a=n.readlinkSync(t);o.dereference&&(a=i.resolve(process.cwd(),a));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(a,r);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),s.isSrcSubdir(a,e))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${e}'.`);if(s.isSrcSubdir(e,a))throw new Error(`Cannot overwrite '${e}' with '${a}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(a,r)}return n.symlinkSync(a,r)}(e,t,r,o);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function u(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){c(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);a(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),c(r,e.mode)}function c(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const o=i.join(t,e),a=i.join(r,e);if(n.filter&&!n.filter(o,a))return;const{destStat:u}=s.checkPathsSync(o,a,"copy",n);return l(u,o,a,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:a,destStat:u}=s.checkPathsSync(e,t,"copy",r);if(s.checkParentPathsSync(e,a,t,"copy"),r.filter&&!r.filter(e,t))return;const c=i.dirname(t);return n.existsSync(c)||o(c),l(u,e,t,r)}},(e,t,r)=>{const n=r(5).fromPromise,i=r(8),o=r(6),a=r(17),s=r(53),l=n((async function(e){let t;try{t=await i.readdir(e)}catch{return a.mkdirs(e)}return Promise.all(t.map((t=>s.remove(o.join(e,t)))))}));function u(e){let t;try{t=i.readdirSync(e)}catch{return a.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t),s.removeSync(t)}))}e.exports={emptyDirSync:u,emptydirSync:u,emptyDir:l,emptydir:l}},(e,t,r)=>{const{createFile:n,createFileSync:i}=r(157),{createLink:o,createLinkSync:a}=r(158),{createSymlink:s,createSymlinkSync:l}=r(159);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:o,createLinkSync:a,ensureLink:o,ensureLinkSync:a,createSymlink:s,createSymlinkSync:l,ensureSymlink:s,ensureSymlinkSync:l}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),a=r(17);e.exports={createFile:n((async function(e){let t;try{t=await o.stat(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);let n=null;try{n=await o.stat(r)}catch(t){if("ENOENT"===t.code)return await a.mkdirs(r),void await o.writeFile(e,"");throw t}n.isDirectory()?await o.writeFile(e,""):await o.readdir(r)})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{o.statSync(r).isDirectory()||o.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;a.mkdirsSync(r)}o.writeFileSync(e,"")}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),a=r(17),{pathExists:s}=r(28),{areIdentical:l}=r(33);e.exports={createLink:n((async function(e,t){let r,n;try{r=await o.lstat(t)}catch{}try{n=await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&l(n,r))return;const u=i.dirname(t);await s(u)||await a.mkdirs(u),await o.link(e,t)})),createLinkSync:function(e,t){let r;try{r=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(r&&l(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return o.existsSync(n)||a.mkdirsSync(n),o.linkSync(e,t)}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(6),o=r(8),{mkdirs:a,mkdirsSync:s}=r(17),{symlinkPaths:l,symlinkPathsSync:u}=r(160),{symlinkType:c,symlinkTypeSync:f}=r(161),{pathExists:d}=r(28),{areIdentical:h}=r(33);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await o.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([o.stat(e),o.stat(t)]);if(h(r,n))return}const s=await l(e,t);e=s.toDst;const u=await c(s.toCwd,r),f=i.dirname(t);return await d(f)||await a(f),o.symlink(e,t,u)})),createSymlinkSync:function(e,t,r){let n;try{n=o.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=o.statSync(e),n=o.statSync(t);if(h(r,n))return}const a=u(e,t);e=a.toDst,r=f(a.toCwd,r);const l=i.dirname(t);return o.existsSync(l)||s(l),o.symlinkSync(e,t,r)}}},(e,t,r)=>{const n=r(6),i=r(8),{pathExists:o}=r(28),a=r(5).fromPromise;e.exports={symlinkPaths:a((async function(e,t){if(n.isAbsolute(e)){try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),a=n.join(r,e);if(await o(a))return{toCwd:a,toDst:e};try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!i.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),o=n.join(r,e);if(i.existsSync(o))return{toCwd:o,toDst:e};if(!i.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},(e,t,r)=>{const n=r(8),i=r(5).fromPromise;e.exports={symlinkType:i((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},(e,t,r)=>{const n=r(5).fromPromise,i=r(163);i.outputJson=n(r(165)),i.outputJsonSync=r(166),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},(e,t,r)=>{const n=r(164);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},(e,t,r)=>{let n;try{n=r(29)}catch(e){n=r(39)}const i=r(5),{stringify:o,stripBom:a}=r(71);const s={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;let s,l=await i.fromCallback(r.readFile)(e,t);l=a(l);try{s=JSON.parse(l,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return s})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=a(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const a=r.fs||n,s=o(t,r);await i.fromCallback(a.writeFile)(e,s,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,a=o(t,r);return i.writeFileSync(e,a,r)}};e.exports=s},(e,t,r)=>{const{stringify:n}=r(71),{outputFile:i}=r(72);e.exports=async function(e,t,r={}){const o=n(t,r);await i(e,o,r)}},(e,t,r)=>{const{stringify:n}=r(71),{outputFileSync:i}=r(72);e.exports=function(e,t,r){const o=n(t,r);i(e,o,r)}},(e,t,r)=>{const n=r(5).fromPromise;e.exports={move:n(r(168)),moveSync:r(169)}},(e,t,r)=>{const n=r(8),i=r(6),{copy:o}=r(70),{remove:a}=r(53),{mkdirp:s}=r(17),{pathExists:l}=r(28),u=r(33);e.exports=async function(e,t,r={}){const c=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:d=!1}=await u.checkPaths(e,t,"move",r);await u.checkParentPaths(e,f,t,"move");const h=i.dirname(t);return i.parse(h).root!==h&&await s(h),async function(e,t,r,i){if(!i)if(r)await a(t);else if(await l(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await o(e,t,n),a(e)}(e,t,r)}}(e,t,c,d)}},(e,t,r)=>{const n=r(29),i=r(6),o=r(70).copySync,a=r(53).removeSync,s=r(17).mkdirpSync,l=r(33);function u(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return o(e,t,n),a(e)}(e,t,r)}}e.exports=function(e,t,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:c,isChangingCase:f=!1}=l.checkPathsSync(e,t,"move",r);return l.checkParentPathsSync(e,c,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||s(i.dirname(t)),function(e,t,r,i){if(i)return u(e,t,r);if(r)return a(t),u(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return u(e,t,r)}(e,t,o,f)}},(e,t,r)=>{const n=r(29),i=r(171),o=r(16);e.exports={buffer:function(e,t){return i({stream:function(t,r){const n=o.PassThrough(),i=r?t+r:void 0;return n.end(e.slice(t,i)),n},size:function(){return Promise.resolve(e.length)}},t)},file:function(e,t){return i({stream:function(t,r){const i=r?t+r:void 0;return n.createReadStream(e,{start:t,end:i})},size:function(){return new Promise((function(t,r){n.stat(e,(function(e,n){e?r(e):t(n.size)}))}))}},t)},url:function(e,t,r){if("string"==typeof t&&(t={url:t}),!t.url)throw"URL missing";t.headers=t.headers||{};const n={stream:function(r,n){const i=Object.create(t),o=n?r+n:"";return i.headers=Object.create(t.headers),i.headers.range="bytes="+r+"-"+o,e(i)},size:function(){return new Promise((function(r,n){const i=e(t);i.on("response",(function(e){i.abort(),e.headers["content-length"]?r(e.headers["content-length"]):n(new Error("Missing content length header"))})).on("error",n)}))}};return i(n,r)},s3:function(e,t,r){return i({size:function(){return new Promise((function(r,n){e.headObject(t,(function(e,t){e?n(e):r(t.ContentLength)}))}))},stream:function(r,n){const i={};for(const e in t)i[e]=t[e];const o=n?r+n:"";return i.Range="bytes="+r+"-"+o,e.getObject(i).createReadStream()}},r)},s3_v3:function(e,t,n){const{GetObjectCommand:a,HeadObjectCommand:s}=r(192);return i({size:async()=>{const r=await e.send(new s({Bucket:t.Bucket,Key:t.Key}));return r.ContentLength?r.ContentLength:0},stream:(r,n)=>{const i=o.PassThrough(),s=n?r+n:"";return e.send(new a({Bucket:t.Bucket,Key:t.Key,Range:`bytes=${r}-${s}`})).then((e=>{e.Body.pipe(i)})).catch((e=>{i.emit("error",e)})),i}},n)},custom:function(e,t){return i(e,t)}}},(e,t,r)=>{const n=r(66),i=r(172),o=r(67),a=r(68),s=r(6),l=r(105),u=r(69),c=r(52),f=r(175),d=Buffer.alloc(4);d.writeUInt32LE(101010256,0),e.exports=function(e,t){const r=n(),h=n(),p=t&&t.tailSize||80;let _,b,y,m;return t&&t.crx&&(b=function(e){const t=e.stream(0).pipe(n());return t.pull(4).then((function(e){if(875721283===e.readUInt32LE(0)){let e;return t.pull(12).then((function(t){e=c.parse(t,[["version",4],["pubKeyLength",4],["signatureLength",4]])})).then((function(){return t.pull(e.pubKeyLength+e.signatureLength)})).then((function(t){return e.publicKey=t.slice(0,e.pubKeyLength),e.signature=t.slice(e.pubKeyLength),e.size=16+e.pubKeyLength+e.signatureLength,e}))}}))}(e)),e.size().then((function(t){return _=t,e.stream(Math.max(0,t-p)).on("error",(function(e){r.emit("error",e)})).pipe(r),r.pull(d)})).then((function(){return f.props({directory:r.pull(22),crxHeader:b})})).then((function(t){const i=t.directory;if(y=t.crxHeader&&t.crxHeader.size||0,m=c.parse(i,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),65535==m.diskNumber||65535==m.numberOfRecords||4294967295==m.offsetToStartOfCentralDirectory){const t=20,i=_-(p-r.match+t),o=n();return e.stream(i).pipe(o),o.pull(t).then((function(t){return function(e,t){const r=c.parse(t,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(117853008!=r.signature)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16));const i=n();return e.stream(r.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}(e,t)})).then((function(e){m=function(e){const t=c.parse(e,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(101075792!=t.signature)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16));return t}(e)}))}m.offsetToStartOfCentralDirectory+=y})).then((function(){if(m.commentLength)return r.pull(m.commentLength).then((function(e){m.comment=e.toString("utf8")}))})).then((function(){return e.stream(m.offsetToStartOfCentralDirectory).pipe(h),m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return e.path=s.resolve(s.normalize(e.path)),m.files.then((function(t){return f.map(t,(async function(t){const r=s.join(e.path,t.path);if(0!=r.indexOf(e.path))return;if("Directory"==t.type)return void await l.ensureDir(r);await l.ensureDir(s.dirname(r));const n=e.getWriter?e.getWriter({path:r}):l.createWriteStream(r);return new Promise((function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)}))}),{concurrency:e.concurrency>1?e.concurrency:1})}))},m.files=f.mapSeries(Array(m.numberOfRecords),(function(){return h.pull(46).then((function(r){const n=c.parse(r,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return n.offsetToLocalFileHeader+=y,n.lastModifiedDateTime=u(n.lastModifiedDate,n.lastModifiedTime),h.pull(n.fileNameLength).then((function(e){return n.pathBuffer=e,n.path=e.toString("utf8"),n.isUnicode=!!(2048&n.flags),h.pull(n.extraFieldLength)})).then((function(e){return n.extra=a(e,n),h.pull(n.fileCommentLength)})).then((function(r){n.comment=r,n.type=0===n.uncompressedSize&&/[/\\]$/.test(n.path)?"Directory":"File";const a=t&&t.padding||1e3;return n.stream=function(t){const r=30+a+(n.extraFieldLength||0)+(n.fileNameLength||0)+n.compressedSize;return i(e,n.offsetToLocalFileHeader,t,n,r)},n.buffer=function(e){return o(n.stream(e))},n}))}))})),f.props(m)}))}},(e,t,r)=>{const n=r(173),i=r(66),o=r(16),a=r(80),s=r(68),l=r(69),u=r(52);e.exports=function(e,t,r,c,f){const d=i(),h=o.PassThrough(),p=e.stream(t,f);return p.pipe(d).on("error",(function(e){h.emit("error",e)})),h.vars=d.pull(30).then((function(e){let t=u.parse(e,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return t.lastModifiedDateTime=l(t.lastModifiedDate,t.lastModifiedTime),d.pull(t.fileNameLength).then((function(e){return t.fileName=e.toString("utf8"),d.pull(t.extraFieldLength)})).then((function(e){let i;return t.extra=s(e,t),c&&c.compressedSize&&(t=c),1&t.flags&&(i=d.pull(12).then((function(e){if(!r)throw new Error("MISSING_PASSWORD");const i=n();String(r).split("").forEach((function(e){i.update(e)}));for(let t=0;t<e.length;t++)e[t]=i.decryptByte(e[t]);t.decrypt=i,t.compressedSize-=12;const o=8&t.flags?t.lastModifiedTime>>8&255:t.crc32>>24&255;if(e[11]!==o)throw new Error("BAD_PASSWORD");return t}))),Promise.resolve(i).then((function(){return h.emit("vars",t),t}))}))})),h.vars.then((function(e){const t=!(8&e.flags)||e.compressedSize>0;let r;const n=e.compressionMethod?a.createInflateRaw():o.PassThrough();t?(h.size=e.uncompressedSize,r=e.compressedSize):(r=Buffer.alloc(4),r.writeUInt32LE(134695760,0));let i=d.stream(r);e.decrypt&&(i=i.pipe(e.decrypt.stream())),i.pipe(n).on("error",(function(e){h.emit("error",e)})).pipe(h).on("finish",(function(){p.destroy?p.destroy():p.abort?p.abort():p.close?p.close():p.push?p.push():console.log("warning - unable to close stream")}))})).catch((function(e){h.emit("error",e)})),h}},(e,t,r)=>{const n=r(174);let i,o=r(16);function a(e,t){i||function(){let e,t,r;for(i=[],t=0;t<256;t++){for(e=t,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>=1;i[t]=e>>>0}}(),e.charCodeAt&&(e=e.charCodeAt(0));return(t.readUInt32BE()>>8&16777215^i[255&(t.readUInt32BE()^e>>>0)])>>>0}function s(e,t){const r=65535&e,n=65535&t;return(((e>>16&65535)*n+r*(t>>16&65535)&65535)<<16>>>0)+r*n}function l(){if(!(this instanceof l))return new l;this.key0=Buffer.allocUnsafe(4),this.key1=Buffer.allocUnsafe(4),this.key2=Buffer.allocUnsafe(4),this.key0.writeUInt32BE(305419896,0),this.key1.writeUInt32BE(591751049,0),this.key2.writeUInt32BE(878082192,0)}o.Writable&&o.Writable.prototype.destroy||(o=r(54)),l.prototype.update=function(e){this.key0.writeUInt32BE(a(e,this.key0)),this.key1.writeUInt32BE((255&this.key0.readUInt32BE())+this.key1.readUInt32BE()>>>0);const t=new n(s(this.key1.readUInt32BE(),134775813)+1&4294967295),r=Buffer.alloc(8);t.copy(r,0),r.copy(this.key1,0,4,8),this.key2.writeUInt32BE(a((this.key1.readUInt32BE()>>24&255)>>>0,this.key2))},l.prototype.decryptByte=function(e){const t=(2|this.key2.readUInt32BE())>>>0;return e^=s(t,1^t)>>8&255,this.update(e),e},l.prototype.stream=function(){const e=o.Transform(),t=this;return e._transform=function(e,r,n){for(let r=0;r<e.length;r++)e[r]=t.decryptByte(e[r]);this.push(e),n()},e},e.exports=l},e=>{for(var t=4294967296,r=[],n=0;n<256;n++)r[n]=(n>15?"":"0")+n.toString(16);var i=e.exports=function(e,t){e instanceof Buffer?(this.buffer=e,this.offset=t||0):"[object Uint8Array]"==Object.prototype.toString.call(e)?(this.buffer=new Buffer(e),this.offset=t||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};i.MAX_INT=Math.pow(2,53),i.MIN_INT=-Math.pow(2,53),i.prototype={constructor:i,_2scomp:function(){for(var e=this.buffer,t=this.offset,r=1,n=t+7;n>=t;n--){var i=(255^e[n])+r;e[n]=255&i,r=i>>8}},setValue:function(e,r){var n=!1;if(1==arguments.length)if("number"==typeof e){if(n=e<0,r=(e=Math.abs(e))%t,(e/=t)>t)throw new RangeError(e+" is outside Int64 range");e|=0}else{if("string"!=typeof e)throw new Error(e+" must be a Number or String");r=(e=(e+"").replace(/^0x/,"")).substr(-8),e=e.length>8?e.substr(0,e.length-8):"",e=parseInt(e,16),r=parseInt(r,16)}for(var i=this.buffer,o=this.offset,a=7;a>=0;a--)i[o+a]=255&r,r=4==a?e:r>>>8;n&&this._2scomp()},toNumber:function(e){for(var t=this.buffer,r=this.offset,n=128&t[r],o=0,a=1,s=7,l=1;s>=0;s--,l*=256){var u=t[r+s];n&&(a=(u=(255^u)+a)>>8,u&=255),o+=u*l}return!e&&o>=i.MAX_INT?n?-1/0:1/0:n?-o:o},valueOf:function(){return this.toNumber(!1)},toString:function(e){return this.valueOf().toString(e||10)},toOctetString:function(e){for(var t=new Array(8),n=this.buffer,i=this.offset,o=0;o<8;o++)t[o]=r[n[i+o]];return t.join(e||"")},toBuffer:function(e){if(e&&0===this.offset)return this.buffer;var t=new Buffer(8);return this.buffer.copy(t,0,this.offset,this.offset+8),t},copy:function(e,t){this.buffer.copy(e,t||0,this.offset,this.offset+8)},compare:function(e){if((128&this.buffer[this.offset])!=(128&e.buffer[e.offset]))return e.buffer[e.offset]-this.buffer[this.offset];for(var t=0;t<8;t++)if(this.buffer[this.offset+t]!==e.buffer[e.offset+t])return this.buffer[this.offset+t]-e.buffer[e.offset+t];return 0},equals:function(e){return 0===this.compare(e)},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}},(e,t,r)=>{e.exports=function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,(function(e){var r=t[a][1][e];return i(r||e)}),c,c.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){var n;try{throw new Error}catch(e){n=e}var i=e("./schedule"),o=e("./queue");function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function s(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function u(e){this._normalQueue._pushOne(e),this._queueTick()}function c(e){for(;e.length()>0;)f(e)}function f(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}a.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},a.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},a.prototype.invokeLater=s,a.prototype.invoke=l,a.prototype.settlePromises=u,a.prototype._drainQueues=function(){c(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,c(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,t.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(e,t,r){t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var u=r(o),c=new e(t);c._propagateFrom(this,1);var f=this._target();if(c._setBoundTo(u),u instanceof e){var d={promiseRejectionQueued:!1,promise:c,target:f,bindingPromise:u};f._then(t,a,void 0,c,d),u._then(s,l,void 0,c,d),c._setOnCancel(u)}else c._resolveCallback(f);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(e){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=e("./promise")();o.noConflict=i,t.exports=o},{"./promise":22}],5:[function(e,t,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var r,n=e("./util"),i=n.canEvaluate;function o(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function a(e){return o(e,this.pop()).apply(e,this)}function s(e){return e[this]}function l(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(a,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=l;else if(i){var n=r(e);t=null!==n?n:s}else t=s;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=a(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),l.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),l.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=e("./es5").keys,i=r.tryCatch,o=r.errorObj;function a(e,a,s){return function(l){var u=s._boundValue();e:for(var c=0;c<e.length;++c){var f=e[c];if(f===Error||null!=f&&f.prototype instanceof Error){if(l instanceof f)return i(a).call(u,l)}else if("function"==typeof f){var d=i(f).call(u,l);if(d===o)return d;if(d)return i(a).call(u,l)}else if(r.isObject(l)){for(var h=n(f),p=0;p<h.length;++p){var _=h[p];if(f[_]!=l[_])continue e}return i(a).call(u,l)}}return t}}return a}},{"./es5":13,"./util":36}],8:[function(e,t,r){t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(t)return new n}function o(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,i=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=i,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){t.exports=function(t,r,n,i){var o,a,s,l,u=t._async,c=e("./errors").Warning,f=e("./util"),d=e("./es5"),h=f.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,b=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,g=!1,v=!(0==f.env("BLUEBIRD_DEBUG")),w=!(0==f.env("BLUEBIRD_WARNINGS")||!v&&!f.env("BLUEBIRD_WARNINGS")),S=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!v&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(w||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}l=function(t){e.push(t),setTimeout(r,1)},d.defineProperty(t,"_unhandledRejectionCheck",{value:r}),d.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),l(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){ee("rejectionHandled",o,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),ee("unhandledRejection",a,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,r){return q(e,t,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=f.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();o=f.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(u.haveItemsQueued()&&!ce.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ce.longStackTraces&&ne()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;ce.longStackTraces=!0,x=function(){if(u.haveItemsQueued()&&!ce.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ce.longStackTraces=!1},t.prototype._captureStackTrace=B,t.prototype._attachExtraTrace=$,t.prototype._dereferenceTrace=z,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return ce.longStackTraces&&ne()};var A={unhandledrejection:{before:function(){var e=f.global.onunhandledrejection;return f.global.onunhandledrejection=null,e},after:function(e){f.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=f.global.onrejectionhandled;return f.global.onrejectionhandled=null,e},after:function(e){f.global.onrejectionhandled=e}}},O=function(){var e=function(e,t){if(!e)return!f.global.dispatchEvent(t);var r;try{return r=e.before(),!f.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return d.defineProperty(n,"promise",{value:r.promise}),d.defineProperty(n,"reason",{value:r.reason}),e(A[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,d.defineProperty(n,"promise",{value:r.promise}),d.defineProperty(n,"reason",{value:r.reason}),e(A[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(A[t],n)})}catch(e){}return function(){return!1}}(),R=f.isNode?function(){return process.emit.apply(process,arguments)}:f.global?function(e){var t="on"+e.toLowerCase(),r=f.global[t];return!!r&&(r.apply(f.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function T(e,t){return{promise:t}}var k={promiseCreated:T,promiseFulfilled:T,promiseRejected:T,promiseResolved:T,promiseCancelled:T,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:T},P=function(e){var t=!1;try{t=R.apply(null,arguments)}catch(e){u.throwLater(e),t=!0}var r=!1;try{r=O(e,k[e].apply(null,arguments))}catch(e){u.throwLater(e),r=!0}return r||t};function C(){return!1}function M(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+f.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function I(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?f.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function L(){return this._onCancelField}function D(e){this._onCancelField=e}function N(){this._cancellationParent=void 0,this._onCancelField=void 0}function j(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}function F(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;ce.warnings=!!r,E=ce.warnings,f.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ce.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=N,t.prototype._propagateFrom=j,t.prototype._onCancel=L,t.prototype._setOnCancel=D,t.prototype._attachCancellationCallback=I,t.prototype._execute=M,U=j,ce.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!ce.monitoring?(ce.monitoring=!0,t.prototype._fireEvent=P):!e.monitoring&&ce.monitoring&&(ce.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&f.nodeSupportsAsyncResource){var o=ce.asyncHooks,a=!!e.asyncHooks;o!==a&&(ce.asyncHooks=a,a?n():i())}return t},t.prototype._fireEvent=C,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var U=F;function W(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function B(){this._trace=new le(this._peekContext())}function $(e,t){if(h(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=J(e);f.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),f.notEnumerableProp(e,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function H(e,t,r,n,i){if(void 0===e&&null!==t&&E){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=Q(s),u=l.length-1;u>=0;--u){var c=l[u];if(!_.test(c)){var f=c.match(b);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(l.length>0){var d=l[0];for(u=0;u<s.length;++u)if(s[u]===d){u>0&&(a="\n"+s[u-1]);break}}}var h="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(h,!0,t)}}function V(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),q(r)}function q(e,r,n){if(ce.warnings){var i,o=new c(e);if(r)n._attachExtraTrace(o);else if(ce.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var a=J(o);o.stack=a.message+"\n"+a.stack.join("\n")}P("warning",o)||Z(o,"",!0)}}function G(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}function K(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}function Y(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,o=t[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(s=a;s>=0;--s){var l=n[s];if(t[i]!==l)break;t.pop(),i--}t=n}}function Q(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||y.test(n),o=i&&ie(n);i&&!o&&(g&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function X(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||y.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function J(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?X(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:Q(t)}}function Z(e,t,r){if("undefined"!=typeof console){var n;if(f.isObject(e)){var i=e.stack;n=t+m(i,e)}else n=t+String(e);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function ee(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){u.throwLater(e)}"unhandledRejection"===e?P(e,r,n)||i||Z(r,"Unhandled rejection "):P(e,n)}function te(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():f.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+re(t)+">, no stack trace)"}function re(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}function ne(){return"function"==typeof ue}var ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function ae(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function se(e,t){if(ne()){for(var r,n,i=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),a=-1,s=-1,l=0;l<i.length;++l)if(u=ae(i[l])){r=u.fileName,a=u.line;break}for(l=0;l<o.length;++l){var u;if(u=ae(o[l])){n=u.fileName,s=u.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(ie=function(e){if(p.test(e))return!0;var t=ae(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}}function le(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ue(this,le),t>32&&this.uncycle()}f.inherits(le,Error),r.CapturedTrace=le,le.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<e;++n){var a=r[t[n].stack];if(void 0!==a&&a!==n){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;a<e-1?(s._parent=t[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var l=s._length+1,u=n-2;u>=0;--u)t[u]._length=l,l++;return}}}},le.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=J(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(Q(i.stack.split("\n"))),i=i._parent;Y(n),K(n),f.notEnumerableProp(e,"stack",G(r,n)),f.notEnumerableProp(e,"__stackCleaned__",!0)}};var ue=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():te(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,m=t;var r=Error.captureStackTrace;return ie=function(e){return p.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=e,m=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(m=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?te(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(e){console.warn(e)},f.isNode&&process.stderr.isTTY?s=function(e,t){var r=t?"[33m":"[31m";console.warn(r+e+"[0m\n")}:f.isNode||"string"!=typeof(new Error).stack||(s=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ce={warnings:w,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return S&&t.longStackTraces(),{asyncHooks:function(){return ce.asyncHooks},longStackTraces:function(){return ce.longStackTraces},warnings:function(){return ce.warnings},cancellation:function(){return ce.cancellation},monitoring:function(){return ce.monitoring},propagateFromFunction:function(){return U},boundValueFunction:function(){return W},checkForgottenReturns:H,setBounds:se,warn:q,deprecated:V,CapturedTrace:le,fireDomEvent:O,fireGlobalEvent:R}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}function o(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=o}},{}],12:[function(e,t,r){var n,i,o=e("./es5"),a=o.freeze,s=e("./util"),l=s.inherits,u=s.notEnumerableProp;function c(e,t){function r(n){if(!(this instanceof r))return new r(n);u(this,"message","string"==typeof n?n:t),u(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}var f=c("Warning","warning"),d=c("CancellationError","cancellation error"),h=c("TimeoutError","timeout error"),p=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b<_.length;++b)"function"==typeof Array.prototype[_[b]]&&(p.prototype[_[b]]=Array.prototype[_[b]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(e){if(!(this instanceof m))return new m(e);u(this,"name","OperationalError"),u(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(u(this,"message",e.message),u(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=e+i[o];t+=(n=i.join("\n"))+"\n"}return y--,t},l(m,Error);var g=Error.__BluebirdErrorTypes__;g||(g=a({CancellationError:d,TimeoutError:h,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:i,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(e){var t=[];for(var r in e)i.call(e,r)&&t.push(r);return t},l=function(e,t){return{value:e[t]}},u=function(e,t,r){return e[t]=r.value,e},c=function(e){return e},f=function(e){try{return Object(e).constructor.prototype}catch(e){return a}},d=function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}};t.exports={isArray:d,keys:s,names:s,defineProperty:u,getDescriptor:l,freeze:c,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},{}],15:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.CancellationError,a=i.errorObj,s=e("./catch_filter")(n);function l(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function u(e){this.finallyHandler=e}function c(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return h.call(this,this.promise._target()._settledValue())}function d(e){if(!c(this,e))return a.e=e,a}function h(e){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),e);if(l===n)return l;if(void 0!==l){i._setReturnedNonUndefined();var h=r(l,i);if(h instanceof t){if(null!=this.cancelPromise){if(h._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),a.e=p,a}h.isPending()&&h._attachCancellationCallback(new u(this))}return h._then(f,d,void 0,this,void 0)}}}return i.isRejected()?(c(this),a.e=e,a):(c(this),e)}return l.prototype.isFinallyHandler=function(){return 0===this.type},u.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new l(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,h,h)},t.prototype.tap=function(e){return this._passThrough(e,1,h)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,h);var n,o=new Array(r-1),a=0;for(n=0;n<r-1;++n){var l=arguments[n];if(!i.isObject(l))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(l)));o[a++]=l}o.length=a;var u=arguments[n];return this._passThrough(s(o,u,this),1,void 0,h)},l}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./errors").TypeError,l=e("./util"),u=l.errorObj,c=l.tryCatch,f=[];function d(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=c(r[o])(e);if(n._popContext(),a===u){n._pushContext();var s=t.reject(u.e);return n._popContext(),s}var l=i(a,n);if(l instanceof t)return l}return null}function h(e,r,i,o){if(a.cancellation()){var s=new t(n),l=this._finallyPromise=new t(n);this._promise=s.lastly((function(){return l})),s._captureStackTrace(),s._setOnCancel(this)}else(this._promise=new t(n))._captureStackTrace();this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(h,o),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=c(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=c(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var r=this._promise;if(e===u)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=d(o,this._yieldHandlers,this._promise))){var a=(o=o._target())._bitField;50397184&a?33554432&a?t._async.invoke(this._promiseFulfilled,this,o._value()):16777216&a?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=h,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=t,o._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+l.classString(e));f.push(e)},t.spawn=function(e){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(e,this),i=n.promise();return n._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util");a.canEvaluate,a.tryCatch,a.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=s.tryCatch,u=s.errorObj,c=t._async;function f(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var l=0;l<e.length;++l){var u=e[l];u instanceof t&&u.suppressUnhandledRejections()}}function d(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+s.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(i.concurrency)));a=i.concurrency}return new f(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var f=this._promise,d=this._callback,h=f._boundValue();f._pushContext();var p=l(d).call(h,e,r,o),_=f._popContext();if(a.checkForgottenReturns(p,_,null!==s?"Promise.filter":"Promise.map",f),p===u)return this._reject(p.e),!0;var b=i(p,this._promise);if(b instanceof t){var y=(b=b._target())._bitField;if(!(50397184&y))return c>=1&&this._inFlight++,n[r]=b,b._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(b._reason()),!0):(this._cancel(),!0);p=b._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,o=0;o<r;++o)e[o]&&(n[i++]=t[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return d(this,e,t,null)},t.map=function(e,t,r,n){return d(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var i=s(e).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+a.classString(e));var n,l=new t(r);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];n=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else n=s(e)();var f=l._popContext();return o.checkForgottenReturns(n,f,"Promise.try",l),l._resolveFromSyncValue(n),l},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,a=e("./es5");function s(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}var l=/^(?:name|message|stack|cause)$/;function u(e){var t;if(s(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=a.keys(e),i=0;i<r.length;++i){var u=r[i];l.test(u)||(t[u]=e[u])}return t}return n.markAsOriginatingFromRejection(e),e}function c(e,t){return function(r,n){if(null!==e){if(r){var o=u(i(r));e._attachExtraTrace(o),e._reject(o)}else if(t){var a=[].slice.call(arguments,1);e._fulfill(a)}else e._fulfill(n);e=null}}}t.exports=c},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=t._async,i=r.tryCatch,o=r.errorObj;function a(e,t){var a=this;if(!r.isArray(e))return s.call(a,e,t);var l=i(t).apply(a._boundValue(),[null].concat(e));l===o&&n.throwLater(l.e)}function s(e,t){var r=this._boundValue(),a=void 0===e?i(t).call(r,null):i(t).call(r,null,e);a===o&&n.throwLater(a.e)}function l(e,t){var r=this;if(!e){var a=new Error(e+"");a.cause=e,e=a}var s=i(t).call(r._boundValue(),e);s===o&&n.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=s;void 0!==t&&Object(t).spread&&(r=a),this._then(r,l,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){t.exports=function(){var r=function(){return new v("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new N.PromiseInspection(this._target())},i=function(e){return N.reject(new v(e))};function o(){}var a={},s=e("./util");s.setReflectHandler(n);var l=function(){var e=process.domain;return void 0===e?null:e},u=function(){return null},c=function(){return{domain:l(),async:null}},f=s.isNode&&s.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,d=function(){return{domain:l(),async:new f("Bluebird::Promise")}},h=s.isNode?c:u;s.notEnumerableProp(N,"_getContext",h);var p=function(){h=d,s.notEnumerableProp(N,"_getContext",d)},_=function(){h=c,s.notEnumerableProp(N,"_getContext",c)},b=e("./es5"),y=e("./async"),m=new y;b.defineProperty(N,"_async",{value:m});var g=e("./errors"),v=N.TypeError=g.TypeError;N.RangeError=g.RangeError;var w=N.CancellationError=g.CancellationError;N.TimeoutError=g.TimeoutError,N.OperationalError=g.OperationalError,N.RejectionError=g.OperationalError,N.AggregateError=g.AggregateError;var S=function(){},E={},x={},A=e("./thenables")(N,S),O=e("./promise_array")(N,S,A,i,o),R=e("./context")(N),T=R.create,k=e("./debuggability")(N,R,p,_),P=(k.CapturedTrace,e("./finally")(N,A,x)),C=e("./catch_filter")(x),M=e("./nodeback"),I=s.errorObj,L=s.tryCatch;function D(e,t){if(null==e||e.constructor!==N)throw new v("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new v("expecting a function but got "+s.classString(t))}function N(e){e!==S&&D(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function j(e){this.promise._resolveCallback(e)}function F(e){this.promise._rejectCallback(e,!1)}function U(e){var t=new N(S);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return N.prototype.toString=function(){return"[object Promise]"},N.prototype.caught=N.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),o=0;for(r=0;r<t-1;++r){var a=arguments[r];if(!s.isObject(a))return i("Catch statement predicate: expecting an object but got "+s.classString(a));n[o++]=a}if(n.length=o,"function"!=typeof(e=arguments[r]))throw new v("The last argument to .catch() must be a function, got "+s.toString(e));return this.then(void 0,C(n,e,this))}return this.then(void 0,e)},N.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},N.prototype.then=function(e,t){if(k.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+s.classString(e);arguments.length>1&&(r+=", "+s.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},N.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},N.prototype.spread=function(e){return"function"!=typeof e?i("expecting a function but got "+s.classString(e)):this.all()._then(e,void 0,void 0,E,void 0)},N.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},N.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new O(this).promise()},N.prototype.error=function(e){return this.caught(s.originatesFromRejection,e)},N.getNewLibraryCopy=t.exports,N.is=function(e){return e instanceof N},N.fromNode=N.fromCallback=function(e){var t=new N(S);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=L(e)(M(t,r));return n===I&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},N.all=function(e){return new O(e).promise()},N.cast=function(e){var t=A(e);return t instanceof N||((t=new N(S))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},N.resolve=N.fulfilled=N.cast,N.reject=N.rejected=function(e){var t=new N(S);return t._captureStackTrace(),t._rejectCallback(e,!0),t},N.setScheduler=function(e){if("function"!=typeof e)throw new v("expecting a function but got "+s.classString(e));return m.setScheduler(e)},N.prototype._then=function(e,t,r,n,i){var o=void 0!==i,a=o?i:new N(S),l=this._target(),u=l._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&u?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c=h();if(50397184&u){var f,d,p=l._settlePromiseCtx;33554432&u?(d=l._rejectionHandler0,f=e):16777216&u?(d=l._fulfillmentHandler0,f=t,l._unsetRejectionIsUnhandled()):(p=l._settlePromiseLateCancellationObserver,d=new w("late cancellation observer"),l._attachExtraTrace(d),f=t),m.invoke(p,l,{handler:s.contextBind(c,f),promise:a,receiver:n,value:d})}else l._addCallbacks(e,t,a,n,c);return a},N.prototype._length=function(){return 65535&this._bitField},N.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},N.prototype._isFollowing=function(){return!(67108864&~this._bitField)},N.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},N.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},N.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},N.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},N.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},N.prototype._isFinal=function(){return(4194304&this._bitField)>0},N.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},N.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},N.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},N.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},N.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},N.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==a)return void 0===t&&this._isBound()?this._boundValue():t},N.prototype._promiseAt=function(e){return this[4*e-4+2]},N.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},N.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},N.prototype._boundValue=function(){},N.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(t,r,n,i,null)},N.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=a),this._addCallbacks(r,n,i,o,null)},N.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=s.contextBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=s.contextBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=s.contextBind(i,e)),"function"==typeof t&&(this[a+1]=s.contextBind(i,t))}return this._setLength(o+1),o},N.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},N.prototype._resolveCallback=function(e,t){if(!(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=A(e,this);if(!(n instanceof N))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var a=new w("late cancellation observer");i._attachExtraTrace(a),this._reject(a)}else{var s=this._length();s>0&&i._migrateCallback0(this);for(var l=1;l<s;++l)i._migrateCallbackAt(this,l);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},N.prototype._rejectCallback=function(e,t,r){var n=s.ensureErrorObject(e),i=n===e;if(!i&&!r&&k.warnings()){var o="a promise was rejected with a non-error: "+s.classString(e);this._warn(o,!0)}this._attachExtraTrace(n,!!t&&i),this._reject(e)},N.prototype._resolveFromExecutor=function(e){if(e!==S){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},N.prototype._settlePromiseFromHandler=function(e,t,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),t===E?r&&"number"==typeof r.length?o=L(e).apply(this._boundValue(),r):(o=I).e=new v("cannot .spread() a non-array: "+s.classString(r)):o=L(e).call(t,r);var a=n._popContext();65536&(i=n._bitField)||(o===x?n._reject(r):o===I?n._rejectCallback(o.e,!1):(k.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},N.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},N.prototype._followee=function(){return this._rejectionHandler0},N.prototype._setFollowee=function(e){this._rejectionHandler0=e},N.prototype._settlePromise=function(e,t,r,i){var a=e instanceof N,s=this._bitField,l=!!(134217728&s);65536&s?(a&&e._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=e,L(t).call(r,i)===I&&e._reject(I.e)):t===n?e._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(e):a||e instanceof O?e._cancel():r.cancel()):"function"==typeof t?a?(l&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof o?r._isResolved()||(33554432&s?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):a&&(l&&e._setAsyncGuaranteed(),33554432&s?e._fulfill(i):e._reject(i))},N.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,i=e.value;"function"==typeof t?r instanceof N?this._settlePromiseFromHandler(t,n,i,r):t.call(n,i,r):r instanceof N&&r._reject(i)},N.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},N.prototype._settlePromise0=function(e,t,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,i,t)},N.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},N.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(134217728&t?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},N.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return m.fatalError(e,s.isNode);(65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},N.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(16842752&e){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},N.prototype._settledValue=function(){var e=this._bitField;return 33554432&e?this._rejectionHandler0:16777216&e?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&b.defineProperty(N.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),N.defer=N.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new N(S),resolve:j,reject:F}},s.notEnumerableProp(N,"_makeSelfResolutionError",r),e("./method")(N,S,A,i,k),e("./bind")(N,S,A,k),e("./cancel")(N,O,i,k),e("./direct_resolve")(N),e("./synchronous_inspection")(N),e("./join")(N,O,A,S,m),N.Promise=N,N.version="3.7.2",e("./call_get.js")(N),e("./generators.js")(N,i,S,A,o,k),e("./map.js")(N,O,i,A,S,k),e("./nodeify.js")(N),e("./promisify.js")(N,S),e("./props.js")(N,O,A,i),e("./race.js")(N,S,A,i),e("./reduce.js")(N,O,i,A,S,k),e("./settle.js")(N,O,k),e("./some.js")(N,O,i),e("./timers.js")(N,S,k),e("./using.js")(N,i,A,T,S,k),e("./any.js")(N),e("./each.js")(N,S),e("./filter.js")(N,S),s.toFastProperties(N),s.toFastProperties(N.prototype),U({a:1}),U({b:2}),U({c:3}),U(1),U((function(){})),U(void 0),U(!1),U(new N(S)),k.setBounds(y.firstLineError,s.lastLineError),N}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){t.exports=function(t,r,n,i,o){var a=e("./util");function s(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function l(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,a.inherits(l,o),l.prototype.length=function(){return this._length},l.prototype.promise=function(){return this._promise},l.prototype._init=function e(r,o){var l=n(this._values,this._promise);if(l instanceof t){var u=(l=l._target())._bitField;if(this._values=l,!(50397184&u))return this._promise._setAsyncGuaranteed(),l._then(e,this._reject,void 0,this,o);if(!(33554432&u))return 16777216&u?this._reject(l._reason()):this._cancel();l=l._value()}if(null!==(l=a.asArray(l)))0!==l.length?this._iterate(l):-5===o?this._resolveEmptyArray():this._resolve(s(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(l)).reason();this._promise._rejectCallback(c,!1)}},l.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var l=n(e[s],i);a=l instanceof t?(l=l._target())._bitField:null,o?null!==a&&l.suppressUnhandledRejections():null!==a?50397184&a?o=33554432&a?this._promiseFulfilled(l._value(),s):16777216&a?this._promiseRejected(l._reason(),s):this._promiseCancelled(s):(l._proxy(this,s),this._values[s]=l):o=this._promiseFulfilled(l,s)}o||i._setAsyncGuaranteed()},l.prototype._isResolved=function(){return null===this._values},l.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},l.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},l.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},l.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},l.prototype._promiseCancelled=function(){return this._cancel(),!0},l.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},l.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},l.prototype.shouldCopyValues=function(){return!0},l.prototype.getActualLength=function(e){return e},l}},{"./util":36}],24:[function(e,t,r){t.exports=function(t,r){var n={},i=e("./util"),o=e("./nodeback"),a=i.withAppended,s=i.maybeWrapAsError,l=i.canEvaluate,u=e("./errors").TypeError,c="Async",f={__isPromisified__:!0},d=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function p(e){return!d.test(e)}function _(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function b(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return!!n&&_(n)}function y(e,t,r){for(var n=0;n<e.length;n+=2){var i=e[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<e.length;a+=2)if(e[a]===o)throw new u("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}function m(e,t,r,n){for(var o=i.inheritedDataKeys(e),a=[],s=0;s<o.length;++s){var l=o[s],u=e[l],c=n===h||h(l,u,e);"function"!=typeof u||_(u)||b(e,l,t)||!n(l,u,e,c)||a.push(l,u)}return y(a,t,r),a}var g,v=function(e){return e.replace(/([$])/,"\\$")};function w(e,l,u,c,f,d){var h=function(){return this}(),p=e;function _(){var i=l;l===n&&(i=this);var u=new t(r);u._captureStackTrace();var c="string"==typeof p&&this!==h?this[p]:e,f=o(u,d);try{c.apply(i,a(arguments,f))}catch(e){u._rejectCallback(s(e),!0,!0)}return u._isFateSealed()||u._setAsyncGuaranteed(),u}return"string"==typeof p&&(e=c),i.notEnumerableProp(_,"__isPromisified__",!0),_}var S=l?g:w;function E(e,t,r,o,a){for(var s=new RegExp(v(t)+"$"),l=m(e,t,s,r),u=0,c=l.length;u<c;u+=2){var f=l[u],d=l[u+1],h=f+t;if(o===S)e[h]=S(f,n,f,d,t,a);else{var p=o(d,(function(){return S(f,n,f,d,t,a)}));i.notEnumerableProp(p,"__isPromisified__",!0),e[h]=p}}return i.toFastProperties(e),e}function x(e,t,r){return S(e,t,void 0,e,null,r)}t.promisify=function(e,t){if("function"!=typeof e)throw new u("expecting a function but got "+i.classString(e));if(_(e))return e;var r=x(e,void 0===(t=Object(t)).context?n:t.context,!!t.multiArgs);return i.copyDescriptors(e,r,p),r},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new u("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n=c);var o=t.filter;"function"!=typeof o&&(o=h);var a=t.promisifier;if("function"!=typeof a&&(a=S),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(e),l=0;l<s.length;++l){var f=e[s[l]];"constructor"!==s[l]&&i.isClass(f)&&(E(f.prototype,n,o,a,r),E(f,n,o,a,r))}return E(e,n,o,a,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){t.exports=function(t,r,n,i){var o,a=e("./util"),s=a.isObject,l=e("./es5");"function"==typeof Map&&(o=Map);var u=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),c=function(e){for(var t=new o,r=e.length/2|0,n=0;n<r;++n){var i=e[r+n],a=e[n];t.set(i,a)}return t};function f(e){var t,r=!1;if(void 0!==o&&e instanceof o)t=u(e),r=!0;else{var n=l.keys(e),i=n.length;t=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];t[a]=e[s],t[a+i]=s}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function d(e){var r,o=n(e);return s(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(f,r),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=c(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return d(this)},t.props=function(e){return d(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){function n(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},i.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,n(this,0,this,t,this._front+this._length&t-1)},t.exports=i},{}],27:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),a=function(e){return e.then((function(t){return s(t,e)}))};function s(e,s){var l=n(e);if(l instanceof t)return a(l);if(null===(e=o.asArray(e)))return i("expecting an array or an iterable object but got "+o.classString(e));var u=new t(r);void 0!==s&&u._propagateFrom(s,3);for(var c=u._fulfill,f=u._reject,d=0,h=e.length;d<h;++d){var p=e[d];(void 0!==p||d in e)&&t.cast(p)._then(c,f,void 0,u,null)}return u}t.race=function(e){return s(e,void 0)},t.prototype.race=function(){return s(this,void 0)}}},{"./util":36}],28:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=s.tryCatch;function u(e,r,n,i){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function f(e,t,r,i){return"function"!=typeof t?n("expecting a function but got "+s.classString(t)):new u(e,t,r,i).promise()}function d(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(h,void 0,void 0,this,void 0)):h.call(this,r)}function h(e){var r,n=this.array,i=n._promise,o=l(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var s=i._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}s.inherits(u,r),u.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},u.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},u.prototype._init=function(){},u.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},u.prototype.shouldCopyValues=function(){return!1},u.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},u.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},u.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var a=e[o];a instanceof t&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var s={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(d,void 0,void 0,s,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(e,t){return f(this,e,t,null)},t.reduce=function(e,t,r,n){return f(e,t,r,n)}}},{"./util":36}],29:[function(e,t,n){var i,o=e("./util"),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var l=r.g.setImmediate,u=process.nextTick;i=o.isRecentNode?function(e){l.call(r.g,e)}:function(e){u.call(process,e)}}else if("function"==typeof s&&"function"==typeof s.resolve){var c=s.resolve();i=function(e){c.then(e)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:a:function(){var e=document.createElement("div"),t={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){e.classList.toggle("foo"),r=!1})).observe(n,t);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(e,t),i()}}();t.exports=i},{"./util":36}],30:[function(e,t,r){t.exports=function(t,r,n){var i=t.PromiseInspection;function o(e){this.constructor$(e)}e("./util").inherits(o,r),o.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.allSettled=function(e){return new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,a=e("./errors").AggregateError,s=i.isArray,l={};function u(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new u(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(u,r),u.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},u.prototype.init=function(){this._initialized=!0,this._init()},u.prototype.setUnwrap=function(){this._unwrap=!0},u.prototype.howMany=function(){return this._howMany},u.prototype.setHowMany=function(e){this._howMany=e},u.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},u.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},u.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},u.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new a,t=this.length();t<this._values.length;++t)this._values[t]!==l&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},u.prototype._fulfilled=function(){return this._totalResolved},u.prototype._rejected=function(){return this._values.length-this.length()},u.prototype._addRejected=function(e){this._values.push(e)},u.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},u.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},u.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},u.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return c(e,t)},t.prototype.some=function(e){return c(this,e)},t._SomePromiseArray=u}},{"./errors":12,"./util":36}],32:[function(e,t,r){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return!!(33554432&this._bitField)},o=t.prototype.isRejected=function(){return!!(16777216&this._bitField)},a=t.prototype.isPending=function(){return!(50397184&this._bitField)},s=t.prototype.isResolved=function(){return!!(50331648&this._bitField)};t.prototype.isCancelled=function(){return!!(8454144&this._bitField)},e.prototype.__isCancelled=function(){return!(65536&~this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return!!(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject;function a(e,n){if(o(e)){if(e instanceof t)return e;var a=l(e);if(a===i){n&&n._pushContext();var s=t.reject(a.e);return n&&n._popContext(),s}if("function"==typeof a)return c(e)?(s=new t(r),e._then(s._fulfill,s._reject,void 0,s,null),s):f(e,a,n)}return e}function s(e){return e.then}function l(e){try{return s(e)}catch(e){return i.e=e,i}}var u={}.hasOwnProperty;function c(e){try{return u.call(e,"_promise0")}catch(e){return!1}}function f(e,o,a){var s=new t(r),l=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,c=n.tryCatch(o).call(e,f,d);function f(e){s&&(s._resolveCallback(e),s=null)}function d(e){s&&(s._rejectCallback(e,u,!0),s=null)}return u=!1,s&&c===i&&(s._rejectCallback(c.e,!0,!0),s=null),l}return a}},{"./util":36}],34:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function a(e){this.handle=e}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,i){var o,l;return void 0!==i?(o=t.resolve(i)._then(s,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),l=setTimeout((function(){o._fulfill()}),+e),n.cancellation()&&o._setOnCancel(new a(l)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return l(e,this)};var u=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};function c(e){return clearTimeout(this.handle),e}function f(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var r,i;e=+e;var o=new a(setTimeout((function(){r.isPending()&&u(r,t,i)}),e));return n.cancellation()?(i=this.then(),(r=i._then(c,f,void 0,o,void 0))._setOnCancel(o)):r=this._then(c,f,void 0,o,void 0),r}}},{"./util":36}],35:[function(e,t,r){t.exports=function(t,r,n,i,o,a){var s=e("./util"),l=e("./errors").TypeError,u=e("./util").inherits,c=s.errorObj,f=s.tryCatch,d={};function h(e){setTimeout((function(){throw e}),0)}function p(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function _(e,r){var i=0,a=e.length,s=new t(o);function l(){if(i>=a)return s._fulfill();var o=p(e[i++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return h(e)}if(o instanceof t)return o._then(l,h,null,null,null)}l()}return l(),s}function b(e,t,r){this._data=e,this._promise=t,this._context=r}function y(e,t,r){this.constructor$(e,t,r)}function m(e){return b.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}b.prototype.data=function(){return this._data},b.prototype.promise=function(){return this._promise},b.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():d},b.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==d?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},b.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},u(y,b),y.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var i,o=arguments[e-1];if("function"!=typeof o)return r("expecting a function but got "+s.classString(o));var l=!0;2===e&&Array.isArray(arguments[0])?(e=(i=arguments[0]).length,l=!1):(i=arguments,e--);for(var u=new g(e),d=0;d<e;++d){var h=i[d];if(b.isDisposer(h)){var p=h;(h=h.promise())._setDisposable(p)}else{var y=n(h);y instanceof t&&(h=y._then(m,null,null,{resources:u,index:d},void 0))}u[d]=h}var v=new Array(u.length);for(d=0;d<v.length;++d)v[d]=t.resolve(u[d]).reflect();var w=t.all(v).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();e[t]=r.value()}S._pushContext(),o=f(o);var n=l?o.apply(void 0,e):o(e),i=S._popContext();return a.checkForgottenReturns(n,i,"Promise.using",S),n})),S=w.lastly((function(){var e=new t.PromiseInspection(w);return _(u,e)}));return u.promise=S,S._setOnCancel(u),S},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new y(e,this,i());throw new l}}},{"./errors":12,"./util":36}],36:[function(e,t,n){var i,o=e("./es5"),a="undefined"==typeof navigator,s={e:{}},l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0!==this?this:null;function u(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return s.e=e,s}}function c(e){return i=e,u}var f=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function d(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function h(e){return"function"==typeof e||"object"==typeof e&&null!==e}function p(e){return d(e)?new Error(O(e)):e}function _(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=e[r];return i[r]=t,i}function b(e,t,r){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(e,t,r){if(d(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,n),e}function m(e){throw e}var g=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(o.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],i=Object.create(null);null!=e&&!t(e);){var a;try{a=r(e)}catch(e){return n}for(var s=0;s<a.length;++s){var l=a[s];if(!i[l]){i[l]=!0;var u=Object.getOwnPropertyDescriptor(e,l);null!=u&&null==u.get&&null==u.set&&n.push(l)}}e=o.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var i=[];e:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<e.length;++a)if(n.call(e[a],o))continue e;i.push(o)}return i}}(),v=/this\s*\.\s*\S+\s*=/;function w(e){try{if("function"==typeof e){var t=o.names(e.prototype),r=o.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=v.test(e+"")&&o.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function S(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return E.test(e)}function A(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function O(e){try{return e+""}catch(e){return"[no string representation]"}}function R(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function T(e){try{y(e,"isOperational",!0)}catch(e){}}function k(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function P(e){return R(e)&&o.propertyIsWritable(e,"stack")}var C="stack"in new Error?function(e){return P(e)?e:new Error(O(e))}:function(e){if(P(e))return e;try{throw new Error(O(e))}catch(e){return e}};function M(e){return{}.toString.call(e)}function I(e,t,r){for(var n=o.names(e),i=0;i<n.length;++i){var a=n[i];if(r(a))try{o.defineProperty(t,a,o.getDescriptor(e,a))}catch(e){}}}var L=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};L=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?D(e):null}}var N,j="undefined"!=typeof process&&"[object process]"===M(process).toLowerCase(),F="undefined"!=typeof process&&void 0!==process.env;function U(e){return F?process.env[e]:void 0}function W(){if("function"==typeof Promise)try{if("[object Promise]"===M(new Promise((function(){}))))return Promise}catch(e){}}function B(e,t){if(null===e||"function"!=typeof t||t===N)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}var $,z={setReflectHandler:function(e){N=e},isClass:w,isIdentifier:x,inheritedDataKeys:g,getDataPropertyOrDefault:b,thrower:m,isArray:o.isArray,asArray:L,notEnumerableProp:y,isPrimitive:d,isObject:h,isError:R,canEvaluate:a,errorObj:s,tryCatch:c,inherits:f,withAppended:_,maybeWrapAsError:p,toFastProperties:S,filledRange:A,toString:O,canAttachTrace:P,ensureErrorObject:C,originatesFromRejection:k,markAsOriginatingFromRejection:T,classString:M,copyDescriptors:I,isNode:j,hasEnvVariables:F,env:U,global:l,getNativePromise:W,contextBind:B};z.isRecentNode=z.isNode&&(process.versions&&process.versions.node?$=process.versions.node.split(".").map(Number):process.version&&($=process.version.split(".").map(Number)),0===$[0]&&$[1]>10||$[0]>0),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(e){z.lastLineError=e}t.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},(e,t,r)=>{var n=r(41).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=a(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=a(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t);var i=r(73),o=r.n(i),a=r(76),s=r.n(a),l=r(81),u=r.n(l),c=r(178),f=r(184),d=r(107),h=r(39),p=r(185),_=r(186),b=r(6),y=r(187);function z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"==typeof e)return V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var m=new d.Logger({name:"web-documentation.deploy",level:"debug"}),g=(0,b.resolve)("./build/"),v=(0,b.resolve)("./data/"),w=["apiDocumentation/","api/"],S="${name}/${version}/",E=(0,b.join)(v,"distributionBundle.zip"),x=(0,b.join)(v,"distributionBundle"),A=[],O={module:{preprocessor:{ejs:{options:{locals:{__evaluate__:"parameters"}}}}},offline:null},R="",T="web-documentation",k="https://github.com/thaibault/"+T+".git",P={name:"__dummy__",version:"1.0.0"},C=!1,M=function(){var e=s()(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t={}),r=o()({directory:!1,encoding:"utf8",extension:"",prefix:"DW"},t),e.next=1,(0,p.mkdtemp)((0,b.join)((0,_.tmpdir)(),r.prefix),r.encoding);case 1:if(n=e.sent,!r.directory){e.next=2;break}return e.abrupt("return",n);case 2:return e.abrupt("return",(0,b.join)(n,""+r.prefix+r.extension));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e,t){return void 0===t&&(t={}),(0,f.execSync)(e,o()({encoding:"utf-8",shell:"/bin/bash"},t))},L=function(){try{return I.apply(void 0,arguments),!0}catch(e){return!1}},D=function(){var e=s()(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){var n=[];t.on("data",(function(e){return n.push(e)})),t.on("end",(function(){e(Buffer.concat(n))})),t.on("error",(function(e){r(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=s()(u().mark((function e(t,r){var n,i,a,s,l,c,f,_,v,A,T,k,D,N,j,W,B,$,H,V,q,G,K,Y,Q,X,J,Z,ee,te,re;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.info("Generate document website artefacts."),!r){e.next=5;break}return m.info("Prepare distribution files."),n=(0,b.join)(t,(0,b.relative)("./",g),(0,b.relative)("./",E)),e.next=1,(0,p.mkdir)((0,b.dirname)(n),{recursive:!0});case 1:return e.next=2,(0,p.copyFile)(r,n);case 2:return e.next=3,(0,p.rm)(r);case 3:return i=(0,b.join)(t,(0,b.relative)("./",g),(0,b.relative)("./",x)),e.next=4,(0,p.mkdir)(i,{recursive:!0});case 4:return e.next=5,new Promise((function(e,t){(0,h.createReadStream)(n).pipe((0,y.Extract)({path:i})).on("close",(function(){e()})).on("error",(function(e){t(e)}))}));case 5:return m.info("Prepare favicon file."),a="favicon.png",e.next=6,(0,d.isFile)(a);case 6:if(!e.sent){e.next=7;break}return e.next=7,(0,p.copyFile)(a,t+"/source/image/favicon.ico");case 7:for(m.info("Render html."),s={},l=0,c=Object.entries(P.documentationWebsite||{});l<c.length;l++)f=c[l],_=f[0],v=f[1],s[(0,d.camelCaseToDelimited)(_).toUpperCase()]=v;if(!s.TAGLINE&&P.description&&(s.TAGLINE=P.description),!s.NAME&&P.name&&(s.NAME=P.name),m.debug('Found parameters "'+(0,d.represent)(s)+'" to render.'),A=null,!C){e.next=9;break}return A=w[1]+S,e.next=8,(0,d.isDirectory)(A);case 8:if(e.sent){e.next=9;break}A=w[1];case 9:return Y=o(),Q={},X=s,J=R,Z=A,e.next=10,(0,d.isFile)(E);case 10:if(!e.sent){e.next=11;break}ee=(0,b.relative)("./",E),e.next=12;break;case 11:ee=null;case 12:for(s=Y(Q,X,{CONTENT:J,API_DOCUMENTATION_PATH:Z,DISTRIBUTION_BUNDLE_FILE_PATH:ee}),T=0,k=Object.entries(s);T<k.length;T++)D=k[T],N=D[0],"string"==typeof(j=D[1])&&(s[N]=j.replace("!","#%%%#"));return W=JSON.stringify((0,d.evaluateDynamicData)(O,o()({parameters:s},P))),e.next=13,M({extension:".json"});case 13:return B=e.sent,e.next=14,(0,p.writeFile)(B,W);case 14:if(!($=(0,d.evaluate)("`yarn build:web '{__reference__: \"${parametersFilePath}\"}'`",o()({parameters:s,parametersFilePath:B},P))).error){e.next=15;break}throw new Error($.error);case 15:return H=$.result,m.debug('Use final parameters "'+W+'".'),m.info('Run "'+H+'".'),m.debug(I(H,{cwd:t})),e.next=16,(0,p.rm)(B);case 16:return te=z,e.next=17,(0,p.readdir)("./");case 17:V=te(e.sent);case 18:if((q=V()).done){e.next=22;break}if(G=q.value,re=[(0,b.resolve)(t),(0,b.resolve)(w[1])].includes((0,b.resolve)(G))){e.next=20;break}return e.next=19,F(G);case 19:re=e.sent;case 20:if(re){e.next=21;break}return e.next=21,(0,p.rm)(G,{recursive:!0});case 21:e.next=18;break;case 22:return m.info("Copy all build artefacts."),K=(0,b.join)(t,(0,b.relative)("./",g)),e.next=23,(0,d.walkDirectoryRecursively)(K,(function(e){return U(K,"./",e)}));case 23:return e.next=24,(0,p.rm)(t,{recursive:!0});case 24:L("git config user.email")||m.debug(I('git config user.email "github_actor@example.com"')),L("git config user.name")||m.debug(I('git config user.name "github_actor"')),m.debug(I("git add --all")),m.debug(I('git commit --message "Update project homepage content." --all')),m.debug(I("git push")),m.debug(I("git checkout main"));case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=s()(u().mark((function e(){var t,r,n,i,o,a,l,f,_,y,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P.scripts&&(P.scripts["build:bundle:compatible"]||P.scripts["build:bundle"]||P.scripts.build)&&(t="yarn "+(P.scripts["build:bundle:compatible"]?"build:bundle:compatible":P.scripts["build:bundle"]?"build:bundle":"build"),m.info('Build distribution bundle via "'+t+'".'),m.debug(I(t))),m.info("Pack to a zip archive."),e.next=1,M({extension:".zip"});case 1:if(r=e.sent,n=P.files||[],P.main&&n.push(P.main),0!==n.length){e.next=2;break}return e.abrupt("return",null);case 2:return i=function(){var e=s()(u().mark((function e(t){var r,n,o,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=u().mark((function e(){var t,n,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.value,t=(0,b.resolve)(t),e.next=1,F(t);case 1:if(e.sent){e.next=6;break}return e.next=2,(0,d.isDirectory)(t);case 2:if(!e.sent){e.next=5;break}return n=r,o=i,e.next=3,(0,p.readdir)(t);case 3:return e.next=4,o(e.sent.map((function(e){return(0,b.resolve)(t,e)})));case 4:r=n.concat.call(n,e.sent),e.next=6;break;case 5:m.debug('Add "'+t+'" to distribution bundle.'),r.push(t);case 6:case"end":return e.stop()}}),e)})),o=z(t);case 1:if((a=o()).done){e.next=3;break}return e.delegateYield(n(),"t0",2);case 2:e.next=1;break;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),(o=new c.SJ({zlib:{level:9}})).pipe((0,h.createWriteStream)(r)),a=new Promise((function(e,t){o.on("error",(function(e){t(e)})),o.on("warning",(function(e){m.warn(e)})),o.on("progress",(function(t){var r=t.entries;r.total===r.processed&&e()}))})),y=z,e.next=3,i(n);case 3:l=y(e.sent);case 4:if((f=l()).done){e.next=7;break}return _=f.value,g=o,e.next=5,D((0,h.createReadStream)(_));case 5:g.append.call(g,e.sent,{name:(0,b.relative)("./",_)});case 6:e.next=4;break;case 7:return e.next=8,o.finalize();case 8:return e.next=9,a;case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=s()(u().mark((function e(t){var r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,b.basename)(t,(0,b.extname)(t)).startsWith(".")&&!(0,b.basename)(t).startsWith(".yarn")||"dummyDocumentation"===(0,b.basename)(t,(0,b.extname)(t))){e.next=3;break}return e.next=1,(0,d.isDirectory)(t);case 1:if(!(i=e.sent)){e.next=2;break}i=["node_modules","build"].includes((0,b.basename)(t));case 2:n=i;case 3:if(r=n){e.next=6;break}return e.next=4,(0,d.isFile)(t);case 4:if(!(o=e.sent)){e.next=5;break}o="params.json"===(0,b.basename)(t);case 5:r=o;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=s()(u().mark((function e(t,r,n){var i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,F(n.path);case 1:if(o=e.sent){e.next=2;break}o="readme.md"===(0,b.basename)(n.name);case 2:if(!o){e.next=3;break}return e.abrupt("return",!1);case 3:if(r=(0,b.join)(r,(0,b.relative)(t,n.path)),m.debug('Copy "'+n.path+'" to "'+r+'".'),null==(i=n.stats)||!i.isFile()){e.next=5;break}return e.next=4,(0,p.copyFile)(n.path,r);case 4:e.next=6;break;case 5:return e.next=6,(0,p.mkdir)(r);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=s()(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,F(t.path);case 1:if(!e.sent){e.next=2;break}return e.abrupt("return",!1);case 2:if("readme"!==(0,b.basename)(t.name,(0,b.extname)(t.name))){e.next=4;break}return m.info('Handle "'+t.path+'".'),R&&(R+="\n"),r=R,e.next=3,(0,p.readFile)(t.path,"utf8");case 3:R=r+=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=s()(u().mark((function e(){var t,r,n,i,o;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=A;case 1:if(!(t<r.length)){e.next=3;break}return n=r[t],e.next=2,(0,p.rm)(n,{recursive:!0});case 2:t++,e.next=1;break;case 3:if(i=(0,b.resolve)(w[1]),!(o=C)){e.next=5;break}return e.next=4,(0,d.isDirectory)(i);case 4:o=!e.sent;case 5:if(!o){e.next=6;break}I("git checkout '"+i+"'");case 6:I("git branch").includes("* main")||m.debug(I("git checkout main"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=s()(u().mark((function e(){var t,r,n,i,a,s,l,c,f,h,_,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!I("git branch --all").includes("gh-pages")){m.debug(I("git fetch --all"));try{m.debug(I("git checkout package.json"))}catch(e){}m.debug(I("git checkout gh-pages"))}if(I("git branch").includes("* main")||m.debug(I("git checkout main")),m.debug(I("git pull")),!I("git branch").includes("* main")||!I("git branch --all").includes("gh-pages")){e.next=28;break}if(P=(0,d.optionalRequire)((0,b.resolve)("./package.json"))||P,!(t=(0,d.evaluate)("`"+S+"`",P)).error){e.next=1;break}throw new Error(t.error);case 1:return S=t.result,m.info("Read and Compile all markdown files and transform to html."),e.next=2,(0,d.walkDirectoryRecursively)("./",W);case 2:return r=null,e.prev=3,e.next=4,j();case 4:r=e.sent,e.next=6;break;case 5:e.prev=5,h=e.catch(3),m.error("Error occurred during building distribution bundle:",h),process.exitCode=1;case 6:if(!(_=r)){e.next=8;break}return e.next=7,(0,d.isFile)(r);case 7:_=e.sent;case 8:if(!_){e.next=11;break}return n=(0,b.join)(v,(0,b.basename)(r)),e.next=9,(0,p.mkdir)(v,{recursive:!0});case 9:return e.next=10,(0,p.copyFile)(r,n);case 10:A.push(n);case 11:if(C=!!P.scripts&&Object.prototype.hasOwnProperty.call(P.scripts,"document")){m.info("API documentation creation script detected.");try{m.debug(I("yarn document"))}catch(e){m.error(e),C=!1}}return m.debug(I("git checkout gh-pages")),m.debug(I("git pull")),i=(0,b.resolve)(w[1]),e.next=12,(0,d.isDirectory)(i);case 12:if(!e.sent){e.next=13;break}return e.next=13,(0,p.rm)(i,{recursive:!0});case 13:return e.next=14,(0,d.isDirectory)(w[0]);case 14:if(!e.sent){e.next=16;break}return e.next=15,(0,p.rename)((0,b.resolve)(w[0]),i);case 15:A.push(i);case 16:return e.next=17,M({directory:!0,prefix:T});case 17:if(a=e.sent,s=(0,b.resolve)("../"+T),!(y=true)){e.next=19;break}return e.next=18,(0,d.isDirectory)(s);case 18:y=e.sent;case 19:if(!y){e.next=21;break}return m.info("Copy local existing "+T+"."),e.next=20,(0,d.walkDirectoryRecursively)(s,(function(e){return U(s,a,e)}));case 20:e.next=22;break;case 21:m.info("No local existing "+T+" found","getting it remotely."),m.debug(I("unset GIT_WORK_TREE; git clone '"+k+"'",{cwd:a})),a=(0,b.resolve)(a,T);case 22:return m.debug(I("corepack enable",{cwd:a})),m.debug(I("corepack install",{cwd:a})),m.debug(I("yarn install",{cwd:a,env:o()({},process.env,{NODE_ENV:"debug"})})),m.debug(I("yarn clear",{cwd:a})),e.next=23,N(a,r);case 23:l=0,c=[i,v,a];case 24:if(!(l<c.length)){e.next=27;break}return f=c[l],e.next=25,(0,d.isDirectory)(f);case 25:if(!e.sent){e.next=26;break}return e.next=26,(0,p.rm)(f,{recursive:!0});case 26:l++,e.next=24;break;case 27:case 28:case"end":return e.stop()}}),e,null,[[3,5]])})));return function(){return e.apply(this,arguments)}}();try{await $()}catch(q){throw await B(),q}n()}catch(G){n(G)}}),1)},(e,t,r)=>{r.d(t,{SJ:()=>vr});var n=r(39);function i(e,{checkOpen:t=!0}={}){return null!==e&&"object"==typeof e&&(e.writable||e.readable||!t||void 0===e.writable&&void 0===e.readable)&&"function"==typeof e.pipe}var o=r(7);const a=(e,t,r)=>{const n=e instanceof RegExp?s(e,r):e,i=t instanceof RegExp?s(t,r):t,o=null!==n&&null!=i&&l(n,i,r);return o&&{start:o[0],end:o[1],pre:r.slice(0,o[0]),body:r.slice(o[0]+n.length,o[1]),post:r.slice(o[1]+i.length)}},s=(e,t)=>{const r=t.match(e);return r?r[0]:null},l=(e,t,r)=>{let n,i,o,a,s,l=r.indexOf(e),u=r.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(n=[],o=r.length;c>=0&&!s;){if(c===l)n.push(c),l=r.indexOf(e,c+1);else if(1===n.length){const e=n.pop();void 0!==e&&(s=[e,u])}else i=n.pop(),void 0!==i&&i<o&&(o=i,a=u),u=r.indexOf(t,c+1);c=l<u&&l>=0?l:u}n.length&&void 0!==a&&(s=[o,a])}return s},u="\0SLASH"+Math.random()+"\0",c="\0OPEN"+Math.random()+"\0",f="\0CLOSE"+Math.random()+"\0",d="\0COMMA"+Math.random()+"\0",h="\0PERIOD"+Math.random()+"\0",p=new RegExp(u,"g"),_=new RegExp(c,"g"),b=new RegExp(f,"g"),y=new RegExp(d,"g"),m=new RegExp(h,"g"),g=/\\\\/g,v=/\\{/g,w=/\\}/g,S=/\\,/g,E=/\\\./g,x=1e5;function A(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function O(e){return e.replace(p,"\\").replace(_,"{").replace(b,"}").replace(y,",").replace(m,".")}function R(e){if(!e)return[""];const t=[],r=a("{","}",e);if(!r)return e.split(",");const{pre:n,body:i,post:o}=r,s=n.split(",");s[s.length-1]+="{"+i+"}";const l=R(o);return o.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function T(e,t={}){if(!e)return[];const{max:r=x}=t;return"{}"===e.slice(0,2)&&(e="\\{\\}"+e.slice(2)),I(function(e){return e.replace(g,u).replace(v,c).replace(w,f).replace(S,d).replace(E,h)}(e),r,!0).map(O)}function k(e){return"{"+e+"}"}function P(e){return/^-?0\d/.test(e)}function C(e,t){return e<=t}function M(e,t){return e>=t}function I(e,t,r){const n=[],i=a("{","}",e);if(!i)return[e];const o=i.pre,s=i.post.length?I(i.post,t,!1):[""];if(/\$$/.test(i.pre))for(let e=0;e<s.length&&e<t;e++){const t=o+"{"+i.body+"}"+s[e];n.push(t)}else{const a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),u=a||l,c=i.body.indexOf(",")>=0;if(!u&&!c)return i.post.match(/,(?!,).*\}/)?I(e=i.pre+"{"+i.body+f+i.post,t,!0):[e];let d,h;if(u)d=i.body.split(/\.\./);else if(d=R(i.body),1===d.length&&void 0!==d[0]&&(d=I(d[0],t,!1).map(k),1===d.length))return s.map((e=>i.pre+d[0]+e));if(u&&void 0!==d[0]&&void 0!==d[1]){const e=A(d[0]),t=A(d[1]),r=Math.max(d[0].length,d[1].length);let n=3===d.length&&void 0!==d[2]?Math.max(Math.abs(A(d[2])),1):1,i=C;t<e&&(n*=-1,i=M);const o=d.some(P);h=[];for(let a=e;i(a,t);a+=n){let e;if(l)e=String.fromCharCode(a),"\\"===e&&(e="");else if(e=String(a),o){const t=r-e.length;if(t>0){const r=new Array(t+1).join("0");e=a<0?"-"+r+e.slice(1):r+e}}h.push(e)}}else{h=[];for(let e=0;e<d.length;e++)h.push.apply(h,I(d[e],t,!1))}for(let e=0;e<h.length;e++)for(let i=0;i<s.length&&n.length<t;i++){const t=o+h[e]+s[i];(!r||u||t)&&n.push(t)}}return n}const L=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},D={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},N=e=>e.replace(/[[\]\\-]/g,"\\$&"),j=e=>e.join(""),F=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const n=[],i=[];let o=r+1,a=!1,s=!1,l=!1,u=!1,c=r,f="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==r+1){if("]"===t&&a&&!l){c=o+1;break}if(a=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[a,l,u]]of Object.entries(D))if(e.startsWith(t,o)){if(f)return["$.",!1,e.length-r,!0];o+=t.length,u?i.push(a):n.push(a),s=s||l;continue e}l=!1,f?(t>f?n.push(N(f)+"-"+N(t)):t===f&&n.push(N(t)),f="",o++):e.startsWith("-]",o+1)?(n.push(N(t+"-")),o+=2):e.startsWith("-",o+1)?(f=t,o+=2):(n.push(N(t)),o++)}else l=!0,o++}else u=!0,o++}if(c<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(0===i.length&&1===n.length&&/^\\?.$/.test(n[0])&&!u){const e=2===n[0].length?n[0].slice(-1):n[0];return[(d=e,d.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,c-r,!1]}var d;const h="["+(u?"^":"")+j(n)+"]",p="["+(u?"":"^")+j(i)+"]";return[n.length&&i.length?"("+h+"|"+p+")":n.length?h:p,s,c-r,!0]},U=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):t?e.replace(/\[([^/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1");var W;const B=new Set(["!","?","+","*","@"]),$=e=>B.has(e),z=e=>$(e.type),H=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),V=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),q=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),G=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),K="(?!\\.)",Y=new Set(["[","."]),Q=new Set(["..","."]),X=new Set("().*{}+?[]^$\\!"),J="[^/]",Z=J+"*?",ee=J+"+?";let te=0;class re{type;#e;#t;#r=!1;#n=[];#i;#o;#a;#s=!1;#l;#u;#c=!1;id=++te;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#n.length,parts:this.#n}}constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#l=this.#e===this?r:this.#e.#l,this.#a=this.#e===this?[]:this.#e.#a,"!"!==e||this.#e.#s||this.#a.push(this),this.#o=this.#i?this.#i.#n.length:0}get hasMagic(){if(void 0!==this.#t)return this.#t;for(const e of this.#n)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return void 0!==this.#u?this.#u:this.type?this.#u=this.type+"("+this.#n.map((e=>String(e))).join("|")+")":this.#u=this.#n.map((e=>String(e))).join("")}#f(){if(this!==this.#e)throw new Error("should only call on root");if(this.#s)return this;let e;for(this.toString(),this.#s=!0;e=this.#a.pop();){if("!"!==e.type)continue;let t=e,r=t.#i;for(;r;){for(let n=t.#o+1;!r.type&&n<r.#n.length;n++)for(const t of e.#n){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#n[n])}t=r,r=t.#i}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof W&&t.#i===this))throw new Error("invalid part: "+t);this.#n.push(t)}}toJSON(){const e=null===this.type?this.#n.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#n.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&"!"===this.#i?.type)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(0===this.#o)return!0;const e=this.#i;for(let t=0;t<this.#o;t++){const r=e.#n[t];if(!(r instanceof W&&"!"===r.type))return!1}return!0}isEnd(){if(this.#e===this)return!0;if("!"===this.#i?.type)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();const e=this.#i?this.#i.#n.length:0;return this.#o===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new W(this.type,e);for(const e of this.#n)t.copyIn(e);return t}static#d(e,t,r,n,i){const o=n.maxExtglobRecursion??2;let a=!1,s=!1,l=-1,u=!1;if(null===t.type){let c=r,f="";for(;c<e.length;){const r=e.charAt(c++);if(a||"\\"===r){a=!a,f+=r;continue}if(s){c===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||c===l+2&&u||(s=!1),f+=r;continue}if("["===r){s=!0,l=c,u=!1,f+=r;continue}if(!n.noext&&$(r)&&"("===e.charAt(c)&&i<=o){t.push(f),f="";const o=new W(r,t);c=W.#d(e,o,c,n,i+1),t.push(o)}else f+=r}return t.push(f),c}let c=r+1,f=new W(null,t);const d=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(a||"\\"===r){a=!a,h+=r;continue}if(s){c===l+1?"^"!==r&&"!"!==r||(u=!0):"]"!==r||c===l+2&&u||(s=!1),h+=r;continue}if("["===r){s=!0,l=c,u=!1,h+=r;continue}if(!n.noext&&$(r)&&"("===e.charAt(c)&&(i<=o||t&&t.#h(r))){const o=t&&t.#h(r)?0:1;f.push(h),h="";const a=new W(r,f);f.push(a),c=W.#d(e,a,c,n,i+o)}else if("|"!==r){if(")"===r)return""===h&&0===t.#n.length&&(t.#c=!0),f.push(h),h="",t.push(...d,f),c;h+=r}else f.push(h),h="",d.push(f),f=new W(null,t)}return t.type=null,t.#t=void 0,t.#n=[e.substring(r-1)],c}#p(e){return this.#_(e,V)}#_(e,t=H){if(!e||"object"!=typeof e||null!==e.type||1!==e.#n.length||null===this.type)return!1;const r=e.#n[0];return!(!r||"object"!=typeof r||null===r.type)&&this.#h(r.type,t)}#h(e,t=q){return!!t.get(this.type)?.includes(e)}#b(e,t){const r=e.#n[0],n=new W(null,r,this.options);n.#n.push(""),r.push(n),this.#y(e,t)}#y(e,t){const r=e.#n[0];this.#n.splice(t,1,...r.#n);for(const e of r.#n)"object"==typeof e&&(e.#i=this);this.#u=void 0}#m(e){const t=G.get(this.type);return!!t?.has(e)}#g(e){if(!e||"object"!=typeof e||null!==e.type||1!==e.#n.length||null===this.type||1!==this.#n.length)return!1;const t=e.#n[0];return!(!t||"object"!=typeof t||null===t.type)&&this.#m(t.type)}#v(e){const t=G.get(this.type),r=e.#n[0],n=t?.get(r.type);if(!n)return!1;this.#n=r.#n;for(const e of this.#n)"object"==typeof e&&(e.#i=this);this.type=n,this.#u=void 0,this.#c=!1}static fromGlob(e,t={}){const r=new W(null,void 0,t);return W.#d(e,r,0,t,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#t||this.#l.nocase&&!this.#l.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#l.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}get options(){return this.#l}toRegExpSource(e){const t=e??!!this.#l.dot;if(this.#e===this&&(this.#w(),this.#f()),!z(this)){const r=this.isStart()&&this.isEnd()&&!this.#n.some((e=>"string"!=typeof e)),n=this.#n.map((t=>{const[n,i,o,a]="string"==typeof t?W.#S(t,this.#t,r):t.toRegExpSource(e);return this.#t=this.#t||o,this.#r=this.#r||a,n})).join("");let i="";if(this.isStart()&&"string"==typeof this.#n[0]){if(!(1===this.#n.length&&Q.has(this.#n[0]))){const r=Y,o=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),a=!t&&!e&&r.has(n.charAt(0));i=o?"(?!(?:^|/)\\.\\.?(?:$|/))":a?K:""}}let o="";this.isEnd()&&this.#e.#s&&"!"===this.#i?.type&&(o="(?:$|\\/)");return[i+n+o,U(n),this.#t=!!this.#t,this.#r]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let i=this.#E(t);if(this.isStart()&&this.isEnd()&&!i&&"!"!==this.type){const e=this.toString(),t=this;return t.#n=[e],t.type=null,t.#t=void 0,[e,U(this.toString()),!1,!1]}let o=!r||e||t?"":this.#E(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let a="";if("!"===this.type&&this.#c)a=(this.isStart()&&!t?K:"")+ee;else{a=n+i+("!"===this.type?"))"+(!this.isStart()||t||e?"":K)+Z+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&o?")":"*"===this.type&&o?")?":`)${this.type}`)}return[a,U(i),this.#t=!!this.#t,this.#r]}#w(){if(z(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#n.length;e++){const r=this.#n[e];"object"==typeof r&&(r.#w(),this.#_(r)?(t=!1,this.#y(r,e)):this.#p(r)?(t=!1,this.#b(r,e)):this.#g(r)&&(t=!1,this.#v(r)))}}while(!t&&++e<10)}else for(const e of this.#n)"object"==typeof e&&e.#w();this.#u=void 0}#E(e){return this.#n.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#r=this.#r||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#S(e,t,r=!1){let n=!1,i="",o=!1,a=!1;for(let s=0;s<e.length;s++){const l=e.charAt(s);if(n)n=!1,i+=(X.has(l)?"\\":"")+l;else if("*"!==l)if(a=!1,"\\"!==l){if("["===l){const[r,n,a,l]=F(e,s);if(a){i+=r,o=o||n,s+=a-1,t=t||l;continue}}"?"!==l?i+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=J,t=!0)}else s===e.length-1?i+="\\\\":n=!0;else{if(a)continue;a=!0,i+=r&&/^[*]+$/.test(e)?ee:Z,t=!0}}return[i,U(e),!!t,o]}}W=re;const ne=(e,t,r={})=>(L(t),!(!r.nocomment&&"#"===t.charAt(0))&&new ke(t,r).match(e)),ie=/^\*+([^+@!?*[(]*)$/,oe=e=>t=>!t.startsWith(".")&&t.endsWith(e),ae=e=>t=>t.endsWith(e),se=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),le=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ue=/^\*+\.\*+$/,ce=e=>!e.startsWith(".")&&e.includes("."),fe=e=>"."!==e&&".."!==e&&e.includes("."),de=/^\.\*+$/,he=e=>"."!==e&&".."!==e&&e.startsWith("."),pe=/^\*+$/,_e=e=>0!==e.length&&!e.startsWith("."),be=e=>0!==e.length&&"."!==e&&".."!==e,ye=/^\?+([^+@!?*[(]*)?$/,me=([e,t=""])=>{const r=Se([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},ge=([e,t=""])=>{const r=Ee([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},ve=([e,t=""])=>{const r=Ee([e]);return t?e=>r(e)&&e.endsWith(t):r},we=([e,t=""])=>{const r=Se([e]);return t?e=>r(e)&&e.endsWith(t):r},Se=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},Ee=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},xe="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";ne.sep="win32"===xe?{sep:"\\"}.sep:{sep:"/"}.sep;const Ae=Symbol("globstar **");ne.GLOBSTAR=Ae;ne.filter=(e,t={})=>r=>ne(r,e,t);const Oe=(e,t={})=>Object.assign({},e,t);ne.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return ne;const t=ne;return Object.assign(((r,n,i={})=>t(r,n,Oe(e,i))),{Minimatch:class extends t.Minimatch{constructor(t,r={}){super(t,Oe(e,r))}static defaults(r){return t.defaults(Oe(e,r)).Minimatch}},AST:class extends t.AST{constructor(t,r,n={}){super(t,r,Oe(e,n))}static fromGlob(r,n={}){return t.AST.fromGlob(r,Oe(e,n))}},unescape:(r,n={})=>t.unescape(r,Oe(e,n)),escape:(r,n={})=>t.escape(r,Oe(e,n)),filter:(r,n={})=>t.filter(r,Oe(e,n)),defaults:r=>t.defaults(Oe(e,r)),makeRe:(r,n={})=>t.makeRe(r,Oe(e,n)),braceExpand:(r,n={})=>t.braceExpand(r,Oe(e,n)),match:(r,n,i={})=>t.match(r,n,Oe(e,i)),sep:t.sep,GLOBSTAR:Ae})};const Re=(e,t={})=>(L(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:T(e,{max:t.braceExpandMax}));ne.braceExpand=Re;ne.makeRe=(e,t={})=>new ke(e,t).makeRe();ne.match=(e,t,r={})=>{const n=new ke(t,r);return e=e.filter((e=>n.match(e))),n.options.nonull&&!e.length&&e.push(t),e};const Te=/[?*]|[+@!]\(.*?\)|\[|\]/;class ke{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){L(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||xe,this.isWindows="win32"===this.platform;this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&Te.test(e[2])||Te.test(e[3])),r=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(r)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,n),this.set=n.filter((e=>-1===e.indexOf(!1))),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(const t of e)for(let e=0;e<t.length;e++)"**"===t[e]&&(t[e]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let r=t;for(;"**"===e[r+1];)r++;r!==t&&e.splice(t,r-t)}return e}))}levelOneOptimize(e){return e.map((e=>0===(e=e.reduce(((e,t)=>{const r=e[e.length-1];return"**"===t&&"**"===r?e:".."===t&&r&&".."!==r&&"."!==r&&"**"!==r?(e.pop(),e):(e.push(t),e)}),[])).length?[""]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const n=e[r];1===r&&""===n&&""===e[0]||("."!==n&&""!==n||(t=!0,e.splice(r,1),r--))}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let r=0;for(;-1!==(r=e.indexOf("..",r+1));){const n=e[r-1];!n||"."===n||".."===n||"**"===n||this.isWindows&&/^[a-z]:$/i.test(n)||(t=!0,e.splice(r-1,2),r-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let n=-1;for(;-1!==(n=r.indexOf("**",n+1));){let i=n;for(;"**"===r[i+1];)i++;i>n&&r.splice(n+1,i-n);let o=r[n+1];const a=r[n+2],s=r[n+3];if(".."!==o)continue;if(!a||"."===a||".."===a||!s||"."===s||".."===s)continue;t=!0,r.splice(n,1);const l=r.slice(0);l[n]="**",e.push(l),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){const n=r[e];1===e&&""===n&&""===r[0]||("."!==n&&""!==n||(t=!0,r.splice(e,1),e--))}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(t=!0,r.pop())}let i=0;for(;-1!==(i=r.indexOf("..",i+1));){const e=r[i-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===i&&"**"===r[i+1]?["."]:[];r.splice(i-1,2,...e),0===r.length&&r.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){const n=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(n){e[t]=[],e[r]=n;break}}return e.filter((e=>e.length))}partsMatch(e,t,r=!1){let n=0,i=0,o=[],a="";for(;n<e.length&&i<t.length;)if(e[n]===t[i])o.push("b"===a?t[i]:e[n]),n++,i++;else if(r&&"**"===e[n]&&t[i]===e[n+1])o.push(e[n]),n++;else if(r&&"**"===t[i]&&e[n]===t[i+1])o.push(t[i]),i++;else if("*"!==e[n]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i]){if("*"!==t[i]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===a)return!1;a="b",o.push(t[i]),n++,i++}else{if("b"===a)return!1;a="a",o.push(e[n]),n++,i++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let n=0,i=0;if(this.isWindows){const r="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),o=!r&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),a="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=o?3:r?0:void 0,l=!a&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:a?0:void 0;if("number"==typeof s&&"number"==typeof l){const[r,o]=[e[s],t[l]];r.toLowerCase()===o.toLowerCase()&&(t[l]=r,i=l,n=s)}}const{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Ae)?this.#x(e,t,r,n,i):this.#A(e,t,r,n,i)}#x(e,t,r,n,i){const o=t.indexOf(Ae,i),a=t.lastIndexOf(Ae),[s,l,u]=r?[t.slice(i,o),t.slice(o+1),[]]:[t.slice(i,o),t.slice(o+1,a),t.slice(a+1)];if(s.length){const t=e.slice(n,n+s.length);if(!this.#A(t,s,r,0,0))return!1;n+=s.length,i+=s.length}let c=0;if(u.length){if(u.length+n>e.length)return!1;let t=e.length-u.length;if(this.#A(e,u,r,t,0))c=u.length;else{if(""!==e[e.length-1]||n+u.length===e.length)return!1;if(t--,!this.#A(e,u,r,t,0))return!1;c=u.length+1}}if(!l.length){let t=!!c;for(let r=n;r<e.length-c;r++){const n=String(e[r]);if(t=!0,"."===n||".."===n||!this.options.dot&&n.startsWith("."))return!1}return r||t}const f=[[[],0]];let d=f[0],h=0;const p=[0];for(const e of l)e===Ae?(p.push(h),d=[[],0],f.push(d)):(d[0].push(e),h++);let _=f.length-1;const b=e.length-c;for(const e of f)e[1]=b-(p[_--]+e[0].length);return!!this.#O(e,f,n,0,r,0,!!c)}#O(e,t,r,n,i,o,a){const s=t[n];if(!s){for(let t=r;t<e.length;t++){a=!0;const r=e[t];if("."===r||".."===r||!this.options.dot&&r.startsWith("."))return!1}return a}const[l,u]=s;for(;r<=u;){if(this.#A(e.slice(0,r+l.length),l,i,r,0)&&o<this.maxGlobstarRecursion){const s=this.#O(e,t,r+l.length,n+1,i,o+1,a);if(!1!==s)return s}const s=e[r];if("."===s||".."===s||!this.options.dot&&s.startsWith("."))return!1;r++}return i||null}#A(e,t,r,n,i){let o,a,s,l;for(o=n,a=i,l=e.length,s=t.length;o<l&&a<s;o++,a++){this.debug("matchOne loop");let r,n=t[a],i=e[o];if(this.debug(t,n,i),!1===n||n===Ae)return!1;if("string"==typeof n?(r=i===n,this.debug("string match",n,i,r)):(r=n.test(i),this.debug("pattern match",n,i,r)),!r)return!1}if(o===l&&a===s)return!0;if(o===l)return r;if(a===s)return o===l-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return Re(this.pattern,this.options)}parse(e){L(e);const t=this.options;if("**"===e)return Ae;if(""===e)return"";let r,n=null;(r=e.match(pe))?n=t.dot?be:_e:(r=e.match(ie))?n=(t.nocase?t.dot?le:se:t.dot?ae:oe)(r[1]):(r=e.match(ye))?n=(t.nocase?t.dot?ge:me:t.dot?ve:we)(r):(r=e.match(ue))?n=t.dot?fe:ce:(r=e.match(de))&&(n=he);const i=re.fromGlob(e,this.options).toMMPattern();return n&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=new Set(t.nocase?["i"]:[]);let i=e.map((e=>{const t=e.map((e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))n.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===Ae?Ae:e._src}));t.forEach(((e,n)=>{const i=t[n+1],o=t[n-1];e===Ae&&o!==Ae&&(void 0===o?void 0!==i&&i!==Ae?t[n+1]="(?:\\/|"+r+"\\/)?"+i:t[n]=r:void 0===i?t[n-1]=o+"(?:\\/|\\/"+r+")?":i!==Ae&&(t[n-1]=o+"(?:\\/|\\/"+r+"\\/)"+i,t[n+1]=Ae))}));const i=t.filter((e=>e!==Ae));if(this.partial&&i.length>=1){const e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join("/"));return"(?:"+e.join("|")+")"}return i.join("/")})).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+a+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let o=n[n.length-1];if(!o)for(let e=n.length-2;!o&&e>=0;e--)o=n[e];for(const e of i){let i=n;r.matchBase&&1===e.length&&(i=[o]);if(this.matchOne(i,e,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return ne.defaults(e).Minimatch}}ne.AST=re,ne.Minimatch=ke,ne.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),ne.unescape=U;var Pe=r(6);function Ce(e,t){return new Promise((r=>{(t?n.stat:n.lstat)(e,((n,i)=>{if(n)if("ENOENT"===n.code)r(t?Ce(e,!1):null);else r(null);else r(i)}))}))}async function*Me(e,t,r,i,o,a){let s=await function(e,t){return new Promise(((r,i)=>{n.readdir(e,{withFileTypes:!0},((e,n)=>{if(e)switch(e.code){case"ENOTDIR":t?i(e):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;default:i(e)}else r(n)}))}))}(t+e,a);for(const n of s){const a=e+"/"+n.name,s=a.slice(1),l=t+"/"+s;let u=n;(i||r)&&(u=await Ce(l,r)??u),u.isDirectory()?o(s)||(yield{relative:s,absolute:l,stat:u},yield*Me(a,t,r,i,o,!1)):yield{relative:s,absolute:l,stat:u}}}var Ie=class extends o.EventEmitter{options;matchers;ignoreMatchers;skipMatchers;paused;aborted;inactive;iterator;constructor(e,t,r){if(super(),"function"==typeof t&&(r=t,t=void 0),this.options=function(e){return{pattern:e.pattern,dot:!!e.dot,noglobstar:!!e.noglobstar,matchBase:!!e.matchBase,nocase:!!e.nocase,ignore:e.ignore,skip:e.skip,follow:!!e.follow,stat:!!e.stat,nodir:!!e.nodir,mark:!!e.mark,silent:!!e.silent,absolute:!!e.absolute}}(t||{}),this.matchers=[],this.options.pattern){const e=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=e.map((e=>new ke(e,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase})))}if(this.ignoreMatchers=[],this.options.ignore){const e=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=e.map((e=>new ke(e,{dot:!0})))}if(this.skipMatchers=[],this.options.skip){const e=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=e.map((e=>new ke(e,{dot:!0})))}if(this.iterator=async function*(e,t,r,n){yield*Me("",e,t,r,n,!0)}((0,Pe.resolve)(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r){const e=r,t=[];this.on("match",(e=>t.push(this.options.absolute?e.absolute:e.relative))),this.on("error",(t=>e(t))),this.on("end",(()=>e(null,t)))}setTimeout((()=>this._next()))}_shouldSkipDirectory(e){return this.skipMatchers.some((t=>t.match(e)))}_fileMatches(e,t){const r=e+(t?"/":"");return(0===this.matchers.length||this.matchers.some((e=>e.match(r))))&&!this.ignoreMatchers.some((e=>e.match(r)))&&(!this.options.nodir||!t)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then((e=>{if(e.done)this.emit("end");else{const t=e.value.stat.isDirectory();if(this._fileMatches(e.value.relative,t)){let r=e.value.relative,n=e.value.absolute;this.options.mark&&t&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:e.value.stat}):this.emit("match",{relative:r,absolute:n})}this._next()}})).catch((e=>{this.abort(),this.emit("error",e),e.code||this.options.silent||console.error(e)}))}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};const Le=(e,t,r)=>new Ie(e,t,r);Le.ReaddirGlob=Ie;var De=Le,Ne=r(123);function je(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}var Fe="function"==typeof queueMicrotask&&queueMicrotask,Ue="function"==typeof setImmediate&&setImmediate,We="object"==typeof process&&"function"==typeof process.nextTick;function Be(e){setTimeout(e,0)}function $e(e){return(t,...r)=>e((()=>t(...r)))}var ze=$e(Fe?queueMicrotask:Ue?setImmediate:We?process.nextTick:Be);function He(e){return Ge(e)?function(...t){const r=t.pop();return Ve(e.apply(this,t),r)}:je((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return Ve(n,r);r(null,n)}))}function Ve(e,t){return e.then((e=>{qe(t,null,e)}),(e=>{qe(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function qe(e,t,r){try{e(t,r)}catch(e){ze((e=>{throw e}),e)}}function Ge(e){return"AsyncFunction"===e[Symbol.toStringTag]}function Ke(e){if("function"!=typeof e)throw new Error("expected a function");return Ge(e)?He(e):e}function Ye(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function Qe(e){return function(t,...r){return Ye((function(n){var i=this;return e(t,((e,t)=>{Ke(e).apply(i,r.concat(t))}),n)}))}}function Xe(e,t,r,n){t=t||[];var i=[],o=0,a=Ke(r);return e(t,((e,t,r)=>{var n=o++;a(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function Je(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}var Ze={};function et(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function tt(e){if(Je(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}function rt(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function nt(e,t,r,n){let i=!1,o=!1,a=!1,s=0,l=0;function u(){s>=t||a||i||(a=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(a=!1,t)return i=!0,void(s<=0&&n(null));s++,r(e,l,c),l++,u()}})).catch(f))}function c(e,t){if(s-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===Ze||i&&s<=0?(i=!0,n(null)):void u()}function f(e){o||(a=!1,i=!0,n(e))}u()}var it=e=>(t,r,n)=>{if(n=et(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return nt(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return nt(t[Symbol.asyncIterator](),e,r,n);var i=tt(t),o=!1,a=!1,s=0,l=!1;function u(e,t){if(!a)if(s-=1,e)o=!0,n(e);else if(!1===e)o=!0,a=!0;else{if(t===Ze||o&&s<=0)return o=!0,n(null);l||c()}}function c(){for(l=!0;s<e&&!o;){var t=i();if(null===t)return o=!0,void(s<=0&&n(null));s+=1,r(t.value,t.key,rt(u))}l=!1}c()};var ot=Ye((function(e,t,r,n){return it(t)(e,Ke(r),n)}),4);function at(e,t,r){r=et(r);var n=0,i=0,{length:o}=e,a=!1;function s(e,t){!1===e&&(a=!0),!0!==a&&(e?r(e):++i!==o&&t!==Ze||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,rt(s))}function st(e,t,r){return ot(e,1/0,t,r)}var lt=Ye((function(e,t,r){return(Je(e)?at:st)(e,Ke(t),r)}),3);var ut=Ye((function(e,t,r){return Xe(lt,e,t,r)}),3);Qe(ut);var ct=Ye((function(e,t,r){return ot(e,1,t,r)}),3);var ft=Ye((function(e,t,r){return Xe(ct,e,t,r)}),3);Qe(ft);Symbol("promiseCallback");class dt{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):ht(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):ht(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function ht(e,t){e.length=1,e.head=e.tail=t}function pt(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=Ke(e),i=0,o=[];const a={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function s(e,t){return e?t?void(a[e]=a[e].filter((e=>e!==t))):a[e]=[]:Object.keys(a).forEach((e=>a[e]=[]))}function l(e,...t){a[e].forEach((e=>e(...t)))}var u=!1;function c(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function a(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}_.started=!0;var s=_._createTaskItem(e,r?a:n||a);if(t?_._tasks.unshift(s):_._tasks.push(s),u||(u=!0,ze((()=>{u=!1,_.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function f(e){return function(t,...r){i-=1;for(var n=0,a=e.length;n<a;n++){var s=e[n],u=o.indexOf(s);0===u?o.shift():u>0&&o.splice(u,1),s.callback(t,...r),null!=t&&l("error",t,s.data)}i<=_.concurrency-_.buffer&&l("unsaturated"),_.idle()&&l("drain"),_.process()}}function d(e){return!(0!==e.length||!_.idle())&&(ze((()=>l("drain"))),!0)}const h=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,t){const r=(...n)=>{s(e,r),t(...n)};a[e].push(r)}(e,((e,n)=>{if(e)return r(e);t(n)}))}));s(e),function(e,t){a[e].push(t)}(e,t)};var p=!1,_={_tasks:new dt,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*_._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!1,!1,t)))}return c(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!1,!0,t)))}return c(e,!1,!0,t)},kill(){s(),_._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!0,!1,t)))}return c(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>c(e,!0,!0,t)))}return c(e,!0,!0,t)},remove(e){_._tasks.remove(e)},process(){if(!p){for(p=!0;!_.paused&&i<_.concurrency&&_._tasks.length;){var e=[],t=[],r=_._tasks.length;_.payload&&(r=Math.min(r,_.payload));for(var a=0;a<r;a++){var s=_._tasks.shift();e.push(s),o.push(s),t.push(s.data)}i+=1,0===_._tasks.length&&l("empty"),i===_.concurrency&&l("saturated");var u=rt(f(e));n(t,u)}p=!1}},length:()=>_._tasks.length,running:()=>i,workersList:()=>o,idle:()=>_._tasks.length+i===0,pause(){_.paused=!0},resume(){!1!==_.paused&&(_.paused=!1,ze(_.process))}};return Object.defineProperties(_,{saturated:{writable:!1,value:h("saturated")},unsaturated:{writable:!1,value:h("unsaturated")},empty:{writable:!1,value:h("empty")},drain:{writable:!1,value:h("drain")},error:{writable:!1,value:h("error")}}),_}Ye((function(e,t,r,n){n=et(n);var i=Ke(r);return ct(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);var _t=Ye((function(e,t,r,n){return Xe(it(t),e,r,n)}),4);var bt=Ye((function(e,t,r,n){var i=Ke(r);return _t(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);Ye((function(e,t,r){return bt(e,1/0,t,r)}),3);Ye((function(e,t,r){return bt(e,1,t,r)}),3);function yt(e,t){return(r,n,i,o)=>{var a,s=!1;const l=Ke(i);r(n,((r,n,i)=>{l(r,((n,o)=>n||!1===n?i(n):e(o)&&!a?(s=!0,a=t(!0,r),i(null,Ze)):void i()))}),(e=>{if(e)return o(e);o(null,s?a:t(!1))}))}}Ye((function(e,t,r){return yt((e=>e),((e,t)=>t))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt((e=>e),((e,t)=>t))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt((e=>e),((e,t)=>t))(it(1),e,t,r)}),3);function mt(e){return(t,...r)=>Ke(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}mt("dir");Ye((function(e,t,r){r=rt(r);var n,i=Ke(e),o=Ke(t);function a(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,s))}function s(e,t){return e?r(e):!1!==e?t?void i(a):r(null,...n):void 0}return s(null,!0)}),3);function gt(e){return(t,r,n)=>e(t,n)}Ye((function(e,t,r){return lt(e,gt(Ke(t)),r)}),3);var vt=Ye((function(e,t,r,n){return it(t)(e,gt(Ke(r)),n)}),4);var wt=Ye((function(e,t,r){return vt(e,1,t,r)}),3);function St(e){return Ge(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?ze((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}Ye((function(e,t,r){return yt((e=>!e),(e=>!e))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt((e=>!e),(e=>!e))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt((e=>!e),(e=>!e))(ct,e,t,r)}),3);function Et(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function xt(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function At(e,t,r,n){return(Je(t)?Et:xt)(e,t,Ke(r),n)}Ye((function(e,t,r){return At(lt,e,t,r)}),3);Ye((function(e,t,r,n){return At(it(t),e,r,n)}),4);Ye((function(e,t,r){return At(ct,e,t,r)}),3);Ye((function(e,t){var r=rt(t),n=Ke(St(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2);Ye((function(e,t,r,n){var i=Ke(r);return _t(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:a}=t[o],{val:s}=t[o];i.call(r,a)?r[a].push(s):r[a]=[s]}return n(e,r)}))}),4);mt("log");Ye((function(e,t,r,n){n=et(n);var i={},o=Ke(r);return it(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);$e(We?process.nextTick:Ue?setImmediate:Be),Ye(((e,t,r)=>{var n=Je(t)?[]:{};e(t,((e,t,r)=>{Ke(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function Ot(e,t){var r=Ke(e);return pt(((e,t)=>{r(e[0],t)}),t,1)}Symbol.iterator;Ye((function(e,t){if(t=et(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)Ke(e[r])(t)}),2);function Rt(e,t,r,n){const i=Ke(r);return At(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}Ye((function(e,t,r){return Rt(lt,e,t,r)}),3);Ye((function(e,t,r,n){return Rt(it(t),e,r,n)}),4);Ye((function(e,t,r){return Rt(ct,e,t,r)}),3);Ye((function(e,t,r){return yt(Boolean,(e=>e))(lt,e,t,r)}),3);Ye((function(e,t,r,n){return yt(Boolean,(e=>e))(it(t),e,r,n)}),4);Ye((function(e,t,r){return yt(Boolean,(e=>e))(ct,e,t,r)}),3);Ye((function(e,t,r){var n=Ke(t);return ut(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);Ye((function(e,t){var r,n=null;return wt(e,((e,t)=>{Ke(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));Ye((function(e,t,r){r=rt(r);var n=Ke(t),i=Ke(e),o=[];function a(e,...t){if(e)return r(e);o=t,!1!==e&&i(s)}function s(e,t){return e?r(e):!1!==e?t?void n(a):r(null,...o):void 0}return i(s)}),3);Ye((function(e,t){if(t=et(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){Ke(e[r++])(...t,rt(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])}));var Tt=r(24);const kt={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function Pt(e,t){Error.captureStackTrace(this,this.constructor),this.message=kt[e]||e,this.code=e,this.data=t}Tt.inherits(Pt,Error);var Ct=r(110),Mt=r(113);function It(e){return"/"!==e.slice(-1)?e+"/":e}const{ReaddirGlob:Lt}=De,Dt="win32"===process.platform;class Nt extends Ct.Transform{_supportsDirectory=!1;_supportsSymlink=!1;constructor(e){super(e={highWaterMark:1048576,statConcurrency:4,...e}),this.options=e,this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=Ot(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=Ot(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]}_abort(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()}_append(e,t){let r={source:null,filepath:e};(t=t||{}).name||(t.name=e),t.sourcePath=e,r.data=t,this._entriesCount++,t.stats&&t.stats instanceof n.Stats?(r=this._updateQueueTaskWithStats(r,t.stats),r&&(t.stats.size&&(this._fsEntriesTotalBytes+=t.stats.size),this._queue.push(r))):this._statQueue.push(r)}_finalize(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)}_maybeFinalize(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))}_moduleAppend(e,t,r){this._state.aborted?r():this._module.append(e,t,function(e){if(this._task=null,this._state.aborted)this._shutdown();else{if(e)return this.emit("error",e),void setImmediate(r);this.emit("entry",t),this._entriesProcessedCount++,t.stats&&t.stats.size&&(this._fsEntriesProcessedBytes+=t.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}}.bind(this))}_moduleFinalize(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new Pt("NOENDMETHOD"))}_modulePipe(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0}_moduleUnpipe(){this._module.unpipe(this),this._state.modulePiped=!1}_normalizeEntryData(e,t){e={type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1,...e},t&&!1===e.stats&&(e.stats=t);let r="directory"===e.type;var n,i;return e.name&&("string"==typeof e.prefix&&""!==e.prefix&&(e.name=e.prefix+"/"+e.name,e.prefix=null),e.name=(n=e.name,Mt(n,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")),"symlink"!==e.type&&"/"===e.name.slice(-1)?(r=!0,e.type="directory"):r&&(e.name+="/")),"number"==typeof e.mode?e.mode&=Dt?511:4095:e.stats&&null===e.mode?(e.mode=Dt?511&e.stats.mode:4095&e.stats.mode,Dt&&r&&(e.mode=493)):null===e.mode&&(e.mode=r?493:420),e.stats&&null===e.date?e.date=e.stats.mtime:e.date=((i=(i=e.date)||new Date)instanceof Date||(i="string"==typeof i?new Date(i):new Date),i),e}_onModuleError(e){this.emit("error",e)}_onQueueDrain(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()}_onQueueTask(e,t){const r=()=>{e.data.callback&&e.data.callback(),t()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=e,this._moduleAppend(e.source,e.data,r))}_onStatQueueTask(e,t){this._state.finalizing||this._state.finalized||this._state.aborted?t():(0,n.lstat)(e.filepath,function(r,n){if(this._state.aborted)setImmediate(t);else{if(r)return this._entriesCount--,this.emit("warning",r),void setImmediate(t);(e=this._updateQueueTaskWithStats(e,n))&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(e)),setImmediate(t)}}.bind(this))}_shutdown(){this._moduleUnpipe(),this.end()}_transform(e,t,r){e&&(this._pointer+=e.length),r(null,e)}_updateQueueTaskWithStats(e,t){if(t.isFile())e.data.type="file",e.data.sourceType="stream",e.source=new Ne.Readable((function(){return(0,n.createReadStream)(e.filepath)}));else if(t.isDirectory()&&this._supportsDirectory)e.data.name=It(e.data.name),e.data.type="directory",e.data.sourcePath=It(e.filepath),e.data.sourceType="buffer",e.source=Buffer.concat([]);else{if(!t.isSymbolicLink()||!this._supportsSymlink)return t.isDirectory()?this.emit("warning",new Pt("DIRECTORYNOTSUPPORTED",e.data)):t.isSymbolicLink()?this.emit("warning",new Pt("SYMLINKNOTSUPPORTED",e.data)):this.emit("warning",new Pt("ENTRYNOTSUPPORTED",e.data)),null;{const t=(0,n.readlinkSync)(e.filepath),r=(0,Pe.dirname)(e.filepath);e.data.type="symlink",e.data.linkname=(0,Pe.relative)(r,(0,Pe.resolve)(r,t)),e.data.sourceType="buffer",e.source=Buffer.concat([])}}return e.data=this._normalizeEntryData(e.data,t),e}abort(){return this._state.aborted||this._state.finalized||this._abort(),this}append(e,t){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof(t=this._normalizeEntryData(t)).name||0===t.name.length)return this.emit("error",new Pt("ENTRYNAMEREQUIRED")),this;if("directory"===t.type&&!this._supportsDirectory)return this.emit("error",new Pt("DIRECTORYNOTSUPPORTED",{name:t.name})),this;if(e=function(e){return null===e?Buffer.alloc(0):"string"==typeof e?Buffer.from(e):i(e)?e.pipe(new Ct.PassThrough):e}(e),Buffer.isBuffer(e))t.sourceType="buffer";else{if(!i(e))return this.emit("error",new Pt("INPUTSTEAMBUFFERREQUIRED",{name:t.name})),this;t.sourceType="stream"}return this._entriesCount++,this._queue.push({data:t,source:e}),this}directory(e,t,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new Pt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===t?t="":"string"!=typeof t&&(t=e);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});const i=De(e,{stat:!0,dot:!0});return i.on("error",function(e){this.emit("error",e)}.bind(this)),i.on("match",function(o){i.pause();let a=!1,s=Object.assign({},r);s.name=o.relative,s.prefix=t,s.stats=o.stat,s.callback=i.resume.bind(i);try{if(n)if(s=n(s),!1===s)a=!0;else if("object"!=typeof s)throw new Pt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:e})}catch(e){return void this.emit("error",e)}a?i.resume():this._append(o.absolute,s)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}file(e,t){return this._state.finalize||this._state.aborted?(this.emit("error",new Pt("QUEUECLOSED")),this):"string"!=typeof e||0===e.length?(this.emit("error",new Pt("FILEFILEPATHREQUIRED")),this):(this._append(e,t),this)}glob(e,t,r){this._pending++,t={stat:!0,pattern:e,...t};const n=new Lt(t.cwd||".",t);return n.on("error",function(e){this.emit("error",e)}.bind(this)),n.on("match",function(e){n.pause();const t=Object.assign({},r);t.callback=n.resume.bind(n),t.stats=e.stat,t.name=e.relative,this._append(e.absolute,t)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this}finalize(){if(this._state.aborted){var e=new Pt("ABORTED");return this.emit("error",e),Promise.reject(e)}if(this._state.finalize){var t=new Pt("FINALIZING");return this.emit("error",t),Promise.reject(t)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise((function(e,t){var n;r._module.on("end",(function(){n||e()})),r._module.on("error",(function(e){n=!0,t(e)}))}))}symlink(e,t,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Pt("QUEUECLOSED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new Pt("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new Pt("SYMLINKTARGETREQUIRED",{filepath:e})),this;if(!this._supportsSymlink)return this.emit("error",new Pt("SYMLINKNOTSUPPORTED",{filepath:e})),this;var n={type:"symlink"};return n.name=e.replace(/\\/g,"/"),n.linkname=t.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this}pointer(){return this._pointer}}class jt{getName(){}getSize(){}getLastModifiedDate(){}isDirectory(){}}function Ft(e,t){var r=(t=t||!1)?e.getFullYear():e.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(t?e.getMonth():e.getUTCMonth())+1<<21|(t?e.getDate():e.getUTCDate())<<16|(t?e.getHours():e.getUTCHours())<<11|(t?e.getMinutes():e.getUTCMinutes())<<5|(t?e.getSeconds():e.getUTCSeconds())/2}function Ut(e){return new Date(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1)}function Wt(e){var t=Buffer.alloc(8);return t.writeUInt32LE(e%4294967296,0),t.writeUInt32LE(e/4294967296|0,4),t}function Bt(e){var t=Buffer.alloc(2);return t.writeUInt16LE((65535&e)>>>0,0),t}function $t(e,t){return e.readUInt16LE(t)}function zt(e){var t=Buffer.alloc(4);return t.writeUInt32LE((4294967295&e)>>>0,0),t}class Ht{constructor(){return this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this}encode(){return Bt((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))}static parse(e,t){var r=$t(e,t),n=new Ht;return n.useDataDescriptor(!!(8&r)),n.useUTF8ForNames(!!(2048&r)),n.useStrongEncryption(!!(64&r)),n.useEncryption(!!(1&r)),n.setSlidingDictionarySize(2&r?8192:4096),n.setNumberOfShannonFanoTrees(4&r?3:2),n}setNumberOfShannonFanoTrees(e){this.numberOfShannonFanoTrees=e}getNumberOfShannonFanoTrees(){return this.numberOfShannonFanoTrees}setSlidingDictionarySize(e){this.slidingDictionarySize=e}getSlidingDictionarySize(){return this.slidingDictionarySize}useDataDescriptor(e){this.descriptor=e}usesDataDescriptor(){return this.descriptor}useEncryption(e){this.encryption=e}usesEncryption(){return this.encryption}useStrongEncryption(e){this.strongEncryption=e}usesStrongEncryption(){return this.strongEncryption}useUTF8ForNames(e){this.utf8=e}usesUTF8ForNames(){return this.utf8}}const Vt=61440,qt=40960,Gt=Buffer.alloc(0),Kt=Buffer.from(Array(2)),Yt=Buffer.from(Array(4)),Qt=67324752,Xt=134695760,Jt=33639248,Zt=101010256,er=101075792,tr=117853008,rr=65535,nr=4294967295;class ir extends jt{constructor(e){super(),this.platform=0,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new Ht,this.crc=0,this.time=-1,this.minver=10,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,e&&this.setName(e)}getCentralDirectoryExtra(){return this.getExtra()}getComment(){return null!==this.comment?this.comment:""}getCompressedSize(){return this.csize}getCrc(){return this.crc}getExternalAttributes=function(){return this.exattr};getExtra(){return null!==this.extra?this.extra:Gt}getGeneralPurposeBit(){return this.gpb}getInternalAttributes(){return this.inattr}getLastModifiedDate(){return this.getTime()}getLocalFileDataExtra(){return this.getExtra()}getMethod(){return this.method}getName(){return this.name}getPlatform(){return this.platform}getSize(){return this.size}getTime(){return-1!==this.time?Ut(this.time):-1}getTimeDos(){return-1!==this.time?this.time:0}getUnixMode(){return 3!==this.platform?0:this.getExternalAttributes()>>16&65535}getVersionNeededToExtract(){return this.minver}setComment(e){Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=e}setCompressedSize(e){if(e<0)throw new Error("invalid entry compressed size");this.csize=e}setCrc(e){if(e<0)throw new Error("invalid entry crc32");this.crc=e}setExternalAttributes(e){this.exattr=e>>>0}setExtra(e){this.extra=e}setGeneralPurposeBit(e){if(!(e instanceof Ht))throw new Error("invalid entry GeneralPurposeBit");this.gpb=e}setInternalAttributes(e){this.inattr=e}setMethod(e){if(e<0)throw new Error("invalid entry compression method");this.method=e}setName(e,t=!1){e=Mt(e,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),t&&(e=`/${e}`),Buffer.byteLength(e)!==e.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=e}setPlatform(e){this.platform=e}setSize(e){if(e<0)throw new Error("invalid entry size");this.size=e}setTime(e,t){if(!(e instanceof Date))throw new Error("invalid entry time");this.time=Ft(e,t)}setUnixMode(e){var t=0;t|=(e|=this.isDirectory()?16384:32768)<<16|(this.isDirectory()?16:32),this.setExternalAttributes(t),this.mode=4095&e,this.platform=3}setVersionNeededToExtract(e){this.minver=e}isDirectory(){return"/"===this.getName().slice(-1)}isUnixSymlink(){return(this.getUnixMode()&Vt)===qt}isZip64(){return this.csize>nr||this.size>nr}}var or=r(114);r(16);function ar(e){if(null===e)return Buffer.alloc(0);if("string"==typeof e)return Buffer.from(e);if(i(e)&&!e._readableState){var t=new or.PassThrough;return e.pipe(t),t}return e}class sr extends or.Transform{constructor(e){super(e),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}}_appendBuffer(e,t,r){}_appendStream(e,t,r){}_emitErrorCallback=function(e){e&&this.emit("error",e)};_finish(e){}_normalizeEntry(e){}_transform(e,t,r){r(null,e)}entry(e,t,r){if(t=t||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),e instanceof jt)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(e),this._entry=e,t=ar(t),Buffer.isBuffer(t))this._appendBuffer(e,t,r);else{if(!i(t))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(e,t,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))}finish(){this._archive.processing?this._archive.finish=!0:this._finish()}getBytesWritten(){return this.offset}write(e,t){return e&&(this.offset+=e.length),super.write(e,t)}}var lr=r(115),ur=r(120);class cr extends ur.Transform{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,t,r){e&&(this.checksum=lr.buf(e,this.checksum)>>>0,this.rawSize+=e.length),r(null,e)}digest(e){const t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}var fr=r(80);class dr extends fr.DeflateRaw{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,t){return e&&(this.compressedSize+=e.length),super.push(e,t)}_transform(e,t,r){e&&(this.checksum=lr.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,t,r)}digest(e){const t=Buffer.allocUnsafe(4);return t.writeUInt32BE(this.checksum>>>0,0),e?t.toString(e):t}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}}class hr extends sr{constructor(e){const t=("object"!=typeof(r=e)&&(r={}),"object"!=typeof r.zlib&&(r.zlib={}),"number"!=typeof r.zlib.level&&(r.zlib.level=1),r.forceZip64=!!r.forceZip64,r.forceLocalTime=!!r.forceLocalTime,r);var r;super(t),this.options=t,this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}}_afterAppend(e){this._entries.push(e),e.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(e),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()}_appendBuffer(e,t,r){0===t.length&&e.setMethod(0);var n=e.getMethod();return 0===n&&(e.setSize(t.length),e.setCompressedSize(t.length),e.setCrc(lr.buf(t)>>>0)),this._writeLocalFileHeader(e),0===n?(this.write(t),this._afterAppend(e),void r(null,e)):8===n?void this._smartStream(e,r).end(t):void r(new Error("compression method "+n+" not implemented"))}_appendStream(e,t,r){e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(20),this._writeLocalFileHeader(e);var n=this._smartStream(e,r);t.once("error",(function(e){n.emit("error",e),n.end()})),t.pipe(n)}_finish(){this._archive.centralOffset=this.offset,this._entries.forEach(function(e){this._writeCentralFileHeader(e)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()}_normalizeEntry(e){-1===e.getMethod()&&e.setMethod(8),8===e.getMethod()&&(e.getGeneralPurposeBit().useDataDescriptor(!0),e.setVersionNeededToExtract(20)),-1===e.getTime()&&e.setTime(new Date,this._archive.forceLocalTime),e._offsets={file:0,data:0,contents:0}}_smartStream(e,t){var r=8===e.getMethod()?new dr(this.options.zlib):new cr,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);e.setCrc(i),e.setSize(r.size()),e.setCompressedSize(r.size(!0)),this._afterAppend(e),t(n,e)}.bind(this)),r.once("error",(function(e){n=e})),r.pipe(this,{end:!1}),r}_writeCentralDirectoryEnd(){var e=this._entries.length,t=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(e=rr,t=nr,r=nr),this.write(zt(Zt)),this.write(Kt),this.write(Kt),this.write(Bt(e)),this.write(Bt(e)),this.write(zt(t)),this.write(zt(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(Bt(i)),this.write(n)}_writeCentralDirectoryZip64(){this.write(zt(er)),this.write(Wt(44)),this.write(Bt(45)),this.write(Bt(45)),this.write(Yt),this.write(Yt),this.write(Wt(this._entries.length)),this.write(Wt(this._entries.length)),this.write(Wt(this._archive.centralLength)),this.write(Wt(this._archive.centralOffset)),this.write(zt(tr)),this.write(Yt),this.write(Wt(this._archive.centralOffset+this._archive.centralLength)),this.write(zt(1))}_writeCentralFileHeader(e){var t=e.getGeneralPurposeBit(),r=e.getMethod(),n=e._offsets.file,i=e.getSize(),o=e.getCompressedSize();if(e.isZip64()||n>nr){i=nr,o=nr,n=nr,e.setVersionNeededToExtract(45);var a=Buffer.concat([Bt(1),Bt(24),Wt(e.getSize()),Wt(e.getCompressedSize()),Wt(e._offsets.file)],28);e.setExtra(a)}this.write(zt(Jt)),this.write(Bt(e.getPlatform()<<8|45)),this.write(Bt(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(Bt(r)),this.write(zt(e.getTimeDos())),this.write(zt(e.getCrc())),this.write(zt(o)),this.write(zt(i));var s=e.getName(),l=e.getComment(),u=e.getCentralDirectoryExtra();t.usesUTF8ForNames()&&(s=Buffer.from(s),l=Buffer.from(l)),this.write(Bt(s.length)),this.write(Bt(u.length)),this.write(Bt(l.length)),this.write(Kt),this.write(Bt(e.getInternalAttributes())),this.write(zt(e.getExternalAttributes())),this.write(zt(n)),this.write(s),this.write(u),this.write(l)}_writeDataDescriptor(e){this.write(zt(Xt)),this.write(zt(e.getCrc())),e.isZip64()?(this.write(Wt(e.getCompressedSize())),this.write(Wt(e.getSize()))):(this.write(zt(e.getCompressedSize())),this.write(zt(e.getSize())))}_writeLocalFileHeader(e){var t=e.getGeneralPurposeBit(),r=e.getMethod(),n=e.getName(),i=e.getLocalFileDataExtra();e.isZip64()&&(t.useDataDescriptor(!0),e.setVersionNeededToExtract(45)),t.usesUTF8ForNames()&&(n=Buffer.from(n)),e._offsets.file=this.offset,this.write(zt(Qt)),this.write(Bt(e.getVersionNeededToExtract())),this.write(t.encode()),this.write(Bt(r)),this.write(zt(e.getTimeDos())),e._offsets.data=this.offset,t.usesDataDescriptor()?(this.write(Yt),this.write(Yt),this.write(Yt)):(this.write(zt(e.getCrc())),this.write(zt(e.getCompressedSize())),this.write(zt(e.getSize()))),this.write(Bt(n.length)),this.write(Bt(i.length)),this.write(n),this.write(i),e._offsets.contents=this.offset}getComment(e){return null!==this._archive.comment?this._archive.comment:""}isZip64(){return this._archive.forceZip64||this._entries.length>rr||this._archive.centralLength>nr||this._archive.centralOffset>nr}setComment(e){this._archive.comment=e}}
|
|
14
14
|
/**
|
|
15
15
|
* ZipStream
|
|
16
16
|
*
|