@wallabyjs/cli 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/index.js +41 -38
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,73 +1,76 @@
1
- var os=Object.create;var mr=Object.defineProperty;var ss=Object.getOwnPropertyDescriptor;var as=Object.getOwnPropertyNames;var cs=Object.getPrototypeOf,us=Object.prototype.hasOwnProperty;var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var fs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of as(e))!us.call(t,o)&&o!==r&&mr(t,o,{get:()=>e[o],enumerable:!(n=ss(e,o))||n.enumerable});return t};var Ae=(t,e,r)=>(r=t!=null?os(cs(t)):{},fs(e||!t||!t.__esModule?mr(r,"default",{value:t,enumerable:!0}):r,t));var K=S(Lt=>{"use strict";Lt.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((r,n)=>{e.push((o,i)=>o!=null?n(o):r(i)),t.apply(this,e)})},"name",{value:t.name})};Lt.fromPromise=function(t){return Object.defineProperty(function(...e){let r=e[e.length-1];if(typeof r!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(n=>r(null,n),r)},"name",{value:t.name})}});var yr=S((Nu,pr)=>{var De=require("constants"),ls=process.cwd,ot=null,ds=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ot||(ot=ls.call(process)),ot};try{process.cwd()}catch{}typeof process.chdir=="function"&&(_t=process.chdir,process.chdir=function(t){ot=null,_t.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,_t));var _t;pr.exports=hs;function hs(t){De.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=i(t.chown),t.fchown=i(t.fchown),t.lchown=i(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=s(t.chownSync),t.fchownSync=s(t.fchownSync),t.lchownSync=s(t.lchownSync),t.chmodSync=o(t.chmodSync),t.fchmodSync=o(t.fchmodSync),t.lchmodSync=o(t.lchmodSync),t.stat=a(t.stat),t.fstat=a(t.fstat),t.lstat=a(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(l,d,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(l,d,m,p){p&&process.nextTick(p)},t.lchownSync=function(){}),ds==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(l){function d(m,p,u){var y=Date.now(),E=0;l(m,p,function h(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){t.stat(p,function(L,B){L&&L.code==="ENOENT"?l(m,p,h):u(w)})},E),E<100&&(E+=10);return}u&&u(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,l),d}(t.rename)),t.read=typeof t.read!="function"?t.read:function(l){function d(m,p,u,y,E,h){var w;if(h&&typeof h=="function"){var L=0;w=function(B,me,j){if(B&&B.code==="EAGAIN"&&L<10)return L++,l.call(t,m,p,u,y,E,w);h.apply(this,arguments)}}return l.call(t,m,p,u,y,E,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,l),d}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(l){return function(d,m,p,u,y){for(var E=0;;)try{return l.call(t,d,m,p,u,y)}catch(h){if(h.code==="EAGAIN"&&E<10){E++;continue}throw h}}}(t.readSync);function e(l){l.lchmod=function(d,m,p){l.open(d,De.O_WRONLY|De.O_SYMLINK,m,function(u,y){if(u){p&&p(u);return}l.fchmod(y,m,function(E){l.close(y,function(h){p&&p(E||h)})})})},l.lchmodSync=function(d,m){var p=l.openSync(d,De.O_WRONLY|De.O_SYMLINK,m),u=!0,y;try{y=l.fchmodSync(p,m),u=!1}finally{if(u)try{l.closeSync(p)}catch{}else l.closeSync(p)}return y}}function r(l){De.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(d,m,p,u){l.open(d,De.O_SYMLINK,function(y,E){if(y){u&&u(y);return}l.futimes(E,m,p,function(h){l.close(E,function(w){u&&u(h||w)})})})},l.lutimesSync=function(d,m,p){var u=l.openSync(d,De.O_SYMLINK),y,E=!0;try{y=l.futimesSync(u,m,p),E=!1}finally{if(E)try{l.closeSync(u)}catch{}else l.closeSync(u)}return y}):l.futimes&&(l.lutimes=function(d,m,p,u){u&&process.nextTick(u)},l.lutimesSync=function(){})}function n(l){return l&&function(d,m,p){return l.call(t,d,m,function(u){f(u)&&(u=null),p&&p.apply(this,arguments)})}}function o(l){return l&&function(d,m){try{return l.call(t,d,m)}catch(p){if(!f(p))throw p}}}function i(l){return l&&function(d,m,p,u){return l.call(t,d,m,p,function(y){f(y)&&(y=null),u&&u.apply(this,arguments)})}}function s(l){return l&&function(d,m,p){try{return l.call(t,d,m,p)}catch(u){if(!f(u))throw u}}}function a(l){return l&&function(d,m,p){typeof m=="function"&&(p=m,m=null);function u(y,E){E&&(E.uid<0&&(E.uid+=4294967296),E.gid<0&&(E.gid+=4294967296)),p&&p.apply(this,arguments)}return m?l.call(t,d,m,u):l.call(t,d,u)}}function c(l){return l&&function(d,m){var p=m?l.call(t,d,m):l.call(t,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function f(l){if(!l||l.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var wr=S((Du,Er)=>{var gr=require("stream").Stream;Er.exports=ms;function ms(t){return{ReadStream:e,WriteStream:r};function e(n,o){if(!(this instanceof e))return new e(n,o);gr.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var s=Object.keys(o),a=0,c=s.length;a<c;a++){var f=s[a];this[f]=o[f]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}t.open(this.path,this.flags,this.mode,function(l,d){if(l){i.emit("error",l),i.readable=!1;return}i.fd=d,i.emit("open",d),i._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);gr.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=o[c]}if(this.start!==void 0){if(typeof this.start!="number")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=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var xr=S((Ou,Sr)=>{"use strict";Sr.exports=ys;var ps=Object.getPrototypeOf||function(t){return t.__proto__};function ys(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:ps(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var qe=S((Iu,kt)=>{var H=require("fs"),gs=yr(),Es=wr(),ws=xr(),st=require("util"),ee,ct;typeof Symbol=="function"&&typeof Symbol.for=="function"?(ee=Symbol.for("graceful-fs.queue"),ct=Symbol.for("graceful-fs.previous")):(ee="___graceful-fs.queue",ct="___graceful-fs.previous");function Ss(){}function br(t,e){Object.defineProperty(t,ee,{get:function(){return e}})}var Te=Ss;st.debuglog?Te=st.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Te=function(){var t=st.format.apply(st,arguments);t="GFS4: "+t.split(/\n/).join(`
2
- GFS4: `),console.error(t)});H[ee]||(vr=global[ee]||[],br(H,vr),H.close=function(t){function e(r,n){return t.call(H,r,function(o){o||Cr(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,ct,{value:t}),e}(H.close),H.closeSync=function(t){function e(r){t.apply(H,arguments),Cr()}return Object.defineProperty(e,ct,{value:t}),e}(H.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Te(H[ee]),require("assert").equal(H[ee].length,0)}));var vr;global[ee]||br(global,H[ee]);kt.exports=Ft(ws(H));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!H.__patched&&(kt.exports=Ft(H),H.__patched=!0);function Ft(t){gs(t),t.gracefulify=Ft,t.createReadStream=me,t.createWriteStream=j;var e=t.readFile;t.readFile=r;function r(b,O,D){return typeof O=="function"&&(D=O,O=null),P(b,O,D);function P(U,$,T,v){return e(U,$,function(C){C&&(C.code==="EMFILE"||C.code==="ENFILE")?Re([P,[U,$,T],C,v||Date.now(),Date.now()]):typeof T=="function"&&T.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=o;function o(b,O,D,P){return typeof D=="function"&&(P=D,D=null),U(b,O,D,P);function U($,T,v,C,N){return n($,T,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Re([U,[$,T,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var i=t.appendFile;i&&(t.appendFile=s);function s(b,O,D,P){return typeof D=="function"&&(P=D,D=null),U(b,O,D,P);function U($,T,v,C,N){return i($,T,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Re([U,[$,T,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(b,O,D,P){return typeof D=="function"&&(P=D,D=0),U(b,O,D,P);function U($,T,v,C,N){return a($,T,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Re([U,[$,T,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var f=t.readdir;t.readdir=d;var l=/^v[0-5]\./;function d(b,O,D){typeof O=="function"&&(D=O,O=null);var P=l.test(process.version)?function(T,v,C,N){return f(T,U(T,v,C,N))}:function(T,v,C,N){return f(T,v,U(T,v,C,N))};return P(b,O,D);function U($,T,v,C){return function(N,g){N&&(N.code==="EMFILE"||N.code==="ENFILE")?Re([P,[$,T,v],N,C||Date.now(),Date.now()]):(g&&g.sort&&g.sort(),typeof v=="function"&&v.call(this,N,g))}}}if(process.version.substr(0,4)==="v0.8"){var m=Es(t);h=m.ReadStream,L=m.WriteStream}var p=t.ReadStream;p&&(h.prototype=Object.create(p.prototype),h.prototype.open=w);var u=t.WriteStream;u&&(L.prototype=Object.create(u.prototype),L.prototype.open=B),Object.defineProperty(t,"ReadStream",{get:function(){return h},set:function(b){h=b},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return L},set:function(b){L=b},enumerable:!0,configurable:!0});var y=h;Object.defineProperty(t,"FileReadStream",{get:function(){return y},set:function(b){y=b},enumerable:!0,configurable:!0});var E=L;Object.defineProperty(t,"FileWriteStream",{get:function(){return E},set:function(b){E=b},enumerable:!0,configurable:!0});function h(b,O){return this instanceof h?(p.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function w(){var b=this;pe(b.path,b.flags,b.mode,function(O,D){O?(b.autoClose&&b.destroy(),b.emit("error",O)):(b.fd=D,b.emit("open",D),b.read())})}function L(b,O){return this instanceof L?(u.apply(this,arguments),this):L.apply(Object.create(L.prototype),arguments)}function B(){var b=this;pe(b.path,b.flags,b.mode,function(O,D){O?(b.destroy(),b.emit("error",O)):(b.fd=D,b.emit("open",D))})}function me(b,O){return new t.ReadStream(b,O)}function j(b,O){return new t.WriteStream(b,O)}var ie=t.open;t.open=pe;function pe(b,O,D,P){return typeof D=="function"&&(P=D,D=null),U(b,O,D,P);function U($,T,v,C,N){return ie($,T,v,function(g,F){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Re([U,[$,T,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}return t}function Re(t){Te("ENQUEUE",t[0].name,t[1]),H[ee].push(t),Tt()}var at;function Cr(){for(var t=Date.now(),e=0;e<H[ee].length;++e)H[ee][e].length>2&&(H[ee][e][3]=t,H[ee][e][4]=t);Tt()}function Tt(){if(clearTimeout(at),at=void 0,H[ee].length!==0){var t=H[ee].shift(),e=t[0],r=t[1],n=t[2],o=t[3],i=t[4];if(o===void 0)Te("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-o>=6e4){Te("TIMEOUT",e.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-o,1),f=Math.min(c*1.2,100);a>=f?(Te("RETRY",e.name,r),e.apply(null,r.concat([o]))):H[ee].push(t)}at===void 0&&(at=setTimeout(Tt,0))}}});var se=S(Ce=>{"use strict";var Nr=K().fromCallback,oe=qe(),xs=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof oe[t]=="function");Object.assign(Ce,oe);xs.forEach(t=>{Ce[t]=Nr(oe[t])});Ce.exists=function(t,e){return typeof e=="function"?oe.exists(t,e):new Promise(r=>oe.exists(t,r))};Ce.read=function(t,e,r,n,o,i){return typeof i=="function"?oe.read(t,e,r,n,o,i):new Promise((s,a)=>{oe.read(t,e,r,n,o,(c,f,l)=>{if(c)return a(c);s({bytesRead:f,buffer:l})})})};Ce.write=function(t,e,...r){return typeof r[r.length-1]=="function"?oe.write(t,e,...r):new Promise((n,o)=>{oe.write(t,e,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffer:a})})})};Ce.readv=function(t,e,...r){return typeof r[r.length-1]=="function"?oe.readv(t,e,...r):new Promise((n,o)=>{oe.readv(t,e,...r,(i,s,a)=>{if(i)return o(i);n({bytesRead:s,buffers:a})})})};Ce.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?oe.writev(t,e,...r):new Promise((n,o)=>{oe.writev(t,e,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffers:a})})})};typeof oe.realpath.native=="function"?Ce.realpath.native=Nr(oe.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Or=S((_u,Dr)=>{"use strict";var vs=require("path");Dr.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(vs.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}}});var Fr=S((Fu,At)=>{"use strict";var Ir=se(),{checkPath:Lr}=Or(),_r=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};At.exports.makeDir=async(t,e)=>(Lr(t),Ir.mkdir(t,{mode:_r(e),recursive:!0}));At.exports.makeDirSync=(t,e)=>(Lr(t),Ir.mkdirSync(t,{mode:_r(e),recursive:!0}))});var ge=S((Tu,Tr)=>{"use strict";var Cs=K().fromPromise,{makeDir:bs,makeDirSync:Rt}=Fr(),qt=Cs(bs);Tr.exports={mkdirs:qt,mkdirsSync:Rt,mkdirp:qt,mkdirpSync:Rt,ensureDir:qt,ensureDirSync:Rt}});var Oe=S((ku,Ar)=>{"use strict";var Ns=K().fromPromise,kr=se();function Ds(t){return kr.access(t).then(()=>!0).catch(()=>!1)}Ar.exports={pathExists:Ns(Ds),pathExistsSync:kr.existsSync}});var Pt=S((Au,Rr)=>{"use strict";var Pe=se(),Os=K().fromPromise;async function Is(t,e,r){let n=await Pe.open(t,"r+"),o=null;try{await Pe.futimes(n,e,r)}finally{try{await Pe.close(n)}catch(i){o=i}}if(o)throw o}function Ls(t,e,r){let n=Pe.openSync(t,"r+");return Pe.futimesSync(n,e,r),Pe.closeSync(n)}Rr.exports={utimesMillis:Os(Is),utimesMillisSync:Ls}});var ke=S((Ru,Br)=>{"use strict";var Ue=se(),X=require("path"),qr=K().fromPromise;function _s(t,e,r){let n=r.dereference?o=>Ue.stat(o,{bigint:!0}):o=>Ue.lstat(o,{bigint:!0});return Promise.all([n(t),n(e).catch(o=>{if(o.code==="ENOENT")return null;throw o})]).then(([o,i])=>({srcStat:o,destStat:i}))}function Fs(t,e,r){let n,o=r.dereference?s=>Ue.statSync(s,{bigint:!0}):s=>Ue.lstatSync(s,{bigint:!0}),i=o(t);try{n=o(e)}catch(s){if(s.code==="ENOENT")return{srcStat:i,destStat:null};throw s}return{srcStat:i,destStat:n}}async function Ts(t,e,r,n){let{srcStat:o,destStat:i}=await _s(t,e,n);if(i){if(Ze(o,i)){let s=X.basename(t),a=X.basename(e);if(r==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!o.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(o.isDirectory()&&Ut(t,e))throw new Error(ut(t,e,r));return{srcStat:o,destStat:i}}function ks(t,e,r,n){let{srcStat:o,destStat:i}=Fs(t,e,n);if(i){if(Ze(o,i)){let s=X.basename(t),a=X.basename(e);if(r==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!o.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(o.isDirectory()&&Ut(t,e))throw new Error(ut(t,e,r));return{srcStat:o,destStat:i}}async function Pr(t,e,r,n){let o=X.resolve(X.dirname(t)),i=X.resolve(X.dirname(r));if(i===o||i===X.parse(i).root)return;let s;try{s=await Ue.stat(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Ze(e,s))throw new Error(ut(t,r,n));return Pr(t,e,i,n)}function Ur(t,e,r,n){let o=X.resolve(X.dirname(t)),i=X.resolve(X.dirname(r));if(i===o||i===X.parse(i).root)return;let s;try{s=Ue.statSync(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Ze(e,s))throw new Error(ut(t,r,n));return Ur(t,e,i,n)}function Ze(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function Ut(t,e){let r=X.resolve(t).split(X.sep).filter(o=>o),n=X.resolve(e).split(X.sep).filter(o=>o);return r.every((o,i)=>n[i]===o)}function ut(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}Br.exports={checkPaths:qr(Ts),checkPathsSync:ks,checkParentPaths:qr(Pr),checkParentPathsSync:Ur,isSrcSubdir:Ut,areIdentical:Ze}});var Wr=S((qu,Vr)=>{"use strict";var re=se(),je=require("path"),{mkdirs:As}=ge(),{pathExists:Rs}=Oe(),{utimesMillis:qs}=Pt(),Ke=ke();async function Ps(t,e,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
1
+ var ca=Object.create;var ht=Object.defineProperty;var ua=Object.getOwnPropertyDescriptor;var fa=Object.getOwnPropertyNames;var la=Object.getPrototypeOf,da=Object.prototype.hasOwnProperty;var ve=(e,t)=>()=>(e&&(t=e(e=0)),t);var S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ma=(e,t)=>{for(var r in t)ht(e,r,{get:t[r],enumerable:!0})},$r=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fa(t))!da.call(e,o)&&o!==r&&ht(e,o,{get:()=>t[o],enumerable:!(n=ua(t,o))||n.enumerable});return e};var X=(e,t,r)=>(r=e!=null?ca(la(e)):{},$r(t||!e||!e.__esModule?ht(r,"default",{value:e,enumerable:!0}):r,e)),ha=e=>$r(ht({},"__esModule",{value:!0}),e);var K=S(Mt=>{"use strict";Mt.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{t.push((o,i)=>o!=null?n(o):r(i)),e.apply(this,t)})},"name",{value:e.name})};Mt.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(n=>r(null,n),r)},"name",{value:e.name})}});var Hr=S((Vf,Mr)=>{var Ie=require("constants"),pa=process.cwd,pt=null,ya=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return pt||(pt=pa.call(process)),pt};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Ht=process.chdir,process.chdir=function(e){pt=null,Ht.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Ht));var Ht;Mr.exports=ga;function ga(e){Ie.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(l,d,h){h&&process.nextTick(h)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(l,d,h,p){p&&process.nextTick(p)},e.lchownSync=function(){}),ya==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(l){function d(h,p,f){var y=Date.now(),w=0;l(h,p,function m(E){if(E&&(E.code==="EACCES"||E.code==="EPERM"||E.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){e.stat(p,function(L,B){L&&L.code==="ENOENT"?l(h,p,m):f(E)})},w),w<100&&(w+=10);return}f&&f(E)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,l),d}(e.rename)),e.read=typeof e.read!="function"?e.read:function(l){function d(h,p,f,y,w,m){var E;if(m&&typeof m=="function"){var L=0;E=function(B,pe,j){if(B&&B.code==="EAGAIN"&&L<10)return L++,l.call(e,h,p,f,y,w,E);m.apply(this,arguments)}}return l.call(e,h,p,f,y,w,E)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,l),d}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(l){return function(d,h,p,f,y){for(var w=0;;)try{return l.call(e,d,h,p,f,y)}catch(m){if(m.code==="EAGAIN"&&w<10){w++;continue}throw m}}}(e.readSync);function t(l){l.lchmod=function(d,h,p){l.open(d,Ie.O_WRONLY|Ie.O_SYMLINK,h,function(f,y){if(f){p&&p(f);return}l.fchmod(y,h,function(w){l.close(y,function(m){p&&p(w||m)})})})},l.lchmodSync=function(d,h){var p=l.openSync(d,Ie.O_WRONLY|Ie.O_SYMLINK,h),f=!0,y;try{y=l.fchmodSync(p,h),f=!1}finally{if(f)try{l.closeSync(p)}catch{}else l.closeSync(p)}return y}}function r(l){Ie.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(d,h,p,f){l.open(d,Ie.O_SYMLINK,function(y,w){if(y){f&&f(y);return}l.futimes(w,h,p,function(m){l.close(w,function(E){f&&f(m||E)})})})},l.lutimesSync=function(d,h,p){var f=l.openSync(d,Ie.O_SYMLINK),y,w=!0;try{y=l.futimesSync(f,h,p),w=!1}finally{if(w)try{l.closeSync(f)}catch{}else l.closeSync(f)}return y}):l.futimes&&(l.lutimes=function(d,h,p,f){f&&process.nextTick(f)},l.lutimesSync=function(){})}function n(l){return l&&function(d,h,p){return l.call(e,d,h,function(f){u(f)&&(f=null),p&&p.apply(this,arguments)})}}function o(l){return l&&function(d,h){try{return l.call(e,d,h)}catch(p){if(!u(p))throw p}}}function i(l){return l&&function(d,h,p,f){return l.call(e,d,h,p,function(y){u(y)&&(y=null),f&&f.apply(this,arguments)})}}function s(l){return l&&function(d,h,p){try{return l.call(e,d,h,p)}catch(f){if(!u(f))throw f}}}function a(l){return l&&function(d,h,p){typeof h=="function"&&(p=h,h=null);function f(y,w){w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),p&&p.apply(this,arguments)}return h?l.call(e,d,h,f):l.call(e,d,f)}}function c(l){return l&&function(d,h){var p=h?l.call(e,d,h):l.call(e,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function u(l){if(!l||l.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var Gr=S((Gf,Vr)=>{var Wr=require("stream").Stream;Vr.exports=wa;function wa(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);Wr.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var s=Object.keys(o),a=0,c=s.length;a<c;a++){var u=s[a];this[u]=o[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(l,d){if(l){i.emit("error",l),i.readable=!1;return}i.fd=d,i.emit("open",d),i._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);Wr.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=o[c]}if(this.start!==void 0){if(typeof this.start!="number")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=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Zr=S((zf,zr)=>{"use strict";zr.exports=Sa;var Ea=Object.getPrototypeOf||function(e){return e.__proto__};function Sa(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Ea(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var $e=S((Zf,Gt)=>{var H=require("fs"),xa=Hr(),va=Gr(),Ca=Zr(),yt=require("util"),te,wt;typeof Symbol=="function"&&typeof Symbol.for=="function"?(te=Symbol.for("graceful-fs.queue"),wt=Symbol.for("graceful-fs.previous")):(te="___graceful-fs.queue",wt="___graceful-fs.previous");function ba(){}function Kr(e,t){Object.defineProperty(e,te,{get:function(){return t}})}var ke=ba;yt.debuglog?ke=yt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ke=function(){var e=yt.format.apply(yt,arguments);e="GFS4: "+e.split(/\n/).join(`
2
+ GFS4: `),console.error(e)});H[te]||(jr=global[te]||[],Kr(H,jr),H.close=function(e){function t(r,n){return e.call(H,r,function(o){o||Xr(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,wt,{value:e}),t}(H.close),H.closeSync=function(e){function t(r){e.apply(H,arguments),Xr()}return Object.defineProperty(t,wt,{value:e}),t}(H.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ke(H[te]),require("assert").equal(H[te].length,0)}));var jr;global[te]||Kr(global,H[te]);Gt.exports=Wt(Ca(H));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!H.__patched&&(Gt.exports=Wt(H),H.__patched=!0);function Wt(e){xa(e),e.gracefulify=Wt,e.createReadStream=pe,e.createWriteStream=j;var t=e.readFile;e.readFile=r;function r(b,O,D){return typeof O=="function"&&(D=O,O=null),q(b,O,D);function q(U,$,A,v){return t(U,$,function(C){C&&(C.code==="EMFILE"||C.code==="ENFILE")?Be([q,[U,$,A],C,v||Date.now(),Date.now()]):typeof A=="function"&&A.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=o;function o(b,O,D,q){return typeof D=="function"&&(q=D,D=null),U(b,O,D,q);function U($,A,v,C,N){return n($,A,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Be([U,[$,A,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var i=e.appendFile;i&&(e.appendFile=s);function s(b,O,D,q){return typeof D=="function"&&(q=D,D=null),U(b,O,D,q);function U($,A,v,C,N){return i($,A,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Be([U,[$,A,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var a=e.copyFile;a&&(e.copyFile=c);function c(b,O,D,q){return typeof D=="function"&&(q=D,D=0),U(b,O,D,q);function U($,A,v,C,N){return a($,A,v,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Be([U,[$,A,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}var u=e.readdir;e.readdir=d;var l=/^v[0-5]\./;function d(b,O,D){typeof O=="function"&&(D=O,O=null);var q=l.test(process.version)?function(A,v,C,N){return u(A,U(A,v,C,N))}:function(A,v,C,N){return u(A,v,U(A,v,C,N))};return q(b,O,D);function U($,A,v,C){return function(N,g){N&&(N.code==="EMFILE"||N.code==="ENFILE")?Be([q,[$,A,v],N,C||Date.now(),Date.now()]):(g&&g.sort&&g.sort(),typeof v=="function"&&v.call(this,N,g))}}}if(process.version.substr(0,4)==="v0.8"){var h=va(e);m=h.ReadStream,L=h.WriteStream}var p=e.ReadStream;p&&(m.prototype=Object.create(p.prototype),m.prototype.open=E);var f=e.WriteStream;f&&(L.prototype=Object.create(f.prototype),L.prototype.open=B),Object.defineProperty(e,"ReadStream",{get:function(){return m},set:function(b){m=b},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return L},set:function(b){L=b},enumerable:!0,configurable:!0});var y=m;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(b){y=b},enumerable:!0,configurable:!0});var w=L;Object.defineProperty(e,"FileWriteStream",{get:function(){return w},set:function(b){w=b},enumerable:!0,configurable:!0});function m(b,O){return this instanceof m?(p.apply(this,arguments),this):m.apply(Object.create(m.prototype),arguments)}function E(){var b=this;ye(b.path,b.flags,b.mode,function(O,D){O?(b.autoClose&&b.destroy(),b.emit("error",O)):(b.fd=D,b.emit("open",D),b.read())})}function L(b,O){return this instanceof L?(f.apply(this,arguments),this):L.apply(Object.create(L.prototype),arguments)}function B(){var b=this;ye(b.path,b.flags,b.mode,function(O,D){O?(b.destroy(),b.emit("error",O)):(b.fd=D,b.emit("open",D))})}function pe(b,O){return new e.ReadStream(b,O)}function j(b,O){return new e.WriteStream(b,O)}var oe=e.open;e.open=ye;function ye(b,O,D,q){return typeof D=="function"&&(q=D,D=null),U(b,O,D,q);function U($,A,v,C,N){return oe($,A,v,function(g,T){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Be([U,[$,A,v,C],g,N||Date.now(),Date.now()]):typeof C=="function"&&C.apply(this,arguments)})}}return e}function Be(e){ke("ENQUEUE",e[0].name,e[1]),H[te].push(e),Vt()}var gt;function Xr(){for(var e=Date.now(),t=0;t<H[te].length;++t)H[te][t].length>2&&(H[te][t][3]=e,H[te][t][4]=e);Vt()}function Vt(){if(clearTimeout(gt),gt=void 0,H[te].length!==0){var e=H[te].shift(),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4];if(o===void 0)ke("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){ke("TIMEOUT",t.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-o,1),u=Math.min(c*1.2,100);a>=u?(ke("RETRY",t.name,r),t.apply(null,r.concat([o]))):H[te].push(e)}gt===void 0&&(gt=setTimeout(Vt,0))}}});var ae=S(Ne=>{"use strict";var Jr=K().fromCallback,se=$e(),Na=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof se[e]=="function");Object.assign(Ne,se);Na.forEach(e=>{Ne[e]=Jr(se[e])});Ne.exists=function(e,t){return typeof t=="function"?se.exists(e,t):new Promise(r=>se.exists(e,r))};Ne.read=function(e,t,r,n,o,i){return typeof i=="function"?se.read(e,t,r,n,o,i):new Promise((s,a)=>{se.read(e,t,r,n,o,(c,u,l)=>{if(c)return a(c);s({bytesRead:u,buffer:l})})})};Ne.write=function(e,t,...r){return typeof r[r.length-1]=="function"?se.write(e,t,...r):new Promise((n,o)=>{se.write(e,t,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffer:a})})})};Ne.readv=function(e,t,...r){return typeof r[r.length-1]=="function"?se.readv(e,t,...r):new Promise((n,o)=>{se.readv(e,t,...r,(i,s,a)=>{if(i)return o(i);n({bytesRead:s,buffers:a})})})};Ne.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?se.writev(e,t,...r):new Promise((n,o)=>{se.writev(e,t,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffers:a})})})};typeof se.realpath.native=="function"?Ne.realpath.native=Jr(se.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Qr=S((Xf,Yr)=>{"use strict";var Da=require("path");Yr.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Da.parse(t).root,""))){let n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}}});var nn=S((Kf,zt)=>{"use strict";var en=ae(),{checkPath:tn}=Qr(),rn=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};zt.exports.makeDir=async(e,t)=>(tn(e),en.mkdir(e,{mode:rn(t),recursive:!0}));zt.exports.makeDirSync=(e,t)=>(tn(e),en.mkdirSync(e,{mode:rn(t),recursive:!0}))});var we=S((Jf,on)=>{"use strict";var Oa=K().fromPromise,{makeDir:Ia,makeDirSync:Zt}=nn(),jt=Oa(Ia);on.exports={mkdirs:jt,mkdirsSync:Zt,mkdirp:jt,mkdirpSync:Zt,ensureDir:jt,ensureDirSync:Zt}});var Le=S((Yf,an)=>{"use strict";var La=K().fromPromise,sn=ae();function Fa(e){return sn.access(e).then(()=>!0).catch(()=>!1)}an.exports={pathExists:La(Fa),pathExistsSync:sn.existsSync}});var Xt=S((Qf,cn)=>{"use strict";var Me=ae(),_a=K().fromPromise;async function Ta(e,t,r){let n=await Me.open(e,"r+"),o=null;try{await Me.futimes(n,t,r)}finally{try{await Me.close(n)}catch(i){o=i}}if(o)throw o}function Aa(e,t,r){let n=Me.openSync(e,"r+");return Me.futimesSync(n,t,r),Me.closeSync(n)}cn.exports={utimesMillis:_a(Ta),utimesMillisSync:Aa}});var Re=S((el,dn)=>{"use strict";var He=ae(),J=require("path"),un=K().fromPromise;function ka(e,t,r){let n=r.dereference?o=>He.stat(o,{bigint:!0}):o=>He.lstat(o,{bigint:!0});return Promise.all([n(e),n(t).catch(o=>{if(o.code==="ENOENT")return null;throw o})]).then(([o,i])=>({srcStat:o,destStat:i}))}function Ra(e,t,r){let n,o=r.dereference?s=>He.statSync(s,{bigint:!0}):s=>He.lstatSync(s,{bigint:!0}),i=o(e);try{n=o(t)}catch(s){if(s.code==="ENOENT")return{srcStat:i,destStat:null};throw s}return{srcStat:i,destStat:n}}async function Pa(e,t,r,n){let{srcStat:o,destStat:i}=await ka(e,t,n);if(i){if(Qe(o,i)){let s=J.basename(e),a=J.basename(t);if(r==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!o.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(o.isDirectory()&&Kt(e,t))throw new Error(Et(e,t,r));return{srcStat:o,destStat:i}}function qa(e,t,r,n){let{srcStat:o,destStat:i}=Ra(e,t,n);if(i){if(Qe(o,i)){let s=J.basename(e),a=J.basename(t);if(r==="move"&&s!==a&&s.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!o.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(o.isDirectory()&&Kt(e,t))throw new Error(Et(e,t,r));return{srcStat:o,destStat:i}}async function fn(e,t,r,n){let o=J.resolve(J.dirname(e)),i=J.resolve(J.dirname(r));if(i===o||i===J.parse(i).root)return;let s;try{s=await He.stat(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Qe(t,s))throw new Error(Et(e,r,n));return fn(e,t,i,n)}function ln(e,t,r,n){let o=J.resolve(J.dirname(e)),i=J.resolve(J.dirname(r));if(i===o||i===J.parse(i).root)return;let s;try{s=He.statSync(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(Qe(t,s))throw new Error(Et(e,r,n));return ln(e,t,i,n)}function Qe(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Kt(e,t){let r=J.resolve(e).split(J.sep).filter(o=>o),n=J.resolve(t).split(J.sep).filter(o=>o);return r.every((o,i)=>n[i]===o)}function Et(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}dn.exports={checkPaths:un(Pa),checkPathsSync:qa,checkParentPaths:un(fn),checkParentPathsSync:ln,isSrcSubdir:Kt,areIdentical:Qe}});var gn=S((tl,yn)=>{"use strict";var ne=ae(),et=require("path"),{mkdirs:Ua}=we(),{pathExists:Ba}=Le(),{utimesMillis:$a}=Xt(),tt=Re();async function Ma(e,t,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
3
3
 
4
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:o}=await Ke.checkPaths(t,e,"copy",r);if(await Ke.checkParentPaths(t,n,e,"copy"),!await Mr(t,e,r))return;let s=je.dirname(e);await Rs(s)||await As(s),await Hr(o,t,e,r)}async function Mr(t,e,r){return r.filter?r.filter(t,e):!0}async function Hr(t,e,r,n){let i=await(n.dereference?re.stat:re.lstat)(e);if(i.isDirectory())return Ms(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Us(i,t,e,r,n);if(i.isSymbolicLink())return Hs(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function Us(t,e,r,n,o){if(!e)return $r(t,r,n,o);if(o.overwrite)return await re.unlink(n),$r(t,r,n,o);if(o.errorOnExist)throw new Error(`'${n}' already exists`)}async function $r(t,e,r,n){if(await re.copyFile(e,r),n.preserveTimestamps){Bs(t.mode)&&await $s(r,t.mode);let o=await re.stat(e);await qs(r,o.atime,o.mtime)}return re.chmod(r,t.mode)}function Bs(t){return(t&128)===0}function $s(t,e){return re.chmod(t,e|128)}async function Ms(t,e,r,n,o){e||await re.mkdir(n);let i=await re.readdir(r);await Promise.all(i.map(async s=>{let a=je.join(r,s),c=je.join(n,s);if(!await Mr(a,c,o))return;let{destStat:l}=await Ke.checkPaths(a,c,"copy",o);return Hr(l,a,c,o)})),e||await re.chmod(n,t.mode)}async function Hs(t,e,r,n){let o=await re.readlink(e);if(n.dereference&&(o=je.resolve(process.cwd(),o)),!t)return re.symlink(o,r);let i=null;try{i=await re.readlink(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return re.symlink(o,r);throw s}if(n.dereference&&(i=je.resolve(process.cwd(),i)),Ke.isSrcSubdir(o,i))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`);if(Ke.isSrcSubdir(i,o))throw new Error(`Cannot overwrite '${i}' with '${o}'.`);return await re.unlink(r),re.symlink(o,r)}Vr.exports=Ps});var Kr=S((Pu,jr)=>{"use strict";var ae=qe(),Xe=require("path"),Vs=ge().mkdirsSync,Ws=Pt().utimesMillisSync,Je=ke();function Gs(t,e,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
4
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:o}=await tt.checkPaths(e,t,"copy",r);if(await tt.checkParentPaths(e,n,t,"copy"),!await hn(e,t,r))return;let s=et.dirname(t);await Ba(s)||await Ua(s),await pn(o,e,t,r)}async function hn(e,t,r){return r.filter?r.filter(e,t):!0}async function pn(e,t,r,n){let i=await(n.dereference?ne.stat:ne.lstat)(t);if(i.isDirectory())return Ga(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Ha(i,e,t,r,n);if(i.isSymbolicLink())return za(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function Ha(e,t,r,n,o){if(!t)return mn(e,r,n,o);if(o.overwrite)return await ne.unlink(n),mn(e,r,n,o);if(o.errorOnExist)throw new Error(`'${n}' already exists`)}async function mn(e,t,r,n){if(await ne.copyFile(t,r),n.preserveTimestamps){Wa(e.mode)&&await Va(r,e.mode);let o=await ne.stat(t);await $a(r,o.atime,o.mtime)}return ne.chmod(r,e.mode)}function Wa(e){return(e&128)===0}function Va(e,t){return ne.chmod(e,t|128)}async function Ga(e,t,r,n,o){t||await ne.mkdir(n);let i=await ne.readdir(r);await Promise.all(i.map(async s=>{let a=et.join(r,s),c=et.join(n,s);if(!await hn(a,c,o))return;let{destStat:l}=await tt.checkPaths(a,c,"copy",o);return pn(l,a,c,o)})),t||await ne.chmod(n,e.mode)}async function za(e,t,r,n){let o=await ne.readlink(t);if(n.dereference&&(o=et.resolve(process.cwd(),o)),!e)return ne.symlink(o,r);let i=null;try{i=await ne.readlink(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return ne.symlink(o,r);throw s}if(n.dereference&&(i=et.resolve(process.cwd(),i)),tt.isSrcSubdir(o,i))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`);if(tt.isSrcSubdir(i,o))throw new Error(`Cannot overwrite '${i}' with '${o}'.`);return await ne.unlink(r),ne.symlink(o,r)}yn.exports=Ma});var vn=S((rl,xn)=>{"use strict";var ce=$e(),rt=require("path"),Za=we().mkdirsSync,ja=Xt().utimesMillisSync,nt=Re();function Xa(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
5
 
6
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:o}=Je.checkPathsSync(t,e,"copy",r);if(Je.checkParentPathsSync(t,n,e,"copy"),r.filter&&!r.filter(t,e))return;let i=Xe.dirname(e);return ae.existsSync(i)||Vs(i),Gr(o,t,e,r)}function Gr(t,e,r,n){let i=(n.dereference?ae.statSync:ae.lstatSync)(e);if(i.isDirectory())return Ys(i,t,e,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return zs(i,t,e,r,n);if(i.isSymbolicLink())return ta(t,e,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${e}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}function zs(t,e,r,n,o){return e?Zs(t,r,n,o):zr(t,r,n,o)}function Zs(t,e,r,n){if(n.overwrite)return ae.unlinkSync(r),zr(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function zr(t,e,r,n){return ae.copyFileSync(e,r),n.preserveTimestamps&&js(t.mode,e,r),Bt(r,t.mode)}function js(t,e,r){return Ks(t)&&Xs(r,t),Js(e,r)}function Ks(t){return(t&128)===0}function Xs(t,e){return Bt(t,e|128)}function Bt(t,e){return ae.chmodSync(t,e)}function Js(t,e){let r=ae.statSync(t);return Ws(e,r.atime,r.mtime)}function Ys(t,e,r,n,o){return e?Zr(r,n,o):Qs(t.mode,r,n,o)}function Qs(t,e,r,n){return ae.mkdirSync(r),Zr(e,r,n),Bt(r,t)}function Zr(t,e,r){ae.readdirSync(t).forEach(n=>ea(n,t,e,r))}function ea(t,e,r,n){let o=Xe.join(e,t),i=Xe.join(r,t);if(n.filter&&!n.filter(o,i))return;let{destStat:s}=Je.checkPathsSync(o,i,"copy",n);return Gr(s,o,i,n)}function ta(t,e,r,n){let o=ae.readlinkSync(e);if(n.dereference&&(o=Xe.resolve(process.cwd(),o)),t){let i;try{i=ae.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return ae.symlinkSync(o,r);throw s}if(n.dereference&&(i=Xe.resolve(process.cwd(),i)),Je.isSrcSubdir(o,i))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`);if(Je.isSrcSubdir(i,o))throw new Error(`Cannot overwrite '${i}' with '${o}'.`);return ra(o,r)}else return ae.symlinkSync(o,r)}function ra(t,e){return ae.unlinkSync(e),ae.symlinkSync(t,e)}jr.exports=Gs});var ft=S((Uu,Xr)=>{"use strict";var na=K().fromPromise;Xr.exports={copy:na(Wr()),copySync:Kr()}});var Ye=S((Bu,Yr)=>{"use strict";var Jr=qe(),ia=K().fromCallback;function oa(t,e){Jr.rm(t,{recursive:!0,force:!0},e)}function sa(t){Jr.rmSync(t,{recursive:!0,force:!0})}Yr.exports={remove:ia(oa),removeSync:sa}});var an=S(($u,sn)=>{"use strict";var aa=K().fromPromise,tn=se(),rn=require("path"),nn=ge(),on=Ye(),Qr=aa(async function(e){let r;try{r=await tn.readdir(e)}catch{return nn.mkdirs(e)}return Promise.all(r.map(n=>on.remove(rn.join(e,n))))});function en(t){let e;try{e=tn.readdirSync(t)}catch{return nn.mkdirsSync(t)}e.forEach(r=>{r=rn.join(t,r),on.removeSync(r)})}sn.exports={emptyDirSync:en,emptydirSync:en,emptyDir:Qr,emptydir:Qr}});var ln=S((Mu,fn)=>{"use strict";var ca=K().fromPromise,cn=require("path"),be=se(),un=ge();async function ua(t){let e;try{e=await be.stat(t)}catch{}if(e&&e.isFile())return;let r=cn.dirname(t),n=null;try{n=await be.stat(r)}catch(o){if(o.code==="ENOENT"){await un.mkdirs(r),await be.writeFile(t,"");return}else throw o}n.isDirectory()?await be.writeFile(t,""):await be.readdir(r)}function fa(t){let e;try{e=be.statSync(t)}catch{}if(e&&e.isFile())return;let r=cn.dirname(t);try{be.statSync(r).isDirectory()||be.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")un.mkdirsSync(r);else throw n}be.writeFileSync(t,"")}fn.exports={createFile:ca(ua),createFileSync:fa}});var yn=S((Hu,pn)=>{"use strict";var la=K().fromPromise,dn=require("path"),Ie=se(),hn=ge(),{pathExists:da}=Oe(),{areIdentical:mn}=ke();async function ha(t,e){let r;try{r=await Ie.lstat(e)}catch{}let n;try{n=await Ie.lstat(t)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}if(r&&mn(n,r))return;let o=dn.dirname(e);await da(o)||await hn.mkdirs(o),await Ie.link(t,e)}function ma(t,e){let r;try{r=Ie.lstatSync(e)}catch{}try{let i=Ie.lstatSync(t);if(r&&mn(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=dn.dirname(e);return Ie.existsSync(n)||hn.mkdirsSync(n),Ie.linkSync(t,e)}pn.exports={createLink:la(ha),createLinkSync:ma}});var En=S((Vu,gn)=>{"use strict";var Le=require("path"),Qe=se(),{pathExists:pa}=Oe(),ya=K().fromPromise;async function ga(t,e){if(Le.isAbsolute(t)){try{await Qe.lstat(t)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:t,toDst:t}}let r=Le.dirname(e),n=Le.join(r,t);if(await pa(n))return{toCwd:n,toDst:t};try{await Qe.lstat(t)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:t,toDst:Le.relative(r,t)}}function Ea(t,e){if(Le.isAbsolute(t)){if(!Qe.existsSync(t))throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}let r=Le.dirname(e),n=Le.join(r,t);if(Qe.existsSync(n))return{toCwd:n,toDst:t};if(!Qe.existsSync(t))throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:Le.relative(r,t)}}gn.exports={symlinkPaths:ya(ga),symlinkPathsSync:Ea}});var xn=S((Wu,Sn)=>{"use strict";var wn=se(),wa=K().fromPromise;async function Sa(t,e){if(e)return e;let r;try{r=await wn.lstat(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function xa(t,e){if(e)return e;let r;try{r=wn.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}Sn.exports={symlinkType:wa(Sa),symlinkTypeSync:xa}});var Nn=S((Gu,bn)=>{"use strict";var va=K().fromPromise,vn=require("path"),xe=se(),{mkdirs:Ca,mkdirsSync:ba}=ge(),{symlinkPaths:Na,symlinkPathsSync:Da}=En(),{symlinkType:Oa,symlinkTypeSync:Ia}=xn(),{pathExists:La}=Oe(),{areIdentical:Cn}=ke();async function _a(t,e,r){let n;try{n=await xe.lstat(e)}catch{}if(n&&n.isSymbolicLink()){let[a,c]=await Promise.all([xe.stat(t),xe.stat(e)]);if(Cn(a,c))return}let o=await Na(t,e);t=o.toDst;let i=await Oa(o.toCwd,r),s=vn.dirname(e);return await La(s)||await Ca(s),xe.symlink(t,e,i)}function Fa(t,e,r){let n;try{n=xe.lstatSync(e)}catch{}if(n&&n.isSymbolicLink()){let a=xe.statSync(t),c=xe.statSync(e);if(Cn(a,c))return}let o=Da(t,e);t=o.toDst,r=Ia(o.toCwd,r);let i=vn.dirname(e);return xe.existsSync(i)||ba(i),xe.symlinkSync(t,e,r)}bn.exports={createSymlink:va(_a),createSymlinkSync:Fa}});var kn=S((zu,Tn)=>{"use strict";var{createFile:Dn,createFileSync:On}=ln(),{createLink:In,createLinkSync:Ln}=yn(),{createSymlink:_n,createSymlinkSync:Fn}=Nn();Tn.exports={createFile:Dn,createFileSync:On,ensureFile:Dn,ensureFileSync:On,createLink:In,createLinkSync:Ln,ensureLink:In,ensureLinkSync:Ln,createSymlink:_n,createSymlinkSync:Fn,ensureSymlink:_n,ensureSymlinkSync:Fn}});var lt=S((Zu,An)=>{function Ta(t,{EOL:e=`
7
- `,finalEOL:r=!0,replacer:n=null,spaces:o}={}){let i=r?e:"";return JSON.stringify(t,n,o).replace(/\n/g,e)+i}function ka(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}An.exports={stringify:Ta,stripBom:ka}});var Un=S((ju,Pn)=>{var Be;try{Be=qe()}catch{Be=require("fs")}var dt=K(),{stringify:Rn,stripBom:qn}=lt();async function Aa(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Be,n="throws"in e?e.throws:!0,o=await dt.fromCallback(r.readFile)(t,e);o=qn(o);let i;try{i=JSON.parse(o,e?e.reviver:null)}catch(s){if(n)throw s.message=`${t}: ${s.message}`,s;return null}return i}var Ra=dt.fromPromise(Aa);function qa(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||Be,n="throws"in e?e.throws:!0;try{let o=r.readFileSync(t,e);return o=qn(o),JSON.parse(o,e.reviver)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}}async function Pa(t,e,r={}){let n=r.fs||Be,o=Rn(e,r);await dt.fromCallback(n.writeFile)(t,o,r)}var Ua=dt.fromPromise(Pa);function Ba(t,e,r={}){let n=r.fs||Be,o=Rn(e,r);return n.writeFileSync(t,o,r)}var $a={readFile:Ra,readFileSync:qa,writeFile:Ua,writeFileSync:Ba};Pn.exports=$a});var $n=S((Ku,Bn)=>{"use strict";var ht=Un();Bn.exports={readJson:ht.readFile,readJsonSync:ht.readFileSync,writeJson:ht.writeFile,writeJsonSync:ht.writeFileSync}});var mt=S((Xu,Vn)=>{"use strict";var Ma=K().fromPromise,$t=se(),Mn=require("path"),Hn=ge(),Ha=Oe().pathExists;async function Va(t,e,r="utf-8"){let n=Mn.dirname(t);return await Ha(n)||await Hn.mkdirs(n),$t.writeFile(t,e,r)}function Wa(t,...e){let r=Mn.dirname(t);$t.existsSync(r)||Hn.mkdirsSync(r),$t.writeFileSync(t,...e)}Vn.exports={outputFile:Ma(Va),outputFileSync:Wa}});var Gn=S((Ju,Wn)=>{"use strict";var{stringify:Ga}=lt(),{outputFile:za}=mt();async function Za(t,e,r={}){let n=Ga(e,r);await za(t,n,r)}Wn.exports=Za});var Zn=S((Yu,zn)=>{"use strict";var{stringify:ja}=lt(),{outputFileSync:Ka}=mt();function Xa(t,e,r){let n=ja(e,r);Ka(t,n,r)}zn.exports=Xa});var Kn=S((Qu,jn)=>{"use strict";var Ja=K().fromPromise,ce=$n();ce.outputJson=Ja(Gn());ce.outputJsonSync=Zn();ce.outputJSON=ce.outputJson;ce.outputJSONSync=ce.outputJsonSync;ce.writeJSON=ce.writeJson;ce.writeJSONSync=ce.writeJsonSync;ce.readJSON=ce.readJson;ce.readJSONSync=ce.readJsonSync;jn.exports=ce});var ei=S((ef,Qn)=>{"use strict";var Ya=se(),Xn=require("path"),{copy:Qa}=ft(),{remove:Yn}=Ye(),{mkdirp:ec}=ge(),{pathExists:tc}=Oe(),Jn=ke();async function rc(t,e,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:o,isChangingCase:i=!1}=await Jn.checkPaths(t,e,"move",r);await Jn.checkParentPaths(t,o,e,"move");let s=Xn.dirname(e);return Xn.parse(s).root!==s&&await ec(s),nc(t,e,n,i)}async function nc(t,e,r,n){if(!n){if(r)await Yn(e);else if(await tc(e))throw new Error("dest already exists.")}try{await Ya.rename(t,e)}catch(o){if(o.code!=="EXDEV")throw o;await ic(t,e,r)}}async function ic(t,e,r){return await Qa(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),Yn(t)}Qn.exports=rc});var oi=S((tf,ii)=>{"use strict";var ri=qe(),Ht=require("path"),oc=ft().copySync,ni=Ye().removeSync,sc=ge().mkdirpSync,ti=ke();function ac(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:o,isChangingCase:i=!1}=ti.checkPathsSync(t,e,"move",r);return ti.checkParentPathsSync(t,o,e,"move"),cc(e)||sc(Ht.dirname(e)),uc(t,e,n,i)}function cc(t){let e=Ht.dirname(t);return Ht.parse(e).root===e}function uc(t,e,r,n){if(n)return Mt(t,e,r);if(r)return ni(e),Mt(t,e,r);if(ri.existsSync(e))throw new Error("dest already exists.");return Mt(t,e,r)}function Mt(t,e,r){try{ri.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return fc(t,e,r)}}function fc(t,e,r){return oc(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),ni(t)}ii.exports=ac});var ai=S((rf,si)=>{"use strict";var lc=K().fromPromise;si.exports={move:lc(ei()),moveSync:oi()}});var ui=S((nf,ci)=>{"use strict";ci.exports={...se(),...ft(),...an(),...kn(),...Kn(),...ge(),...ai(),...mt(),...Oe(),...Ye()}});var Ei=S((sf,zt)=>{var yi=process.argv||[],Et=process.env,vc=!("NO_COLOR"in Et||yi.includes("--no-color"))&&("FORCE_COLOR"in Et||yi.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&Et.TERM!=="dumb"||"CI"in Et),Cc=(t,e,r=t)=>n=>{let o=""+n,i=o.indexOf(e,t.length);return~i?t+bc(o,e,r,i)+e:t+o+e},bc=(t,e,r,n)=>{let o="",i=0;do o+=t.substring(i,n)+r,i=n+e.length,n=t.indexOf(e,i);while(~n);return o+t.substring(i)},gi=(t=vc)=>{let e=t?Cc:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m")}};zt.exports=gi();zt.exports.createColors=gi});var Ci=S((af,vi)=>{vi.exports=xi;xi.sync=Dc;var wi=require("fs");function Nc(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&t.substr(-o.length).toLowerCase()===o)return!0}return!1}function Si(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:Nc(e,r)}function xi(t,e,r){wi.stat(t,function(n,o){r(n,n?!1:Si(o,t,e))})}function Dc(t,e){return Si(wi.statSync(t),t,e)}});var Ii=S((cf,Oi)=>{Oi.exports=Ni;Ni.sync=Oc;var bi=require("fs");function Ni(t,e,r){bi.stat(t,function(n,o){r(n,n?!1:Di(o,e))})}function Oc(t,e){return Di(bi.statSync(t),e)}function Di(t,e){return t.isFile()&&Ic(t,e)}function Ic(t,e){var r=t.mode,n=t.uid,o=t.gid,i=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),f=parseInt("001",8),l=a|c,d=r&f||r&c&&o===s||r&a&&n===i||r&l&&i===0;return d}});var _i=S((ff,Li)=>{var uf=require("fs"),wt;process.platform==="win32"||global.TESTING_WINDOWS?wt=Ci():wt=Ii();Li.exports=Zt;Zt.sync=Lc;function Zt(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){Zt(t,e||{},function(i,s){i?o(i):n(s)})})}wt(t,e||{},function(n,o){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Lc(t,e){try{return wt.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Pi=S((lf,qi)=>{var $e=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Fi=require("path"),_c=$e?";":":",Ti=_i(),ki=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Ai=(t,e)=>{let r=e.colon||_c,n=t.match(/\//)||$e&&t.match(/\\/)?[""]:[...$e?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],o=$e?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=$e?o.split(r):[""];return $e&&t.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Ri=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:o,pathExtExe:i}=Ai(t,e),s=[],a=f=>new Promise((l,d)=>{if(f===n.length)return e.all&&s.length?l(s):d(ki(t));let m=n[f],p=/^".*"$/.test(m)?m.slice(1,-1):m,u=Fi.join(p,t),y=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;l(c(y,f,0))}),c=(f,l,d)=>new Promise((m,p)=>{if(d===o.length)return m(a(l+1));let u=o[d];Ti(f+u,{pathExt:i},(y,E)=>{if(!y&&E)if(e.all)s.push(f+u);else return m(f+u);return m(c(f,l,d+1))})});return r?a(0).then(f=>r(null,f),r):a(0)},Fc=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=Ai(t,e),i=[];for(let s=0;s<r.length;s++){let a=r[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,f=Fi.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+f:f;for(let d=0;d<n.length;d++){let m=l+n[d];try{if(Ti.sync(m,{pathExt:o}))if(e.all)i.push(m);else return m}catch{}}}if(e.all&&i.length)return i;if(e.nothrow)return null;throw ki(t)};qi.exports=Ri;Ri.sync=Fc});var Bi=S((df,jt)=>{"use strict";var Ui=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};jt.exports=Ui;jt.exports.default=Ui});var Vi=S((hf,Hi)=>{"use strict";var $i=require("path"),Tc=Pi(),kc=Bi();function Mi(t,e){let r=t.options.env||process.env,n=process.cwd(),o=t.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(t.options.cwd)}catch{}let s;try{s=Tc.sync(t.command,{path:r[kc({env:r})],pathExt:e?$i.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return s&&(s=$i.resolve(o?t.options.cwd:"",s)),s}function Ac(t){return Mi(t)||Mi(t,!0)}Hi.exports=Ac});var Wi=S((mf,Xt)=>{"use strict";var Kt=/([()\][%!^"`<>&|;, *?])/g;function Rc(t){return t=t.replace(Kt,"^$1"),t}function qc(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Kt,"^$1"),e&&(t=t.replace(Kt,"^$1")),t}Xt.exports.command=Rc;Xt.exports.argument=qc});var zi=S((pf,Gi)=>{"use strict";Gi.exports=/^#!(.*)/});var ji=S((yf,Zi)=>{"use strict";var Pc=zi();Zi.exports=(t="")=>{let e=t.match(Pc);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var Xi=S((gf,Ki)=>{"use strict";var Jt=require("fs"),Uc=ji();function Bc(t){let r=Buffer.alloc(150),n;try{n=Jt.openSync(t,"r"),Jt.readSync(n,r,0,150,0),Jt.closeSync(n)}catch{}return Uc(r.toString())}Ki.exports=Bc});var eo=S((Ef,Qi)=>{"use strict";var $c=require("path"),Ji=Vi(),Yi=Wi(),Mc=Xi(),Hc=process.platform==="win32",Vc=/\.(?:com|exe)$/i,Wc=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Gc(t){t.file=Ji(t);let e=t.file&&Mc(t.file);return e?(t.args.unshift(t.file),t.command=e,Ji(t)):t.file}function zc(t){if(!Hc)return t;let e=Gc(t),r=!Vc.test(e);if(t.options.forceShell||r){let n=Wc.test(e);t.command=$c.normalize(t.command),t.command=Yi.command(t.command),t.args=t.args.map(i=>Yi.argument(i,n));let o=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${o}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Zc(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:zc(n)}Qi.exports=Zc});var no=S((wf,ro)=>{"use strict";var Yt=process.platform==="win32";function Qt(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function jc(t,e){if(!Yt)return;let r=t.emit;t.emit=function(n,o){if(n==="exit"){let i=to(o,e,"spawn");if(i)return r.call(t,"error",i)}return r.apply(t,arguments)}}function to(t,e){return Yt&&t===1&&!e.file?Qt(e.original,"spawn"):null}function Kc(t,e){return Yt&&t===1&&!e.file?Qt(e.original,"spawnSync"):null}ro.exports={hookChildProcess:jc,verifyENOENT:to,verifyENOENTSync:Kc,notFoundError:Qt}});var so=S((Sf,Me)=>{"use strict";var io=require("child_process"),er=eo(),tr=no();function oo(t,e,r){let n=er(t,e,r),o=io.spawn(n.command,n.args,n.options);return tr.hookChildProcess(o,n),o}function Xc(t,e,r){let n=er(t,e,r),o=io.spawnSync(n.command,n.args,n.options);return o.error=o.error||tr.verifyENOENTSync(o.status,n),o}Me.exports=oo;Me.exports.spawn=oo;Me.exports.sync=Xc;Me.exports._parse=er;Me.exports._enoent=tr});var ao=S((xf,Jc)=>{Jc.exports=["|/-\\","\u2802-\u2013\u2014\u2013-","\u25D0\u25D3\u25D1\u25D2","\u25F4\u25F7\u25F6\u25F5","\u25F0\u25F3\u25F2\u25F1","\u2596\u2598\u259D\u2597","\u25A0\u25A1\u25AA\u25AB","\u258C\u2580\u2590\u2584","\u2589\u258A\u258B\u258C\u258D\u258E\u258F\u258E\u258D\u258C\u258B\u258A\u2589","\u2581\u2583\u2584\u2585\u2586\u2587\u2588\u2587\u2586\u2585\u2584\u2583","\u2190\u2196\u2191\u2197\u2192\u2198\u2193\u2199","\u2524\u2518\u2534\u2514\u251C\u250C\u252C\u2510","\u25E2\u25E3\u25E4\u25E5",".oO\xB0Oo.",".oO@*",["\u{1F30D}","\u{1F30E}","\u{1F30F}"],"\u25E1\u25E1 \u2299\u2299 \u25E0\u25E0","\u2631\u2632\u2634","\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F","\u280B\u2819\u281A\u281E\u2816\u2826\u2834\u2832\u2833\u2813","\u2804\u2806\u2807\u280B\u2819\u2838\u2830\u2820\u2830\u2838\u2819\u280B\u2807\u2806","\u280B\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B","\u2801\u2809\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2824\u2804\u2804\u2824\u2834\u2832\u2812\u2802\u2802\u2812\u281A\u2819\u2809\u2801","\u2808\u2809\u280B\u2813\u2812\u2810\u2810\u2812\u2816\u2826\u2824\u2820\u2820\u2824\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B\u2809\u2808","\u2801\u2801\u2809\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2824\u2804\u2804\u2824\u2820\u2820\u2824\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B\u2809\u2808\u2808","\u2884\u2882\u2881\u2841\u2848\u2850\u2860","\u28B9\u28BA\u28BC\u28F8\u28C7\u2867\u2857\u284F","\u28FE\u28FD\u28FB\u28BF\u287F\u28DF\u28EF\u28F7","\u2801\u2802\u2804\u2840\u2880\u2820\u2810\u2808",["\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F31D}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F31A}"],["\u{1F55B}","\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}"]]});var ho=S(lo=>{var co=require("readline"),uo=0,fo=60;function Yc(t){this.clearLine(this.stream),this.stream.write(t)}var ue=function(t){if(!(this instanceof ue))return new ue(t);typeof t=="string"?t={text:t}:t||(t={}),this.text=t.text||"",this.setSpinnerString(uo),this.setSpinnerDelay(fo),this.onTick=t.onTick||Yc,this.stream=t.stream||process.stdout};ue.spinners=ao();ue.setDefaultSpinnerString=function(t){return uo=t,this};ue.setDefaultSpinnerDelay=function(t){return fo=t,this};ue.prototype.start=function(){if(this.stream===process.stdout&&this.stream.isTTY!==!0)return this;var t=0,e=this,r=function(){var n=e.text.indexOf("%s")>-1?e.text.replace("%s",e.chars[t]):e.chars[t]+" "+e.text;e.onTick(n),t=++t%e.chars.length};return r(),this.id=setInterval(r,this.delay),this};ue.prototype.isSpinning=function(){return this.id!==void 0};ue.prototype.setSpinnerDelay=function(t){return this.delay=t,this};ue.prototype.setSpinnerString=function(t){let e=eu(t,this.spinners);return this.chars=Array.isArray(e)?e:e.split(""),this};ue.prototype.setSpinnerTitle=function(t){return this.text=t,this};ue.prototype.stop=function(t){return this.isSpinning===!1?this:(clearInterval(this.id),this.id=void 0,t&&this.clearLine(this.stream),this)};ue.prototype.clearLine=function(t){return co.clearLine(t,0),co.cursorTo(t,0),this};function Qc(t){return typeof t=="number"&&t%1===0}function eu(t,e){if(!Qc(t))return t+"";var r=ue.spinners.length;return t=t>=r?0:t,t=t<0?r+t:t,ue.spinners[t]}lo.Spinner=ue});var St=S(mo=>{mo.require=function(){var t=require("fs");if(process.versions.electron)try{t=require("original-fs")}catch{}return t}});var rr=S((bf,po)=>{po.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FILE:0,BUFFER:1,NONE:2,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var nr=S((Nf,yo)=>{yo.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}});var Eo=S((Df,go)=>{var R=St().require(),He=require("path");R.existsSync=R.existsSync||He.existsSync;go.exports=function(){var t=[],e=rr(),r=nr(),n=He.sep;function o(s){var a=s.split(n)[0];s.split(n).forEach(function(c){if(!(!c||c.substr(-1,1)===":")){a+=n+c;var f;try{f=R.statSync(a)}catch{R.mkdirSync(a)}if(f&&f.isFile())throw r.FILE_IN_THE_WAY.replace("%s",a)}})}function i(s,a,c){typeof a=="boolean"&&(c=a,a=void 0);var f=[];return R.readdirSync(s).forEach(function(l){var d=He.join(s,l);R.statSync(d).isDirectory()&&c&&(f=f.concat(i(d,a,c))),(!a||a.test(d))&&f.push(He.normalize(d)+(R.statSync(d).isDirectory()?n:""))}),f}return{makeDir:function(s){o(s)},crc32:function(s){typeof s=="string"&&(s=Buffer.alloc(s.length,s));var a=Buffer.alloc(4);if(!t.length)for(var c=0;c<256;c++){for(var f=c,l=8;--l>=0;)f&1?f=3988292384^f>>>1:f=f>>>1;f<0&&(a.writeInt32LE(f,0),f=a.readUInt32LE(0)),t[c]=f}for(var d=0,m=0,p=s.length,u=~d;--p>=0;)u=t[(u^s[m++])&255]^u>>>8;return d=~u,a.writeInt32LE(d&4294967295,0),a.readUInt32LE(0)},methodToString:function(s){switch(s){case e.STORED:return"STORED ("+s+")";case e.DEFLATED:return"DEFLATED ("+s+")";default:return"UNSUPPORTED ("+s+")"}},writeFileTo:function(s,a,c,f){if(R.existsSync(s)){if(!c)return!1;var l=R.statSync(s);if(l.isDirectory())return!1}var d=He.dirname(s);R.existsSync(d)||o(d);var m;try{m=R.openSync(s,"w",438)}catch{R.chmodSync(s,438),m=R.openSync(s,"w",438)}if(m)try{R.writeSync(m,a,0,a.length,0)}catch(p){throw p}finally{R.closeSync(m)}return R.chmodSync(s,f||438),!0},writeFileToAsync:function(s,a,c,f,l){typeof f=="function"&&(l=f,f=void 0),R.exists(s,function(d){if(d&&!c)return l(!1);R.stat(s,function(m,p){if(d&&p.isDirectory())return l(!1);var u=He.dirname(s);R.exists(u,function(y){y||o(u),R.open(s,"w",438,function(E,h){E?R.chmod(s,438,function(){R.open(s,"w",438,function(w,L){R.write(L,a,0,a.length,0,function(){R.close(L,function(){R.chmod(s,f||438,function(){l(!0)})})})})}):h?R.write(h,a,0,a.length,0,function(){R.close(h,function(){R.chmod(s,f||438,function(){l(!0)})})}):R.chmod(s,f||438,function(){l(!0)})})})})})},findFiles:function(s){return i(s,!0)},getAttributes:function(s){},setAttributes:function(s){},toBuffer:function(s){return Buffer.isBuffer(s)?s:s.length===0?Buffer.alloc(0):Buffer.alloc(s.length,s,"utf8")},Constants:e,Errors:r}}()});var xo=S((Of,So)=>{var xt=St().require(),wo=require("path");xt.existsSync=xt.existsSync||wo.existsSync;So.exports=function(t){var e=t||"",r=0,n=i(),o=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return e&&xt.existsSync(e)?(o=xt.statSync(e),n.directory=o.isDirectory(),n.mtime=o.mtime,n.atime=o.atime,n.executable=!!(1&parseInt((o.mode&parseInt("777",8)).toString(8)[0])),n.readonly=!!(2&parseInt((o.mode&parseInt("777",8)).toString(8)[0])),n.hidden=wo.basename(e)[0]==="."):console.warn("Invalid path: "+e),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(s){},encodeAttributes:function(s){},toString:function(){return`{
8
- "path" : "`+e+`,
6
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:o}=nt.checkPathsSync(e,t,"copy",r);if(nt.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;let i=rt.dirname(t);return ce.existsSync(i)||Za(i),wn(o,e,t,r)}function wn(e,t,r,n){let i=(n.dereference?ce.statSync:ce.lstatSync)(t);if(i.isDirectory())return rc(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Ka(i,e,t,r,n);if(i.isSymbolicLink())return oc(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function Ka(e,t,r,n,o){return t?Ja(e,r,n,o):En(e,r,n,o)}function Ja(e,t,r,n){if(n.overwrite)return ce.unlinkSync(r),En(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function En(e,t,r,n){return ce.copyFileSync(t,r),n.preserveTimestamps&&Ya(e.mode,t,r),Jt(r,e.mode)}function Ya(e,t,r){return Qa(e)&&ec(r,e),tc(t,r)}function Qa(e){return(e&128)===0}function ec(e,t){return Jt(e,t|128)}function Jt(e,t){return ce.chmodSync(e,t)}function tc(e,t){let r=ce.statSync(e);return ja(t,r.atime,r.mtime)}function rc(e,t,r,n,o){return t?Sn(r,n,o):nc(e.mode,r,n,o)}function nc(e,t,r,n){return ce.mkdirSync(r),Sn(t,r,n),Jt(r,e)}function Sn(e,t,r){ce.readdirSync(e).forEach(n=>ic(n,e,t,r))}function ic(e,t,r,n){let o=rt.join(t,e),i=rt.join(r,e);if(n.filter&&!n.filter(o,i))return;let{destStat:s}=nt.checkPathsSync(o,i,"copy",n);return wn(s,o,i,n)}function oc(e,t,r,n){let o=ce.readlinkSync(t);if(n.dereference&&(o=rt.resolve(process.cwd(),o)),e){let i;try{i=ce.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return ce.symlinkSync(o,r);throw s}if(n.dereference&&(i=rt.resolve(process.cwd(),i)),nt.isSrcSubdir(o,i))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`);if(nt.isSrcSubdir(i,o))throw new Error(`Cannot overwrite '${i}' with '${o}'.`);return sc(o,r)}else return ce.symlinkSync(o,r)}function sc(e,t){return ce.unlinkSync(t),ce.symlinkSync(e,t)}xn.exports=Xa});var St=S((nl,Cn)=>{"use strict";var ac=K().fromPromise;Cn.exports={copy:ac(gn()),copySync:vn()}});var it=S((il,Nn)=>{"use strict";var bn=$e(),cc=K().fromCallback;function uc(e,t){bn.rm(e,{recursive:!0,force:!0},t)}function fc(e){bn.rmSync(e,{recursive:!0,force:!0})}Nn.exports={remove:cc(uc),removeSync:fc}});var An=S((ol,Tn)=>{"use strict";var lc=K().fromPromise,In=ae(),Ln=require("path"),Fn=we(),_n=it(),Dn=lc(async function(t){let r;try{r=await In.readdir(t)}catch{return Fn.mkdirs(t)}return Promise.all(r.map(n=>_n.remove(Ln.join(t,n))))});function On(e){let t;try{t=In.readdirSync(e)}catch{return Fn.mkdirsSync(e)}t.forEach(r=>{r=Ln.join(e,r),_n.removeSync(r)})}Tn.exports={emptyDirSync:On,emptydirSync:On,emptyDir:Dn,emptydir:Dn}});var qn=S((sl,Pn)=>{"use strict";var dc=K().fromPromise,kn=require("path"),De=ae(),Rn=we();async function mc(e){let t;try{t=await De.stat(e)}catch{}if(t&&t.isFile())return;let r=kn.dirname(e),n=null;try{n=await De.stat(r)}catch(o){if(o.code==="ENOENT"){await Rn.mkdirs(r),await De.writeFile(e,"");return}else throw o}n.isDirectory()?await De.writeFile(e,""):await De.readdir(r)}function hc(e){let t;try{t=De.statSync(e)}catch{}if(t&&t.isFile())return;let r=kn.dirname(e);try{De.statSync(r).isDirectory()||De.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")Rn.mkdirsSync(r);else throw n}De.writeFileSync(e,"")}Pn.exports={createFile:dc(mc),createFileSync:hc}});var Hn=S((al,Mn)=>{"use strict";var pc=K().fromPromise,Un=require("path"),Fe=ae(),Bn=we(),{pathExists:yc}=Le(),{areIdentical:$n}=Re();async function gc(e,t){let r;try{r=await Fe.lstat(t)}catch{}let n;try{n=await Fe.lstat(e)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}if(r&&$n(n,r))return;let o=Un.dirname(t);await yc(o)||await Bn.mkdirs(o),await Fe.link(e,t)}function wc(e,t){let r;try{r=Fe.lstatSync(t)}catch{}try{let i=Fe.lstatSync(e);if(r&&$n(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=Un.dirname(t);return Fe.existsSync(n)||Bn.mkdirsSync(n),Fe.linkSync(e,t)}Mn.exports={createLink:pc(gc),createLinkSync:wc}});var Vn=S((cl,Wn)=>{"use strict";var _e=require("path"),ot=ae(),{pathExists:Ec}=Le(),Sc=K().fromPromise;async function xc(e,t){if(_e.isAbsolute(e)){try{await ot.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:e}}let r=_e.dirname(t),n=_e.join(r,e);if(await Ec(n))return{toCwd:n,toDst:e};try{await ot.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:_e.relative(r,e)}}function vc(e,t){if(_e.isAbsolute(e)){if(!ot.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let r=_e.dirname(t),n=_e.join(r,e);if(ot.existsSync(n))return{toCwd:n,toDst:e};if(!ot.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:_e.relative(r,e)}}Wn.exports={symlinkPaths:Sc(xc),symlinkPathsSync:vc}});var Zn=S((ul,zn)=>{"use strict";var Gn=ae(),Cc=K().fromPromise;async function bc(e,t){if(t)return t;let r;try{r=await Gn.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function Nc(e,t){if(t)return t;let r;try{r=Gn.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}zn.exports={symlinkType:Cc(bc),symlinkTypeSync:Nc}});var Jn=S((fl,Kn)=>{"use strict";var Dc=K().fromPromise,jn=require("path"),Ce=ae(),{mkdirs:Oc,mkdirsSync:Ic}=we(),{symlinkPaths:Lc,symlinkPathsSync:Fc}=Vn(),{symlinkType:_c,symlinkTypeSync:Tc}=Zn(),{pathExists:Ac}=Le(),{areIdentical:Xn}=Re();async function kc(e,t,r){let n;try{n=await Ce.lstat(t)}catch{}if(n&&n.isSymbolicLink()){let[a,c]=await Promise.all([Ce.stat(e),Ce.stat(t)]);if(Xn(a,c))return}let o=await Lc(e,t);e=o.toDst;let i=await _c(o.toCwd,r),s=jn.dirname(t);return await Ac(s)||await Oc(s),Ce.symlink(e,t,i)}function Rc(e,t,r){let n;try{n=Ce.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){let a=Ce.statSync(e),c=Ce.statSync(t);if(Xn(a,c))return}let o=Fc(e,t);e=o.toDst,r=Tc(o.toCwd,r);let i=jn.dirname(t);return Ce.existsSync(i)||Ic(i),Ce.symlinkSync(e,t,r)}Kn.exports={createSymlink:Dc(kc),createSymlinkSync:Rc}});var oi=S((ll,ii)=>{"use strict";var{createFile:Yn,createFileSync:Qn}=qn(),{createLink:ei,createLinkSync:ti}=Hn(),{createSymlink:ri,createSymlinkSync:ni}=Jn();ii.exports={createFile:Yn,createFileSync:Qn,ensureFile:Yn,ensureFileSync:Qn,createLink:ei,createLinkSync:ti,ensureLink:ei,ensureLinkSync:ti,createSymlink:ri,createSymlinkSync:ni,ensureSymlink:ri,ensureSymlinkSync:ni}});var xt=S((dl,si)=>{function Pc(e,{EOL:t=`
7
+ `,finalEOL:r=!0,replacer:n=null,spaces:o}={}){let i=r?t:"";return JSON.stringify(e,n,o).replace(/\n/g,t)+i}function qc(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}si.exports={stringify:Pc,stripBom:qc}});var fi=S((ml,ui)=>{var We;try{We=$e()}catch{We=require("fs")}var vt=K(),{stringify:ai,stripBom:ci}=xt();async function Uc(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||We,n="throws"in t?t.throws:!0,o=await vt.fromCallback(r.readFile)(e,t);o=ci(o);let i;try{i=JSON.parse(o,t?t.reviver:null)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}return i}var Bc=vt.fromPromise(Uc);function $c(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||We,n="throws"in t?t.throws:!0;try{let o=r.readFileSync(e,t);return o=ci(o),JSON.parse(o,t.reviver)}catch(o){if(n)throw o.message=`${e}: ${o.message}`,o;return null}}async function Mc(e,t,r={}){let n=r.fs||We,o=ai(t,r);await vt.fromCallback(n.writeFile)(e,o,r)}var Hc=vt.fromPromise(Mc);function Wc(e,t,r={}){let n=r.fs||We,o=ai(t,r);return n.writeFileSync(e,o,r)}var Vc={readFile:Bc,readFileSync:$c,writeFile:Hc,writeFileSync:Wc};ui.exports=Vc});var di=S((hl,li)=>{"use strict";var Ct=fi();li.exports={readJson:Ct.readFile,readJsonSync:Ct.readFileSync,writeJson:Ct.writeFile,writeJsonSync:Ct.writeFileSync}});var bt=S((pl,pi)=>{"use strict";var Gc=K().fromPromise,Yt=ae(),mi=require("path"),hi=we(),zc=Le().pathExists;async function Zc(e,t,r="utf-8"){let n=mi.dirname(e);return await zc(n)||await hi.mkdirs(n),Yt.writeFile(e,t,r)}function jc(e,...t){let r=mi.dirname(e);Yt.existsSync(r)||hi.mkdirsSync(r),Yt.writeFileSync(e,...t)}pi.exports={outputFile:Gc(Zc),outputFileSync:jc}});var gi=S((yl,yi)=>{"use strict";var{stringify:Xc}=xt(),{outputFile:Kc}=bt();async function Jc(e,t,r={}){let n=Xc(t,r);await Kc(e,n,r)}yi.exports=Jc});var Ei=S((gl,wi)=>{"use strict";var{stringify:Yc}=xt(),{outputFileSync:Qc}=bt();function eu(e,t,r){let n=Yc(t,r);Qc(e,n,r)}wi.exports=eu});var xi=S((wl,Si)=>{"use strict";var tu=K().fromPromise,ue=di();ue.outputJson=tu(gi());ue.outputJsonSync=Ei();ue.outputJSON=ue.outputJson;ue.outputJSONSync=ue.outputJsonSync;ue.writeJSON=ue.writeJson;ue.writeJSONSync=ue.writeJsonSync;ue.readJSON=ue.readJson;ue.readJSONSync=ue.readJsonSync;Si.exports=ue});var Di=S((El,Ni)=>{"use strict";var ru=ae(),vi=require("path"),{copy:nu}=St(),{remove:bi}=it(),{mkdirp:iu}=we(),{pathExists:ou}=Le(),Ci=Re();async function su(e,t,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:o,isChangingCase:i=!1}=await Ci.checkPaths(e,t,"move",r);await Ci.checkParentPaths(e,o,t,"move");let s=vi.dirname(t);return vi.parse(s).root!==s&&await iu(s),au(e,t,n,i)}async function au(e,t,r,n){if(!n){if(r)await bi(t);else if(await ou(t))throw new Error("dest already exists.")}try{await ru.rename(e,t)}catch(o){if(o.code!=="EXDEV")throw o;await cu(e,t,r)}}async function cu(e,t,r){return await nu(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),bi(e)}Ni.exports=su});var _i=S((Sl,Fi)=>{"use strict";var Ii=$e(),er=require("path"),uu=St().copySync,Li=it().removeSync,fu=we().mkdirpSync,Oi=Re();function lu(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:o,isChangingCase:i=!1}=Oi.checkPathsSync(e,t,"move",r);return Oi.checkParentPathsSync(e,o,t,"move"),du(t)||fu(er.dirname(t)),mu(e,t,n,i)}function du(e){let t=er.dirname(e);return er.parse(t).root===t}function mu(e,t,r,n){if(n)return Qt(e,t,r);if(r)return Li(t),Qt(e,t,r);if(Ii.existsSync(t))throw new Error("dest already exists.");return Qt(e,t,r)}function Qt(e,t,r){try{Ii.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return hu(e,t,r)}}function hu(e,t,r){return uu(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),Li(e)}Fi.exports=lu});var Ai=S((xl,Ti)=>{"use strict";var pu=K().fromPromise;Ti.exports={move:pu(Di()),moveSync:_i()}});var Ri=S((vl,ki)=>{"use strict";ki.exports={...ae(),...St(),...An(),...oi(),...xi(),...we(),...Ai(),...bt(),...Le(),...it()}});var Vi=S((bl,ir)=>{var Hi=process.argv||[],It=process.env,Du=!("NO_COLOR"in It||Hi.includes("--no-color"))&&("FORCE_COLOR"in It||Hi.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&It.TERM!=="dumb"||"CI"in It),Ou=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Iu(o,t,r,i)+t:e+o+t},Iu=(e,t,r,n)=>{let o="",i=0;do o+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return o+e.substring(i)},Wi=(e=Du)=>{let t=e?Ou:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m")}};ir.exports=Wi();ir.exports.createColors=Wi});var Xi=S((Nl,ji)=>{ji.exports=Zi;Zi.sync=Fu;var Gi=require("fs");function Lu(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function zi(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:Lu(t,r)}function Zi(e,t,r){Gi.stat(e,function(n,o){r(n,n?!1:zi(o,e,t))})}function Fu(e,t){return zi(Gi.statSync(e),e,t)}});var eo=S((Dl,Qi)=>{Qi.exports=Ji;Ji.sync=_u;var Ki=require("fs");function Ji(e,t,r){Ki.stat(e,function(n,o){r(n,n?!1:Yi(o,t))})}function _u(e,t){return Yi(Ki.statSync(e),t)}function Yi(e,t){return e.isFile()&&Tu(e,t)}function Tu(e,t){var r=e.mode,n=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,d=r&u||r&c&&o===s||r&a&&n===i||r&l&&i===0;return d}});var ro=S((Il,to)=>{var Ol=require("fs"),Lt;process.platform==="win32"||global.TESTING_WINDOWS?Lt=Xi():Lt=eo();to.exports=or;or.sync=Au;function or(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,o){or(e,t||{},function(i,s){i?o(i):n(s)})})}Lt(e,t||{},function(n,o){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,o=!1),r(n,o)})}function Au(e,t){try{return Lt.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uo=S((Ll,co)=>{var Ve=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",no=require("path"),ku=Ve?";":":",io=ro(),oo=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),so=(e,t)=>{let r=t.colon||ku,n=e.match(/\//)||Ve&&e.match(/\\/)?[""]:[...Ve?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=Ve?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=Ve?o.split(r):[""];return Ve&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},ao=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:o,pathExtExe:i}=so(e,t),s=[],a=u=>new Promise((l,d)=>{if(u===n.length)return t.all&&s.length?l(s):d(oo(e));let h=n[u],p=/^".*"$/.test(h)?h.slice(1,-1):h,f=no.join(p,e),y=!p&&/^\.[\\\/]/.test(e)?e.slice(0,2)+f:f;l(c(y,u,0))}),c=(u,l,d)=>new Promise((h,p)=>{if(d===o.length)return h(a(l+1));let f=o[d];io(u+f,{pathExt:i},(y,w)=>{if(!y&&w)if(t.all)s.push(u+f);else return h(u+f);return h(c(u,l,d+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Ru=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:o}=so(e,t),i=[];for(let s=0;s<r.length;s++){let a=r[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=no.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let d=0;d<n.length;d++){let h=l+n[d];try{if(io.sync(h,{pathExt:o}))if(t.all)i.push(h);else return h}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw oo(e)};co.exports=ao;ao.sync=Ru});var lo=S((Fl,sr)=>{"use strict";var fo=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};sr.exports=fo;sr.exports.default=fo});var yo=S((_l,po)=>{"use strict";var mo=require("path"),Pu=uo(),qu=lo();function ho(e,t){let r=e.options.env||process.env,n=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=Pu.sync(e.command,{path:r[qu({env:r})],pathExt:t?mo.delimiter:void 0})}catch{}finally{i&&process.chdir(n)}return s&&(s=mo.resolve(o?e.options.cwd:"",s)),s}function Uu(e){return ho(e)||ho(e,!0)}po.exports=Uu});var go=S((Tl,cr)=>{"use strict";var ar=/([()\][%!^"`<>&|;, *?])/g;function Bu(e){return e=e.replace(ar,"^$1"),e}function $u(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ar,"^$1"),t&&(e=e.replace(ar,"^$1")),e}cr.exports.command=Bu;cr.exports.argument=$u});var Eo=S((Al,wo)=>{"use strict";wo.exports=/^#!(.*)/});var xo=S((kl,So)=>{"use strict";var Mu=Eo();So.exports=(e="")=>{let t=e.match(Mu);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return o==="env"?n:n?`${o} ${n}`:o}});var Co=S((Rl,vo)=>{"use strict";var ur=require("fs"),Hu=xo();function Wu(e){let r=Buffer.alloc(150),n;try{n=ur.openSync(e,"r"),ur.readSync(n,r,0,150,0),ur.closeSync(n)}catch{}return Hu(r.toString())}vo.exports=Wu});var Oo=S((Pl,Do)=>{"use strict";var Vu=require("path"),bo=yo(),No=go(),Gu=Co(),zu=process.platform==="win32",Zu=/\.(?:com|exe)$/i,ju=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Xu(e){e.file=bo(e);let t=e.file&&Gu(e.file);return t?(e.args.unshift(e.file),e.command=t,bo(e)):e.file}function Ku(e){if(!zu)return e;let t=Xu(e),r=!Zu.test(t);if(e.options.forceShell||r){let n=ju.test(t);e.command=Vu.normalize(e.command),e.command=No.command(e.command),e.args=e.args.map(i=>No.argument(i,n));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Ju(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:Ku(n)}Do.exports=Ju});var Fo=S((ql,Lo)=>{"use strict";var fr=process.platform==="win32";function lr(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Yu(e,t){if(!fr)return;let r=e.emit;e.emit=function(n,o){if(n==="exit"){let i=Io(o,t,"spawn");if(i)return r.call(e,"error",i)}return r.apply(e,arguments)}}function Io(e,t){return fr&&e===1&&!t.file?lr(t.original,"spawn"):null}function Qu(e,t){return fr&&e===1&&!t.file?lr(t.original,"spawnSync"):null}Lo.exports={hookChildProcess:Yu,verifyENOENT:Io,verifyENOENTSync:Qu,notFoundError:lr}});var Ao=S((Ul,Ge)=>{"use strict";var _o=require("child_process"),dr=Oo(),mr=Fo();function To(e,t,r){let n=dr(e,t,r),o=_o.spawn(n.command,n.args,n.options);return mr.hookChildProcess(o,n),o}function ef(e,t,r){let n=dr(e,t,r),o=_o.spawnSync(n.command,n.args,n.options);return o.error=o.error||mr.verifyENOENTSync(o.status,n),o}Ge.exports=To;Ge.exports.spawn=To;Ge.exports.sync=ef;Ge.exports._parse=dr;Ge.exports._enoent=mr});var ko=S((Bl,tf)=>{tf.exports=["|/-\\","\u2802-\u2013\u2014\u2013-","\u25D0\u25D3\u25D1\u25D2","\u25F4\u25F7\u25F6\u25F5","\u25F0\u25F3\u25F2\u25F1","\u2596\u2598\u259D\u2597","\u25A0\u25A1\u25AA\u25AB","\u258C\u2580\u2590\u2584","\u2589\u258A\u258B\u258C\u258D\u258E\u258F\u258E\u258D\u258C\u258B\u258A\u2589","\u2581\u2583\u2584\u2585\u2586\u2587\u2588\u2587\u2586\u2585\u2584\u2583","\u2190\u2196\u2191\u2197\u2192\u2198\u2193\u2199","\u2524\u2518\u2534\u2514\u251C\u250C\u252C\u2510","\u25E2\u25E3\u25E4\u25E5",".oO\xB0Oo.",".oO@*",["\u{1F30D}","\u{1F30E}","\u{1F30F}"],"\u25E1\u25E1 \u2299\u2299 \u25E0\u25E0","\u2631\u2632\u2634","\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F","\u280B\u2819\u281A\u281E\u2816\u2826\u2834\u2832\u2833\u2813","\u2804\u2806\u2807\u280B\u2819\u2838\u2830\u2820\u2830\u2838\u2819\u280B\u2807\u2806","\u280B\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B","\u2801\u2809\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2824\u2804\u2804\u2824\u2834\u2832\u2812\u2802\u2802\u2812\u281A\u2819\u2809\u2801","\u2808\u2809\u280B\u2813\u2812\u2810\u2810\u2812\u2816\u2826\u2824\u2820\u2820\u2824\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B\u2809\u2808","\u2801\u2801\u2809\u2819\u281A\u2812\u2802\u2802\u2812\u2832\u2834\u2824\u2804\u2804\u2824\u2820\u2820\u2824\u2826\u2816\u2812\u2810\u2810\u2812\u2813\u280B\u2809\u2808\u2808","\u2884\u2882\u2881\u2841\u2848\u2850\u2860","\u28B9\u28BA\u28BC\u28F8\u28C7\u2867\u2857\u284F","\u28FE\u28FD\u28FB\u28BF\u287F\u28DF\u28EF\u28F7","\u2801\u2802\u2804\u2840\u2880\u2820\u2810\u2808",["\u{1F311}","\u{1F312}","\u{1F313}","\u{1F314}","\u{1F315}","\u{1F31D}","\u{1F316}","\u{1F317}","\u{1F318}","\u{1F31A}"],["\u{1F55B}","\u{1F550}","\u{1F551}","\u{1F552}","\u{1F553}","\u{1F554}","\u{1F555}","\u{1F556}","\u{1F557}","\u{1F558}","\u{1F559}","\u{1F55A}"]]});var Bo=S(Uo=>{var Ro=require("readline"),Po=0,qo=60;function rf(e){this.clearLine(this.stream),this.stream.write(e)}var fe=function(e){if(!(this instanceof fe))return new fe(e);typeof e=="string"?e={text:e}:e||(e={}),this.text=e.text||"",this.setSpinnerString(Po),this.setSpinnerDelay(qo),this.onTick=e.onTick||rf,this.stream=e.stream||process.stdout};fe.spinners=ko();fe.setDefaultSpinnerString=function(e){return Po=e,this};fe.setDefaultSpinnerDelay=function(e){return qo=e,this};fe.prototype.start=function(){if(this.stream===process.stdout&&this.stream.isTTY!==!0)return this;var e=0,t=this,r=function(){var n=t.text.indexOf("%s")>-1?t.text.replace("%s",t.chars[e]):t.chars[e]+" "+t.text;t.onTick(n),e=++e%t.chars.length};return r(),this.id=setInterval(r,this.delay),this};fe.prototype.isSpinning=function(){return this.id!==void 0};fe.prototype.setSpinnerDelay=function(e){return this.delay=e,this};fe.prototype.setSpinnerString=function(e){let t=of(e,this.spinners);return this.chars=Array.isArray(t)?t:t.split(""),this};fe.prototype.setSpinnerTitle=function(e){return this.text=e,this};fe.prototype.stop=function(e){return this.isSpinning===!1?this:(clearInterval(this.id),this.id=void 0,e&&this.clearLine(this.stream),this)};fe.prototype.clearLine=function(e){return Ro.clearLine(e,0),Ro.cursorTo(e,0),this};function nf(e){return typeof e=="number"&&e%1===0}function of(e,t){if(!nf(e))return e+"";var r=fe.spinners.length;return e=e>=r?0:e,e=e<0?r+e:e,fe.spinners[e]}Uo.Spinner=fe});function sf(){try{return pr.default.statSync("/.dockerenv"),!0}catch{return!1}}function af(){try{return pr.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function yr(){return hr===void 0&&(hr=sf()||af()),hr}var pr,hr,$o=ve(()=>{pr=X(require("node:fs"),1)});function ze(){return gr===void 0&&(gr=cf()||yr()),gr}var Mo,gr,cf,wr=ve(()=>{Mo=X(require("node:fs"),1);$o();cf=()=>{try{return Mo.default.statSync("/run/.containerenv"),!0}catch{return!1}}});var Er,Wo,Vo,Ho,at,Go=ve(()=>{Er=X(require("node:process"),1),Wo=X(require("node:os"),1),Vo=X(require("node:fs"),1);wr();Ho=()=>{if(Er.default.platform!=="linux")return!1;if(Wo.default.release().toLowerCase().includes("microsoft"))return!ze();try{return Vo.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!ze():!1}catch{return!1}},at=Er.default.env.__IS_WSL_TEST__?Ho:Ho()});function Pe(e,t,r){let n=o=>Object.defineProperty(e,t,{value:o,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let o=r();return n(o),o},set(o){n(o)}}),e}var zo=ve(()=>{});async function Sr(){if(jo.default.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await uf("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari"}var Zo,jo,Xo,uf,Ko=ve(()=>{Zo=require("node:util"),jo=X(require("node:process"),1),Xo=require("node:child_process"),uf=(0,Zo.promisify)(Xo.execFile)});async function Qo(e,{humanReadableOutput:t=!0}={}){if(Jo.default.platform!=="darwin")throw new Error("macOS only");let r=t?[]:["-ss"],{stdout:n}=await ff("osascript",["-e",e,r]);return n.trim()}var Jo,Yo,xr,ff,es=ve(()=>{Jo=X(require("node:process"),1),Yo=require("node:util"),xr=require("node:child_process"),ff=(0,Yo.promisify)(xr.execFile)});async function vr(e){return Qo(`tell application "Finder" to set app_path to application file id "${e}" as string
8
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var ts=ve(()=>{es()});async function Cr(e=lf){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!r)throw new Ft(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:n}=r.groups,o=df[n];if(!o)throw new Ft(`Unknown browser ID: ${n}`);return o}var rs,ns,lf,df,Ft,is=ve(()=>{rs=require("node:util"),ns=require("node:child_process"),lf=(0,rs.promisify)(ns.execFile),df={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},Ft=class extends Error{}});async function br(){if(_t.default.platform==="darwin"){let e=await Sr();return{name:await vr(e),id:e}}if(_t.default.platform==="linux"){let{stdout:e}=await mf("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:hf(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(_t.default.platform==="win32")return Cr();throw new Error("Only macOS, Linux, and Windows are supported")}var os,_t,ss,mf,hf,as=ve(()=>{os=require("node:util"),_t=X(require("node:process"),1),ss=require("node:child_process");Ko();ts();is();mf=(0,os.promisify)(ss.execFile),hf=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase())});var ps={};ma(ps,{apps:()=>Ue,default:()=>wf,openApp:()=>gf});function ls(e){if(typeof e=="string"||Array.isArray(e))return e;let{[us]:t}=e;if(!t)throw new Error(`${us} is not supported`);return t}function Or({[Ze]:e},{wsl:t}){if(t&&at)return ls(t);if(!e)throw new Error(`${Ze} is not supported`);return ls(e)}var ct,ds,Dr,ms,hs,qe,Ef,Nr,cs,Ze,us,pf,fs,ut,yf,gf,Ue,wf,ys=ve(()=>{ct=X(require("node:process"),1),ds=require("node:buffer"),Dr=X(require("node:path"),1),ms=require("node:url"),hs=X(require("node:child_process"),1),qe=X(require("node:fs/promises"),1);Go();zo();as();wr();Ef={},Nr=Dr.default.dirname((0,ms.fileURLToPath)(Ef.url)),cs=Dr.default.join(Nr,"xdg-open"),{platform:Ze,arch:us}=ct.default,pf=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let r="/etc/wsl.conf",n=!1;try{await qe.default.access(r,qe.constants.F_OK),n=!0}catch{}if(!n)return e;let o=await qe.default.readFile(r,{encoding:"utf8"}),i=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(o);return i?(t=i.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),fs=async(e,t)=>{let r;for(let n of e)try{return await t(n)}catch(o){r=o}throw r},ut=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return fs(e.app,a=>ut({...e,app:a}));let{name:t,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(t))return fs(t,a=>ut({...e,app:{name:a,arguments:r}}));if(t==="browser"||t==="browserPrivate"){let a={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","microsoft-edge.desktop":"edge"},c={chrome:"--incognito",firefox:"--private-window",edge:"--inPrivate"},u=await br();if(u.id in a){let l=a[u.id];return t==="browserPrivate"&&r.push(c[l]),ut({...e,app:{name:Ue[l],arguments:r}})}throw new Error(`${u.name} is not supported as a default browser`)}let n,o=[],i={};if(Ze==="darwin")n="open",e.wait&&o.push("--wait-apps"),e.background&&o.push("--background"),e.newInstance&&o.push("--new"),t&&o.push("-a",t);else if(Ze==="win32"||at&&!ze()&&!t){let a=await pf();n=at?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${ct.default.env.SYSTEMROOT||ct.default.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,o.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),at||(i.windowsVerbatimArguments=!0);let c=["Start"];e.wait&&c.push("-Wait"),t?(c.push(`"\`"${t}\`""`),e.target&&r.push(e.target)):e.target&&c.push(`"${e.target}"`),r.length>0&&(r=r.map(u=>`"\`"${u}\`""`),c.push("-ArgumentList",r.join(","))),e.target=ds.Buffer.from(c.join(" "),"utf16le").toString("base64")}else{if(t)n=t;else{let a=!Nr||Nr==="/",c=!1;try{await qe.default.access(cs,qe.constants.X_OK),c=!0}catch{}n=ct.default.versions.electron??(Ze==="android"||a||!c)?"xdg-open":cs}r.length>0&&o.push(...r),e.wait||(i.stdio="ignore",i.detached=!0)}Ze==="darwin"&&r.length>0&&o.push("--args",...r),e.target&&o.push(e.target);let s=hs.default.spawn(n,o,i);return e.wait?new Promise((a,c)=>{s.once("error",c),s.once("close",u=>{if(!e.allowNonzeroExitCode&&u>0){c(new Error(`Exited with code ${u}`));return}a(s)})}):(s.unref(),s)},yf=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return ut({...t,target:e})},gf=(e,t)=>{if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("Expected a valid `name`");let{arguments:r=[]}=t??{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return ut({...t,app:{name:e,arguments:r}})};Ue={};Pe(Ue,"chrome",()=>Or({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Pe(Ue,"firefox",()=>Or({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Pe(Ue,"edge",()=>Or({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Pe(Ue,"browser",()=>"browser");Pe(Ue,"browserPrivate",()=>"browserPrivate");wf=yf});var Tt=S(gs=>{gs.require=function(){var e=require("fs");if(process.versions.electron)try{e=require("original-fs")}catch{}return e}});var Ir=S((ad,ws)=>{ws.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FILE:0,BUFFER:1,NONE:2,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var Lr=S((cd,Es)=>{Es.exports={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed",FILE_IN_THE_WAY:"There is a file in the way: %s",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:"File not found: %s",NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found"}});var xs=S((ud,Ss)=>{var P=Tt().require(),je=require("path");P.existsSync=P.existsSync||je.existsSync;Ss.exports=function(){var e=[],t=Ir(),r=Lr(),n=je.sep;function o(s){var a=s.split(n)[0];s.split(n).forEach(function(c){if(!(!c||c.substr(-1,1)===":")){a+=n+c;var u;try{u=P.statSync(a)}catch{P.mkdirSync(a)}if(u&&u.isFile())throw r.FILE_IN_THE_WAY.replace("%s",a)}})}function i(s,a,c){typeof a=="boolean"&&(c=a,a=void 0);var u=[];return P.readdirSync(s).forEach(function(l){var d=je.join(s,l);P.statSync(d).isDirectory()&&c&&(u=u.concat(i(d,a,c))),(!a||a.test(d))&&u.push(je.normalize(d)+(P.statSync(d).isDirectory()?n:""))}),u}return{makeDir:function(s){o(s)},crc32:function(s){typeof s=="string"&&(s=Buffer.alloc(s.length,s));var a=Buffer.alloc(4);if(!e.length)for(var c=0;c<256;c++){for(var u=c,l=8;--l>=0;)u&1?u=3988292384^u>>>1:u=u>>>1;u<0&&(a.writeInt32LE(u,0),u=a.readUInt32LE(0)),e[c]=u}for(var d=0,h=0,p=s.length,f=~d;--p>=0;)f=e[(f^s[h++])&255]^f>>>8;return d=~f,a.writeInt32LE(d&4294967295,0),a.readUInt32LE(0)},methodToString:function(s){switch(s){case t.STORED:return"STORED ("+s+")";case t.DEFLATED:return"DEFLATED ("+s+")";default:return"UNSUPPORTED ("+s+")"}},writeFileTo:function(s,a,c,u){if(P.existsSync(s)){if(!c)return!1;var l=P.statSync(s);if(l.isDirectory())return!1}var d=je.dirname(s);P.existsSync(d)||o(d);var h;try{h=P.openSync(s,"w",438)}catch{P.chmodSync(s,438),h=P.openSync(s,"w",438)}if(h)try{P.writeSync(h,a,0,a.length,0)}catch(p){throw p}finally{P.closeSync(h)}return P.chmodSync(s,u||438),!0},writeFileToAsync:function(s,a,c,u,l){typeof u=="function"&&(l=u,u=void 0),P.exists(s,function(d){if(d&&!c)return l(!1);P.stat(s,function(h,p){if(d&&p.isDirectory())return l(!1);var f=je.dirname(s);P.exists(f,function(y){y||o(f),P.open(s,"w",438,function(w,m){w?P.chmod(s,438,function(){P.open(s,"w",438,function(E,L){P.write(L,a,0,a.length,0,function(){P.close(L,function(){P.chmod(s,u||438,function(){l(!0)})})})})}):m?P.write(m,a,0,a.length,0,function(){P.close(m,function(){P.chmod(s,u||438,function(){l(!0)})})}):P.chmod(s,u||438,function(){l(!0)})})})})})},findFiles:function(s){return i(s,!0)},getAttributes:function(s){},setAttributes:function(s){},toBuffer:function(s){return Buffer.isBuffer(s)?s:s.length===0?Buffer.alloc(0):Buffer.alloc(s.length,s,"utf8")},Constants:t,Errors:r}}()});var bs=S((fd,Cs)=>{var At=Tt().require(),vs=require("path");At.existsSync=At.existsSync||vs.existsSync;Cs.exports=function(e){var t=e||"",r=0,n=i(),o=null;function i(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return t&&At.existsSync(t)?(o=At.statSync(t),n.directory=o.isDirectory(),n.mtime=o.mtime,n.atime=o.atime,n.executable=!!(1&parseInt((o.mode&parseInt("777",8)).toString(8)[0])),n.readonly=!!(2&parseInt((o.mode&parseInt("777",8)).toString(8)[0])),n.hidden=vs.basename(t)[0]==="."):console.warn("Invalid path: "+t),{get directory(){return n.directory},get readOnly(){return n.readonly},get hidden(){return n.hidden},get mtime(){return n.mtime},get atime(){return n.atime},get executable(){return n.executable},decodeAttributes:function(s){},encodeAttributes:function(s){},toString:function(){return`{
9
+ "path" : "`+t+`,
9
10
  "isDirectory" : `+n.directory+`,
10
11
  "isReadOnly" : `+n.readonly+`,
11
12
  "isHidden" : `+n.hidden+`,
12
13
  "isExecutable" : `+n.executable+`,
13
14
  "mTime" : `+n.mtime+`
14
15
  "aTime" : `+n.atime+`
15
- }`}}}});var We=S((If,Ve)=>{Ve.exports=Eo();Ve.exports.FileSystem=St();Ve.exports.Constants=rr();Ve.exports.Errors=nr();Ve.exports.FileAttr=xo()});var Co=S((Lf,vo)=>{var vt=We(),x=vt.Constants;vo.exports=function(){var t=10,e=10,r=0,n=0,o=0,i=0,s=0,a=0,c=0,f=0,l=0,d=0,m=0,p=0,u=0,y={};function E(h){h=new Date(h),o=(h.getFullYear()-1980&127)<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1}return E(+new Date),{get made(){return t},set made(h){t=h},get version(){return e},set version(h){e=h},get flags(){return r},set flags(h){r=h},get method(){return n},set method(h){n=h},get time(){return new Date((o>>25&127)+1980,(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(o&31)<<1)},set time(h){E(h)},get crc(){return i},set crc(h){i=h},get compressedSize(){return s},set compressedSize(h){s=h},get size(){return a},set size(h){a=h},get fileNameLength(){return c},set fileNameLength(h){c=h},get extraLength(){return f},set extraLength(h){f=h},get commentLength(){return l},set commentLength(h){l=h},get diskNumStart(){return d},set diskNumStart(h){d=h},get inAttr(){return m},set inAttr(h){m=h},get attr(){return p},set attr(h){p=h},get offset(){return u},set offset(h){u=h},get encripted(){return(r&1)===1},get entryHeaderSize(){return x.CENHDR+c+f+l},get realDataOffset(){return u+x.LOCHDR+y.fnameLen+y.extraLen},get dataHeader(){return y},loadDataHeaderFromBinary:function(h){var w=h.slice(u,u+x.LOCHDR);if(w.readUInt32LE(0)!==x.LOCSIG)throw vt.Errors.INVALID_LOC;y={version:w.readUInt16LE(x.LOCVER),flags:w.readUInt16LE(x.LOCFLG),method:w.readUInt16LE(x.LOCHOW),time:w.readUInt32LE(x.LOCTIM),crc:w.readUInt32LE(x.LOCCRC),compressedSize:w.readUInt32LE(x.LOCSIZ),size:w.readUInt32LE(x.LOCLEN),fnameLen:w.readUInt16LE(x.LOCNAM),extraLen:w.readUInt16LE(x.LOCEXT)}},loadFromBinary:function(h){if(h.length!==x.CENHDR||h.readUInt32LE(0)!==x.CENSIG)throw vt.Errors.INVALID_CEN;t=h.readUInt16LE(x.CENVEM),e=h.readUInt16LE(x.CENVER),r=h.readUInt16LE(x.CENFLG),n=h.readUInt16LE(x.CENHOW),o=h.readUInt32LE(x.CENTIM),i=h.readUInt32LE(x.CENCRC),s=h.readUInt32LE(x.CENSIZ),a=h.readUInt32LE(x.CENLEN),c=h.readUInt16LE(x.CENNAM),f=h.readUInt16LE(x.CENEXT),l=h.readUInt16LE(x.CENCOM),d=h.readUInt16LE(x.CENDSK),m=h.readUInt16LE(x.CENATT),p=h.readUInt32LE(x.CENATX),u=h.readUInt32LE(x.CENOFF)},dataHeaderToBinary:function(){var h=Buffer.alloc(x.LOCHDR);return h.writeUInt32LE(x.LOCSIG,0),h.writeUInt16LE(e,x.LOCVER),h.writeUInt16LE(r,x.LOCFLG),h.writeUInt16LE(n,x.LOCHOW),h.writeUInt32LE(o,x.LOCTIM),h.writeUInt32LE(i,x.LOCCRC),h.writeUInt32LE(s,x.LOCSIZ),h.writeUInt32LE(a,x.LOCLEN),h.writeUInt16LE(c,x.LOCNAM),h.writeUInt16LE(f,x.LOCEXT),h},entryHeaderToBinary:function(){var h=Buffer.alloc(x.CENHDR+c+f+l);return h.writeUInt32LE(x.CENSIG,0),h.writeUInt16LE(t,x.CENVEM),h.writeUInt16LE(e,x.CENVER),h.writeUInt16LE(r,x.CENFLG),h.writeUInt16LE(n,x.CENHOW),h.writeUInt32LE(o,x.CENTIM),h.writeUInt32LE(i,x.CENCRC),h.writeUInt32LE(s,x.CENSIZ),h.writeUInt32LE(a,x.CENLEN),h.writeUInt16LE(c,x.CENNAM),h.writeUInt16LE(f,x.CENEXT),h.writeUInt16LE(l,x.CENCOM),h.writeUInt16LE(d,x.CENDSK),h.writeUInt16LE(m,x.CENATT),h.writeUInt32LE(p,x.CENATX),h.writeUInt32LE(u,x.CENOFF),h.fill(0,x.CENHDR),h},toString:function(){return`{
16
- "made" : `+t+`,
17
- "version" : `+e+`,
16
+ }`}}}});var Ke=S((ld,Xe)=>{Xe.exports=xs();Xe.exports.FileSystem=Tt();Xe.exports.Constants=Ir();Xe.exports.Errors=Lr();Xe.exports.FileAttr=bs()});var Ds=S((dd,Ns)=>{var kt=Ke(),x=kt.Constants;Ns.exports=function(){var e=10,t=10,r=0,n=0,o=0,i=0,s=0,a=0,c=0,u=0,l=0,d=0,h=0,p=0,f=0,y={};function w(m){m=new Date(m),o=(m.getFullYear()-1980&127)<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1}return w(+new Date),{get made(){return e},set made(m){e=m},get version(){return t},set version(m){t=m},get flags(){return r},set flags(m){r=m},get method(){return n},set method(m){n=m},get time(){return new Date((o>>25&127)+1980,(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(o&31)<<1)},set time(m){w(m)},get crc(){return i},set crc(m){i=m},get compressedSize(){return s},set compressedSize(m){s=m},get size(){return a},set size(m){a=m},get fileNameLength(){return c},set fileNameLength(m){c=m},get extraLength(){return u},set extraLength(m){u=m},get commentLength(){return l},set commentLength(m){l=m},get diskNumStart(){return d},set diskNumStart(m){d=m},get inAttr(){return h},set inAttr(m){h=m},get attr(){return p},set attr(m){p=m},get offset(){return f},set offset(m){f=m},get encripted(){return(r&1)===1},get entryHeaderSize(){return x.CENHDR+c+u+l},get realDataOffset(){return f+x.LOCHDR+y.fnameLen+y.extraLen},get dataHeader(){return y},loadDataHeaderFromBinary:function(m){var E=m.slice(f,f+x.LOCHDR);if(E.readUInt32LE(0)!==x.LOCSIG)throw kt.Errors.INVALID_LOC;y={version:E.readUInt16LE(x.LOCVER),flags:E.readUInt16LE(x.LOCFLG),method:E.readUInt16LE(x.LOCHOW),time:E.readUInt32LE(x.LOCTIM),crc:E.readUInt32LE(x.LOCCRC),compressedSize:E.readUInt32LE(x.LOCSIZ),size:E.readUInt32LE(x.LOCLEN),fnameLen:E.readUInt16LE(x.LOCNAM),extraLen:E.readUInt16LE(x.LOCEXT)}},loadFromBinary:function(m){if(m.length!==x.CENHDR||m.readUInt32LE(0)!==x.CENSIG)throw kt.Errors.INVALID_CEN;e=m.readUInt16LE(x.CENVEM),t=m.readUInt16LE(x.CENVER),r=m.readUInt16LE(x.CENFLG),n=m.readUInt16LE(x.CENHOW),o=m.readUInt32LE(x.CENTIM),i=m.readUInt32LE(x.CENCRC),s=m.readUInt32LE(x.CENSIZ),a=m.readUInt32LE(x.CENLEN),c=m.readUInt16LE(x.CENNAM),u=m.readUInt16LE(x.CENEXT),l=m.readUInt16LE(x.CENCOM),d=m.readUInt16LE(x.CENDSK),h=m.readUInt16LE(x.CENATT),p=m.readUInt32LE(x.CENATX),f=m.readUInt32LE(x.CENOFF)},dataHeaderToBinary:function(){var m=Buffer.alloc(x.LOCHDR);return m.writeUInt32LE(x.LOCSIG,0),m.writeUInt16LE(t,x.LOCVER),m.writeUInt16LE(r,x.LOCFLG),m.writeUInt16LE(n,x.LOCHOW),m.writeUInt32LE(o,x.LOCTIM),m.writeUInt32LE(i,x.LOCCRC),m.writeUInt32LE(s,x.LOCSIZ),m.writeUInt32LE(a,x.LOCLEN),m.writeUInt16LE(c,x.LOCNAM),m.writeUInt16LE(u,x.LOCEXT),m},entryHeaderToBinary:function(){var m=Buffer.alloc(x.CENHDR+c+u+l);return m.writeUInt32LE(x.CENSIG,0),m.writeUInt16LE(e,x.CENVEM),m.writeUInt16LE(t,x.CENVER),m.writeUInt16LE(r,x.CENFLG),m.writeUInt16LE(n,x.CENHOW),m.writeUInt32LE(o,x.CENTIM),m.writeUInt32LE(i,x.CENCRC),m.writeUInt32LE(s,x.CENSIZ),m.writeUInt32LE(a,x.CENLEN),m.writeUInt16LE(c,x.CENNAM),m.writeUInt16LE(u,x.CENEXT),m.writeUInt16LE(l,x.CENCOM),m.writeUInt16LE(d,x.CENDSK),m.writeUInt16LE(h,x.CENATT),m.writeUInt32LE(p,x.CENATX),m.writeUInt32LE(f,x.CENOFF),m.fill(0,x.CENHDR),m},toString:function(){return`{
17
+ "made" : `+e+`,
18
+ "version" : `+t+`,
18
19
  "flags" : `+r+`,
19
- "method" : `+vt.methodToString(n)+`,
20
+ "method" : `+kt.methodToString(n)+`,
20
21
  "time" : `+this.time+`,
21
22
  "crc" : 0x`+i.toString(16).toUpperCase()+`,
22
23
  "compressedSize" : `+s+` bytes,
23
24
  "size" : `+a+` bytes,
24
25
  "fileNameLength" : `+c+`,
25
- "extraLength" : `+f+` bytes,
26
+ "extraLength" : `+u+` bytes,
26
27
  "commentLength" : `+l+` bytes,
27
28
  "diskNumStart" : `+d+`,
28
- "inAttr" : `+m+`,
29
+ "inAttr" : `+h+`,
29
30
  "attr" : `+p+`,
30
- "offset" : `+u+`,
31
- "entryHeaderSize" : `+(x.CENHDR+c+f+l)+` bytes
32
- }`}}}});var Do=S((_f,No)=>{var bo=We(),ne=bo.Constants;No.exports=function(){var t=0,e=0,r=0,n=0,o=0;return{get diskEntries(){return t},set diskEntries(i){t=e=i},get totalEntries(){return e},set totalEntries(i){e=t=i},get size(){return r},set size(i){r=i},get offset(){return n},set offset(i){n=i},get commentLength(){return o},set commentLength(i){o=i},get mainHeaderSize(){return ne.ENDHDR+o},loadFromBinary:function(i){if(i.length!==ne.ENDHDR||i.readUInt32LE(0)!==ne.ENDSIG)throw bo.Errors.INVALID_END;t=i.readUInt16LE(ne.ENDSUB),e=i.readUInt16LE(ne.ENDTOT),r=i.readUInt32LE(ne.ENDSIZ),n=i.readUInt32LE(ne.ENDOFF),o=i.readUInt16LE(ne.ENDCOM)},toBinary:function(){var i=Buffer.alloc(ne.ENDHDR+o);return i.writeUInt32LE(ne.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(t,ne.ENDSUB),i.writeUInt16LE(e,ne.ENDTOT),i.writeUInt32LE(r,ne.ENDSIZ),i.writeUInt32LE(n,ne.ENDOFF),i.writeUInt16LE(o,ne.ENDCOM),i.fill(" ",ne.ENDHDR),i},toString:function(){return`{
33
- "diskEntries" : `+t+`,
34
- "totalEntries" : `+e+`,
31
+ "offset" : `+f+`,
32
+ "entryHeaderSize" : `+(x.CENHDR+c+u+l)+` bytes
33
+ }`}}}});var Ls=S((md,Is)=>{var Os=Ke(),ie=Os.Constants;Is.exports=function(){var e=0,t=0,r=0,n=0,o=0;return{get diskEntries(){return e},set diskEntries(i){e=t=i},get totalEntries(){return t},set totalEntries(i){t=e=i},get size(){return r},set size(i){r=i},get offset(){return n},set offset(i){n=i},get commentLength(){return o},set commentLength(i){o=i},get mainHeaderSize(){return ie.ENDHDR+o},loadFromBinary:function(i){if(i.length!==ie.ENDHDR||i.readUInt32LE(0)!==ie.ENDSIG)throw Os.Errors.INVALID_END;e=i.readUInt16LE(ie.ENDSUB),t=i.readUInt16LE(ie.ENDTOT),r=i.readUInt32LE(ie.ENDSIZ),n=i.readUInt32LE(ie.ENDOFF),o=i.readUInt16LE(ie.ENDCOM)},toBinary:function(){var i=Buffer.alloc(ie.ENDHDR+o);return i.writeUInt32LE(ie.ENDSIG,0),i.writeUInt32LE(0,4),i.writeUInt16LE(e,ie.ENDSUB),i.writeUInt16LE(t,ie.ENDTOT),i.writeUInt32LE(r,ie.ENDSIZ),i.writeUInt32LE(n,ie.ENDOFF),i.writeUInt16LE(o,ie.ENDCOM),i.fill(" ",ie.ENDHDR),i},toString:function(){return`{
34
+ "diskEntries" : `+e+`,
35
+ "totalEntries" : `+t+`,
35
36
  "size" : `+r+` bytes,
36
37
  "offset" : 0x`+n.toString(16).toUpperCase()+`,
37
38
  "commentLength" : 0x`+o+`
38
- }`}}}});var or=S(ir=>{ir.EntryHeader=Co();ir.MainHeader=Do()});var Oo=S(()=>{});var _o=S((Af,Lo)=>{var Io=require("buffer").Buffer;function tu(t){var e=32768,r=Io.alloc(65536),n=0,o=null,i,s,a=0,c=0,f=-1,l=!1,d=0,m=0,p,u,y,E,h=0,w=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],L=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],B=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],me=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],j=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function pe(v,C,N,g,F,_){this.status=0,this.r=null,this.maxbit=0;var Y,Ne,k,z=[],Q=[],M=[],ye=[],Z={extra:0,bitcnt:0,lbase:0,next:null};k=this.r=null;for(var A=0;A<17;A++)Q[A]=0,M[A]=0,z[A]=0;for(A=0;A<288;A++)ye[A]=0;Y=C>256?v[256]:16;for(var de=-1;++de<C;)Q[v[de]]++;if(Q[0]!==C){for(var I=1;I<=16&&Q[I]===0;I++);var ve=I;for(A=16;A!==0&&Q[A]===0;A--);var nt=A;_<I&&(_=I);for(var Ge=1<<I;I<A;I++,Ge<<=1)if((Ge-=Q[I])<0){this.status=2,this.maxbit=_;return}if((Ge-=Q[A])<0){this.status=2,this.maxbit=_;return}Q[A]+=Ge,z[1]=I=0,de=1;for(var it=2;--A>0;)z[it++]=I+=Q[de++];de=0,A=0;do(I=v[de++])&&(ye[z[I]++]=A);while(++A<C);C=z[nt],z[0]=A=0,de=0;for(var te=-1,le=M[0]=0,Se=null,Fe=0,ze=[];ve<=nt;ve++)for(var It=Q[ve];It-- >0;){for(;ve>le+M[1+te];){if(le+=M[1+te],te++,Fe=(Fe=nt-le)>_?_:Fe,(Ne=1<<(I=ve-le))>It+1)for(Ne-=It+1,it=ve;++I<Fe&&!((Ne<<=1)<=Q[++it]);)Ne-=Q[it];for(le+I>Y&&le<Y&&(I=Y-le),Fe=1<<I,M[1+te]=I,Se=[];Se.length<Fe;)Se.push({extra:0,bitcnt:0,lbase:0,next:null});k==null?k=this.r={next:null,list:null}:k=k.next={next:null,list:null},k.next=null,k.list=Se,ze[te]=Se,te>0&&(z[te]=A,Z.bitcnt=M[te],Z.extra=16+I,Z.next=Se,I=(A&(1<<le)-1)>>le-M[te],ze[te-1][I].extra=Z.extra,ze[te-1][I].bitcnt=Z.bitcnt,ze[te-1][I].lbase=Z.lbase,ze[te-1][I].next=Z.next)}for(Z.bitcnt=ve-le,de>=C?Z.extra=99:ye[de]<N?(Z.extra=ye[de]<256?16:15,Z.lbase=ye[de++]):(Z.extra=F[ye[de]-N],Z.lbase=g[ye[de++]-N]),Ne=1<<ve-le,I=A>>le;I<Fe;I+=Ne)Se[I].extra=Z.extra,Se[I].bitcnt=Z.bitcnt,Se[I].lbase=Z.lbase,Se[I].next=Z.next;for(I=1<<ve-1;A&I;I>>=1)A^=I;for(A^=I;(A&(1<<le)-1)!==z[te];)le-=M[te],te--}this.maxbit=M[1],this.status=Ge!==0&&nt!==1?1:0}}function b(v){for(;c<v;)a|=t[h++]<<c,c+=8;return a}function O(v){return c-=v,a>>=v}function D(v){for(;c<v;)a|=t[h++]<<c,c+=8;var C=a&w[v];return a>>=v,c-=v,C}function P(v,C,N){var g,F;if(N===0)return 0;for(var _=0;;){for(F=p.list[b(y)&w[y]],g=F.extra;g>16;){if(g===99)return-1;O(F.bitcnt),g-=16,F=F.next[b(g)&w[g]],g=F.extra}if(O(F.bitcnt),g===16){if(n&=e-1,v[C+_++]=r[n++]=F.lbase,_===N)return N;continue}if(g===15)break;for(d=F.lbase+D(g),F=u.list[b(E)&w[E]],g=F.extra;g>16;){if(g===99)return-1;O(F.bitcnt),g-=16,F=F.next[b(g)&w[g]],g=F.extra}for(O(F.bitcnt),m=n-F.lbase-D(g);d>0&&_<N;)d--,m&=e-1,n&=e-1,v[C+_++]=r[n++]=r[m++];if(_===N)return N}return f=-1,_}function U(v,C,N){O(c&7);var g=D(16);if(g!==(~D(16)&65535))return-1;for(d=g,g=0;d>0&&g<N;)d--,n&=e-1,v[C+g++]=r[n++]=D(8);return d===0&&(f=-1),g}function $(v,C,N){var g=0;if(o==null){for(var F=[],_=0;_<144;_++)F[_]=8;for(;_<256;_++)F[_]=9;for(;_<280;_++)F[_]=7;for(;_<288;_++)F[_]=8;s=7;var Y=new pe(F,288,257,L,B,s);if(Y.status!==0)return-1;for(o=Y.r,s=Y.maxbit,_=0;_<30;_++)F[_]=5;if(g=5,Y=new pe(F,30,0,me,j,g),Y.status>1)return o=null,-1;i=Y.r,g=Y.maxbit}return p=o,u=i,y=s,E=g,P(v,C,N)}function T(v,C,N){for(var g=new Array(572),F=0;F<572;F++)g[F]=0;var _=257+D(5),Y=1+D(5),Ne=4+D(4);if(_>286||Y>30)return-1;for(var k=0;k<Ne;k++)g[ie[k]]=D(3);for(;k<19;k++)g[ie[k]]=0;y=7;var z=new pe(g,19,19,null,null,y);if(z.status!==0)return-1;p=z.r,y=z.maxbit;for(var Q=_+Y,M=0,ye=0;M<Q;){var Z=p.list[b(y)&w[y]];if(k=Z.bitcnt,O(k),k=Z.lbase,k<16)g[M++]=ye=k;else if(k===16){if(k=3+D(2),M+k>Q)return-1;for(;k-- >0;)g[M++]=ye}else if(k===17){if(k=3+D(3),M+k>Q)return-1;for(;k-- >0;)g[M++]=0;ye=0}else{if(k=11+D(7),M+k>Q)return-1;for(;k-- >0;)g[M++]=0;ye=0}}if(y=9,z=new pe(g,_,257,L,B,y),y===0&&(z.status=1),z.status!==0)return-1;for(p=z.r,y=z.maxbit,M=0;M<Y;M++)g[M]=g[M+_];return E=6,z=new pe(g,Y,0,me,j,E),u=z.r,E=z.maxbit,E===0&&_>257||z.status!==0?-1:P(v,C,N)}return{inflate:function(v){p=null;for(var C=v.length,N=0,g;N<C;){if(l&&f===-1)return;if(d>0){if(f!==0)for(;d>0&&N<C;)d--,m&=e-1,n&=e-1,v[N++]=r[n++]=r[m++];else{for(;d>0&&N<C;)d--,n&=e-1,v[N++]=r[n++]=D(8);d===0&&(f=-1)}if(N===C)return}if(f===-1){if(l)break;l=D(1)!==0,f=D(2),p=null,d=0}switch(f){case 0:g=U(v,N,C-N);break;case 1:g=p!=null?P(v,N,C-N):$(v,N,C-N);break;case 2:g=p!=null?P(v,N,C-N):T(v,N,C-N);break;default:g=-1;break}if(g===-1)return;N+=g}}}}Lo.exports=function(t){var e=require("zlib");return{inflateAsync:function(r){var n=e.createInflateRaw(),o=[],i=0;n.on("data",function(s){o.push(s),i+=s.length}),n.on("end",function(){var s=Io.alloc(i),a=0;s.fill(0);for(var c=0;c<o.length;c++){var f=o[c];f.copy(s,a),a+=f.length}r&&r(s)}),n.end(t)},inflate:function(r){var n={x:new tu(t)};n.x.inflate(r),delete n.x}}}});var Fo=S(sr=>{sr.Deflater=Oo();sr.Inflater=_o()});var ar=S((qf,ko)=>{var V=We(),ru=or(),he=V.Constants,To=Fo();ko.exports=function(t){var e=new ru.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),o=!1,i=null,s=Buffer.alloc(0);function a(){return!t||!Buffer.isBuffer(t)?Buffer.alloc(0):(e.loadDataHeaderFromBinary(t),t.slice(e.realDataOffset,e.realDataOffset+e.compressedSize))}function c(u){return!((e.flags&8)!==8&&V.crc32(u)!==e.crc)}function f(u,y,E){if(typeof y>"u"&&typeof u=="string"&&(E=u,u=void 0),o)return u&&y&&y(Buffer.alloc(0),V.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var h=a();if(h.length===0)return u&&y&&y(h,V.Errors.NO_DATA),h;var w=Buffer.alloc(e.size);switch(e.method){case V.Constants.STORED:return h.copy(w),c(w)?(u&&y&&y(w),w):(u&&y&&y(w,V.Errors.BAD_CRC),V.Errors.BAD_CRC);case V.Constants.DEFLATED:var L=new To.Inflater(h);if(u)L.inflateAsync(function(B){B.copy(w,0),c(w)?y&&y(w):y&&y(w,V.Errors.BAD_CRC)});else return L.inflate(w),c(w)||console.warn(V.Errors.BAD_CRC+" "+r.toString()),w;break;default:return u&&y&&y(Buffer.alloc(0),V.Errors.UNKNOWN_METHOD),V.Errors.UNKNOWN_METHOD}}function l(u,y){if((!i||!i.length)&&Buffer.isBuffer(t))return u&&y&&y(a()),a();if(i.length&&!o){var E;switch(e.method){case V.Constants.STORED:return e.compressedSize=e.size,E=Buffer.alloc(i.length),i.copy(E),u&&y&&y(E),E;default:case V.Constants.DEFLATED:var h=new To.Deflater(i);if(u)h.deflateAsync(function(L){E=Buffer.alloc(L.length),e.compressedSize=L.length,L.copy(E),y&&y(E)});else{var w=h.deflate();return e.compressedSize=w.length,w}h=null;break}}else if(u&&y)y(Buffer.alloc(0));else return Buffer.alloc(0)}function d(u,y){return(u.readUInt32LE(y+4)<<4)+u.readUInt32LE(y)}function m(u){for(var y=0,E,h,w;y<u.length;)E=u.readUInt16LE(y),y+=2,h=u.readUInt16LE(y),y+=2,w=u.slice(y,y+h),y+=h,he.ID_ZIP64===E&&p(w)}function p(u){var y,E,h,w;u.length>=he.EF_ZIP64_SCOMP&&(y=d(u,he.EF_ZIP64_SUNCOMP),e.size===he.EF_ZIP64_OR_32&&(e.size=y)),u.length>=he.EF_ZIP64_RHO&&(E=d(u,he.EF_ZIP64_SCOMP),e.compressedSize===he.EF_ZIP64_OR_32&&(e.compressedSize=E)),u.length>=he.EF_ZIP64_DSN&&(h=d(u,he.EF_ZIP64_RHO),e.offset===he.EF_ZIP64_OR_32&&(e.offset=h)),u.length>=he.EF_ZIP64_DSN+4&&(w=u.readUInt32LE(he.EF_ZIP64_DSN),e.diskNumStart===he.EF_ZIP64_OR_16&&(e.diskNumStart=w))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(u){r=V.toBuffer(u);var y=r[r.length-1];o=y===47||y===92,e.fileNameLength=r.length},get extra(){return s},set extra(u){s=u,e.extraLength=u.length,m(u)},get comment(){return n.toString()},set comment(u){n=V.toBuffer(u),e.commentLength=n.length},get name(){var u=r.toString();return o?u.substr(u.length-1).split("/").pop():u.split("/").pop()},get isDirectory(){return o},getCompressedData:function(){return l(!1,null)},getCompressedDataAsync:function(u){l(!0,u)},setData:function(u){i=V.toBuffer(u),!o&&i.length?(e.size=i.length,e.method=V.Constants.STORED,e.crc=V.crc32(u),e.changed=!0):e.method=V.Constants.STORED},getData:function(u){return e.changed?i:f(!1,null,u)},getDataAsync:function(u,y){e.changed?u(i):f(!0,u,y)},set attr(u){e.attr=u},get attr(){return e.attr},set header(u){e.loadFromBinary(u)},get header(){return e},packHeader:function(){var u=e.entryHeaderToBinary();return r.copy(u,V.Constants.CENHDR),e.extraLength&&s.copy(u,V.Constants.CENHDR+r.length),e.commentLength&&n.copy(u,V.Constants.CENHDR+r.length+e.extraLength,n.length),u},toString:function(){return`{
39
+ }`}}}});var _r=S(Fr=>{Fr.EntryHeader=Ds();Fr.MainHeader=Ls()});var Fs=S(()=>{});var As=S((gd,Ts)=>{var _s=require("buffer").Buffer;function Sf(e){var t=32768,r=_s.alloc(65536),n=0,o=null,i,s,a=0,c=0,u=-1,l=!1,d=0,h=0,p,f,y,w,m=0,E=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],L=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],B=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,99,99],pe=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],j=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],oe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function ye(v,C,N,g,T,F){this.status=0,this.r=null,this.maxbit=0;var Q,Oe,k,z=[],ee=[],M=[],ge=[],Z={extra:0,bitcnt:0,lbase:0,next:null};k=this.r=null;for(var R=0;R<17;R++)ee[R]=0,M[R]=0,z[R]=0;for(R=0;R<288;R++)ge[R]=0;Q=C>256?v[256]:16;for(var me=-1;++me<C;)ee[v[me]]++;if(ee[0]!==C){for(var I=1;I<=16&&ee[I]===0;I++);var be=I;for(R=16;R!==0&&ee[R]===0;R--);var dt=R;F<I&&(F=I);for(var Je=1<<I;I<R;I++,Je<<=1)if((Je-=ee[I])<0){this.status=2,this.maxbit=F;return}if((Je-=ee[R])<0){this.status=2,this.maxbit=F;return}ee[R]+=Je,z[1]=I=0,me=1;for(var mt=2;--R>0;)z[mt++]=I+=ee[me++];me=0,R=0;do(I=v[me++])&&(ge[z[I]++]=R);while(++R<C);C=z[dt],z[0]=R=0,me=0;for(var re=-1,de=M[0]=0,xe=null,Ae=0,Ye=[];be<=dt;be++)for(var $t=ee[be];$t-- >0;){for(;be>de+M[1+re];){if(de+=M[1+re],re++,Ae=(Ae=dt-de)>F?F:Ae,(Oe=1<<(I=be-de))>$t+1)for(Oe-=$t+1,mt=be;++I<Ae&&!((Oe<<=1)<=ee[++mt]);)Oe-=ee[mt];for(de+I>Q&&de<Q&&(I=Q-de),Ae=1<<I,M[1+re]=I,xe=[];xe.length<Ae;)xe.push({extra:0,bitcnt:0,lbase:0,next:null});k==null?k=this.r={next:null,list:null}:k=k.next={next:null,list:null},k.next=null,k.list=xe,Ye[re]=xe,re>0&&(z[re]=R,Z.bitcnt=M[re],Z.extra=16+I,Z.next=xe,I=(R&(1<<de)-1)>>de-M[re],Ye[re-1][I].extra=Z.extra,Ye[re-1][I].bitcnt=Z.bitcnt,Ye[re-1][I].lbase=Z.lbase,Ye[re-1][I].next=Z.next)}for(Z.bitcnt=be-de,me>=C?Z.extra=99:ge[me]<N?(Z.extra=ge[me]<256?16:15,Z.lbase=ge[me++]):(Z.extra=T[ge[me]-N],Z.lbase=g[ge[me++]-N]),Oe=1<<be-de,I=R>>de;I<Ae;I+=Oe)xe[I].extra=Z.extra,xe[I].bitcnt=Z.bitcnt,xe[I].lbase=Z.lbase,xe[I].next=Z.next;for(I=1<<be-1;R&I;I>>=1)R^=I;for(R^=I;(R&(1<<de)-1)!==z[re];)de-=M[re],re--}this.maxbit=M[1],this.status=Je!==0&&dt!==1?1:0}}function b(v){for(;c<v;)a|=e[m++]<<c,c+=8;return a}function O(v){return c-=v,a>>=v}function D(v){for(;c<v;)a|=e[m++]<<c,c+=8;var C=a&E[v];return a>>=v,c-=v,C}function q(v,C,N){var g,T;if(N===0)return 0;for(var F=0;;){for(T=p.list[b(y)&E[y]],g=T.extra;g>16;){if(g===99)return-1;O(T.bitcnt),g-=16,T=T.next[b(g)&E[g]],g=T.extra}if(O(T.bitcnt),g===16){if(n&=t-1,v[C+F++]=r[n++]=T.lbase,F===N)return N;continue}if(g===15)break;for(d=T.lbase+D(g),T=f.list[b(w)&E[w]],g=T.extra;g>16;){if(g===99)return-1;O(T.bitcnt),g-=16,T=T.next[b(g)&E[g]],g=T.extra}for(O(T.bitcnt),h=n-T.lbase-D(g);d>0&&F<N;)d--,h&=t-1,n&=t-1,v[C+F++]=r[n++]=r[h++];if(F===N)return N}return u=-1,F}function U(v,C,N){O(c&7);var g=D(16);if(g!==(~D(16)&65535))return-1;for(d=g,g=0;d>0&&g<N;)d--,n&=t-1,v[C+g++]=r[n++]=D(8);return d===0&&(u=-1),g}function $(v,C,N){var g=0;if(o==null){for(var T=[],F=0;F<144;F++)T[F]=8;for(;F<256;F++)T[F]=9;for(;F<280;F++)T[F]=7;for(;F<288;F++)T[F]=8;s=7;var Q=new ye(T,288,257,L,B,s);if(Q.status!==0)return-1;for(o=Q.r,s=Q.maxbit,F=0;F<30;F++)T[F]=5;if(g=5,Q=new ye(T,30,0,pe,j,g),Q.status>1)return o=null,-1;i=Q.r,g=Q.maxbit}return p=o,f=i,y=s,w=g,q(v,C,N)}function A(v,C,N){for(var g=new Array(572),T=0;T<572;T++)g[T]=0;var F=257+D(5),Q=1+D(5),Oe=4+D(4);if(F>286||Q>30)return-1;for(var k=0;k<Oe;k++)g[oe[k]]=D(3);for(;k<19;k++)g[oe[k]]=0;y=7;var z=new ye(g,19,19,null,null,y);if(z.status!==0)return-1;p=z.r,y=z.maxbit;for(var ee=F+Q,M=0,ge=0;M<ee;){var Z=p.list[b(y)&E[y]];if(k=Z.bitcnt,O(k),k=Z.lbase,k<16)g[M++]=ge=k;else if(k===16){if(k=3+D(2),M+k>ee)return-1;for(;k-- >0;)g[M++]=ge}else if(k===17){if(k=3+D(3),M+k>ee)return-1;for(;k-- >0;)g[M++]=0;ge=0}else{if(k=11+D(7),M+k>ee)return-1;for(;k-- >0;)g[M++]=0;ge=0}}if(y=9,z=new ye(g,F,257,L,B,y),y===0&&(z.status=1),z.status!==0)return-1;for(p=z.r,y=z.maxbit,M=0;M<Q;M++)g[M]=g[M+F];return w=6,z=new ye(g,Q,0,pe,j,w),f=z.r,w=z.maxbit,w===0&&F>257||z.status!==0?-1:q(v,C,N)}return{inflate:function(v){p=null;for(var C=v.length,N=0,g;N<C;){if(l&&u===-1)return;if(d>0){if(u!==0)for(;d>0&&N<C;)d--,h&=t-1,n&=t-1,v[N++]=r[n++]=r[h++];else{for(;d>0&&N<C;)d--,n&=t-1,v[N++]=r[n++]=D(8);d===0&&(u=-1)}if(N===C)return}if(u===-1){if(l)break;l=D(1)!==0,u=D(2),p=null,d=0}switch(u){case 0:g=U(v,N,C-N);break;case 1:g=p!=null?q(v,N,C-N):$(v,N,C-N);break;case 2:g=p!=null?q(v,N,C-N):A(v,N,C-N);break;default:g=-1;break}if(g===-1)return;N+=g}}}}Ts.exports=function(e){var t=require("zlib");return{inflateAsync:function(r){var n=t.createInflateRaw(),o=[],i=0;n.on("data",function(s){o.push(s),i+=s.length}),n.on("end",function(){var s=_s.alloc(i),a=0;s.fill(0);for(var c=0;c<o.length;c++){var u=o[c];u.copy(s,a),a+=u.length}r&&r(s)}),n.end(e)},inflate:function(r){var n={x:new Sf(e)};n.x.inflate(r),delete n.x}}}});var ks=S(Tr=>{Tr.Deflater=Fs();Tr.Inflater=As()});var Ar=S((Ed,Ps)=>{var W=Ke(),xf=_r(),he=W.Constants,Rs=ks();Ps.exports=function(e){var t=new xf.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),o=!1,i=null,s=Buffer.alloc(0);function a(){return!e||!Buffer.isBuffer(e)?Buffer.alloc(0):(t.loadDataHeaderFromBinary(e),e.slice(t.realDataOffset,t.realDataOffset+t.compressedSize))}function c(f){return!((t.flags&8)!==8&&W.crc32(f)!==t.crc)}function u(f,y,w){if(typeof y>"u"&&typeof f=="string"&&(w=f,f=void 0),o)return f&&y&&y(Buffer.alloc(0),W.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var m=a();if(m.length===0)return f&&y&&y(m,W.Errors.NO_DATA),m;var E=Buffer.alloc(t.size);switch(t.method){case W.Constants.STORED:return m.copy(E),c(E)?(f&&y&&y(E),E):(f&&y&&y(E,W.Errors.BAD_CRC),W.Errors.BAD_CRC);case W.Constants.DEFLATED:var L=new Rs.Inflater(m);if(f)L.inflateAsync(function(B){B.copy(E,0),c(E)?y&&y(E):y&&y(E,W.Errors.BAD_CRC)});else return L.inflate(E),c(E)||console.warn(W.Errors.BAD_CRC+" "+r.toString()),E;break;default:return f&&y&&y(Buffer.alloc(0),W.Errors.UNKNOWN_METHOD),W.Errors.UNKNOWN_METHOD}}function l(f,y){if((!i||!i.length)&&Buffer.isBuffer(e))return f&&y&&y(a()),a();if(i.length&&!o){var w;switch(t.method){case W.Constants.STORED:return t.compressedSize=t.size,w=Buffer.alloc(i.length),i.copy(w),f&&y&&y(w),w;default:case W.Constants.DEFLATED:var m=new Rs.Deflater(i);if(f)m.deflateAsync(function(L){w=Buffer.alloc(L.length),t.compressedSize=L.length,L.copy(w),y&&y(w)});else{var E=m.deflate();return t.compressedSize=E.length,E}m=null;break}}else if(f&&y)y(Buffer.alloc(0));else return Buffer.alloc(0)}function d(f,y){return(f.readUInt32LE(y+4)<<4)+f.readUInt32LE(y)}function h(f){for(var y=0,w,m,E;y<f.length;)w=f.readUInt16LE(y),y+=2,m=f.readUInt16LE(y),y+=2,E=f.slice(y,y+m),y+=m,he.ID_ZIP64===w&&p(E)}function p(f){var y,w,m,E;f.length>=he.EF_ZIP64_SCOMP&&(y=d(f,he.EF_ZIP64_SUNCOMP),t.size===he.EF_ZIP64_OR_32&&(t.size=y)),f.length>=he.EF_ZIP64_RHO&&(w=d(f,he.EF_ZIP64_SCOMP),t.compressedSize===he.EF_ZIP64_OR_32&&(t.compressedSize=w)),f.length>=he.EF_ZIP64_DSN&&(m=d(f,he.EF_ZIP64_RHO),t.offset===he.EF_ZIP64_OR_32&&(t.offset=m)),f.length>=he.EF_ZIP64_DSN+4&&(E=f.readUInt32LE(he.EF_ZIP64_DSN),t.diskNumStart===he.EF_ZIP64_OR_16&&(t.diskNumStart=E))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(f){r=W.toBuffer(f);var y=r[r.length-1];o=y===47||y===92,t.fileNameLength=r.length},get extra(){return s},set extra(f){s=f,t.extraLength=f.length,h(f)},get comment(){return n.toString()},set comment(f){n=W.toBuffer(f),t.commentLength=n.length},get name(){var f=r.toString();return o?f.substr(f.length-1).split("/").pop():f.split("/").pop()},get isDirectory(){return o},getCompressedData:function(){return l(!1,null)},getCompressedDataAsync:function(f){l(!0,f)},setData:function(f){i=W.toBuffer(f),!o&&i.length?(t.size=i.length,t.method=W.Constants.STORED,t.crc=W.crc32(f),t.changed=!0):t.method=W.Constants.STORED},getData:function(f){return t.changed?i:u(!1,null,f)},getDataAsync:function(f,y){t.changed?f(i):u(!0,f,y)},set attr(f){t.attr=f},get attr(){return t.attr},set header(f){t.loadFromBinary(f)},get header(){return t},packHeader:function(){var f=t.entryHeaderToBinary();return r.copy(f,W.Constants.CENHDR),t.extraLength&&s.copy(f,W.Constants.CENHDR+r.length),t.commentLength&&n.copy(f,W.Constants.CENHDR+r.length+t.extraLength,n.length),f},toString:function(){return`{
39
40
  "entryName" : "`+r.toString()+`",
40
41
  "name" : "`+(o?r.toString().replace(/\/$/,"").split("/").pop():r.toString().split("/").pop())+`",
41
42
  "comment" : "`+n.toString()+`",
42
43
  "isDirectory" : `+o+`,
43
- "header" : `+e.toString().replace(/\t/mg," ").replace(/}/mg," }")+`,
44
- "compressedData" : <`+(t&&t.length+" bytes buffer"||"null")+`>
44
+ "header" : `+t.toString().replace(/\t/mg," ").replace(/}/mg," }")+`,
45
+ "compressedData" : <`+(e&&e.length+" bytes buffer"||"null")+`>
45
46
  "data" : <`+(i&&i.length+" bytes buffer"||"null")+`>
46
- }`}}}});var Ro=S((Pf,Ao)=>{var nu=ar(),iu=or(),Ee=We();Ao.exports=function(t,e){var r=[],n={},o=Buffer.alloc(0),i="",s=Ee.FileSystem.require(),a=null,c=new iu.MainHeader;e===Ee.Constants.FILE?(i=t,a=s.readFileSync(i),l()):e===Ee.Constants.BUFFER&&(a=t,l());function f(){n={},r=new Array(c.diskEntries);for(var d=c.offset,m=0;m<r.length;m++){var p=d,u=new nu(a);u.header=a.slice(p,p+=Ee.Constants.CENHDR),u.entryName=a.slice(p,p+=u.header.fileNameLength),u.header.extraLength&&(u.extra=a.slice(p,p+=u.header.extraLength)),u.header.commentLength&&(u.comment=a.slice(p,p+u.header.commentLength)),d+=u.header.entryHeaderSize,r[m]=u,n[u.entryName]=u}}function l(){var d=a.length-Ee.Constants.ENDHDR,m=Math.max(0,d-65535),p=-1;for(d;d>=m;d--)if(a[d]===80&&a.readUInt32LE(d)===Ee.Constants.ENDSIG){p=d;break}if(!~p)throw Ee.Errors.INVALID_FORMAT;c.loadFromBinary(a.slice(p,p+Ee.Constants.ENDHDR)),c.commentLength&&(o=a.slice(p+Ee.Constants.ENDHDR)),f()}return{get entries(){return r},get comment(){return o.toString()},set comment(d){c.commentLength=d.length,o=d},getEntry:function(d){return n[d]||null},setEntry:function(d){r.push(d),n[d.entryName]=d,c.totalEntries=r.length},deleteEntry:function(d){var m=n[d];if(m&&m.isDirectory){var p=this;this.getEntryChildren(m).forEach(function(u){u.entryName!==d&&p.deleteEntry(u.entryName)})}r.splice(r.indexOf(m),1),delete n[d],c.totalEntries=r.length},getEntryChildren:function(d){if(d.isDirectory){var m=[],p=d.entryName,u=p.length;return r.forEach(function(y){y.entryName.substr(0,u)===p&&m.push(y)}),m}return[]},compressToBuffer:function(){r.length>1&&r.sort(function(h,w){var L=h.entryName.toLowerCase(),B=w.entryName.toLowerCase();return L<B?-1:L>B?1:0});var d=0,m=[],p=[],u=0;c.size=0,c.offset=0,r.forEach(function(h){var w=h.getCompressedData();h.header.offset=u;var L=h.header.dataHeaderToBinary(),B=h.entryName+h.extra.toString(),me=Buffer.alloc(B.length,B),j=L.length+me.length+w.length;u+=j,m.push(L),m.push(me),m.push(w);var ie=h.packHeader();p.push(ie),c.size+=ie.length,d+=j+ie.length}),d+=c.mainHeaderSize,c.offset=u,u=0;var y=Buffer.alloc(d);m.forEach(function(h){h.copy(y,u),u+=h.length}),p.forEach(function(h){h.copy(y,u),u+=h.length});var E=c.toBinary();return o&&o.copy(E,Ee.Constants.ENDHDR),E.copy(y,u),y},toAsyncBuffer:function(d,m,p,u){r.length>1&&r.sort(function(B,me){var j=B.entryName.toLowerCase(),ie=me.entryName.toLowerCase();return j>ie?-1:j<ie?1:0});var y=0,E=[],h=[],w=0;c.size=0,c.offset=0;var L=function(B){var me=arguments.callee;if(B.length){var j=B.pop(),ie=j.entryName+j.extra.toString();p&&p(ie),j.getCompressedDataAsync(function(pe){u&&u(ie),j.header.offset=w;var b=j.header.dataHeaderToBinary(),O=Buffer.alloc(ie),D=b.length+O.length+pe.length;w+=D,E.push(b),E.push(O),E.push(pe);var P=j.packHeader();if(h.push(P),c.size+=P.length,y+=D+P.length,B.length)me(B);else{y+=c.mainHeaderSize,c.offset=w,w=0;var U=Buffer.alloc(y);E.forEach(function(T){T.copy(U,w),w+=T.length}),h.forEach(function(T){T.copy(U,w),w+=T.length});var $=c.toBinary();o&&o.copy($,Ee.Constants.ENDHDR),$.copy(U,w),d(U)}})}};L(r)}}}});var Po=S((Bf,qo)=>{var W=We(),we=W.FileSystem.require(),fe=require("path");we.existsSync=we.existsSync||fe.existsSync;var ou=ar(),cr=Ro(),Uf=/^win/.test(process.platform);qo.exports=function(t){var e=void 0,r="";if(t&&typeof t=="string")if(we.existsSync(t))r=t,e=new cr(t,W.Constants.FILE);else throw W.Errors.INVALID_FILENAME;else t&&Buffer.isBuffer(t)?e=new cr(t,W.Constants.BUFFER):e=new cr(null,W.Constants.NONE);function n(i,s){i=fe.resolve(fe.normalize(i));for(var a=s.split("/"),c=0,f=a.length;c<f;c++){var l=fe.normalize(fe.join(i,a.slice(c,f).join(fe.sep)));if(l.indexOf(i)===0)return l}return fe.normalize(fe.join(i,fe.basename(s)))}function o(i){if(i&&e){var s;if(typeof i=="string"&&(s=e.getEntry(i)),typeof i=="object"&&typeof i.entryName<"u"&&typeof i.header<"u"&&(s=e.getEntry(i.entryName)),s)return s}return null}return{readFile:function(i){var s=o(i);return s&&s.getData()||null},readFileAsync:function(i,s){var a=o(i);a?a.getDataAsync(s):s(null,"getEntry failed for:"+i)},readAsText:function(i,s){var a=o(i);if(a){var c=a.getData();if(c&&c.length)return c.toString(s||"utf8")}return""},readAsTextAsync:function(i,s,a){var c=o(i);c?c.getDataAsync(function(f){f&&f.length?s(f.toString(a||"utf8")):s("")}):s("")},deleteFile:function(i){var s=o(i);s&&e.deleteEntry(s.entryName)},addZipComment:function(i){e.comment=i},getZipComment:function(){return e.comment||""},addZipEntryComment:function(i,s){var a=o(i);a&&(a.comment=s)},getZipEntryComment:function(i){var s=o(i);return s&&s.comment||""},updateFile:function(i,s){var a=o(i);a&&a.setData(s)},addLocalFile:function(i,s,a){if(we.existsSync(i)){s?(s=s.split("\\").join("/"),s.charAt(s.length-1)!=="/"&&(s+="/")):s="";var c=i.split("\\").join("/").split("/").pop();a?this.addFile(s+a,we.readFileSync(i),"",0):this.addFile(s+c,we.readFileSync(i),"",0)}else throw W.Errors.FILE_NOT_FOUND.replace("%s",i)},addLocalFolder:function(i,s,a){if(a===void 0?a=function(){return!0}:a instanceof RegExp&&(a=function(l){return function(d){return l.test(d)}}(a)),s?(s=s.split("\\").join("/"),s.charAt(s.length-1)!=="/"&&(s+="/")):s="",i=fe.normalize(i),i=i.split("\\").join("/"),i.charAt(i.length-1)!=="/"&&(i+="/"),we.existsSync(i)){var c=W.findFiles(i),f=this;c.length&&c.forEach(function(l){var d=l.split("\\").join("/").replace(new RegExp(i.replace(/(\(|\))/g,"\\$1"),"i"),"");a(d)&&(d.charAt(d.length-1)!=="/"?f.addFile(s+d,we.readFileSync(l),"",0):f.addFile(s+d,Buffer.alloc(0),"",0))})}else throw W.Errors.FILE_NOT_FOUND.replace("%s",i)},addFile:function(i,s,a,c){var f=new ou;f.entryName=i,f.comment=a||"",c||(f.isDirectory?c=16877<<16|16:c=420<<16),f.attr=c,f.setData(s),e.setEntry(f)},getEntries:function(){return e?e.entries:[]},getEntry:function(i){return o(i)},extractEntryTo:function(i,s,a,c){c=c||!1,a=typeof a>"u"?!0:a;var f=o(i);if(!f)throw W.Errors.NO_ENTRY;var l=f.entryName,d=n(s,a?l:fe.basename(l));if(f.isDirectory){d=fe.resolve(d,"..");var m=e.getEntryChildren(f);return m.forEach(function(u){if(!u.isDirectory){var y=u.getData();if(!y)throw W.Errors.CANT_EXTRACT_FILE;var E=n(s,a?u.entryName:fe.basename(u.entryName));W.writeFileTo(E,y,c)}}),!0}var p=f.getData();if(!p)throw W.Errors.CANT_EXTRACT_FILE;if(we.existsSync(d)&&!c)throw W.Errors.CANT_OVERRIDE;return W.writeFileTo(d,p,c),!0},test:function(){if(!e)return!1;for(var i in e.entries)try{if(i.isDirectory)continue;var s=e.entries[i].getData();if(!s)return!1}catch{return!1}return!0},extractAllTo:function(i,s){if(s=s||!1,!e)throw W.Errors.NO_ZIP;e.entries.forEach(function(a){var c=n(i,a.entryName.toString());if(a.isDirectory){W.makeDir(c);return}var f=a.getData();if(!f)throw W.Errors.CANT_EXTRACT_FILE;W.writeFileTo(c,f,s),we.utimesSync(c,a.header.time,a.header.time)})},extractAllToAsync:function(i,s,a){if(a||(a=function(){}),s=s||!1,!e){a(new Error(W.Errors.NO_ZIP));return}var c=e.entries,f=c.length;c.forEach(function(l){if(!(f<=0)){var d=fe.normalize(l.entryName.toString());if(l.isDirectory){W.makeDir(n(i,d)),--f===0&&a(void 0);return}l.getDataAsync(function(m){if(!(f<=0)){if(!m){f=0,a(new Error(W.Errors.CANT_EXTRACT_FILE));return}W.writeFileToAsync(n(i,d),m,s,function(p){if(we.utimesSync(fe.resolve(i,d),l.header.time,l.header.time),!(f<=0)){if(!p){f=0,a(new Error("Unable to write"));return}--f===0&&a(void 0)}})}})}})},writeZip:function(i,s){if(arguments.length===1&&typeof i=="function"&&(s=i,i=""),!i&&r&&(i=r),!!i){var a=e.compressToBuffer();if(a){var c=W.writeFileTo(i,a,!0);typeof s=="function"&&s(c?null:new Error("failed"),"")}}},toBuffer:function(i,s,a,c){return this.valueOf=2,typeof i=="function"?(e.toAsyncBuffer(i,s,a,c),null):e.compressToBuffer()}}}});var G=require("node:path"),Dt=require("node:child_process"),Ho=require("node:os"),J=Ae(ui());var di=require("events");function Vt(t){return t==null?[]:Array.isArray(t)?t:[t]}function dc(t,e,r,n){var o,i=t[e],s=~n.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((o=+r,o*0===0?o:r)),!!r):(o=+r,o*0===0?o:r);t[e]=i==null?s:Array.isArray(i)?i.concat(s):[i,s]}function hc(t,e){t=t||[],e=e||{};var r,n,o,i,s,a={_:[]},c=0,f=0,l=0,d=t.length;let m=e.alias!==void 0,p=e.unknown!==void 0,u=e.default!==void 0;if(e.alias=e.alias||{},e.string=Vt(e.string),e.boolean=Vt(e.boolean),m)for(r in e.alias)for(n=e.alias[r]=Vt(e.alias[r]),c=0;c<n.length;c++)(e.alias[n[c]]=n.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(n=e.alias[e.boolean[c]]||[],f=n.length;f-- >0;)e.boolean.push(n[f]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],f=n.length;f-- >0;)e.string.push(n[f]);if(u){for(r in e.default)if(i=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[i]!==void 0)for(e[i].push(r),c=0;c<n.length;c++)e[i].push(n[c])}let y=p?Object.keys(e.alias):[];for(c=0;c<d;c++){if(o=t[c],o==="--"){a._=a._.concat(t.slice(++c));break}for(f=0;f<o.length&&o.charCodeAt(f)===45;f++);if(f===0)a._.push(o);else if(o.substring(f,f+3)==="no-"){if(i=o.substring(f+3),p&&!~y.indexOf(i))return e.unknown(o);a[i]=!1}else{for(l=f+1;l<o.length&&o.charCodeAt(l)!==61;l++);for(i=o.substring(f,l),s=o.substring(++l)||c+1===d||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=f===2?[i]:i,l=0;l<n.length;l++){if(i=n[l],p&&!~y.indexOf(i))return e.unknown("-".repeat(f)+i);dc(a,i,l+1<n.length||s,e)}}}if(u)for(r in e.default)a[r]===void 0&&(a[r]=e.default[r]);if(m)for(r in a)for(n=e.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var hi=t=>t.replace(/[<[].+/,"").trim(),mc=t=>{let e=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],o=a=>{let c=!1,f=a[1];return f.startsWith("...")&&(f=f.slice(3),c=!0),{required:a[0].startsWith("<"),value:f,variadic:c}},i;for(;i=e.exec(t);)n.push(o(i));let s;for(;s=r.exec(t);)n.push(o(s));return n},pc=t=>{let e={alias:{},boolean:[]};for(let[r,n]of t.entries())n.names.length>1&&(e.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&t.some((i,s)=>s!==r&&i.names.some(a=>n.names.includes(a))&&typeof i.required=="boolean")||e.boolean.push(n.names[0]));return e},fi=t=>t.sort((e,r)=>e.length>r.length?-1:1)[0],li=(t,e)=>t.length>=e?t:`${t}${" ".repeat(e-t.length)}`,yc=t=>t.replace(/([a-z])-([a-z])/g,(e,r,n)=>r+n.toUpperCase()),gc=(t,e,r)=>{let n=0,o=e.length,i=t,s;for(;n<o;++n)s=i[e[n]],i=i[e[n]]=n===o-1?r:s??(~e[n+1].indexOf(".")||!(+e[n+1]>-1)?{}:[])},Ec=(t,e)=>{for(let r of Object.keys(e)){let n=e[r];n.shouldTransform&&(t[r]=Array.prototype.concat.call([],t[r]),typeof n.transformFunction=="function"&&(t[r]=t[r].map(n.transformFunction)))}},wc=t=>{let e=/([^\\\/]+)$/.exec(t);return e?e[1]:""},mi=t=>t.split(".").map((e,r)=>r===0?yc(e):e).join("."),et=class extends Error{constructor(e){super(e),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}},Wt=class{constructor(e,r,n){this.rawName=e,this.description=r,this.config=Object.assign({},n),e=e.replace(/\.\*/g,""),this.negated=!1,this.names=hi(e).split(",").map(o=>{let i=o.trim().replace(/^-{1,2}/,"");return i.startsWith("no-")&&(this.negated=!0,i=i.replace(/^no-/,"")),mi(i)}).sort((o,i)=>o.length>i.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),e.includes("<")?this.required=!0:e.includes("[")?this.required=!1:this.isBoolean=!0}},Sc=process.argv,xc=`${process.platform}-${process.arch} node-${process.version}`,yt=class{constructor(e,r,n={},o){this.rawName=e,this.description=r,this.config=n,this.cli=o,this.options=[],this.aliasNames=[],this.name=hi(e),this.args=mc(e),this.examples=[]}usage(e){return this.usageText=e,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(e,r="-v, --version"){return this.versionNumber=e,this.option(r,"Display version number"),this}example(e){return this.examples.push(e),this}option(e,r,n){let o=new Wt(e,r,n);return this.options.push(o),this}alias(e){return this.aliasNames.push(e),this}action(e){return this.commandAction=e,this}isMatched(e){return this.name===e||this.aliasNames.includes(e)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof gt}hasOption(e){return e=e.split(".")[0],this.options.find(r=>r.names.includes(e))}outputHelp(){let{name:e,commands:r}=this.cli,{versionNumber:n,options:o,helpCallback:i}=this.cli.globalCommand,s=[{body:`${e}${n?`/${n}`:""}`}];if(s.push({title:"Usage",body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let f=fi(r.map(l=>l.rawName));s.push({title:"Commands",body:r.map(l=>` ${li(l.rawName,f.length)} ${l.description}`).join(`
47
- `)}),s.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${e}${l.name===""?"":` ${l.name}`} --help`).join(`
48
- `)})}let c=this.isGlobalCommand?o:[...this.options,...o||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(f=>f.name!=="version")),c.length>0){let f=fi(c.map(l=>l.rawName));s.push({title:"Options",body:c.map(l=>` ${li(l.rawName,f.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
49
- `)})}this.examples.length>0&&s.push({title:"Examples",body:this.examples.map(f=>typeof f=="function"?f(e):f).join(`
50
- `)}),i&&(s=i(s)||s),console.log(s.map(f=>f.title?`${f.title}:
51
- ${f.body}`:f.body).join(`
47
+ }`}}}});var Us=S((Sd,qs)=>{var vf=Ar(),Cf=_r(),Ee=Ke();qs.exports=function(e,t){var r=[],n={},o=Buffer.alloc(0),i="",s=Ee.FileSystem.require(),a=null,c=new Cf.MainHeader;t===Ee.Constants.FILE?(i=e,a=s.readFileSync(i),l()):t===Ee.Constants.BUFFER&&(a=e,l());function u(){n={},r=new Array(c.diskEntries);for(var d=c.offset,h=0;h<r.length;h++){var p=d,f=new vf(a);f.header=a.slice(p,p+=Ee.Constants.CENHDR),f.entryName=a.slice(p,p+=f.header.fileNameLength),f.header.extraLength&&(f.extra=a.slice(p,p+=f.header.extraLength)),f.header.commentLength&&(f.comment=a.slice(p,p+f.header.commentLength)),d+=f.header.entryHeaderSize,r[h]=f,n[f.entryName]=f}}function l(){var d=a.length-Ee.Constants.ENDHDR,h=Math.max(0,d-65535),p=-1;for(d;d>=h;d--)if(a[d]===80&&a.readUInt32LE(d)===Ee.Constants.ENDSIG){p=d;break}if(!~p)throw Ee.Errors.INVALID_FORMAT;c.loadFromBinary(a.slice(p,p+Ee.Constants.ENDHDR)),c.commentLength&&(o=a.slice(p+Ee.Constants.ENDHDR)),u()}return{get entries(){return r},get comment(){return o.toString()},set comment(d){c.commentLength=d.length,o=d},getEntry:function(d){return n[d]||null},setEntry:function(d){r.push(d),n[d.entryName]=d,c.totalEntries=r.length},deleteEntry:function(d){var h=n[d];if(h&&h.isDirectory){var p=this;this.getEntryChildren(h).forEach(function(f){f.entryName!==d&&p.deleteEntry(f.entryName)})}r.splice(r.indexOf(h),1),delete n[d],c.totalEntries=r.length},getEntryChildren:function(d){if(d.isDirectory){var h=[],p=d.entryName,f=p.length;return r.forEach(function(y){y.entryName.substr(0,f)===p&&h.push(y)}),h}return[]},compressToBuffer:function(){r.length>1&&r.sort(function(m,E){var L=m.entryName.toLowerCase(),B=E.entryName.toLowerCase();return L<B?-1:L>B?1:0});var d=0,h=[],p=[],f=0;c.size=0,c.offset=0,r.forEach(function(m){var E=m.getCompressedData();m.header.offset=f;var L=m.header.dataHeaderToBinary(),B=m.entryName+m.extra.toString(),pe=Buffer.alloc(B.length,B),j=L.length+pe.length+E.length;f+=j,h.push(L),h.push(pe),h.push(E);var oe=m.packHeader();p.push(oe),c.size+=oe.length,d+=j+oe.length}),d+=c.mainHeaderSize,c.offset=f,f=0;var y=Buffer.alloc(d);h.forEach(function(m){m.copy(y,f),f+=m.length}),p.forEach(function(m){m.copy(y,f),f+=m.length});var w=c.toBinary();return o&&o.copy(w,Ee.Constants.ENDHDR),w.copy(y,f),y},toAsyncBuffer:function(d,h,p,f){r.length>1&&r.sort(function(B,pe){var j=B.entryName.toLowerCase(),oe=pe.entryName.toLowerCase();return j>oe?-1:j<oe?1:0});var y=0,w=[],m=[],E=0;c.size=0,c.offset=0;var L=function(B){var pe=arguments.callee;if(B.length){var j=B.pop(),oe=j.entryName+j.extra.toString();p&&p(oe),j.getCompressedDataAsync(function(ye){f&&f(oe),j.header.offset=E;var b=j.header.dataHeaderToBinary(),O=Buffer.alloc(oe),D=b.length+O.length+ye.length;E+=D,w.push(b),w.push(O),w.push(ye);var q=j.packHeader();if(m.push(q),c.size+=q.length,y+=D+q.length,B.length)pe(B);else{y+=c.mainHeaderSize,c.offset=E,E=0;var U=Buffer.alloc(y);w.forEach(function(A){A.copy(U,E),E+=A.length}),m.forEach(function(A){A.copy(U,E),E+=A.length});var $=c.toBinary();o&&o.copy($,Ee.Constants.ENDHDR),$.copy(U,E),d(U)}})}};L(r)}}}});var $s=S((vd,Bs)=>{var V=Ke(),Se=V.FileSystem.require(),le=require("path");Se.existsSync=Se.existsSync||le.existsSync;var bf=Ar(),kr=Us(),xd=/^win/.test(process.platform);Bs.exports=function(e){var t=void 0,r="";if(e&&typeof e=="string")if(Se.existsSync(e))r=e,t=new kr(e,V.Constants.FILE);else throw V.Errors.INVALID_FILENAME;else e&&Buffer.isBuffer(e)?t=new kr(e,V.Constants.BUFFER):t=new kr(null,V.Constants.NONE);function n(i,s){i=le.resolve(le.normalize(i));for(var a=s.split("/"),c=0,u=a.length;c<u;c++){var l=le.normalize(le.join(i,a.slice(c,u).join(le.sep)));if(l.indexOf(i)===0)return l}return le.normalize(le.join(i,le.basename(s)))}function o(i){if(i&&t){var s;if(typeof i=="string"&&(s=t.getEntry(i)),typeof i=="object"&&typeof i.entryName<"u"&&typeof i.header<"u"&&(s=t.getEntry(i.entryName)),s)return s}return null}return{readFile:function(i){var s=o(i);return s&&s.getData()||null},readFileAsync:function(i,s){var a=o(i);a?a.getDataAsync(s):s(null,"getEntry failed for:"+i)},readAsText:function(i,s){var a=o(i);if(a){var c=a.getData();if(c&&c.length)return c.toString(s||"utf8")}return""},readAsTextAsync:function(i,s,a){var c=o(i);c?c.getDataAsync(function(u){u&&u.length?s(u.toString(a||"utf8")):s("")}):s("")},deleteFile:function(i){var s=o(i);s&&t.deleteEntry(s.entryName)},addZipComment:function(i){t.comment=i},getZipComment:function(){return t.comment||""},addZipEntryComment:function(i,s){var a=o(i);a&&(a.comment=s)},getZipEntryComment:function(i){var s=o(i);return s&&s.comment||""},updateFile:function(i,s){var a=o(i);a&&a.setData(s)},addLocalFile:function(i,s,a){if(Se.existsSync(i)){s?(s=s.split("\\").join("/"),s.charAt(s.length-1)!=="/"&&(s+="/")):s="";var c=i.split("\\").join("/").split("/").pop();a?this.addFile(s+a,Se.readFileSync(i),"",0):this.addFile(s+c,Se.readFileSync(i),"",0)}else throw V.Errors.FILE_NOT_FOUND.replace("%s",i)},addLocalFolder:function(i,s,a){if(a===void 0?a=function(){return!0}:a instanceof RegExp&&(a=function(l){return function(d){return l.test(d)}}(a)),s?(s=s.split("\\").join("/"),s.charAt(s.length-1)!=="/"&&(s+="/")):s="",i=le.normalize(i),i=i.split("\\").join("/"),i.charAt(i.length-1)!=="/"&&(i+="/"),Se.existsSync(i)){var c=V.findFiles(i),u=this;c.length&&c.forEach(function(l){var d=l.split("\\").join("/").replace(new RegExp(i.replace(/(\(|\))/g,"\\$1"),"i"),"");a(d)&&(d.charAt(d.length-1)!=="/"?u.addFile(s+d,Se.readFileSync(l),"",0):u.addFile(s+d,Buffer.alloc(0),"",0))})}else throw V.Errors.FILE_NOT_FOUND.replace("%s",i)},addFile:function(i,s,a,c){var u=new bf;u.entryName=i,u.comment=a||"",c||(u.isDirectory?c=16877<<16|16:c=420<<16),u.attr=c,u.setData(s),t.setEntry(u)},getEntries:function(){return t?t.entries:[]},getEntry:function(i){return o(i)},extractEntryTo:function(i,s,a,c){c=c||!1,a=typeof a>"u"?!0:a;var u=o(i);if(!u)throw V.Errors.NO_ENTRY;var l=u.entryName,d=n(s,a?l:le.basename(l));if(u.isDirectory){d=le.resolve(d,"..");var h=t.getEntryChildren(u);return h.forEach(function(f){if(!f.isDirectory){var y=f.getData();if(!y)throw V.Errors.CANT_EXTRACT_FILE;var w=n(s,a?f.entryName:le.basename(f.entryName));V.writeFileTo(w,y,c)}}),!0}var p=u.getData();if(!p)throw V.Errors.CANT_EXTRACT_FILE;if(Se.existsSync(d)&&!c)throw V.Errors.CANT_OVERRIDE;return V.writeFileTo(d,p,c),!0},test:function(){if(!t)return!1;for(var i in t.entries)try{if(i.isDirectory)continue;var s=t.entries[i].getData();if(!s)return!1}catch{return!1}return!0},extractAllTo:function(i,s){if(s=s||!1,!t)throw V.Errors.NO_ZIP;t.entries.forEach(function(a){var c=n(i,a.entryName.toString());if(a.isDirectory){V.makeDir(c);return}var u=a.getData();if(!u)throw V.Errors.CANT_EXTRACT_FILE;V.writeFileTo(c,u,s),Se.utimesSync(c,a.header.time,a.header.time)})},extractAllToAsync:function(i,s,a){if(a||(a=function(){}),s=s||!1,!t){a(new Error(V.Errors.NO_ZIP));return}var c=t.entries,u=c.length;c.forEach(function(l){if(!(u<=0)){var d=le.normalize(l.entryName.toString());if(l.isDirectory){V.makeDir(n(i,d)),--u===0&&a(void 0);return}l.getDataAsync(function(h){if(!(u<=0)){if(!h){u=0,a(new Error(V.Errors.CANT_EXTRACT_FILE));return}V.writeFileToAsync(n(i,d),h,s,function(p){if(Se.utimesSync(le.resolve(i,d),l.header.time,l.header.time),!(u<=0)){if(!p){u=0,a(new Error("Unable to write"));return}--u===0&&a(void 0)}})}})}})},writeZip:function(i,s){if(arguments.length===1&&typeof i=="function"&&(s=i,i=""),!i&&r&&(i=r),!!i){var a=t.compressToBuffer();if(a){var c=V.writeFileTo(i,a,!0);typeof s=="function"&&s(c?null:new Error("failed"),"")}}},toBuffer:function(i,s,a,c){return this.valueOf=2,typeof i=="function"?(t.toAsyncBuffer(i,s,a,c),null):t.compressToBuffer()}}}});var G=require("node:path"),Ut=require("node:child_process"),Gs=require("node:os"),Y=X(Ri());var Ui=require("events");function tr(e){return e==null?[]:Array.isArray(e)?e:[e]}function yu(e,t,r,n){var o,i=e[t],s=~n.string.indexOf(t)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~n.boolean.indexOf(t)?r==="false"?!1:r==="true"||(e._.push((o=+r,o*0===0?o:r)),!!r):(o=+r,o*0===0?o:r);e[t]=i==null?s:Array.isArray(i)?i.concat(s):[i,s]}function gu(e,t){e=e||[],t=t||{};var r,n,o,i,s,a={_:[]},c=0,u=0,l=0,d=e.length;let h=t.alias!==void 0,p=t.unknown!==void 0,f=t.default!==void 0;if(t.alias=t.alias||{},t.string=tr(t.string),t.boolean=tr(t.boolean),h)for(r in t.alias)for(n=t.alias[r]=tr(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(f){for(r in t.default)if(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[i]!==void 0)for(t[i].push(r),c=0;c<n.length;c++)t[i].push(n[c])}let y=p?Object.keys(t.alias):[];for(c=0;c<d;c++){if(o=e[c],o==="--"){a._=a._.concat(e.slice(++c));break}for(u=0;u<o.length&&o.charCodeAt(u)===45;u++);if(u===0)a._.push(o);else if(o.substring(u,u+3)==="no-"){if(i=o.substring(u+3),p&&!~y.indexOf(i))return t.unknown(o);a[i]=!1}else{for(l=u+1;l<o.length&&o.charCodeAt(l)!==61;l++);for(i=o.substring(u,l),s=o.substring(++l)||c+1===d||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=u===2?[i]:i,l=0;l<n.length;l++){if(i=n[l],p&&!~y.indexOf(i))return t.unknown("-".repeat(u)+i);yu(a,i,l+1<n.length||s,t)}}}if(f)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(h)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Bi=e=>e.replace(/[<[].+/,"").trim(),wu=e=>{let t=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],o=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},i;for(;i=t.exec(e);)n.push(o(i));let s;for(;s=r.exec(e);)n.push(o(s));return n},Eu=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((i,s)=>s!==r&&i.names.some(a=>n.names.includes(a))&&typeof i.required=="boolean")||t.boolean.push(n.names[0]));return t},Pi=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],qi=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,Su=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),xu=(e,t,r)=>{let n=0,o=t.length,i=e,s;for(;n<o;++n)s=i[t[n]],i=i[t[n]]=n===o-1?r:s??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},vu=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},Cu=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},$i=e=>e.split(".").map((t,r)=>r===0?Su(t):t).join("."),st=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},rr=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Bi(t).split(",").map(o=>{let i=o.trim().replace(/^-{1,2}/,"");return i.startsWith("no-")&&(this.negated=!0,i=i.replace(/^no-/,"")),$i(i)}).sort((o,i)=>o.length>i.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},bu=process.argv,Nu=`${process.platform}-${process.arch} node-${process.version}`,Dt=class{constructor(t,r,n={},o){this.rawName=t,this.description=r,this.config=n,this.cli=o,this.options=[],this.aliasNames=[],this.name=Bi(t),this.args=wu(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let o=new rr(t,r,n);return this.options.push(o),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof Ot}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:o,helpCallback:i}=this.cli.globalCommand,s=[{body:`${t}${n?`/${n}`:""}`}];if(s.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=Pi(r.map(l=>l.rawName));s.push({title:"Commands",body:r.map(l=>` ${qi(l.rawName,u.length)} ${l.description}`).join(`
48
+ `)}),s.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${t}${l.name===""?"":` ${l.name}`} --help`).join(`
49
+ `)})}let c=this.isGlobalCommand?o:[...this.options,...o||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=Pi(c.map(l=>l.rawName));s.push({title:"Options",body:c.map(l=>` ${qi(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
50
+ `)})}this.examples.length>0&&s.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(t):u).join(`
51
+ `)}),i&&(s=i(s)||s),console.log(s.map(u=>u.title?`${u.title}:
52
+ ${u.body}`:u.body).join(`
52
53
 
53
- `))}outputVersion(){let{name:e}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${e}/${r} ${xc}`)}checkRequiredArgs(){let e=this.args.filter(r=>r.required).length;if(this.cli.args.length<e)throw new et(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:e,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(e))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new et(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:e,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let o of n){let i=e[o.name.split(".")[0]];if(o.required){let s=n.some(a=>a.negated&&a.names.includes(o.name));if(i===!0||i===!1&&!s)throw new et(`option \`${o.rawName}\` value is missing`)}}}},gt=class extends yt{constructor(e){super("@@global@@","",{},e)}},pt=Object.assign,Gt=class extends di.EventEmitter{constructor(e=""){super(),this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new gt(this),this.globalCommand.usage("<command> [options]")}usage(e){return this.globalCommand.usage(e),this}command(e,r,n){let o=new yt(e,r||"",n,this);return o.globalCommand=this.globalCommand,this.commands.push(o),o}option(e,r,n){return this.globalCommand.option(e,r,n),this}help(e){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=e,this.showHelpOnExit=!0,this}version(e,r="-v, --version"){return this.globalCommand.version(e,r),this.showVersionOnExit=!0,this}example(e){return this.globalCommand.example(e),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:e,options:r},n,o){return this.args=e,this.options=r,n&&(this.matchedCommand=n),o&&(this.matchedCommandName=o),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e=Sc,{run:r=!0}={}){this.rawArgs=e,this.name||(this.name=e[1]?wc(e[1]):"cli");let n=!0;for(let i of this.commands){let s=this.mri(e.slice(2),i),a=s.args[0];if(i.isMatched(a)){n=!1;let c=pt(pt({},s),{args:s.args.slice(1)});this.setParsedInfo(c,i,a),this.emit(`command:${a}`,i)}}if(n){for(let i of this.commands)if(i.name===""){n=!1;let s=this.mri(e.slice(2),i);this.setParsedInfo(s,i),this.emit("command:!",i)}}if(n){let i=this.mri(e.slice(2));this.setParsedInfo(i)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let o={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),o}mri(e,r){let n=[...this.globalCommand.options,...r?r.options:[]],o=pc(n),i=[],s=e.indexOf("--");s>-1&&(i=e.slice(s+1),e=e.slice(0,s));let a=hc(e,o);a=Object.keys(a).reduce((m,p)=>pt(pt({},m),{[mi(p)]:a[p]}),{_:[]});let c=a._,f={"--":i},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,d=Object.create(null);for(let m of n){if(!l&&m.config.default!==void 0)for(let p of m.names)f[p]=m.config.default;Array.isArray(m.config.type)&&d[m.name]===void 0&&(d[m.name]=Object.create(null),d[m.name].shouldTransform=!0,d[m.name].transformFunction=m.config.type[0])}for(let m of Object.keys(a))if(m!=="_"){let p=m.split(".");gc(f,p,a[m]),Ec(f,d)}return{args:c,options:f}}runMatchedCommand(){let{args:e,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let o=[];return n.args.forEach((i,s)=>{i.variadic?o.push(e.slice(s)):o.push(e[s])}),o.push(r),n.commandAction.apply(this,o)}},pi=(t="")=>new Gt(t);var q=Ae(Ei()),Vo=Ae(so()),Wo=Ae(ho()),su=!1,Ct="https",Go=!0,zo=__dirname,au=(0,G.join)(zo,"bin"),Ot=pi("wallaby"),Zo=require((0,G.join)(zo,"package.json")).version,hr=(0,G.join)((0,Ho.homedir)(),".wallaby"),_e=(0,G.join)(hr,"cli"),fr=(0,G.join)(_e,"downloads"),jo=(0,G.join)(hr,"key.lic"),Ko=(0,G.join)(_e,"wallaby.json"),lr=(0,G.join)(_e,"core.json"),Uo=()=>Ct+"://update.wallabyjs.com/",cu=10*60*1e3,bt,ur=0,tt,rt;Ot.command("[root]","start wallaby").option("--doNotOpen","do not open browser on startup").option("--smart","use smart (lazy) start to run tests of modified test files only: https://wallabyjs.com/docs/intro/smart-start.html").option("--config <path>","use config file: https://wallabyjs.com/docs/config/overview.html").option("--update","force Wallaby Core update to the latest version before starting").option("--useHttp","use http instead of https for downloading Wallaby dependencies").option("--useNonStrictSSL","do not use strict SSL for downloading Wallaby dependencies").option("--suppressExpirationNotifications","do not notify about license expiration").action(async(t,e)=>{pu(e),e.useHttp&&(Ct="http"),e.useNonStrictSSL&&(Go=!1),J.default.ensureDirSync(hr),J.default.ensureDirSync(_e),await Yo(e)});Ot.help();Ot.version(Zo);Ot.parse();function Xo(t){clearTimeout(bt),bt=setTimeout(async()=>{await Jo(t)},cu)}async function Jo(t){try{rt=await rs(t),rt?.updated&&(tt?.process.send({type:"coreUpdated",version:Nt(rt.path)}),ur=0)}catch{ur++}finally{ur<=3&&Xo(rt?.path||t)}}async function Yo(t){clearTimeout(bt),tt?.process.removeAllListeners(),tt?.process.kill();let{path:e,type:r}=rt||await fu();tt=uu(e,t),r==="dist"&&Xo(tt.path)}function uu(t,e){let r=["--cli=true","--lkp="+jo];e.smart&&r.push("--smartStart=true"),e.config&&r.push("--configPath="+(0,G.resolve)(e.config));let n=Nt((0,G.dirname)(t)),o=(0,Dt.fork)(t,r,{env:process.env,silent:!0});return e.printLinks=!0,o.on("message",i=>{switch(i?.type){case"uiStarted":e.port=i.port,mu(e,n);break;case"notification":hu(e,i.notification);break;case"restart":Yo(e);break;case"licenseChanged":clearTimeout(bt),Jo(t);break;case"stopped":break;default:break}}),o.on("exit",()=>{process.stdout.write(q.gray(`
54
- ${q.bold("WALLABY CORE")} stopped
55
- `))}),{process:o,path:t}}async function fu(t){if(su)return{path:require.resolve("../wallaby/server"),type:"dev"};let e=lu();return e?{path:e,type:"npm"}:{path:await du(t),type:"dist"}}function lu(){try{let t=require.resolve("@wallabyjs/core"),e=(0,G.join)(t,"server.js");if(J.default.existsSync(e))return e}catch{}}async function du(t){let e=ts(),r=await rs(e,{forceLatestVersion:t?.forceUpdate,useInstalledVersion:!0});if(!r)throw new Error("Could not resolve Wallaby Core");return(0,G.join)(r.path,"server.js")}function hu(t,e){if(!e.text)return;let r=[];if(~e.text.indexOf("expire")&&e.type==="warning"&&t.suppressExpirationNotifications)return;let n=`http://localhost:${t.port}`;~e.text.indexOf("activate-link")&&t.port&&r.push({title:"Enter License",url:n}),~e.text.indexOf("continue-trial-link")&&t.port&&r.push({title:"Continue Trial",url:n}),e.button&&r.push({title:e.button.label,url:e.button.link}),e.text=e.text.replace(/<br\/><br\/>/g," ").replace(/<br\/>/g," ").replace(/<a\s+(?:[^>]*?\s+)?href=['"]([^'"]*)['"]/g,(i,s)=>(s.startsWith("http")&&r.push({url:s}),i)).replace(/<[^>]*>/g,"");let o=e.type==="error"?q.red:e.type==="warning"?q.yellow:q.green;if(process.stdout.write(o(`
56
- \u2691 ${e.text}
54
+ `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${Nu}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new st(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new st(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let o of n){let i=t[o.name.split(".")[0]];if(o.required){let s=n.some(a=>a.negated&&a.names.includes(o.name));if(i===!0||i===!1&&!s)throw new st(`option \`${o.rawName}\` value is missing`)}}}},Ot=class extends Dt{constructor(t){super("@@global@@","",{},t)}},Nt=Object.assign,nr=class extends Ui.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new Ot(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let o=new Dt(t,r||"",n,this);return o.globalCommand=this.globalCommand,this.commands.push(o),o}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,o){return this.args=t,this.options=r,n&&(this.matchedCommand=n),o&&(this.matchedCommandName=o),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=bu,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?Cu(t[1]):"cli");let n=!0;for(let i of this.commands){let s=this.mri(t.slice(2),i),a=s.args[0];if(i.isMatched(a)){n=!1;let c=Nt(Nt({},s),{args:s.args.slice(1)});this.setParsedInfo(c,i,a),this.emit(`command:${a}`,i)}}if(n){for(let i of this.commands)if(i.name===""){n=!1;let s=this.mri(t.slice(2),i);this.setParsedInfo(s,i),this.emit("command:!",i)}}if(n){let i=this.mri(t.slice(2));this.setParsedInfo(i)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let o={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),o}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],o=Eu(n),i=[],s=t.indexOf("--");s>-1&&(i=t.slice(s+1),t=t.slice(0,s));let a=gu(t,o);a=Object.keys(a).reduce((h,p)=>Nt(Nt({},h),{[$i(p)]:a[p]}),{_:[]});let c=a._,u={"--":i},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,d=Object.create(null);for(let h of n){if(!l&&h.config.default!==void 0)for(let p of h.names)u[p]=h.config.default;Array.isArray(h.config.type)&&d[h.name]===void 0&&(d[h.name]=Object.create(null),d[h.name].shouldTransform=!0,d[h.name].transformFunction=h.config.type[0])}for(let h of Object.keys(a))if(h!=="_"){let p=h.split(".");xu(u,p,a[h]),vu(u,d)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let o=[];return n.args.forEach((i,s)=>{i.variadic?o.push(t.slice(s)):o.push(t[s])}),o.push(r),n.commandAction.apply(this,o)}},Mi=(e="")=>new nr(e);var _=X(Vi()),zs=X(Ao()),Zs=X(Bo());try{ys()}catch{}var Nf=!1,Rt="https",js=!0,Xs=__dirname,Df=(0,G.join)(Xs,"bin"),Bt=Mi("wallaby"),Ks=require((0,G.join)(Xs,"package.json")).version,Br=(0,G.join)((0,Gs.homedir)(),".wallaby"),Te=(0,G.join)(Br,"cli"),Pr=(0,G.join)(Te,"downloads"),Js=(0,G.join)(Br,"key.lic"),Ys=(0,G.join)(Te,"wallaby.json"),qr=(0,G.join)(Te,"core.json"),Ms=()=>Rt+"://update.wallabyjs.com/",Of=10*60*1e3,Pt,Rr=0,ft,lt;Bt.command("[root]","start wallaby").option("--doNotOpen","do not open browser on startup").option("--smart","use smart (lazy) start to run tests of modified test files only: https://wallabyjs.com/docs/intro/smart-start.html").option("--config <path>","use config file: https://wallabyjs.com/docs/config/overview.html").option("--update","force Wallaby Core update to the latest version before starting").option("--useHttp","use http instead of https for downloading Wallaby dependencies").option("--useNonStrictSSL","do not use strict SSL for downloading Wallaby dependencies").option("--suppressExpirationNotifications","do not notify about license expiration").action(async(e,t)=>{kf(t),t.useHttp&&(Rt="http"),t.useNonStrictSSL&&(js=!1),Y.default.ensureDirSync(Br),Y.default.ensureDirSync(Te),await ta(t)});Bt.help();Bt.version(Ks);Bt.parse();function Qs(e){clearTimeout(Pt),Pt=setTimeout(async()=>{await ea(e)},Of)}async function ea(e){try{lt=await oa(e),lt?.updated&&(ft?.process.send({type:"coreUpdated",version:qt(lt.path)}),Rr=0)}catch{Rr++}finally{Rr<=3&&Qs(lt?.path||e)}}async function ta(e){clearTimeout(Pt),ft?.process.removeAllListeners(),ft?.process.kill();let{path:t,type:r}=lt||await Lf({forceUpdate:e.update});ft=If(t,e),r==="dist"&&Qs(ft.path)}function If(e,t){let r=["--cli=true","--lkp="+Js];t.smart&&r.push("--smartStart=true"),t.config&&r.push("--configPath="+(0,G.resolve)(t.config));let n=qt((0,G.dirname)(e)),[,,o]=n.split(".");parseInt(o,10)<1608&&(process.stdout.write(_.red(`${_.bold("Wallaby Core")} v${n} is not supported.
55
+ `)),process.stdout.write(_.red(`Run with ${_.bold("--update")} flag to get the latest version of Wallaby Core.
56
+ `)),process.exit(1));let i=(0,Ut.fork)(e,r,{env:process.env,silent:!0});return t.printLinks=!0,i.on("message",s=>{switch(s?.type){case"uiStarted":t.port=s.port,Af(t,n);break;case"notification":Tf(t,s.notification);break;case"restart":ta(t);break;case"licenseChanged":clearTimeout(Pt),ea(e);break;case"stopped":break;default:break}}),i.on("exit",()=>{process.stdout.write(_.gray(`
57
+ ${_.bold("WALLABY CORE")} stopped
58
+ `))}),{process:i,path:e}}async function Lf(e){if(Nf)return{path:require.resolve("../wallaby/server"),type:"dev"};let t=Ff();return t?{path:t,type:"npm"}:{path:await _f(e),type:"dist"}}function Ff(){try{let e=require.resolve("@wallabyjs/core"),t=(0,G.join)(e,"server.js");if(Y.default.existsSync(t))return t}catch{}}async function _f(e){let t=ia(),r=await oa(t,{forceLatestVersion:e?.forceUpdate,useInstalledVersion:!0});if(!r)throw new Error("Could not resolve Wallaby Core");return(0,G.join)(r.path,"server.js")}function Tf(e,t){if(!t.text)return;let r=[];if(~t.text.indexOf("expire")&&t.type==="warning"&&e.suppressExpirationNotifications)return;let n=`http://localhost:${e.port}`;~t.text.indexOf("activate-link")&&e.port&&r.push({title:"Enter License",url:n}),~t.text.indexOf("continue-trial-link")&&e.port&&r.push({title:"Continue Trial",url:n}),t.button&&r.push({title:t.button.label,url:t.button.link}),t.text=t.text.replace(/<br\/><br\/>/g," ").replace(/<br\/>/g," ").replace(/<a\s+(?:[^>]*?\s+)?href=['"]([^'"]*)['"]/g,(i,s)=>(s.startsWith("http")&&r.push({url:s}),i)).replace(/<[^>]*>/g,"");let o=t.type==="error"?_.red:t.type==="warning"?_.yellow:_.green;if(process.stdout.write(o(`
59
+ \u2691 ${t.text}
57
60
 
58
- `)),r.length)for(let i of r)process.stdout.write(`${q.green(" \u279C ")}${q.bold(q.yellow(i.title?i.title+": ":""))}${q.cyan(i.url)}
59
- `)}function mu(t,e){let r=`http://localhost:${t.port}`;process.stdout.write(q.green(` ${q.bold("WALLABY CORE")} v${e}
60
- `)),t.printLinks&&(process.stdout.write(`${q.green(" \u279C ")}${q.bold(q.yellow("UI:"))} ${q.cyan(r)}
61
- `),process.stdout.write(`${q.green(" \u279C ")}${q.bold(q.dim("Docs:"))} ${q.cyan("https://wallabyjs.com/docs")}
62
- `)),t.doNotOpen||yu(r)}function pu(t){for(let[e,r]of Object.entries(t))Array.isArray(r)&&(t[e]=r[r.length-1])}function yu(t){let e=process.env.BROWSER||"";if(e.toLowerCase().endsWith(".js"))gu(e,t);else if(e.toLowerCase()!=="none"){let r=process.env.BROWSER_ARGS?process.env.BROWSER_ARGS.split(" "):[];Eu(e,r,t)}}function gu(t,e){let r=process.argv.slice(2);(0,Vo.default)(process.execPath,[t,...r,e],{stdio:"inherit"}).on("close",o=>{o!==0&&process.stdout.write(q.red(`
61
+ `)),r.length)for(let i of r)process.stdout.write(`${_.green(" \u279C ")}${_.bold(_.yellow(i.title?i.title+": ":""))}${_.cyan(i.url)}
62
+ `)}function Af(e,t){let r=`http://localhost:${e.port}`;process.stdout.write(_.green(` ${_.bold("WALLABY CORE")} v${t}
63
+ `)),e.printLinks&&(process.stdout.write(`${_.green(" \u279C ")}${_.bold(_.yellow("UI:"))} ${_.cyan(r)}
64
+ `),process.stdout.write(`${_.green(" \u279C ")}${_.bold(_.dim("Docs:"))} ${_.cyan("https://wallabyjs.com/docs")}
65
+ `)),e.doNotOpen||Rf(r)}function kf(e){for(let[t,r]of Object.entries(e))Array.isArray(r)&&(e[t]=r[r.length-1])}function Rf(e){let t=process.env.BROWSER||"";if(t.toLowerCase().endsWith(".js"))Pf(t,e);else if(t.toLowerCase()!=="none"){let r=process.env.BROWSER_ARGS?process.env.BROWSER_ARGS.split(" "):[];qf(t,r,e)}}function Pf(e,t){let r=process.argv.slice(2);(0,zs.default)(process.execPath,[e,...r,t],{stdio:"inherit"}).on("close",o=>{o!==0&&process.stdout.write(_.red(`
63
66
  The script specified as BROWSER environment variable failed.
64
67
 
65
- ${q.cyan(t)} exited with code ${o}.`))})}var Bo=["Google Chrome Canary","Google Chrome Dev","Google Chrome Beta","Google Chrome","Microsoft Edge","Brave Browser","Vivaldi","Chromium"];async function Eu(t,e,r){let n=t==="google chrome"?"Google Chrome":t;if(process.platform==="darwin"&&(!n||Bo.includes(n)))try{let i=await $o("ps cax"),s=n&&i.includes(n)?n:Bo.find(a=>i.includes(a));if(s)return await $o(`osascript openChrome.applescript "${encodeURI(r)}" "${s}"`,{cwd:au}),!0}catch{}process.platform==="darwin"&&t==="open"&&(t=void 0);try{let i=t?{app:{name:t,arguments:e}}:{};return new Promise(async(s,a)=>{let c=(await eval?.("import('open')")).default;c(r,i).then(f=>{f.on("error",a)}).catch(a)}).catch(s=>{process.stderr.write(s.stack||s.message)}),!0}catch{return!1}}function $o(t,e){return new Promise((r,n)=>{(0,Dt.exec)(t,e,(o,i)=>{o?n(o):r(i.toString())})})}function Qo(){try{let t=r=>r&&r.replace(/^\s+|\s+$/gm,""),e=J.default.readFileSync(jo).toString();if(e){let r=e.split(":");r.length===2&&(e=t(r[1]))}return Buffer.from(e,"base64").toString().split(`
66
- `)[2]}catch{}}function wu(){try{let[t,e,r]=Qo().split("/");return new Date(Date.UTC(parseInt(r,10),parseInt(e,10)-1,parseInt(t,10)))}catch{}}async function es(t,e){try{await J.default.remove(t)}catch(r){if(e)throw r;await es(t,!0)}}function ts(t,e){let r;if(!t)try{t=JSON.parse(J.default.readFileSync(lr).toString())}catch{}t||(t={});let n=wu()?.getTime(),o=Object.keys(t).map(a=>({id:a,folder:(0,G.join)(_e,"wallaby"+a),...t[a]})).sort((a,c)=>c.releaseDate-a.releaseDate),i=new Date().getTime()-1e3*1440*5;o.forEach(a=>{if(!J.default.existsSync(a.folder))e=!0,delete t[a.id];else if(a.invalidated&&Object.keys(a.expiry).length===0&&a.invalidated<i){e=!0,delete t[a.id];try{es(a.folder,!0)}catch{}}});let s=o.filter(a=>(!n||a.releaseDate<n)&&t[a.id]);if(s.length){if(n&&n<new Date().getTime()&&!t[s[0].id].expiry[n]){t[s[0].id].expiry[n]=!0;for(let c=1;c<s.length;c++)delete t[s[c].id].expiry[n];e=!0}let a=(s.find(c=>!c.invalidated)||s[0]).id;r=(0,G.join)(_e,"wallaby"+a)}return e&&J.default.writeFileSync(lr,JSON.stringify(t)),r}async function rs(t,e){let r=!1,n=t,o=e?.forceLatestVersion,i=e?.useInstalledVersion,s=Qo(),a=Uo(),c=m=>xu({name:"version",from:`${m}wallaby.json?${s?"expiry="+s.replace(/\//g,"-"):""}`,to:Ko}),f=o?!1:n&&J.default.existsSync(n),l=(0,G.join)(fr,"wallaby.zip");if(!f&&!o&&J.default.existsSync(l))try{n=await is(l),f=!!n&&J.default.existsSync(n),r=!0}catch{}let d;if(i&&f)d={core:f&&Nt(n)||"unknown"};else{let m=dr("Downloading version file");try{try{await c(Uo())}catch{a=`${Ct}://s3.amazonaws.com/wallaby-downloads/`,await c("http://update.wallabyjs.com/")}}finally{m()}d=Su()}if(!(f&&Nt(n)===d.core))try{n=await Mo({name:"core",from:`${a}wallaby-v${d.core}.zip`}),r=!0}catch{n=await Mo({name:"core",from:`${Ct}://s3.amazonaws.com/wallaby-downloads/wallaby-v${d.core}.zip`}),r=!0}return{path:n,updated:r,type:"dist"}}function Su(){let t=JSON.parse(J.default.readFileSync(Ko).toString()),e;return t.latestServer.forEach(r=>{r.substring(0,r.lastIndexOf("."))===Zo.substring(0,r.lastIndexOf("."))&&(e=r)}),{core:e}}function Nt(t){return JSON.parse(J.default.readFileSync((0,G.join)(t,"package.json")).toString()).version}async function Mo(t){let e=dr("Downloading core"),r=(0,G.join)(fr,"wallaby.zip");try{J.default.ensureDirSync(fr),await ns(t.from,t.name,r,2e6)}finally{e()}let n=dr("Extracting core");try{return await is(r)}catch(o){throw new Error(`Error while unzipping wallaby.js ${t.name} file: ${o.message}`)}finally{n()}}async function xu(t){return await ns(t.from,t.name,t.to)}function ns(t,e,r,n){let o=!1,i=()=>!o&&(o=!0),s="This may occur when you are behind proxy.";return new Promise(async(a,c)=>{try{let f=global.fetch,l={headers:{"User-Agent":"node "+process.version},agent:void 0};if(t.startsWith("https:")){let m=require("https");Go===!1&&(l.agent=new m.Agent({rejectUnauthorized:!1}))}let d=await f(t,l);if(!d.ok||d.status!==200)throw new Error(`Error while downloading wallaby.js ${e}, status code: ${d.status}. ${s}`);if(n&&d.headers.get("content-length")&&parseInt(d.headers.get("content-length"),10)<n)throw new Error(`Error while downloading wallaby.js ${e}, file is corrupt. ${s}`);{let m=await d.arrayBuffer();J.default.writeFileSync(r,Buffer.from(m)),i()&&a(r)}}catch(f){i()&&c(f)}})}async function is(t){let e=Po(),r=new e(t),n=new Date(r.getEntry("package.json").header.time);n.setMinutes(n.getMinutes()-n.getTimezoneOffset());let o=JSON.parse(r.readAsText("package.json")).version,[i,s,a]=o.split(".").map(m=>parseInt(m)),c=require("crypto");if(i>1||s>0||a>1091){let m=`-----BEGIN RSA PUBLIC KEY-----
68
+ ${_.cyan(e)} exited with code ${o}.`))})}var Hs=["Google Chrome Canary","Google Chrome Dev","Google Chrome Beta","Google Chrome","Microsoft Edge","Brave Browser","Vivaldi","Chromium"];async function qf(e,t,r){let n=e==="google chrome"?"Google Chrome":e;if(process.platform==="darwin"&&(!n||Hs.includes(n)))try{let i=await Ws("ps cax"),s=n&&i.includes(n)?n:Hs.find(a=>i.includes(a));if(s)return await Ws(`osascript openChrome.applescript "${encodeURI(r)}" "${s}"`,{cwd:Df}),!0}catch{}process.platform==="darwin"&&e==="open"&&(e=void 0);try{let i=e?{app:{name:e,arguments:t}}:{};return new Promise(async(s,a)=>{let c=(await eval?.("import('open')")).default;c(r,i).then(u=>{u.on("error",a)}).catch(a)}).catch(s=>{process.stderr.write(s.stack||s.message)}),!0}catch{return!1}}function Ws(e,t){return new Promise((r,n)=>{(0,Ut.exec)(e,t,(o,i)=>{o?n(o):r(i.toString())})})}function ra(){try{let e=r=>r&&r.replace(/^\s+|\s+$/gm,""),t=Y.default.readFileSync(Js).toString();if(t){let r=t.split(":");r.length===2&&(t=e(r[1]))}return Buffer.from(t,"base64").toString().split(`
69
+ `)[2]}catch{}}function Uf(){try{let[e,t,r]=ra().split("/");return new Date(Date.UTC(parseInt(r,10),parseInt(t,10)-1,parseInt(e,10)))}catch{}}async function na(e,t){try{await Y.default.remove(e)}catch(r){if(t)throw r;await na(e,!0)}}function ia(e,t){let r;if(!e)try{e=JSON.parse(Y.default.readFileSync(qr).toString())}catch{}e||(e={});let n=Uf()?.getTime(),o=Object.keys(e).map(a=>({id:a,folder:(0,G.join)(Te,"wallaby"+a),...e[a]})).sort((a,c)=>c.releaseDate-a.releaseDate),i=new Date().getTime()-1e3*1440*5;o.forEach(a=>{if(!Y.default.existsSync(a.folder))t=!0,delete e[a.id];else if(a.invalidated&&Object.keys(a.expiry).length===0&&a.invalidated<i){t=!0,delete e[a.id];try{na(a.folder,!0)}catch{}}});let s=o.filter(a=>(!n||a.releaseDate<n)&&e[a.id]);if(s.length){if(n&&n<new Date().getTime()&&!e[s[0].id].expiry[n]){e[s[0].id].expiry[n]=!0;for(let c=1;c<s.length;c++)delete e[s[c].id].expiry[n];t=!0}let a=(s.find(c=>!c.invalidated)||s[0]).id;r=(0,G.join)(Te,"wallaby"+a)}return t&&Y.default.writeFileSync(qr,JSON.stringify(e)),r}async function oa(e,t){let r=!1,n=e,o=t?.forceLatestVersion,i=t?.useInstalledVersion,s=ra(),a=Ms(),c=h=>$f({name:"version",from:`${h}wallaby.json?${s?"expiry="+s.replace(/\//g,"-"):""}`,to:Ys}),u=o?!1:n&&Y.default.existsSync(n),l=(0,G.join)(Pr,"wallaby.zip");if(!u&&!o&&Y.default.existsSync(l))try{n=await aa(l),u=!!n&&Y.default.existsSync(n),r=!0}catch{}let d;if(i&&u)d={core:u&&qt(n)||"unknown"};else{let h=Ur("Downloading version file");try{try{await c(Ms())}catch{a=`${Rt}://s3.amazonaws.com/wallaby-downloads/`,await c("http://update.wallabyjs.com/")}}finally{h()}d=Bf()}if(!(u&&qt(n)===d.core))try{n=await Vs({name:"core",from:`${a}wallaby-v${d.core}.zip`}),r=!0}catch{n=await Vs({name:"core",from:`${Rt}://s3.amazonaws.com/wallaby-downloads/wallaby-v${d.core}.zip`}),r=!0}return{path:n,updated:r,type:"dist"}}function Bf(){let e=JSON.parse(Y.default.readFileSync(Ys).toString()),t;return e.latestServer.forEach(r=>{r.substring(0,r.lastIndexOf("."))===Ks.substring(0,r.lastIndexOf("."))&&(t=r)}),{core:t}}function qt(e){return JSON.parse(Y.default.readFileSync((0,G.join)(e,"package.json")).toString()).version}async function Vs(e){let t=Ur("Downloading core"),r=(0,G.join)(Pr,"wallaby.zip");try{Y.default.ensureDirSync(Pr),await sa(e.from,e.name,r,2e6)}finally{t()}let n=Ur("Extracting core");try{return await aa(r)}catch(o){throw new Error(`Error while unzipping wallaby.js ${e.name} file: ${o.message}`)}finally{n()}}async function $f(e){return await sa(e.from,e.name,e.to)}function sa(e,t,r,n){let o=!1,i=()=>!o&&(o=!0),s="This may occur when you are behind proxy.";return new Promise(async(a,c)=>{try{let u=global.fetch,l={headers:{"User-Agent":"node "+process.version},agent:void 0};if(e.startsWith("https:")){let h=require("https");js===!1&&(l.agent=new h.Agent({rejectUnauthorized:!1}))}let d=await u(e,l);if(!d.ok||d.status!==200)throw new Error(`Error while downloading wallaby.js ${t}, status code: ${d.status}. ${s}`);if(n&&d.headers.get("content-length")&&parseInt(d.headers.get("content-length"),10)<n)throw new Error(`Error while downloading wallaby.js ${t}, file is corrupt. ${s}`);{let h=await d.arrayBuffer();Y.default.writeFileSync(r,Buffer.from(h)),i()&&a(r)}}catch(u){i()&&c(u)}})}async function aa(e){let t=$s(),r=new t(e),n=new Date(r.getEntry("package.json").header.time);n.setMinutes(n.getMinutes()-n.getTimezoneOffset());let o=JSON.parse(r.readAsText("package.json")).version,[i,s,a]=o.split(".").map(h=>parseInt(h)),c=require("crypto");if(i>1||s>0||a>1091){let h=`-----BEGIN RSA PUBLIC KEY-----
67
70
  MIIBCgKCAQEAngwMnSkF1zlHJggr7kXXO02ytYIlzMdvQxHu6hli+TFIeO72HNfK
68
71
  P27g+f8EtlPRB0UwnpAHtkJHNCdwpo04eU8hS8g9vbmNf00luUJGuUHnf62Pp0EI
69
72
  KbGKJvzkdPgfs62MItfi4uf+XiHa8rN0Bk7hRbddI1zA4Wupf/E0wZ7UorgCE9XB
70
73
  EM6VULphGdHorpmHBW5deeCHIledtMOpOfDSM5lvjiqgVqmjNYT+WXCwjN8yCcyU
71
74
  oedY3afSHTyqiuInKcpXd+VJQb2+d7y583Pb3+kDGraBMGFJaWGewm7+IYIlgk5C
72
75
  uk54FsjCvwvaa0SKr2rkIBKuyFX3ZGymyQIDAQAB
73
- -----END RSA PUBLIC KEY-----`,p=r.getEntries();p.sort((E,h)=>E.entryName.localeCompare(h.entryName));let u=r.readAsText("signature.txt"),y=c.createVerify("RSA-SHA512");if(p.forEach(E=>{E.entryName!=="signature.txt"&&y.update(E.getData())}),!y.verify(m,Buffer.from(u,"base64")))throw new Error("could not verify core version")}let l=c.randomBytes(3).toString("hex");for(;J.default.existsSync((0,G.join)(_e,"wallaby"+l));)l=c.randomBytes(3).toString("hex");let d=(0,G.join)(_e,"wallaby"+l);return await new Promise((m,p)=>{r.extractAllToAsync(d,!0,u=>{u?p(u):m(void 0)})}),vu(l,n.getTime())}function vu(t,e){let r;try{r=JSON.parse(J.default.readFileSync(lr).toString());let n=new Date().getTime();Object.keys(r).forEach(o=>{!r[o].invalidated&&r[o].releaseDate<=e&&(r[o].invalidated=n)})}catch{r={}}return r[t]={releaseDate:e,invalidated:!1,expiry:{}},ts(r,!0)}function dr(t){var e=new Wo.Spinner;return e.setSpinnerString(4),e.setSpinnerDelay(250),e.setSpinnerTitle(` ${q.green("%s")} ${t}`),e.start(),()=>e.stop(!0)}
76
+ -----END RSA PUBLIC KEY-----`,p=r.getEntries();p.sort((w,m)=>w.entryName.localeCompare(m.entryName));let f=r.readAsText("signature.txt"),y=c.createVerify("RSA-SHA512");if(p.forEach(w=>{w.entryName!=="signature.txt"&&y.update(w.getData())}),!y.verify(h,Buffer.from(f,"base64")))throw new Error("could not verify core version")}let l=c.randomBytes(3).toString("hex");for(;Y.default.existsSync((0,G.join)(Te,"wallaby"+l));)l=c.randomBytes(3).toString("hex");let d=(0,G.join)(Te,"wallaby"+l);return await new Promise((h,p)=>{r.extractAllToAsync(d,!0,f=>{f?p(f):h(void 0)})}),Mf(l,n.getTime())}function Mf(e,t){let r;try{r=JSON.parse(Y.default.readFileSync(qr).toString());let n=new Date().getTime();Object.keys(r).forEach(o=>{!r[o].invalidated&&r[o].releaseDate<=t&&(r[o].invalidated=n)})}catch{r={}}return r[e]={releaseDate:t,invalidated:!1,expiry:{}},ia(r,!0)}function Ur(e){var t=new Zs.Spinner;return t.setSpinnerString(4),t.setSpinnerDelay(250),t.setSpinnerTitle(` ${_.green("%s")} ${e}`),t.start(),()=>t.stop(!0)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallabyjs/cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "./index.js",
5
5
  "description": "Wallaby CLI",
6
6
  "homepage": "https://wallabyjs.com",