@wallabyjs/cli 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +47 -47
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
var
|
|
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;
|
|
1
|
+
var Ku=Object.create;var qt=Object.defineProperty;var Ju=Object.getOwnPropertyDescriptor;var Qu=Object.getOwnPropertyNames;var el=Object.getPrototypeOf,tl=Object.prototype.hasOwnProperty;var Ae=(t,e)=>()=>(t&&(e=t(t=0)),e);var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rl=(t,e)=>{for(var r in e)qt(t,r,{get:e[r],enumerable:!0})},Mn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qu(e))!tl.call(t,i)&&i!==r&&qt(t,i,{get:()=>e[i],enumerable:!(n=Ju(e,i))||n.enumerable});return t};var Q=(t,e,r)=>(r=t!=null?Ku(el(t)):{},Mn(e||!t||!t.__esModule?qt(r,"default",{value:t,enumerable:!0}):r,t)),nl=t=>Mn(qt({},"__esModule",{value:!0}),t);var te=y(vr=>{"use strict";vr.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((i,s)=>i!=null?n(i):r(s)),t.apply(this,e)})},"name",{value:t.name})};vr.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 Gn=y((DE,Hn)=>{var Be=require("constants"),il=process.cwd,_t=null,sl=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return _t||(_t=il.call(process)),_t};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Cr=process.chdir,process.chdir=function(t){_t=null,Cr.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Cr));var Cr;Hn.exports=ol;function ol(t){Be.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(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,f,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(l,f,m,d){d&&process.nextTick(d)},t.lchownSync=function(){}),sl==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(l){function f(m,d,h){var E=Date.now(),w=0;l(m,d,function p(S){if(S&&(S.code==="EACCES"||S.code==="EPERM"||S.code==="EBUSY")&&Date.now()-E<6e4){setTimeout(function(){t.stat(d,function(A,V){A&&A.code==="ENOENT"?l(m,d,p):h(S)})},w),w<100&&(w+=10);return}h&&h(S)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,l),f}(t.rename)),t.read=typeof t.read!="function"?t.read:function(l){function f(m,d,h,E,w,p){var S;if(p&&typeof p=="function"){var A=0;S=function(V,Ce,ee){if(V&&V.code==="EAGAIN"&&A<10)return A++,l.call(t,m,d,h,E,w,S);p.apply(this,arguments)}}return l.call(t,m,d,h,E,w,S)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,l),f}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(l){return function(f,m,d,h,E){for(var w=0;;)try{return l.call(t,f,m,d,h,E)}catch(p){if(p.code==="EAGAIN"&&w<10){w++;continue}throw p}}}(t.readSync);function e(l){l.lchmod=function(f,m,d){l.open(f,Be.O_WRONLY|Be.O_SYMLINK,m,function(h,E){if(h){d&&d(h);return}l.fchmod(E,m,function(w){l.close(E,function(p){d&&d(w||p)})})})},l.lchmodSync=function(f,m){var d=l.openSync(f,Be.O_WRONLY|Be.O_SYMLINK,m),h=!0,E;try{E=l.fchmodSync(d,m),h=!1}finally{if(h)try{l.closeSync(d)}catch{}else l.closeSync(d)}return E}}function r(l){Be.hasOwnProperty("O_SYMLINK")&&l.futimes?(l.lutimes=function(f,m,d,h){l.open(f,Be.O_SYMLINK,function(E,w){if(E){h&&h(E);return}l.futimes(w,m,d,function(p){l.close(w,function(S){h&&h(p||S)})})})},l.lutimesSync=function(f,m,d){var h=l.openSync(f,Be.O_SYMLINK),E,w=!0;try{E=l.futimesSync(h,m,d),w=!1}finally{if(w)try{l.closeSync(h)}catch{}else l.closeSync(h)}return E}):l.futimes&&(l.lutimes=function(f,m,d,h){h&&process.nextTick(h)},l.lutimesSync=function(){})}function n(l){return l&&function(f,m,d){return l.call(t,f,m,function(h){u(h)&&(h=null),d&&d.apply(this,arguments)})}}function i(l){return l&&function(f,m){try{return l.call(t,f,m)}catch(d){if(!u(d))throw d}}}function s(l){return l&&function(f,m,d,h){return l.call(t,f,m,d,function(E){u(E)&&(E=null),h&&h.apply(this,arguments)})}}function o(l){return l&&function(f,m,d){try{return l.call(t,f,m,d)}catch(h){if(!u(h))throw h}}}function a(l){return l&&function(f,m,d){typeof m=="function"&&(d=m,m=null);function h(E,w){w&&(w.uid<0&&(w.uid+=4294967296),w.gid<0&&(w.gid+=4294967296)),d&&d.apply(this,arguments)}return m?l.call(t,f,m,h):l.call(t,f,h)}}function c(l){return l&&function(f,m){var d=m?l.call(t,f,m):l.call(t,f);return d&&(d.uid<0&&(d.uid+=4294967296),d.gid<0&&(d.gid+=4294967296)),d}}function u(l){if(!l||l.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(l.code==="EINVAL"||l.code==="EPERM"))}}});var jn=y((RE,Wn)=>{var Vn=require("stream").Stream;Wn.exports=al;function al(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);Vn.call(this);var s=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var o=Object.keys(i),a=0,c=o.length;a<c;a++){var u=o[a];this[u]=i[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(){s._read()});return}t.open(this.path,this.flags,this.mode,function(l,f){if(l){s.emit("error",l),s.readable=!1;return}s.fd=f,s.emit("open",f),s._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);Vn.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),o=0,a=s.length;o<a;o++){var c=s[o];this[c]=i[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 zn=y((bE,Xn)=>{"use strict";Xn.exports=ul;var cl=Object.getPrototypeOf||function(t){return t.__proto__};function ul(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:cl(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var Je=y((TE,Or)=>{var X=require("fs"),ll=Gn(),fl=jn(),hl=zn(),Pt=require("util"),se,Ut;typeof Symbol=="function"&&typeof Symbol.for=="function"?(se=Symbol.for("graceful-fs.queue"),Ut=Symbol.for("graceful-fs.previous")):(se="___graceful-fs.queue",Ut="___graceful-fs.previous");function dl(){}function Kn(t,e){Object.defineProperty(t,se,{get:function(){return e}})}var We=dl;Pt.debuglog?We=Pt.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(We=function(){var t=Pt.format.apply(Pt,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(t)});X[se]||(Zn=global[se]||[],Kn(X,Zn),X.close=function(t){function e(r,n){return t.call(X,r,function(i){i||Yn(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Ut,{value:t}),e}(X.close),X.closeSync=function(t){function e(r){t.apply(X,arguments),Yn()}return Object.defineProperty(e,Ut,{value:t}),e}(X.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){We(X[se]),require("assert").equal(X[se].length,0)}));var Zn;global[se]||Kn(global,X[se]);Or.exports=Ir(hl(X));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!X.__patched&&(Or.exports=Ir(X),X.__patched=!0);function Ir(t){ll(t),t.gracefulify=Ir,t.createReadStream=Ce,t.createWriteStream=ee;var e=t.readFile;t.readFile=r;function r(O,b,D){return typeof b=="function"&&(D=b,b=null),B(O,b,D);function B(G,W,_,I){return e(G,W,function(N){N&&(N.code==="EMFILE"||N.code==="ENFILE")?Ke([B,[G,W,_],N,I||Date.now(),Date.now()]):typeof _=="function"&&_.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(O,b,D,B){return typeof D=="function"&&(B=D,D=null),G(O,b,D,B);function G(W,_,I,N,L){return n(W,_,I,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Ke([G,[W,_,I,N],g,L||Date.now(),Date.now()]):typeof N=="function"&&N.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(O,b,D,B){return typeof D=="function"&&(B=D,D=null),G(O,b,D,B);function G(W,_,I,N,L){return s(W,_,I,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Ke([G,[W,_,I,N],g,L||Date.now(),Date.now()]):typeof N=="function"&&N.apply(this,arguments)})}}var a=t.copyFile;a&&(t.copyFile=c);function c(O,b,D,B){return typeof D=="function"&&(B=D,D=0),G(O,b,D,B);function G(W,_,I,N,L){return a(W,_,I,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Ke([G,[W,_,I,N],g,L||Date.now(),Date.now()]):typeof N=="function"&&N.apply(this,arguments)})}}var u=t.readdir;t.readdir=f;var l=/^v[0-5]\./;function f(O,b,D){typeof b=="function"&&(D=b,b=null);var B=l.test(process.version)?function(_,I,N,L){return u(_,G(_,I,N,L))}:function(_,I,N,L){return u(_,I,G(_,I,N,L))};return B(O,b,D);function G(W,_,I,N){return function(L,g){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Ke([B,[W,_,I],L,N||Date.now(),Date.now()]):(g&&g.sort&&g.sort(),typeof I=="function"&&I.call(this,L,g))}}}if(process.version.substr(0,4)==="v0.8"){var m=fl(t);p=m.ReadStream,A=m.WriteStream}var d=t.ReadStream;d&&(p.prototype=Object.create(d.prototype),p.prototype.open=S);var h=t.WriteStream;h&&(A.prototype=Object.create(h.prototype),A.prototype.open=V),Object.defineProperty(t,"ReadStream",{get:function(){return p},set:function(O){p=O},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return A},set:function(O){A=O},enumerable:!0,configurable:!0});var E=p;Object.defineProperty(t,"FileReadStream",{get:function(){return E},set:function(O){E=O},enumerable:!0,configurable:!0});var w=A;Object.defineProperty(t,"FileWriteStream",{get:function(){return w},set:function(O){w=O},enumerable:!0,configurable:!0});function p(O,b){return this instanceof p?(d.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}function S(){var O=this;Ie(O.path,O.flags,O.mode,function(b,D){b?(O.autoClose&&O.destroy(),O.emit("error",b)):(O.fd=D,O.emit("open",D),O.read())})}function A(O,b){return this instanceof A?(h.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function V(){var O=this;Ie(O.path,O.flags,O.mode,function(b,D){b?(O.destroy(),O.emit("error",b)):(O.fd=D,O.emit("open",D))})}function Ce(O,b){return new t.ReadStream(O,b)}function ee(O,b){return new t.WriteStream(O,b)}var fe=t.open;t.open=Ie;function Ie(O,b,D,B){return typeof D=="function"&&(B=D,D=null),G(O,b,D,B);function G(W,_,I,N,L){return fe(W,_,I,function(g,q){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Ke([G,[W,_,I,N],g,L||Date.now(),Date.now()]):typeof N=="function"&&N.apply(this,arguments)})}}return t}function Ke(t){We("ENQUEUE",t[0].name,t[1]),X[se].push(t),Nr()}var kt;function Yn(){for(var t=Date.now(),e=0;e<X[se].length;++e)X[se][e].length>2&&(X[se][e][3]=t,X[se][e][4]=t);Nr()}function Nr(){if(clearTimeout(kt),kt=void 0,X[se].length!==0){var t=X[se].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)We("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){We("TIMEOUT",e.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var a=Date.now()-s,c=Math.max(s-i,1),u=Math.min(c*1.2,100);a>=u?(We("RETRY",e.name,r),e.apply(null,r.concat([i]))):X[se].push(t)}kt===void 0&&(kt=setTimeout(Nr,0))}}});var de=y(_e=>{"use strict";var Jn=te().fromCallback,he=Je(),ml=["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 he[t]=="function");Object.assign(_e,he);ml.forEach(t=>{_e[t]=Jn(he[t])});_e.exists=function(t,e){return typeof e=="function"?he.exists(t,e):new Promise(r=>he.exists(t,r))};_e.read=function(t,e,r,n,i,s){return typeof s=="function"?he.read(t,e,r,n,i,s):new Promise((o,a)=>{he.read(t,e,r,n,i,(c,u,l)=>{if(c)return a(c);o({bytesRead:u,buffer:l})})})};_e.write=function(t,e,...r){return typeof r[r.length-1]=="function"?he.write(t,e,...r):new Promise((n,i)=>{he.write(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffer:a})})})};_e.readv=function(t,e,...r){return typeof r[r.length-1]=="function"?he.readv(t,e,...r):new Promise((n,i)=>{he.readv(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesRead:o,buffers:a})})})};_e.writev=function(t,e,...r){return typeof r[r.length-1]=="function"?he.writev(t,e,...r):new Promise((n,i)=>{he.writev(t,e,...r,(s,o,a)=>{if(s)return i(s);n({bytesWritten:o,buffers:a})})})};typeof he.realpath.native=="function"?_e.realpath.native=Jn(he.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var ei=y(($E,Qn)=>{"use strict";var pl=require("path");Qn.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(pl.parse(e).root,""))){let n=new Error(`Path contains invalid characters: ${e}`);throw n.code="EINVAL",n}}});var ii=y((FE,Lr)=>{"use strict";var ti=de(),{checkPath:ri}=ei(),ni=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};Lr.exports.makeDir=async(t,e)=>(ri(t),ti.mkdir(t,{mode:ni(e),recursive:!0}));Lr.exports.makeDirSync=(t,e)=>(ri(t),ti.mkdirSync(t,{mode:ni(e),recursive:!0}))});var De=y((qE,si)=>{"use strict";var El=te().fromPromise,{makeDir:yl,makeDirSync:Dr}=ii(),Rr=El(yl);si.exports={mkdirs:Rr,mkdirsSync:Dr,mkdirp:Rr,mkdirpSync:Dr,ensureDir:Rr,ensureDirSync:Dr}});var Me=y((_E,ai)=>{"use strict";var gl=te().fromPromise,oi=de();function wl(t){return oi.access(t).then(()=>!0).catch(()=>!1)}ai.exports={pathExists:gl(wl),pathExistsSync:oi.existsSync}});var br=y((PE,ci)=>{"use strict";var Qe=de(),Sl=te().fromPromise;async function xl(t,e,r){let n=await Qe.open(t,"r+"),i=null;try{await Qe.futimes(n,e,r)}finally{try{await Qe.close(n)}catch(s){i=s}}if(i)throw i}function vl(t,e,r){let n=Qe.openSync(t,"r+");return Qe.futimesSync(n,e,r),Qe.closeSync(n)}ci.exports={utimesMillis:Sl(xl),utimesMillisSync:vl}});var je=y((kE,hi)=>{"use strict";var et=de(),re=require("path"),ui=te().fromPromise;function Cl(t,e,r){let n=r.dereference?i=>et.stat(i,{bigint:!0}):i=>et.lstat(i,{bigint:!0});return Promise.all([n(t),n(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}function Il(t,e,r){let n,i=r.dereference?o=>et.statSync(o,{bigint:!0}):o=>et.lstatSync(o,{bigint:!0}),s=i(t);try{n=i(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:n}}async function Nl(t,e,r,n){let{srcStat:i,destStat:s}=await Cl(t,e,n);if(s){if(ht(i,s)){let o=re.basename(t),a=re.basename(e);if(r==="move"&&o!==a&&o.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(i.isDirectory()&&Tr(t,e))throw new Error(Bt(t,e,r));return{srcStat:i,destStat:s}}function Ol(t,e,r,n){let{srcStat:i,destStat:s}=Il(t,e,n);if(s){if(ht(i,s)){let o=re.basename(t),a=re.basename(e);if(r==="move"&&o!==a&&o.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(i.isDirectory()&&Tr(t,e))throw new Error(Bt(t,e,r));return{srcStat:i,destStat:s}}async function li(t,e,r,n){let i=re.resolve(re.dirname(t)),s=re.resolve(re.dirname(r));if(s===i||s===re.parse(s).root)return;let o;try{o=await et.stat(s,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(ht(e,o))throw new Error(Bt(t,r,n));return li(t,e,s,n)}function fi(t,e,r,n){let i=re.resolve(re.dirname(t)),s=re.resolve(re.dirname(r));if(s===i||s===re.parse(s).root)return;let o;try{o=et.statSync(s,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(ht(e,o))throw new Error(Bt(t,r,n));return fi(t,e,s,n)}function ht(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function Tr(t,e){let r=re.resolve(t).split(re.sep).filter(i=>i),n=re.resolve(e).split(re.sep).filter(i=>i);return r.every((i,s)=>n[s]===i)}function Bt(t,e,r){return`Cannot ${r} '${t}' to a subdirectory of itself, '${e}'.`}hi.exports={checkPaths:ui(Nl),checkPathsSync:Ol,checkParentPaths:ui(li),checkParentPathsSync:fi,isSrcSubdir:Tr,areIdentical:ht}});var yi=y((UE,Ei)=>{"use strict";var ae=de(),dt=require("path"),{mkdirs:Ll}=De(),{pathExists:Dl}=Me(),{utimesMillis:Rl}=br(),mt=je();async function bl(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;
|
|
3
3
|
|
|
4
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:
|
|
4
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:i}=await mt.checkPaths(t,e,"copy",r);if(await mt.checkParentPaths(t,n,e,"copy"),!await mi(t,e,r))return;let o=dt.dirname(e);await Dl(o)||await Ll(o),await pi(i,t,e,r)}async function mi(t,e,r){return r.filter?r.filter(t,e):!0}async function pi(t,e,r,n){let s=await(n.dereference?ae.stat:ae.lstat)(e);if(s.isDirectory())return Fl(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Tl(s,t,e,r,n);if(s.isSymbolicLink())return ql(t,e,r,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function Tl(t,e,r,n,i){if(!e)return di(t,r,n,i);if(i.overwrite)return await ae.unlink(n),di(t,r,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}async function di(t,e,r,n){if(await ae.copyFile(e,r),n.preserveTimestamps){Al(t.mode)&&await $l(r,t.mode);let i=await ae.stat(e);await Rl(r,i.atime,i.mtime)}return ae.chmod(r,t.mode)}function Al(t){return(t&128)===0}function $l(t,e){return ae.chmod(t,e|128)}async function Fl(t,e,r,n,i){e||await ae.mkdir(n);let s=await ae.readdir(r);await Promise.all(s.map(async o=>{let a=dt.join(r,o),c=dt.join(n,o);if(!await mi(a,c,i))return;let{destStat:l}=await mt.checkPaths(a,c,"copy",i);return pi(l,a,c,i)})),e||await ae.chmod(n,t.mode)}async function ql(t,e,r,n){let i=await ae.readlink(e);if(n.dereference&&(i=dt.resolve(process.cwd(),i)),!t)return ae.symlink(i,r);let s=null;try{s=await ae.readlink(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return ae.symlink(i,r);throw o}if(n.dereference&&(s=dt.resolve(process.cwd(),s)),mt.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(mt.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return await ae.unlink(r),ae.symlink(i,r)}Ei.exports=bl});var vi=y((BE,xi)=>{"use strict";var me=Je(),pt=require("path"),_l=De().mkdirsSync,Pl=br().utimesMillisSync,Et=je();function kl(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;
|
|
5
5
|
|
|
6
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:
|
|
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" : "`+
|
|
6
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:i}=Et.checkPathsSync(t,e,"copy",r);if(Et.checkParentPathsSync(t,n,e,"copy"),r.filter&&!r.filter(t,e))return;let s=pt.dirname(e);return me.existsSync(s)||_l(s),gi(i,t,e,r)}function gi(t,e,r,n){let s=(n.dereference?me.statSync:me.lstatSync)(e);if(s.isDirectory())return Wl(s,t,e,r,n);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return Ul(s,t,e,r,n);if(s.isSymbolicLink())return zl(t,e,r,n);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}function Ul(t,e,r,n,i){return e?Bl(t,r,n,i):wi(t,r,n,i)}function Bl(t,e,r,n){if(n.overwrite)return me.unlinkSync(r),wi(t,e,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function wi(t,e,r,n){return me.copyFileSync(e,r),n.preserveTimestamps&&Ml(t.mode,e,r),Ar(r,t.mode)}function Ml(t,e,r){return Hl(t)&&Gl(r,t),Vl(e,r)}function Hl(t){return(t&128)===0}function Gl(t,e){return Ar(t,e|128)}function Ar(t,e){return me.chmodSync(t,e)}function Vl(t,e){let r=me.statSync(t);return Pl(e,r.atime,r.mtime)}function Wl(t,e,r,n,i){return e?Si(r,n,i):jl(t.mode,r,n,i)}function jl(t,e,r,n){return me.mkdirSync(r),Si(e,r,n),Ar(r,t)}function Si(t,e,r){me.readdirSync(t).forEach(n=>Xl(n,t,e,r))}function Xl(t,e,r,n){let i=pt.join(e,t),s=pt.join(r,t);if(n.filter&&!n.filter(i,s))return;let{destStat:o}=Et.checkPathsSync(i,s,"copy",n);return gi(o,i,s,n)}function zl(t,e,r,n){let i=me.readlinkSync(e);if(n.dereference&&(i=pt.resolve(process.cwd(),i)),t){let s;try{s=me.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return me.symlinkSync(i,r);throw o}if(n.dereference&&(s=pt.resolve(process.cwd(),s)),Et.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(Et.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return Zl(i,r)}else return me.symlinkSync(i,r)}function Zl(t,e){return me.unlinkSync(e),me.symlinkSync(t,e)}xi.exports=kl});var Mt=y((ME,Ci)=>{"use strict";var Yl=te().fromPromise;Ci.exports={copy:Yl(yi()),copySync:vi()}});var yt=y((HE,Ni)=>{"use strict";var Ii=Je(),Kl=te().fromCallback;function Jl(t,e){Ii.rm(t,{recursive:!0,force:!0},e)}function Ql(t){Ii.rmSync(t,{recursive:!0,force:!0})}Ni.exports={remove:Kl(Jl),removeSync:Ql}});var $i=y((GE,Ai)=>{"use strict";var ef=te().fromPromise,Di=de(),Ri=require("path"),bi=De(),Ti=yt(),Oi=ef(async function(e){let r;try{r=await Di.readdir(e)}catch{return bi.mkdirs(e)}return Promise.all(r.map(n=>Ti.remove(Ri.join(e,n))))});function Li(t){let e;try{e=Di.readdirSync(t)}catch{return bi.mkdirsSync(t)}e.forEach(r=>{r=Ri.join(t,r),Ti.removeSync(r)})}Ai.exports={emptyDirSync:Li,emptydirSync:Li,emptyDir:Oi,emptydir:Oi}});var Pi=y((VE,_i)=>{"use strict";var tf=te().fromPromise,Fi=require("path"),Pe=de(),qi=De();async function rf(t){let e;try{e=await Pe.stat(t)}catch{}if(e&&e.isFile())return;let r=Fi.dirname(t),n=null;try{n=await Pe.stat(r)}catch(i){if(i.code==="ENOENT"){await qi.mkdirs(r),await Pe.writeFile(t,"");return}else throw i}n.isDirectory()?await Pe.writeFile(t,""):await Pe.readdir(r)}function nf(t){let e;try{e=Pe.statSync(t)}catch{}if(e&&e.isFile())return;let r=Fi.dirname(t);try{Pe.statSync(r).isDirectory()||Pe.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")qi.mkdirsSync(r);else throw n}Pe.writeFileSync(t,"")}_i.exports={createFile:tf(rf),createFileSync:nf}});var Hi=y((WE,Mi)=>{"use strict";var sf=te().fromPromise,ki=require("path"),He=de(),Ui=De(),{pathExists:of}=Me(),{areIdentical:Bi}=je();async function af(t,e){let r;try{r=await He.lstat(e)}catch{}let n;try{n=await He.lstat(t)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}if(r&&Bi(n,r))return;let i=ki.dirname(e);await of(i)||await Ui.mkdirs(i),await He.link(t,e)}function cf(t,e){let r;try{r=He.lstatSync(e)}catch{}try{let s=He.lstatSync(t);if(r&&Bi(s,r))return}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}let n=ki.dirname(e);return He.existsSync(n)||Ui.mkdirsSync(n),He.linkSync(t,e)}Mi.exports={createLink:sf(af),createLinkSync:cf}});var Vi=y((jE,Gi)=>{"use strict";var Ge=require("path"),gt=de(),{pathExists:uf}=Me(),lf=te().fromPromise;async function ff(t,e){if(Ge.isAbsolute(t)){try{await gt.lstat(t)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:t,toDst:t}}let r=Ge.dirname(e),n=Ge.join(r,t);if(await uf(n))return{toCwd:n,toDst:t};try{await gt.lstat(t)}catch(s){throw s.message=s.message.replace("lstat","ensureSymlink"),s}return{toCwd:t,toDst:Ge.relative(r,t)}}function hf(t,e){if(Ge.isAbsolute(t)){if(!gt.existsSync(t))throw new Error("absolute srcpath does not exist");return{toCwd:t,toDst:t}}let r=Ge.dirname(e),n=Ge.join(r,t);if(gt.existsSync(n))return{toCwd:n,toDst:t};if(!gt.existsSync(t))throw new Error("relative srcpath does not exist");return{toCwd:t,toDst:Ge.relative(r,t)}}Gi.exports={symlinkPaths:lf(ff),symlinkPathsSync:hf}});var Xi=y((XE,ji)=>{"use strict";var Wi=de(),df=te().fromPromise;async function mf(t,e){if(e)return e;let r;try{r=await Wi.lstat(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function pf(t,e){if(e)return e;let r;try{r=Wi.lstatSync(t)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}ji.exports={symlinkType:df(mf),symlinkTypeSync:pf}});var Ki=y((zE,Yi)=>{"use strict";var Ef=te().fromPromise,zi=require("path"),$e=de(),{mkdirs:yf,mkdirsSync:gf}=De(),{symlinkPaths:wf,symlinkPathsSync:Sf}=Vi(),{symlinkType:xf,symlinkTypeSync:vf}=Xi(),{pathExists:Cf}=Me(),{areIdentical:Zi}=je();async function If(t,e,r){let n;try{n=await $e.lstat(e)}catch{}if(n&&n.isSymbolicLink()){let[a,c]=await Promise.all([$e.stat(t),$e.stat(e)]);if(Zi(a,c))return}let i=await wf(t,e);t=i.toDst;let s=await xf(i.toCwd,r),o=zi.dirname(e);return await Cf(o)||await yf(o),$e.symlink(t,e,s)}function Nf(t,e,r){let n;try{n=$e.lstatSync(e)}catch{}if(n&&n.isSymbolicLink()){let a=$e.statSync(t),c=$e.statSync(e);if(Zi(a,c))return}let i=Sf(t,e);t=i.toDst,r=vf(i.toCwd,r);let s=zi.dirname(e);return $e.existsSync(s)||gf(s),$e.symlinkSync(t,e,r)}Yi.exports={createSymlink:Ef(If),createSymlinkSync:Nf}});var ss=y((ZE,is)=>{"use strict";var{createFile:Ji,createFileSync:Qi}=Pi(),{createLink:es,createLinkSync:ts}=Hi(),{createSymlink:rs,createSymlinkSync:ns}=Ki();is.exports={createFile:Ji,createFileSync:Qi,ensureFile:Ji,ensureFileSync:Qi,createLink:es,createLinkSync:ts,ensureLink:es,ensureLinkSync:ts,createSymlink:rs,createSymlinkSync:ns,ensureSymlink:rs,ensureSymlinkSync:ns}});var Ht=y((YE,os)=>{function Of(t,{EOL:e=`
|
|
7
|
+
`,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let s=r?e:"";return JSON.stringify(t,n,i).replace(/\n/g,e)+s}function Lf(t){return Buffer.isBuffer(t)&&(t=t.toString("utf8")),t.replace(/^\uFEFF/,"")}os.exports={stringify:Of,stripBom:Lf}});var ls=y((KE,us)=>{var tt;try{tt=Je()}catch{tt=require("fs")}var Gt=te(),{stringify:as,stripBom:cs}=Ht();async function Df(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||tt,n="throws"in e?e.throws:!0,i=await Gt.fromCallback(r.readFile)(t,e);i=cs(i);let s;try{s=JSON.parse(i,e?e.reviver:null)}catch(o){if(n)throw o.message=`${t}: ${o.message}`,o;return null}return s}var Rf=Gt.fromPromise(Df);function bf(t,e={}){typeof e=="string"&&(e={encoding:e});let r=e.fs||tt,n="throws"in e?e.throws:!0;try{let i=r.readFileSync(t,e);return i=cs(i),JSON.parse(i,e.reviver)}catch(i){if(n)throw i.message=`${t}: ${i.message}`,i;return null}}async function Tf(t,e,r={}){let n=r.fs||tt,i=as(e,r);await Gt.fromCallback(n.writeFile)(t,i,r)}var Af=Gt.fromPromise(Tf);function $f(t,e,r={}){let n=r.fs||tt,i=as(e,r);return n.writeFileSync(t,i,r)}var Ff={readFile:Rf,readFileSync:bf,writeFile:Af,writeFileSync:$f};us.exports=Ff});var hs=y((JE,fs)=>{"use strict";var Vt=ls();fs.exports={readJson:Vt.readFile,readJsonSync:Vt.readFileSync,writeJson:Vt.writeFile,writeJsonSync:Vt.writeFileSync}});var Wt=y((QE,ps)=>{"use strict";var qf=te().fromPromise,$r=de(),ds=require("path"),ms=De(),_f=Me().pathExists;async function Pf(t,e,r="utf-8"){let n=ds.dirname(t);return await _f(n)||await ms.mkdirs(n),$r.writeFile(t,e,r)}function kf(t,...e){let r=ds.dirname(t);$r.existsSync(r)||ms.mkdirsSync(r),$r.writeFileSync(t,...e)}ps.exports={outputFile:qf(Pf),outputFileSync:kf}});var ys=y((ey,Es)=>{"use strict";var{stringify:Uf}=Ht(),{outputFile:Bf}=Wt();async function Mf(t,e,r={}){let n=Uf(e,r);await Bf(t,n,r)}Es.exports=Mf});var ws=y((ty,gs)=>{"use strict";var{stringify:Hf}=Ht(),{outputFileSync:Gf}=Wt();function Vf(t,e,r){let n=Hf(e,r);Gf(t,n,r)}gs.exports=Vf});var xs=y((ry,Ss)=>{"use strict";var Wf=te().fromPromise,pe=hs();pe.outputJson=Wf(ys());pe.outputJsonSync=ws();pe.outputJSON=pe.outputJson;pe.outputJSONSync=pe.outputJsonSync;pe.writeJSON=pe.writeJson;pe.writeJSONSync=pe.writeJsonSync;pe.readJSON=pe.readJson;pe.readJSONSync=pe.readJsonSync;Ss.exports=pe});var Os=y((ny,Ns)=>{"use strict";var jf=de(),vs=require("path"),{copy:Xf}=Mt(),{remove:Is}=yt(),{mkdirp:zf}=De(),{pathExists:Zf}=Me(),Cs=je();async function Yf(t,e,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=await Cs.checkPaths(t,e,"move",r);await Cs.checkParentPaths(t,i,e,"move");let o=vs.dirname(e);return vs.parse(o).root!==o&&await zf(o),Kf(t,e,n,s)}async function Kf(t,e,r,n){if(!n){if(r)await Is(e);else if(await Zf(e))throw new Error("dest already exists.")}try{await jf.rename(t,e)}catch(i){if(i.code!=="EXDEV")throw i;await Jf(t,e,r)}}async function Jf(t,e,r){return await Xf(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),Is(t)}Ns.exports=Yf});var Ts=y((iy,bs)=>{"use strict";var Ds=Je(),qr=require("path"),Qf=Mt().copySync,Rs=yt().removeSync,eh=De().mkdirpSync,Ls=je();function th(t,e,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i,isChangingCase:s=!1}=Ls.checkPathsSync(t,e,"move",r);return Ls.checkParentPathsSync(t,i,e,"move"),rh(e)||eh(qr.dirname(e)),nh(t,e,n,s)}function rh(t){let e=qr.dirname(t);return qr.parse(e).root===e}function nh(t,e,r,n){if(n)return Fr(t,e,r);if(r)return Rs(e),Fr(t,e,r);if(Ds.existsSync(e))throw new Error("dest already exists.");return Fr(t,e,r)}function Fr(t,e,r){try{Ds.renameSync(t,e)}catch(n){if(n.code!=="EXDEV")throw n;return ih(t,e,r)}}function ih(t,e,r){return Qf(t,e,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),Rs(t)}bs.exports=th});var $s=y((sy,As)=>{"use strict";var sh=te().fromPromise;As.exports={move:sh(Os()),moveSync:Ts()}});var qs=y((oy,Fs)=>{"use strict";Fs.exports={...de(),...Mt(),...$i(),...ss(),...xs(),...De(),...$s(),...Wt(),...Me(),...yt()}});var St=y((cy,Hs)=>{"use strict";var Eh="2.0.0",yh=Number.MAX_SAFE_INTEGER||9007199254740991,gh=16,wh=250,Sh=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Hs.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:gh,MAX_SAFE_BUILD_LENGTH:wh,MAX_SAFE_INTEGER:yh,RELEASE_TYPES:Sh,SEMVER_SPEC_VERSION:Eh,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var xt=y((uy,Gs)=>{"use strict";var xh=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Gs.exports=xh});var rt=y((Fe,Vs)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Ur,MAX_SAFE_BUILD_LENGTH:vh,MAX_LENGTH:Ch}=St(),Ih=xt();Fe=Vs.exports={};var Nh=Fe.re=[],Oh=Fe.safeRe=[],x=Fe.src=[],Lh=Fe.safeSrc=[],v=Fe.t={},Dh=0,Br="[a-zA-Z0-9-]",Rh=[["\\s",1],["\\d",Ch],[Br,vh]],bh=t=>{for(let[e,r]of Rh)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let n=bh(e),i=Dh++;Ih(t,i,e),v[t]=i,x[i]=e,Lh[i]=n,Nh[i]=new RegExp(e,r?"g":void 0),Oh[i]=new RegExp(n,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Br}*`);R("MAINVERSION",`(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${x[v.NONNUMERICIDENTIFIER]}|${x[v.NUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${x[v.NONNUMERICIDENTIFIER]}|${x[v.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASE",`(?:-(${x[v.PRERELEASEIDENTIFIER]}(?:\\.${x[v.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${x[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[v.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${Br}+`);R("BUILD",`(?:\\+(${x[v.BUILDIDENTIFIER]}(?:\\.${x[v.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${x[v.MAINVERSION]}${x[v.PRERELEASE]}?${x[v.BUILD]}?`);R("FULL",`^${x[v.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${x[v.MAINVERSIONLOOSE]}${x[v.PRERELEASELOOSE]}?${x[v.BUILD]}?`);R("LOOSE",`^${x[v.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${x[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${x[v.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:${x[v.PRERELEASE]})?${x[v.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:${x[v.PRERELEASELOOSE]})?${x[v.BUILD]}?)?)?`);R("XRANGE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ur}})(?:\\.(\\d{1,${Ur}}))?(?:\\.(\\d{1,${Ur}}))?`);R("COERCE",`${x[v.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",x[v.COERCEPLAIN]+`(?:${x[v.PRERELEASE]})?(?:${x[v.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",x[v.COERCE],!0);R("COERCERTLFULL",x[v.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${x[v.LONETILDE]}\\s+`,!0);Fe.tildeTrimReplace="$1~";R("TILDE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${x[v.LONECARET]}\\s+`,!0);Fe.caretTrimReplace="$1^";R("CARET",`^${x[v.LONECARET]}${x[v.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${x[v.LONECARET]}${x[v.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${x[v.GTLT]}\\s*(${x[v.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]}|${x[v.XRANGEPLAIN]})`,!0);Fe.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${x[v.XRANGEPLAIN]})\\s+-\\s+(${x[v.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${x[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[v.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Zt=y((ly,Ws)=>{"use strict";var Th=Object.freeze({loose:!0}),Ah=Object.freeze({}),$h=t=>t?typeof t!="object"?Th:t:Ah;Ws.exports=$h});var Mr=y((fy,zs)=>{"use strict";var js=/^[0-9]+$/,Xs=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=js.test(t),n=js.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Fh=(t,e)=>Xs(e,t);zs.exports={compareIdentifiers:Xs,rcompareIdentifiers:Fh}});var ce=y((hy,Ys)=>{"use strict";var Yt=xt(),{MAX_LENGTH:Zs,MAX_SAFE_INTEGER:Kt}=St(),{safeRe:Jt,t:Qt}=rt(),qh=Zt(),{compareIdentifiers:Hr}=Mr(),Gr=class t{constructor(e,r){if(r=qh(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Zs)throw new TypeError(`version is longer than ${Zs} characters`);Yt("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Jt[Qt.LOOSE]:Jt[Qt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Kt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Kt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Kt||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let s=+i;if(s>=0&&s<Kt)return s}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Yt("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let n=this.prerelease[r],i=e.prerelease[r];if(Yt("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Hr(n,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],i=e.build[r];if(Yt("build compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return Hr(n,i)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let i=`-${r}`.match(this.options.loose?Jt[Qt.PRERELEASELOOSE]:Jt[Qt.PRERELEASE]);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let s=[r,i];n===!1&&(s=[r]),Hr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Ys.exports=Gr});var Xe=y((dy,Js)=>{"use strict";var Ks=ce(),_h=(t,e,r=!1)=>{if(t instanceof Ks)return t;try{return new Ks(t,e)}catch(n){if(!r)return null;throw n}};Js.exports=_h});var eo=y((my,Qs)=>{"use strict";var Ph=Xe(),kh=(t,e)=>{let r=Ph(t,e);return r?r.version:null};Qs.exports=kh});var ro=y((py,to)=>{"use strict";var Uh=Xe(),Bh=(t,e)=>{let r=Uh(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};to.exports=Bh});var so=y((Ey,io)=>{"use strict";var no=ce(),Mh=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new no(t instanceof no?t.version:t,r).inc(e,n,i).version}catch{return null}};io.exports=Mh});var co=y((yy,ao)=>{"use strict";var oo=Xe(),Hh=(t,e)=>{let r=oo(t,null,!0),n=oo(e,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,o=s?r:n,a=s?n:r,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};ao.exports=Hh});var lo=y((gy,uo)=>{"use strict";var Gh=ce(),Vh=(t,e)=>new Gh(t,e).major;uo.exports=Vh});var ho=y((wy,fo)=>{"use strict";var Wh=ce(),jh=(t,e)=>new Wh(t,e).minor;fo.exports=jh});var po=y((Sy,mo)=>{"use strict";var Xh=ce(),zh=(t,e)=>new Xh(t,e).patch;mo.exports=zh});var yo=y((xy,Eo)=>{"use strict";var Zh=Xe(),Yh=(t,e)=>{let r=Zh(t,e);return r&&r.prerelease.length?r.prerelease:null};Eo.exports=Yh});var Oe=y((vy,wo)=>{"use strict";var go=ce(),Kh=(t,e,r)=>new go(t,r).compare(new go(e,r));wo.exports=Kh});var xo=y((Cy,So)=>{"use strict";var Jh=Oe(),Qh=(t,e,r)=>Jh(e,t,r);So.exports=Qh});var Co=y((Iy,vo)=>{"use strict";var ed=Oe(),td=(t,e)=>ed(t,e,!0);vo.exports=td});var er=y((Ny,No)=>{"use strict";var Io=ce(),rd=(t,e,r)=>{let n=new Io(t,r),i=new Io(e,r);return n.compare(i)||n.compareBuild(i)};No.exports=rd});var Lo=y((Oy,Oo)=>{"use strict";var nd=er(),id=(t,e)=>t.sort((r,n)=>nd(r,n,e));Oo.exports=id});var Ro=y((Ly,Do)=>{"use strict";var sd=er(),od=(t,e)=>t.sort((r,n)=>sd(n,r,e));Do.exports=od});var vt=y((Dy,bo)=>{"use strict";var ad=Oe(),cd=(t,e,r)=>ad(t,e,r)>0;bo.exports=cd});var tr=y((Ry,To)=>{"use strict";var ud=Oe(),ld=(t,e,r)=>ud(t,e,r)<0;To.exports=ld});var Vr=y((by,Ao)=>{"use strict";var fd=Oe(),hd=(t,e,r)=>fd(t,e,r)===0;Ao.exports=hd});var Wr=y((Ty,$o)=>{"use strict";var dd=Oe(),md=(t,e,r)=>dd(t,e,r)!==0;$o.exports=md});var rr=y((Ay,Fo)=>{"use strict";var pd=Oe(),Ed=(t,e,r)=>pd(t,e,r)>=0;Fo.exports=Ed});var nr=y(($y,qo)=>{"use strict";var yd=Oe(),gd=(t,e,r)=>yd(t,e,r)<=0;qo.exports=gd});var jr=y((Fy,_o)=>{"use strict";var wd=Vr(),Sd=Wr(),xd=vt(),vd=rr(),Cd=tr(),Id=nr(),Nd=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return wd(t,r,n);case"!=":return Sd(t,r,n);case">":return xd(t,r,n);case">=":return vd(t,r,n);case"<":return Cd(t,r,n);case"<=":return Id(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};_o.exports=Nd});var ko=y((qy,Po)=>{"use strict";var Od=ce(),Ld=Xe(),{safeRe:ir,t:sr}=rt(),Dd=(t,e)=>{if(t instanceof Od)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?ir[sr.COERCEFULL]:ir[sr.COERCE]);else{let c=e.includePrerelease?ir[sr.COERCERTLFULL]:ir[sr.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Ld(`${n}.${i}.${s}${o}${a}`,e)};Po.exports=Dd});var Bo=y((_y,Uo)=>{"use strict";var Xr=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Uo.exports=Xr});var Le=y((Py,Vo)=>{"use strict";var Rd=/\s+/g,zr=class t{constructor(e,r){if(r=Td(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof Zr)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Rd," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(i=>!Ho(i[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&kd(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&_d)|(this.options.loose&&Pd))+":"+e,i=Mo.get(n);if(i)return i;let s=this.options.loose,o=s?Ee[ue.HYPHENRANGELOOSE]:Ee[ue.HYPHENRANGE];e=e.replace(o,zd(this.options.includePrerelease)),M("hyphen replace",e),e=e.replace(Ee[ue.COMPARATORTRIM],$d),M("comparator trim",e),e=e.replace(Ee[ue.TILDETRIM],Fd),M("tilde trim",e),e=e.replace(Ee[ue.CARETTRIM],qd),M("caret trim",e);let a=e.split(" ").map(f=>Ud(f,this.options)).join(" ").split(/\s+/).map(f=>Xd(f,this.options));s&&(a=a.filter(f=>(M("loose invalid filter",f,this.options),!!f.match(Ee[ue.COMPARATORLOOSE])))),M("range list",a);let c=new Map,u=a.map(f=>new Zr(f,this.options));for(let f of u){if(Ho(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Mo.set(n,l),l}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>Go(n,r)&&e.set.some(i=>Go(i,r)&&n.every(s=>i.every(o=>s.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ad(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Zd(this.set[r],e,this.options))return!0;return!1}};Vo.exports=zr;var bd=Bo(),Mo=new bd,Td=Zt(),Zr=Ct(),M=xt(),Ad=ce(),{safeRe:Ee,t:ue,comparatorTrimReplace:$d,tildeTrimReplace:Fd,caretTrimReplace:qd}=rt(),{FLAG_INCLUDE_PRERELEASE:_d,FLAG_LOOSE:Pd}=St(),Ho=t=>t.value==="<0.0.0-0",kd=t=>t.value==="",Go=(t,e)=>{let r=!0,n=t.slice(),i=n.pop();for(;r&&n.length;)r=n.every(s=>i.intersects(s,e)),i=n.pop();return r},Ud=(t,e)=>(t=t.replace(Ee[ue.BUILD],""),M("comp",t,e),t=Hd(t,e),M("caret",t),t=Bd(t,e),M("tildes",t),t=Vd(t,e),M("xrange",t),t=jd(t,e),M("stars",t),t),ye=t=>!t||t.toLowerCase()==="x"||t==="*",Bd=(t,e)=>t.trim().split(/\s+/).map(r=>Md(r,e)).join(" "),Md=(t,e)=>{let r=e.loose?Ee[ue.TILDELOOSE]:Ee[ue.TILDE];return t.replace(r,(n,i,s,o,a)=>{M("tilde",t,n,i,s,o,a);let c;return ye(i)?c="":ye(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:ye(o)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:a?(M("replaceTilde pr",a),c=`>=${i}.${s}.${o}-${a} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${o} <${i}.${+s+1}.0-0`,M("tilde return",c),c})},Hd=(t,e)=>t.trim().split(/\s+/).map(r=>Gd(r,e)).join(" "),Gd=(t,e)=>{M("caret",t,e);let r=e.loose?Ee[ue.CARETLOOSE]:Ee[ue.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,o,a,c)=>{M("caret",t,i,s,o,a,c);let u;return ye(s)?u="":ye(o)?u=`>=${s}.0.0${n} <${+s+1}.0.0-0`:ye(a)?s==="0"?u=`>=${s}.${o}.0${n} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.0${n} <${+s+1}.0.0-0`:c?(M("replaceCaret pr",c),s==="0"?o==="0"?u=`>=${s}.${o}.${a}-${c} <${s}.${o}.${+a+1}-0`:u=`>=${s}.${o}.${a}-${c} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.${a}-${c} <${+s+1}.0.0-0`):(M("no pr"),s==="0"?o==="0"?u=`>=${s}.${o}.${a}${n} <${s}.${o}.${+a+1}-0`:u=`>=${s}.${o}.${a}${n} <${s}.${+o+1}.0-0`:u=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),M("caret return",u),u})},Vd=(t,e)=>(M("replaceXRanges",t,e),t.split(/\s+/).map(r=>Wd(r,e)).join(" ")),Wd=(t,e)=>{t=t.trim();let r=e.loose?Ee[ue.XRANGELOOSE]:Ee[ue.XRANGE];return t.replace(r,(n,i,s,o,a,c)=>{M("xRange",t,n,i,s,o,a,c);let u=ye(s),l=u||ye(o),f=l||ye(a),m=f;return i==="="&&m&&(i=""),c=e.includePrerelease?"-0":"",u?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(l&&(o=0),a=0,i===">"?(i=">=",l?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",l?s=+s+1:o=+o+1),i==="<"&&(c="-0"),n=`${i+s}.${o}.${a}${c}`):l?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:f&&(n=`>=${s}.${o}.0${c} <${s}.${+o+1}.0-0`),M("xRange return",n),n})},jd=(t,e)=>(M("replaceStars",t,e),t.trim().replace(Ee[ue.STAR],"")),Xd=(t,e)=>(M("replaceGTE0",t,e),t.trim().replace(Ee[e.includePrerelease?ue.GTE0PRE:ue.GTE0],"")),zd=t=>(e,r,n,i,s,o,a,c,u,l,f,m)=>(ye(n)?r="":ye(i)?r=`>=${n}.0.0${t?"-0":""}`:ye(s)?r=`>=${n}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ye(u)?c="":ye(l)?c=`<${+u+1}.0.0-0`:ye(f)?c=`<${u}.${+l+1}.0-0`:m?c=`<=${u}.${l}.${f}-${m}`:t?c=`<${u}.${l}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),Zd=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(M(t[n].semver),t[n].semver!==Zr.ANY&&t[n].semver.prerelease.length>0){let i=t[n].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var Ct=y((ky,Yo)=>{"use strict";var It=Symbol("SemVer ANY"),Jr=class t{static get ANY(){return It}constructor(e,r){if(r=Wo(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kr("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===It?this.value="":this.value=this.operator+this.semver.version,Kr("comp",this)}parse(e){let r=this.options.loose?jo[Xo.COMPARATORLOOSE]:jo[Xo.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new zo(n[2],this.options.loose):this.semver=It}toString(){return this.value}test(e){if(Kr("Comparator.test",e,this.options.loose),this.semver===It||e===It)return!0;if(typeof e=="string")try{e=new zo(e,this.options)}catch{return!1}return Yr(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Zo(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Zo(this.value,r).test(e.semver):(r=Wo(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Yr(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Yr(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Yo.exports=Jr;var Wo=Zt(),{safeRe:jo,t:Xo}=rt(),Yr=jr(),Kr=xt(),zo=ce(),Zo=Le()});var Nt=y((Uy,Ko)=>{"use strict";var Yd=Le(),Kd=(t,e,r)=>{try{e=new Yd(e,r)}catch{return!1}return e.test(t)};Ko.exports=Kd});var Qo=y((By,Jo)=>{"use strict";var Jd=Le(),Qd=(t,e)=>new Jd(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Jo.exports=Qd});var ta=y((My,ea)=>{"use strict";var em=ce(),tm=Le(),rm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new tm(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new em(n,r))}),n};ea.exports=rm});var na=y((Hy,ra)=>{"use strict";var nm=ce(),im=Le(),sm=(t,e,r)=>{let n=null,i=null,s=null;try{s=new im(e,r)}catch{return null}return t.forEach(o=>{s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new nm(n,r))}),n};ra.exports=sm});var oa=y((Gy,sa)=>{"use strict";var Qr=ce(),om=Le(),ia=vt(),am=(t,e)=>{t=new om(t,e);let r=new Qr("0.0.0");if(t.test(r)||(r=new Qr("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let i=t.set[n],s=null;i.forEach(o=>{let a=new Qr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||ia(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||ia(r,s))&&(r=s)}return r&&t.test(r)?r:null};sa.exports=am});var ca=y((Vy,aa)=>{"use strict";var cm=Le(),um=(t,e)=>{try{return new cm(t,e).range||"*"}catch{return null}};aa.exports=um});var or=y((Wy,ha)=>{"use strict";var lm=ce(),fa=Ct(),{ANY:fm}=fa,hm=Le(),dm=Nt(),ua=vt(),la=tr(),mm=nr(),pm=rr(),Em=(t,e,r,n)=>{t=new lm(t,n),e=new hm(e,n);let i,s,o,a,c;switch(r){case">":i=ua,s=mm,o=la,a=">",c=">=";break;case"<":i=la,s=pm,o=ua,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(dm(t,e,n))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],f=null,m=null;if(l.forEach(d=>{d.semver===fm&&(d=new fa(">=0.0.0")),f=f||d,m=m||d,i(d.semver,f.semver,n)?f=d:o(d.semver,m.semver,n)&&(m=d)}),f.operator===a||f.operator===c||(!m.operator||m.operator===a)&&s(t,m.semver))return!1;if(m.operator===c&&o(t,m.semver))return!1}return!0};ha.exports=Em});var ma=y((jy,da)=>{"use strict";var ym=or(),gm=(t,e,r)=>ym(t,e,">",r);da.exports=gm});var Ea=y((Xy,pa)=>{"use strict";var wm=or(),Sm=(t,e,r)=>wm(t,e,"<",r);pa.exports=Sm});var wa=y((zy,ga)=>{"use strict";var ya=Le(),xm=(t,e,r)=>(t=new ya(t,r),e=new ya(e,r),t.intersects(e,r));ga.exports=xm});var xa=y((Zy,Sa)=>{"use strict";var vm=Nt(),Cm=Oe();Sa.exports=(t,e,r)=>{let n=[],i=null,s=null,o=t.sort((l,f)=>Cm(l,f,r));for(let l of o)vm(l,e,r)?(s=l,i||(i=l)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===o[0]?a.push("*"):f?l===o[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e}});var La=y((Yy,Oa)=>{"use strict";var va=Le(),tn=Ct(),{ANY:en}=tn,Ot=Nt(),rn=Oe(),Im=(t,e,r={})=>{if(t===e)return!0;t=new va(t,r),e=new va(e,r);let n=!1;e:for(let i of t.set){for(let s of e.set){let o=Om(i,s,r);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Nm=[new tn(">=0.0.0-0")],Ca=[new tn(">=0.0.0")],Om=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===en){if(e.length===1&&e[0].semver===en)return!0;r.includePrerelease?t=Nm:t=Ca}if(e.length===1&&e[0].semver===en){if(r.includePrerelease)return!0;e=Ca}let n=new Set,i,s;for(let d of t)d.operator===">"||d.operator===">="?i=Ia(i,d,r):d.operator==="<"||d.operator==="<="?s=Na(s,d,r):n.add(d.semver);if(n.size>1)return null;let o;if(i&&s){if(o=rn(i.semver,s.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let d of n){if(i&&!Ot(d,String(i),r)||s&&!Ot(d,String(s),r))return null;for(let h of e)if(!Ot(d,String(h),r))return!1;return!0}let a,c,u,l,f=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,m=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of e){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",i){if(m&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===m.major&&d.semver.minor===m.minor&&d.semver.patch===m.patch&&(m=!1),d.operator===">"||d.operator===">="){if(a=Ia(i,d,r),a===d&&a!==i)return!1}else if(i.operator===">="&&!Ot(i.semver,String(d),r))return!1}if(s){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(c=Na(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!Ot(s.semver,String(d),r))return!1}if(!d.operator&&(s||i)&&o!==0)return!1}return!(i&&u&&!s&&o!==0||s&&l&&!i&&o!==0||m||f)},Ia=(t,e,r)=>{if(!t)return e;let n=rn(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},Na=(t,e,r)=>{if(!t)return e;let n=rn(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};Oa.exports=Im});var Ta=y((Ky,ba)=>{"use strict";var nn=rt(),Da=St(),Lm=ce(),Ra=Mr(),Dm=Xe(),Rm=eo(),bm=ro(),Tm=so(),Am=co(),$m=lo(),Fm=ho(),qm=po(),_m=yo(),Pm=Oe(),km=xo(),Um=Co(),Bm=er(),Mm=Lo(),Hm=Ro(),Gm=vt(),Vm=tr(),Wm=Vr(),jm=Wr(),Xm=rr(),zm=nr(),Zm=jr(),Ym=ko(),Km=Ct(),Jm=Le(),Qm=Nt(),ep=Qo(),tp=ta(),rp=na(),np=oa(),ip=ca(),sp=or(),op=ma(),ap=Ea(),cp=wa(),up=xa(),lp=La();ba.exports={parse:Dm,valid:Rm,clean:bm,inc:Tm,diff:Am,major:$m,minor:Fm,patch:qm,prerelease:_m,compare:Pm,rcompare:km,compareLoose:Um,compareBuild:Bm,sort:Mm,rsort:Hm,gt:Gm,lt:Vm,eq:Wm,neq:jm,gte:Xm,lte:zm,cmp:Zm,coerce:Ym,Comparator:Km,Range:Jm,satisfies:Qm,toComparators:ep,maxSatisfying:tp,minSatisfying:rp,minVersion:np,validRange:ip,outside:sp,gtr:op,ltr:ap,intersects:cp,simplifyRange:up,subset:lp,SemVer:Lm,re:nn.re,src:nn.src,tokens:nn.t,SEMVER_SPEC_VERSION:Da.SEMVER_SPEC_VERSION,RELEASE_TYPES:Da.RELEASE_TYPES,compareIdentifiers:Ra.compareIdentifiers,rcompareIdentifiers:Ra.rcompareIdentifiers}});var Fa=y((Jy,sn)=>{var Aa=process.argv||[],ar=process.env,fp=!("NO_COLOR"in ar||Aa.includes("--no-color"))&&("FORCE_COLOR"in ar||Aa.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&ar.TERM!=="dumb"||"CI"in ar),hp=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+dp(i,e,r,s)+e:t+i+e},dp=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},$a=(t=fp)=>{let e=t?hp:()=>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")}};sn.exports=$a();sn.exports.createColors=$a});var Ua=y((Qy,ka)=>{ka.exports=Pa;Pa.sync=pp;var qa=require("fs");function mp(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 i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function _a(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:mp(e,r)}function Pa(t,e,r){qa.stat(t,function(n,i){r(n,n?!1:_a(i,t,e))})}function pp(t,e){return _a(qa.statSync(t),t,e)}});var Va=y((eg,Ga)=>{Ga.exports=Ma;Ma.sync=Ep;var Ba=require("fs");function Ma(t,e,r){Ba.stat(t,function(n,i){r(n,n?!1:Ha(i,e))})}function Ep(t,e){return Ha(Ba.statSync(t),e)}function Ha(t,e){return t.isFile()&&yp(t,e)}function yp(t,e){var r=t.mode,n=t.uid,i=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&i===o||r&a&&n===s||r&l&&s===0;return f}});var ja=y((rg,Wa)=>{var tg=require("fs"),cr;process.platform==="win32"||global.TESTING_WINDOWS?cr=Ua():cr=Va();Wa.exports=on;on.sync=gp;function on(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,i){on(t,e||{},function(s,o){s?i(s):n(o)})})}cr(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function gp(t,e){try{return cr.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Qa=y((ng,Ja)=>{var nt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Xa=require("path"),wp=nt?";":":",za=ja(),Za=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Ya=(t,e)=>{let r=e.colon||wp,n=t.match(/\//)||nt&&t.match(/\\/)?[""]:[...nt?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=nt?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=nt?i.split(r):[""];return nt&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},Ka=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:s}=Ya(t,e),o=[],a=u=>new Promise((l,f)=>{if(u===n.length)return e.all&&o.length?l(o):f(Za(t));let m=n[u],d=/^".*"$/.test(m)?m.slice(1,-1):m,h=Xa.join(d,t),E=!d&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;l(c(E,u,0))}),c=(u,l,f)=>new Promise((m,d)=>{if(f===i.length)return m(a(l+1));let h=i[f];za(u+h,{pathExt:s},(E,w)=>{if(!E&&w)if(e.all)o.push(u+h);else return m(u+h);return m(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Sp=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Ya(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=Xa.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let m=l+n[f];try{if(za.sync(m,{pathExt:i}))if(e.all)s.push(m);else return m}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw Za(t)};Ja.exports=Ka;Ka.sync=Sp});var tc=y((ig,an)=>{"use strict";var ec=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};an.exports=ec;an.exports.default=ec});var sc=y((sg,ic)=>{"use strict";var rc=require("path"),xp=Qa(),vp=tc();function nc(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,s=i&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=xp.sync(t.command,{path:r[vp({env:r})],pathExt:e?rc.delimiter:void 0})}catch{}finally{s&&process.chdir(n)}return o&&(o=rc.resolve(i?t.options.cwd:"",o)),o}function Cp(t){return nc(t)||nc(t,!0)}ic.exports=Cp});var oc=y((og,un)=>{"use strict";var cn=/([()\][%!^"`<>&|;, *?])/g;function Ip(t){return t=t.replace(cn,"^$1"),t}function Np(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(cn,"^$1"),e&&(t=t.replace(cn,"^$1")),t}un.exports.command=Ip;un.exports.argument=Np});var cc=y((ag,ac)=>{"use strict";ac.exports=/^#!(.*)/});var lc=y((cg,uc)=>{"use strict";var Op=cc();uc.exports=(t="")=>{let e=t.match(Op);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var hc=y((ug,fc)=>{"use strict";var ln=require("fs"),Lp=lc();function Dp(t){let r=Buffer.alloc(150),n;try{n=ln.openSync(t,"r"),ln.readSync(n,r,0,150,0),ln.closeSync(n)}catch{}return Lp(r.toString())}fc.exports=Dp});var Ec=y((lg,pc)=>{"use strict";var Rp=require("path"),dc=sc(),mc=oc(),bp=hc(),Tp=process.platform==="win32",Ap=/\.(?:com|exe)$/i,$p=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Fp(t){t.file=dc(t);let e=t.file&&bp(t.file);return e?(t.args.unshift(t.file),t.command=e,dc(t)):t.file}function qp(t){if(!Tp)return t;let e=Fp(t),r=!Ap.test(e);if(t.options.forceShell||r){let n=$p.test(e);t.command=Rp.normalize(t.command),t.command=mc.command(t.command),t.args=t.args.map(s=>mc.argument(s,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function _p(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:qp(n)}pc.exports=_p});var wc=y((fg,gc)=>{"use strict";var fn=process.platform==="win32";function hn(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 Pp(t,e){if(!fn)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let s=yc(i,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function yc(t,e){return fn&&t===1&&!e.file?hn(e.original,"spawn"):null}function kp(t,e){return fn&&t===1&&!e.file?hn(e.original,"spawnSync"):null}gc.exports={hookChildProcess:Pp,verifyENOENT:yc,verifyENOENTSync:kp,notFoundError:hn}});var vc=y((hg,it)=>{"use strict";var Sc=require("child_process"),dn=Ec(),mn=wc();function xc(t,e,r){let n=dn(t,e,r),i=Sc.spawn(n.command,n.args,n.options);return mn.hookChildProcess(i,n),i}function Up(t,e,r){let n=dn(t,e,r),i=Sc.spawnSync(n.command,n.args,n.options);return i.error=i.error||mn.verifyENOENTSync(i.status,n),i}it.exports=xc;it.exports.spawn=xc;it.exports.sync=Up;it.exports._parse=dn;it.exports._enoent=mn});var Cc=y((dg,Bp)=>{Bp.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 Dc=y(Lc=>{var Ic=require("readline"),Nc=0,Oc=60;function Mp(t){this.clearLine(this.stream),this.stream.write(t)}var ge=function(t){if(!(this instanceof ge))return new ge(t);typeof t=="string"?t={text:t}:t||(t={}),this.text=t.text||"",this.setSpinnerString(Nc),this.setSpinnerDelay(Oc),this.onTick=t.onTick||Mp,this.stream=t.stream||process.stdout};ge.spinners=Cc();ge.setDefaultSpinnerString=function(t){return Nc=t,this};ge.setDefaultSpinnerDelay=function(t){return Oc=t,this};ge.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};ge.prototype.isSpinning=function(){return this.id!==void 0};ge.prototype.setSpinnerDelay=function(t){return this.delay=t,this};ge.prototype.setSpinnerString=function(t){let e=Gp(t,this.spinners);return this.chars=Array.isArray(e)?e:e.split(""),this};ge.prototype.setSpinnerTitle=function(t){return this.text=t,this};ge.prototype.stop=function(t){return this.isSpinning===!1?this:(clearInterval(this.id),this.id=void 0,t&&this.clearLine(this.stream),this)};ge.prototype.clearLine=function(t){return Ic.clearLine(t,0),Ic.cursorTo(t,0),this};function Hp(t){return typeof t=="number"&&t%1===0}function Gp(t,e){if(!Hp(t))return t+"";var r=ge.spinners.length;return t=t>=r?0:t,t=t<0?r+t:t,ge.spinners[t]}Lc.Spinner=ge});function Vp(){try{return En.default.statSync("/.dockerenv"),!0}catch{return!1}}function Wp(){try{return En.default.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function yn(){return pn===void 0&&(pn=Vp()||Wp()),pn}var En,pn,Rc=Ae(()=>{En=Q(require("node:fs"),1)});function st(){return gn===void 0&&(gn=jp()||yn()),gn}var bc,gn,jp,wn=Ae(()=>{bc=Q(require("node:fs"),1);Rc();jp=()=>{try{return bc.default.statSync("/run/.containerenv"),!0}catch{return!1}}});var Sn,Ac,$c,Tc,Lt,Fc=Ae(()=>{Sn=Q(require("node:process"),1),Ac=Q(require("node:os"),1),$c=Q(require("node:fs"),1);wn();Tc=()=>{if(Sn.default.platform!=="linux")return!1;if(Ac.default.release().toLowerCase().includes("microsoft"))return!st();try{return $c.default.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!st():!1}catch{return!1}},Lt=Sn.default.env.__IS_WSL_TEST__?Tc:Tc()});function ze(t,e,r){let n=i=>Object.defineProperty(t,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){let i=r();return n(i),i},set(i){n(i)}}),t}var qc=Ae(()=>{});async function xn(){if(Pc.default.platform!=="darwin")throw new Error("macOS only");let{stdout:t}=await Xp("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(t)?.groups.id??"com.apple.Safari"}var _c,Pc,kc,Xp,Uc=Ae(()=>{_c=require("node:util"),Pc=Q(require("node:process"),1),kc=require("node:child_process"),Xp=(0,_c.promisify)(kc.execFile)});async function Hc(t,{humanReadableOutput:e=!0}={}){if(Bc.default.platform!=="darwin")throw new Error("macOS only");let r=e?[]:["-ss"],{stdout:n}=await zp("osascript",["-e",t,r]);return n.trim()}var Bc,Mc,vn,zp,Gc=Ae(()=>{Bc=Q(require("node:process"),1),Mc=require("node:util"),vn=require("node:child_process"),zp=(0,Mc.promisify)(vn.execFile)});async function Cn(t){return Hc(`tell application "Finder" to set app_path to application file id "${t}" 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 Vc=Ae(()=>{Gc()});async function In(t=Zp){let{stdout:e}=await t("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),r=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(e);if(!r)throw new ur(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=r.groups,i=Yp[n];if(!i)throw new ur(`Unknown browser ID: ${n}`);return i}var Wc,jc,Zp,Yp,ur,Xc=Ae(()=>{Wc=require("node:util"),jc=require("node:child_process"),Zp=(0,Wc.promisify)(jc.execFile),Yp={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"}},ur=class extends Error{}});async function Nn(){if(lr.default.platform==="darwin"){let t=await xn();return{name:await Cn(t),id:t}}if(lr.default.platform==="linux"){let{stdout:t}=await Kp("xdg-mime",["query","default","x-scheme-handler/http"]),e=t.trim();return{name:Jp(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(lr.default.platform==="win32")return In();throw new Error("Only macOS, Linux, and Windows are supported")}var zc,lr,Zc,Kp,Jp,Yc=Ae(()=>{zc=require("node:util"),lr=Q(require("node:process"),1),Zc=require("node:child_process");Uc();Vc();Xc();Kp=(0,zc.promisify)(Zc.execFile),Jp=t=>t.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase())});var iu={};rl(iu,{apps:()=>Ye,default:()=>rE,openApp:()=>tE});function eu(t){if(typeof t=="string"||Array.isArray(t))return t;let{[Jc]:e}=t;if(!e)throw new Error(`${Jc} is not supported`);return e}function On({[ot]:t},{wsl:e}){if(e&&Lt)return eu(e);if(!t)throw new Error(`${ot} is not supported`);return eu(t)}var Dt,tu,ru,nu,Ze,Kc,ot,Jc,Qp,Qc,Rt,eE,tE,Ye,rE,su=Ae(()=>{Dt=Q(require("node:process"),1),tu=require("node:buffer"),ru=Q(require("node:path"),1),nu=Q(require("node:child_process"),1),Ze=Q(require("node:fs/promises"),1);Fc();qc();Yc();wn();Kc=ru.default.join(__dirname,"xdg-open"),{platform:ot,arch:Jc}=Dt.default,Qp=(()=>{let t="/mnt/",e;return async function(){if(e)return e;let r="/etc/wsl.conf",n=!1;try{await Ze.default.access(r,Ze.constants.F_OK),n=!0}catch{}if(!n)return t;let i=await Ze.default.readFile(r,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):t}})(),Qc=async(t,e)=>{let r;for(let n of t)try{return await e(n)}catch(i){r=i}throw r},Rt=async t=>{if(t={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...t},Array.isArray(t.app))return Qc(t.app,a=>Rt({...t,app:a}));let{name:e,arguments:r=[]}=t.app??{};if(r=[...r],Array.isArray(e))return Qc(e,a=>Rt({...t,app:{name:a,arguments:r}}));if(e==="browser"||e==="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 Nn();if(u.id in a){let l=a[u.id];return e==="browserPrivate"&&r.push(c[l]),Rt({...t,app:{name:Ye[l],arguments:r}})}throw new Error(`${u.name} is not supported as a default browser`)}let n,i=[],s={};if(ot==="darwin")n="open",t.wait&&i.push("--wait-apps"),t.background&&i.push("--background"),t.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(ot==="win32"||Lt&&!st()&&!e){let a=await Qp();n=Lt?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${Dt.default.env.SYSTEMROOT||Dt.default.env.windir||"C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),Lt||(s.windowsVerbatimArguments=!0);let c=["Start"];t.wait&&c.push("-Wait"),e?(c.push(`"\`"${e}\`""`),t.target&&r.push(t.target)):t.target&&c.push(`"${t.target}"`),r.length>0&&(r=r.map(u=>`"\`"${u}\`""`),c.push("-ArgumentList",r.join(","))),t.target=tu.Buffer.from(c.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let a=!__dirname||__dirname==="/",c=!1;try{await Ze.default.access(Kc,Ze.constants.X_OK),c=!0}catch{}n=Dt.default.versions.electron??(ot==="android"||a||!c)?"xdg-open":Kc}r.length>0&&i.push(...r),t.wait||(s.stdio="ignore",s.detached=!0)}ot==="darwin"&&r.length>0&&i.push("--args",...r),t.target&&i.push(t.target);let o=nu.default.spawn(n,i,s);return t.wait?new Promise((a,c)=>{o.once("error",c),o.once("close",u=>{if(!t.allowNonzeroExitCode&&u>0){c(new Error(`Exited with code ${u}`));return}a(o)})}):(o.unref(),o)},eE=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a `target`");return Rt({...e,target:t})},tE=(t,e)=>{if(typeof t!="string"&&!Array.isArray(t))throw new TypeError("Expected a valid `name`");let{arguments:r=[]}=e??{};if(r!=null&&!Array.isArray(r))throw new TypeError("Expected `appArguments` as Array type");return Rt({...e,app:{name:t,arguments:r}})};Ye={};ze(Ye,"chrome",()=>On({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"]}}));ze(Ye,"firefox",()=>On({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));ze(Ye,"edge",()=>On({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));ze(Ye,"browser",()=>"browser");ze(Ye,"browserPrivate",()=>"browserPrivate");rE=eE});var fr=y(ou=>{ou.require=function(){var t=require("fs");if(process.versions.electron)try{t=require("original-fs")}catch{}return t}});var Ln=y((qg,au)=>{au.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 Dn=y((_g,cu)=>{cu.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 lu=y((Pg,uu)=>{var U=fr().require(),at=require("path");U.existsSync=U.existsSync||at.existsSync;uu.exports=function(){var t=[],e=Ln(),r=Dn(),n=at.sep;function i(o){var a=o.split(n)[0];o.split(n).forEach(function(c){if(!(!c||c.substr(-1,1)===":")){a+=n+c;var u;try{u=U.statSync(a)}catch{U.mkdirSync(a)}if(u&&u.isFile())throw r.FILE_IN_THE_WAY.replace("%s",a)}})}function s(o,a,c){typeof a=="boolean"&&(c=a,a=void 0);var u=[];return U.readdirSync(o).forEach(function(l){var f=at.join(o,l);U.statSync(f).isDirectory()&&c&&(u=u.concat(s(f,a,c))),(!a||a.test(f))&&u.push(at.normalize(f)+(U.statSync(f).isDirectory()?n:""))}),u}return{makeDir:function(o){i(o)},crc32:function(o){typeof o=="string"&&(o=Buffer.alloc(o.length,o));var a=Buffer.alloc(4);if(!t.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)),t[c]=u}for(var f=0,m=0,d=o.length,h=~f;--d>=0;)h=t[(h^o[m++])&255]^h>>>8;return f=~h,a.writeInt32LE(f&4294967295,0),a.readUInt32LE(0)},methodToString:function(o){switch(o){case e.STORED:return"STORED ("+o+")";case e.DEFLATED:return"DEFLATED ("+o+")";default:return"UNSUPPORTED ("+o+")"}},writeFileTo:function(o,a,c,u){if(U.existsSync(o)){if(!c)return!1;var l=U.statSync(o);if(l.isDirectory())return!1}var f=at.dirname(o);U.existsSync(f)||i(f);var m;try{m=U.openSync(o,"w",438)}catch{U.chmodSync(o,438),m=U.openSync(o,"w",438)}if(m)try{U.writeSync(m,a,0,a.length,0)}catch(d){throw d}finally{U.closeSync(m)}return U.chmodSync(o,u||438),!0},writeFileToAsync:function(o,a,c,u,l){typeof u=="function"&&(l=u,u=void 0),U.exists(o,function(f){if(f&&!c)return l(!1);U.stat(o,function(m,d){if(f&&d.isDirectory())return l(!1);var h=at.dirname(o);U.exists(h,function(E){E||i(h),U.open(o,"w",438,function(w,p){w?U.chmod(o,438,function(){U.open(o,"w",438,function(S,A){U.write(A,a,0,a.length,0,function(){U.close(A,function(){U.chmod(o,u||438,function(){l(!0)})})})})}):p?U.write(p,a,0,a.length,0,function(){U.close(p,function(){U.chmod(o,u||438,function(){l(!0)})})}):U.chmod(o,u||438,function(){l(!0)})})})})})},findFiles:function(o){return s(o,!0)},getAttributes:function(o){},setAttributes:function(o){},toBuffer:function(o){return Buffer.isBuffer(o)?o:o.length===0?Buffer.alloc(0):Buffer.alloc(o.length,o,"utf8")},Constants:e,Errors:r}}()});var du=y((kg,hu)=>{var hr=fr().require(),fu=require("path");hr.existsSync=hr.existsSync||fu.existsSync;hu.exports=function(t){var e=t||"",r=0,n=s(),i=null;function s(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return e&&hr.existsSync(e)?(i=hr.statSync(e),n.directory=i.isDirectory(),n.mtime=i.mtime,n.atime=i.atime,n.executable=!!(1&parseInt((i.mode&parseInt("777",8)).toString(8)[0])),n.readonly=!!(2&parseInt((i.mode&parseInt("777",8)).toString(8)[0])),n.hidden=fu.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(o){},encodeAttributes:function(o){},toString:function(){return`{
|
|
9
|
+
"path" : "`+e+`,
|
|
10
10
|
"isDirectory" : `+n.directory+`,
|
|
11
11
|
"isReadOnly" : `+n.readonly+`,
|
|
12
12
|
"isHidden" : `+n.hidden+`,
|
|
13
13
|
"isExecutable" : `+n.executable+`,
|
|
14
14
|
"mTime" : `+n.mtime+`
|
|
15
15
|
"aTime" : `+n.atime+`
|
|
16
|
-
}`}}}});var
|
|
17
|
-
"made" : `+
|
|
18
|
-
"version" : `+
|
|
16
|
+
}`}}}});var ut=y((Ug,ct)=>{ct.exports=lu();ct.exports.FileSystem=fr();ct.exports.Constants=Ln();ct.exports.Errors=Dn();ct.exports.FileAttr=du()});var pu=y((Bg,mu)=>{var dr=ut(),C=dr.Constants;mu.exports=function(){var t=10,e=10,r=0,n=0,i=0,s=0,o=0,a=0,c=0,u=0,l=0,f=0,m=0,d=0,h=0,E={};function w(p){p=new Date(p),i=(p.getFullYear()-1980&127)<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1}return w(+new Date),{get made(){return t},set made(p){t=p},get version(){return e},set version(p){e=p},get flags(){return r},set flags(p){r=p},get method(){return n},set method(p){n=p},get time(){return new Date((i>>25&127)+1980,(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(i&31)<<1)},set time(p){w(p)},get crc(){return s},set crc(p){s=p},get compressedSize(){return o},set compressedSize(p){o=p},get size(){return a},set size(p){a=p},get fileNameLength(){return c},set fileNameLength(p){c=p},get extraLength(){return u},set extraLength(p){u=p},get commentLength(){return l},set commentLength(p){l=p},get diskNumStart(){return f},set diskNumStart(p){f=p},get inAttr(){return m},set inAttr(p){m=p},get attr(){return d},set attr(p){d=p},get offset(){return h},set offset(p){h=p},get encripted(){return(r&1)===1},get entryHeaderSize(){return C.CENHDR+c+u+l},get realDataOffset(){return h+C.LOCHDR+E.fnameLen+E.extraLen},get dataHeader(){return E},loadDataHeaderFromBinary:function(p){var S=p.slice(h,h+C.LOCHDR);if(S.readUInt32LE(0)!==C.LOCSIG)throw dr.Errors.INVALID_LOC;E={version:S.readUInt16LE(C.LOCVER),flags:S.readUInt16LE(C.LOCFLG),method:S.readUInt16LE(C.LOCHOW),time:S.readUInt32LE(C.LOCTIM),crc:S.readUInt32LE(C.LOCCRC),compressedSize:S.readUInt32LE(C.LOCSIZ),size:S.readUInt32LE(C.LOCLEN),fnameLen:S.readUInt16LE(C.LOCNAM),extraLen:S.readUInt16LE(C.LOCEXT)}},loadFromBinary:function(p){if(p.length!==C.CENHDR||p.readUInt32LE(0)!==C.CENSIG)throw dr.Errors.INVALID_CEN;t=p.readUInt16LE(C.CENVEM),e=p.readUInt16LE(C.CENVER),r=p.readUInt16LE(C.CENFLG),n=p.readUInt16LE(C.CENHOW),i=p.readUInt32LE(C.CENTIM),s=p.readUInt32LE(C.CENCRC),o=p.readUInt32LE(C.CENSIZ),a=p.readUInt32LE(C.CENLEN),c=p.readUInt16LE(C.CENNAM),u=p.readUInt16LE(C.CENEXT),l=p.readUInt16LE(C.CENCOM),f=p.readUInt16LE(C.CENDSK),m=p.readUInt16LE(C.CENATT),d=p.readUInt32LE(C.CENATX),h=p.readUInt32LE(C.CENOFF)},dataHeaderToBinary:function(){var p=Buffer.alloc(C.LOCHDR);return p.writeUInt32LE(C.LOCSIG,0),p.writeUInt16LE(e,C.LOCVER),p.writeUInt16LE(r,C.LOCFLG),p.writeUInt16LE(n,C.LOCHOW),p.writeUInt32LE(i,C.LOCTIM),p.writeUInt32LE(s,C.LOCCRC),p.writeUInt32LE(o,C.LOCSIZ),p.writeUInt32LE(a,C.LOCLEN),p.writeUInt16LE(c,C.LOCNAM),p.writeUInt16LE(u,C.LOCEXT),p},entryHeaderToBinary:function(){var p=Buffer.alloc(C.CENHDR+c+u+l);return p.writeUInt32LE(C.CENSIG,0),p.writeUInt16LE(t,C.CENVEM),p.writeUInt16LE(e,C.CENVER),p.writeUInt16LE(r,C.CENFLG),p.writeUInt16LE(n,C.CENHOW),p.writeUInt32LE(i,C.CENTIM),p.writeUInt32LE(s,C.CENCRC),p.writeUInt32LE(o,C.CENSIZ),p.writeUInt32LE(a,C.CENLEN),p.writeUInt16LE(c,C.CENNAM),p.writeUInt16LE(u,C.CENEXT),p.writeUInt16LE(l,C.CENCOM),p.writeUInt16LE(f,C.CENDSK),p.writeUInt16LE(m,C.CENATT),p.writeUInt32LE(d,C.CENATX),p.writeUInt32LE(h,C.CENOFF),p.fill(0,C.CENHDR),p},toString:function(){return`{
|
|
17
|
+
"made" : `+t+`,
|
|
18
|
+
"version" : `+e+`,
|
|
19
19
|
"flags" : `+r+`,
|
|
20
|
-
"method" : `+
|
|
20
|
+
"method" : `+dr.methodToString(n)+`,
|
|
21
21
|
"time" : `+this.time+`,
|
|
22
|
-
"crc" : 0x`+
|
|
23
|
-
"compressedSize" : `+
|
|
22
|
+
"crc" : 0x`+s.toString(16).toUpperCase()+`,
|
|
23
|
+
"compressedSize" : `+o+` bytes,
|
|
24
24
|
"size" : `+a+` bytes,
|
|
25
25
|
"fileNameLength" : `+c+`,
|
|
26
26
|
"extraLength" : `+u+` bytes,
|
|
27
27
|
"commentLength" : `+l+` bytes,
|
|
28
|
-
"diskNumStart" : `+
|
|
29
|
-
"inAttr" : `+
|
|
30
|
-
"attr" : `+
|
|
31
|
-
"offset" : `+
|
|
32
|
-
"entryHeaderSize" : `+(
|
|
33
|
-
}`}}}});var
|
|
34
|
-
"diskEntries" : `+
|
|
35
|
-
"totalEntries" : `+
|
|
28
|
+
"diskNumStart" : `+f+`,
|
|
29
|
+
"inAttr" : `+m+`,
|
|
30
|
+
"attr" : `+d+`,
|
|
31
|
+
"offset" : `+h+`,
|
|
32
|
+
"entryHeaderSize" : `+(C.CENHDR+c+u+l)+` bytes
|
|
33
|
+
}`}}}});var gu=y((Mg,yu)=>{var Eu=ut(),le=Eu.Constants;yu.exports=function(){var t=0,e=0,r=0,n=0,i=0;return{get diskEntries(){return t},set diskEntries(s){t=e=s},get totalEntries(){return e},set totalEntries(s){e=t=s},get size(){return r},set size(s){r=s},get offset(){return n},set offset(s){n=s},get commentLength(){return i},set commentLength(s){i=s},get mainHeaderSize(){return le.ENDHDR+i},loadFromBinary:function(s){if(s.length!==le.ENDHDR||s.readUInt32LE(0)!==le.ENDSIG)throw Eu.Errors.INVALID_END;t=s.readUInt16LE(le.ENDSUB),e=s.readUInt16LE(le.ENDTOT),r=s.readUInt32LE(le.ENDSIZ),n=s.readUInt32LE(le.ENDOFF),i=s.readUInt16LE(le.ENDCOM)},toBinary:function(){var s=Buffer.alloc(le.ENDHDR+i);return s.writeUInt32LE(le.ENDSIG,0),s.writeUInt32LE(0,4),s.writeUInt16LE(t,le.ENDSUB),s.writeUInt16LE(e,le.ENDTOT),s.writeUInt32LE(r,le.ENDSIZ),s.writeUInt32LE(n,le.ENDOFF),s.writeUInt16LE(i,le.ENDCOM),s.fill(" ",le.ENDHDR),s},toString:function(){return`{
|
|
34
|
+
"diskEntries" : `+t+`,
|
|
35
|
+
"totalEntries" : `+e+`,
|
|
36
36
|
"size" : `+r+` bytes,
|
|
37
37
|
"offset" : 0x`+n.toString(16).toUpperCase()+`,
|
|
38
|
-
"commentLength" : 0x`+
|
|
39
|
-
}`}}}});var
|
|
38
|
+
"commentLength" : 0x`+i+`
|
|
39
|
+
}`}}}});var bn=y(Rn=>{Rn.EntryHeader=pu();Rn.MainHeader=gu()});var wu=y(()=>{});var vu=y((Wg,xu)=>{var Su=require("buffer").Buffer;function nE(t){var e=32768,r=Su.alloc(65536),n=0,i=null,s,o,a=0,c=0,u=-1,l=!1,f=0,m=0,d,h,E,w,p=0,S=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],A=[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],V=[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],Ce=[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],ee=[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],fe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ie(I,N,L,g,q,$){this.status=0,this.r=null,this.maxbit=0;var ne,Ue,P,K=[],ie=[],j=[],Ne=[],J={extra:0,bitcnt:0,lbase:0,next:null};P=this.r=null;for(var k=0;k<17;k++)ie[k]=0,j[k]=0,K[k]=0;for(k=0;k<288;k++)Ne[k]=0;ne=N>256?I[256]:16;for(var xe=-1;++xe<N;)ie[I[xe]]++;if(ie[0]!==N){for(var T=1;T<=16&&ie[T]===0;T++);var qe=T;for(k=16;k!==0&&ie[k]===0;k--);var $t=k;$<T&&($=T);for(var lt=1<<T;T<k;T++,lt<<=1)if((lt-=ie[T])<0){this.status=2,this.maxbit=$;return}if((lt-=ie[k])<0){this.status=2,this.maxbit=$;return}ie[k]+=lt,K[1]=T=0,xe=1;for(var Ft=2;--k>0;)K[Ft++]=T+=ie[xe++];xe=0,k=0;do(T=I[xe++])&&(Ne[K[T]++]=k);while(++k<N);N=K[$t],K[0]=k=0,xe=0;for(var oe=-1,Se=j[0]=0,Te=null,Ve=0,ft=[];qe<=$t;qe++)for(var xr=ie[qe];xr-- >0;){for(;qe>Se+j[1+oe];){if(Se+=j[1+oe],oe++,Ve=(Ve=$t-Se)>$?$:Ve,(Ue=1<<(T=qe-Se))>xr+1)for(Ue-=xr+1,Ft=qe;++T<Ve&&!((Ue<<=1)<=ie[++Ft]);)Ue-=ie[Ft];for(Se+T>ne&&Se<ne&&(T=ne-Se),Ve=1<<T,j[1+oe]=T,Te=[];Te.length<Ve;)Te.push({extra:0,bitcnt:0,lbase:0,next:null});P==null?P=this.r={next:null,list:null}:P=P.next={next:null,list:null},P.next=null,P.list=Te,ft[oe]=Te,oe>0&&(K[oe]=k,J.bitcnt=j[oe],J.extra=16+T,J.next=Te,T=(k&(1<<Se)-1)>>Se-j[oe],ft[oe-1][T].extra=J.extra,ft[oe-1][T].bitcnt=J.bitcnt,ft[oe-1][T].lbase=J.lbase,ft[oe-1][T].next=J.next)}for(J.bitcnt=qe-Se,xe>=N?J.extra=99:Ne[xe]<L?(J.extra=Ne[xe]<256?16:15,J.lbase=Ne[xe++]):(J.extra=q[Ne[xe]-L],J.lbase=g[Ne[xe++]-L]),Ue=1<<qe-Se,T=k>>Se;T<Ve;T+=Ue)Te[T].extra=J.extra,Te[T].bitcnt=J.bitcnt,Te[T].lbase=J.lbase,Te[T].next=J.next;for(T=1<<qe-1;k&T;T>>=1)k^=T;for(k^=T;(k&(1<<Se)-1)!==K[oe];)Se-=j[oe],oe--}this.maxbit=j[1],this.status=lt!==0&&$t!==1?1:0}}function O(I){for(;c<I;)a|=t[p++]<<c,c+=8;return a}function b(I){return c-=I,a>>=I}function D(I){for(;c<I;)a|=t[p++]<<c,c+=8;var N=a&S[I];return a>>=I,c-=I,N}function B(I,N,L){var g,q;if(L===0)return 0;for(var $=0;;){for(q=d.list[O(E)&S[E]],g=q.extra;g>16;){if(g===99)return-1;b(q.bitcnt),g-=16,q=q.next[O(g)&S[g]],g=q.extra}if(b(q.bitcnt),g===16){if(n&=e-1,I[N+$++]=r[n++]=q.lbase,$===L)return L;continue}if(g===15)break;for(f=q.lbase+D(g),q=h.list[O(w)&S[w]],g=q.extra;g>16;){if(g===99)return-1;b(q.bitcnt),g-=16,q=q.next[O(g)&S[g]],g=q.extra}for(b(q.bitcnt),m=n-q.lbase-D(g);f>0&&$<L;)f--,m&=e-1,n&=e-1,I[N+$++]=r[n++]=r[m++];if($===L)return L}return u=-1,$}function G(I,N,L){b(c&7);var g=D(16);if(g!==(~D(16)&65535))return-1;for(f=g,g=0;f>0&&g<L;)f--,n&=e-1,I[N+g++]=r[n++]=D(8);return f===0&&(u=-1),g}function W(I,N,L){var g=0;if(i==null){for(var q=[],$=0;$<144;$++)q[$]=8;for(;$<256;$++)q[$]=9;for(;$<280;$++)q[$]=7;for(;$<288;$++)q[$]=8;o=7;var ne=new Ie(q,288,257,A,V,o);if(ne.status!==0)return-1;for(i=ne.r,o=ne.maxbit,$=0;$<30;$++)q[$]=5;if(g=5,ne=new Ie(q,30,0,Ce,ee,g),ne.status>1)return i=null,-1;s=ne.r,g=ne.maxbit}return d=i,h=s,E=o,w=g,B(I,N,L)}function _(I,N,L){for(var g=new Array(572),q=0;q<572;q++)g[q]=0;var $=257+D(5),ne=1+D(5),Ue=4+D(4);if($>286||ne>30)return-1;for(var P=0;P<Ue;P++)g[fe[P]]=D(3);for(;P<19;P++)g[fe[P]]=0;E=7;var K=new Ie(g,19,19,null,null,E);if(K.status!==0)return-1;d=K.r,E=K.maxbit;for(var ie=$+ne,j=0,Ne=0;j<ie;){var J=d.list[O(E)&S[E]];if(P=J.bitcnt,b(P),P=J.lbase,P<16)g[j++]=Ne=P;else if(P===16){if(P=3+D(2),j+P>ie)return-1;for(;P-- >0;)g[j++]=Ne}else if(P===17){if(P=3+D(3),j+P>ie)return-1;for(;P-- >0;)g[j++]=0;Ne=0}else{if(P=11+D(7),j+P>ie)return-1;for(;P-- >0;)g[j++]=0;Ne=0}}if(E=9,K=new Ie(g,$,257,A,V,E),E===0&&(K.status=1),K.status!==0)return-1;for(d=K.r,E=K.maxbit,j=0;j<ne;j++)g[j]=g[j+$];return w=6,K=new Ie(g,ne,0,Ce,ee,w),h=K.r,w=K.maxbit,w===0&&$>257||K.status!==0?-1:B(I,N,L)}return{inflate:function(I){d=null;for(var N=I.length,L=0,g;L<N;){if(l&&u===-1)return;if(f>0){if(u!==0)for(;f>0&&L<N;)f--,m&=e-1,n&=e-1,I[L++]=r[n++]=r[m++];else{for(;f>0&&L<N;)f--,n&=e-1,I[L++]=r[n++]=D(8);f===0&&(u=-1)}if(L===N)return}if(u===-1){if(l)break;l=D(1)!==0,u=D(2),d=null,f=0}switch(u){case 0:g=G(I,L,N-L);break;case 1:g=d!=null?B(I,L,N-L):W(I,L,N-L);break;case 2:g=d!=null?B(I,L,N-L):_(I,L,N-L);break;default:g=-1;break}if(g===-1)return;L+=g}}}}xu.exports=function(t){var e=require("zlib");return{inflateAsync:function(r){var n=e.createInflateRaw(),i=[],s=0;n.on("data",function(o){i.push(o),s+=o.length}),n.on("end",function(){var o=Su.alloc(s),a=0;o.fill(0);for(var c=0;c<i.length;c++){var u=i[c];u.copy(o,a),a+=u.length}r&&r(o)}),n.end(t)},inflate:function(r){var n={x:new nE(t)};n.x.inflate(r),delete n.x}}}});var Cu=y(Tn=>{Tn.Deflater=wu();Tn.Inflater=vu()});var An=y((Xg,Nu)=>{var z=ut(),iE=bn(),ve=z.Constants,Iu=Cu();Nu.exports=function(t){var e=new iE.EntryHeader,r=Buffer.alloc(0),n=Buffer.alloc(0),i=!1,s=null,o=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(h){return!((e.flags&8)!==8&&z.crc32(h)!==e.crc)}function u(h,E,w){if(typeof E>"u"&&typeof h=="string"&&(w=h,h=void 0),i)return h&&E&&E(Buffer.alloc(0),z.Errors.DIRECTORY_CONTENT_ERROR),Buffer.alloc(0);var p=a();if(p.length===0)return h&&E&&E(p,z.Errors.NO_DATA),p;var S=Buffer.alloc(e.size);switch(e.method){case z.Constants.STORED:return p.copy(S),c(S)?(h&&E&&E(S),S):(h&&E&&E(S,z.Errors.BAD_CRC),z.Errors.BAD_CRC);case z.Constants.DEFLATED:var A=new Iu.Inflater(p);if(h)A.inflateAsync(function(V){V.copy(S,0),c(S)?E&&E(S):E&&E(S,z.Errors.BAD_CRC)});else return A.inflate(S),c(S)||console.warn(z.Errors.BAD_CRC+" "+r.toString()),S;break;default:return h&&E&&E(Buffer.alloc(0),z.Errors.UNKNOWN_METHOD),z.Errors.UNKNOWN_METHOD}}function l(h,E){if((!s||!s.length)&&Buffer.isBuffer(t))return h&&E&&E(a()),a();if(s.length&&!i){var w;switch(e.method){case z.Constants.STORED:return e.compressedSize=e.size,w=Buffer.alloc(s.length),s.copy(w),h&&E&&E(w),w;default:case z.Constants.DEFLATED:var p=new Iu.Deflater(s);if(h)p.deflateAsync(function(A){w=Buffer.alloc(A.length),e.compressedSize=A.length,A.copy(w),E&&E(w)});else{var S=p.deflate();return e.compressedSize=S.length,S}p=null;break}}else if(h&&E)E(Buffer.alloc(0));else return Buffer.alloc(0)}function f(h,E){return(h.readUInt32LE(E+4)<<4)+h.readUInt32LE(E)}function m(h){for(var E=0,w,p,S;E<h.length;)w=h.readUInt16LE(E),E+=2,p=h.readUInt16LE(E),E+=2,S=h.slice(E,E+p),E+=p,ve.ID_ZIP64===w&&d(S)}function d(h){var E,w,p,S;h.length>=ve.EF_ZIP64_SCOMP&&(E=f(h,ve.EF_ZIP64_SUNCOMP),e.size===ve.EF_ZIP64_OR_32&&(e.size=E)),h.length>=ve.EF_ZIP64_RHO&&(w=f(h,ve.EF_ZIP64_SCOMP),e.compressedSize===ve.EF_ZIP64_OR_32&&(e.compressedSize=w)),h.length>=ve.EF_ZIP64_DSN&&(p=f(h,ve.EF_ZIP64_RHO),e.offset===ve.EF_ZIP64_OR_32&&(e.offset=p)),h.length>=ve.EF_ZIP64_DSN+4&&(S=h.readUInt32LE(ve.EF_ZIP64_DSN),e.diskNumStart===ve.EF_ZIP64_OR_16&&(e.diskNumStart=S))}return{get entryName(){return r.toString()},get rawEntryName(){return r},set entryName(h){r=z.toBuffer(h);var E=r[r.length-1];i=E===47||E===92,e.fileNameLength=r.length},get extra(){return o},set extra(h){o=h,e.extraLength=h.length,m(h)},get comment(){return n.toString()},set comment(h){n=z.toBuffer(h),e.commentLength=n.length},get name(){var h=r.toString();return i?h.substr(h.length-1).split("/").pop():h.split("/").pop()},get isDirectory(){return i},getCompressedData:function(){return l(!1,null)},getCompressedDataAsync:function(h){l(!0,h)},setData:function(h){s=z.toBuffer(h),!i&&s.length?(e.size=s.length,e.method=z.Constants.STORED,e.crc=z.crc32(h),e.changed=!0):e.method=z.Constants.STORED},getData:function(h){return e.changed?s:u(!1,null,h)},getDataAsync:function(h,E){e.changed?h(s):u(!0,h,E)},set attr(h){e.attr=h},get attr(){return e.attr},set header(h){e.loadFromBinary(h)},get header(){return e},packHeader:function(){var h=e.entryHeaderToBinary();return r.copy(h,z.Constants.CENHDR),e.extraLength&&o.copy(h,z.Constants.CENHDR+r.length),e.commentLength&&n.copy(h,z.Constants.CENHDR+r.length+e.extraLength,n.length),h},toString:function(){return`{
|
|
40
40
|
"entryName" : "`+r.toString()+`",
|
|
41
|
-
"name" : "`+(
|
|
41
|
+
"name" : "`+(i?r.toString().replace(/\/$/,"").split("/").pop():r.toString().split("/").pop())+`",
|
|
42
42
|
"comment" : "`+n.toString()+`",
|
|
43
|
-
"isDirectory" : `+
|
|
44
|
-
"header" : `+
|
|
45
|
-
"compressedData" : <`+(
|
|
46
|
-
"data" : <`+(
|
|
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
|
-
`)}),
|
|
49
|
-
`)})}let c=this.isGlobalCommand?
|
|
50
|
-
`)})}this.examples.length>0&&
|
|
51
|
-
`)}),
|
|
43
|
+
"isDirectory" : `+i+`,
|
|
44
|
+
"header" : `+e.toString().replace(/\t/mg," ").replace(/}/mg," }")+`,
|
|
45
|
+
"compressedData" : <`+(t&&t.length+" bytes buffer"||"null")+`>
|
|
46
|
+
"data" : <`+(s&&s.length+" bytes buffer"||"null")+`>
|
|
47
|
+
}`}}}});var Lu=y((zg,Ou)=>{var sE=An(),oE=bn(),Re=ut();Ou.exports=function(t,e){var r=[],n={},i=Buffer.alloc(0),s="",o=Re.FileSystem.require(),a=null,c=new oE.MainHeader;e===Re.Constants.FILE?(s=t,a=o.readFileSync(s),l()):e===Re.Constants.BUFFER&&(a=t,l());function u(){n={},r=new Array(c.diskEntries);for(var f=c.offset,m=0;m<r.length;m++){var d=f,h=new sE(a);h.header=a.slice(d,d+=Re.Constants.CENHDR),h.entryName=a.slice(d,d+=h.header.fileNameLength),h.header.extraLength&&(h.extra=a.slice(d,d+=h.header.extraLength)),h.header.commentLength&&(h.comment=a.slice(d,d+h.header.commentLength)),f+=h.header.entryHeaderSize,r[m]=h,n[h.entryName]=h}}function l(){var f=a.length-Re.Constants.ENDHDR,m=Math.max(0,f-65535),d=-1;for(f;f>=m;f--)if(a[f]===80&&a.readUInt32LE(f)===Re.Constants.ENDSIG){d=f;break}if(!~d)throw Re.Errors.INVALID_FORMAT;c.loadFromBinary(a.slice(d,d+Re.Constants.ENDHDR)),c.commentLength&&(i=a.slice(d+Re.Constants.ENDHDR)),u()}return{get entries(){return r},get comment(){return i.toString()},set comment(f){c.commentLength=f.length,i=f},getEntry:function(f){return n[f]||null},setEntry:function(f){r.push(f),n[f.entryName]=f,c.totalEntries=r.length},deleteEntry:function(f){var m=n[f];if(m&&m.isDirectory){var d=this;this.getEntryChildren(m).forEach(function(h){h.entryName!==f&&d.deleteEntry(h.entryName)})}r.splice(r.indexOf(m),1),delete n[f],c.totalEntries=r.length},getEntryChildren:function(f){if(f.isDirectory){var m=[],d=f.entryName,h=d.length;return r.forEach(function(E){E.entryName.substr(0,h)===d&&m.push(E)}),m}return[]},compressToBuffer:function(){r.length>1&&r.sort(function(p,S){var A=p.entryName.toLowerCase(),V=S.entryName.toLowerCase();return A<V?-1:A>V?1:0});var f=0,m=[],d=[],h=0;c.size=0,c.offset=0,r.forEach(function(p){var S=p.getCompressedData();p.header.offset=h;var A=p.header.dataHeaderToBinary(),V=p.entryName+p.extra.toString(),Ce=Buffer.alloc(V.length,V),ee=A.length+Ce.length+S.length;h+=ee,m.push(A),m.push(Ce),m.push(S);var fe=p.packHeader();d.push(fe),c.size+=fe.length,f+=ee+fe.length}),f+=c.mainHeaderSize,c.offset=h,h=0;var E=Buffer.alloc(f);m.forEach(function(p){p.copy(E,h),h+=p.length}),d.forEach(function(p){p.copy(E,h),h+=p.length});var w=c.toBinary();return i&&i.copy(w,Re.Constants.ENDHDR),w.copy(E,h),E},toAsyncBuffer:function(f,m,d,h){r.length>1&&r.sort(function(V,Ce){var ee=V.entryName.toLowerCase(),fe=Ce.entryName.toLowerCase();return ee>fe?-1:ee<fe?1:0});var E=0,w=[],p=[],S=0;c.size=0,c.offset=0;var A=function(V){var Ce=arguments.callee;if(V.length){var ee=V.pop(),fe=ee.entryName+ee.extra.toString();d&&d(fe),ee.getCompressedDataAsync(function(Ie){h&&h(fe),ee.header.offset=S;var O=ee.header.dataHeaderToBinary(),b=Buffer.alloc(fe),D=O.length+b.length+Ie.length;S+=D,w.push(O),w.push(b),w.push(Ie);var B=ee.packHeader();if(p.push(B),c.size+=B.length,E+=D+B.length,V.length)Ce(V);else{E+=c.mainHeaderSize,c.offset=S,S=0;var G=Buffer.alloc(E);w.forEach(function(_){_.copy(G,S),S+=_.length}),p.forEach(function(_){_.copy(G,S),S+=_.length});var W=c.toBinary();i&&i.copy(W,Re.Constants.ENDHDR),W.copy(G,S),f(G)}})}};A(r)}}}});var Ru=y((Yg,Du)=>{var Z=ut(),be=Z.FileSystem.require(),we=require("path");be.existsSync=be.existsSync||we.existsSync;var aE=An(),$n=Lu(),Zg=/^win/.test(process.platform);Du.exports=function(t){var e=void 0,r="";if(t&&typeof t=="string")if(be.existsSync(t))r=t,e=new $n(t,Z.Constants.FILE);else throw Z.Errors.INVALID_FILENAME;else t&&Buffer.isBuffer(t)?e=new $n(t,Z.Constants.BUFFER):e=new $n(null,Z.Constants.NONE);function n(s,o){s=we.resolve(we.normalize(s));for(var a=o.split("/"),c=0,u=a.length;c<u;c++){var l=we.normalize(we.join(s,a.slice(c,u).join(we.sep)));if(l.indexOf(s)===0)return l}return we.normalize(we.join(s,we.basename(o)))}function i(s){if(s&&e){var o;if(typeof s=="string"&&(o=e.getEntry(s)),typeof s=="object"&&typeof s.entryName<"u"&&typeof s.header<"u"&&(o=e.getEntry(s.entryName)),o)return o}return null}return{readFile:function(s){var o=i(s);return o&&o.getData()||null},readFileAsync:function(s,o){var a=i(s);a?a.getDataAsync(o):o(null,"getEntry failed for:"+s)},readAsText:function(s,o){var a=i(s);if(a){var c=a.getData();if(c&&c.length)return c.toString(o||"utf8")}return""},readAsTextAsync:function(s,o,a){var c=i(s);c?c.getDataAsync(function(u){u&&u.length?o(u.toString(a||"utf8")):o("")}):o("")},deleteFile:function(s){var o=i(s);o&&e.deleteEntry(o.entryName)},addZipComment:function(s){e.comment=s},getZipComment:function(){return e.comment||""},addZipEntryComment:function(s,o){var a=i(s);a&&(a.comment=o)},getZipEntryComment:function(s){var o=i(s);return o&&o.comment||""},updateFile:function(s,o){var a=i(s);a&&a.setData(o)},addLocalFile:function(s,o,a){if(be.existsSync(s)){o?(o=o.split("\\").join("/"),o.charAt(o.length-1)!=="/"&&(o+="/")):o="";var c=s.split("\\").join("/").split("/").pop();a?this.addFile(o+a,be.readFileSync(s),"",0):this.addFile(o+c,be.readFileSync(s),"",0)}else throw Z.Errors.FILE_NOT_FOUND.replace("%s",s)},addLocalFolder:function(s,o,a){if(a===void 0?a=function(){return!0}:a instanceof RegExp&&(a=function(l){return function(f){return l.test(f)}}(a)),o?(o=o.split("\\").join("/"),o.charAt(o.length-1)!=="/"&&(o+="/")):o="",s=we.normalize(s),s=s.split("\\").join("/"),s.charAt(s.length-1)!=="/"&&(s+="/"),be.existsSync(s)){var c=Z.findFiles(s),u=this;c.length&&c.forEach(function(l){var f=l.split("\\").join("/").replace(new RegExp(s.replace(/(\(|\))/g,"\\$1"),"i"),"");a(f)&&(f.charAt(f.length-1)!=="/"?u.addFile(o+f,be.readFileSync(l),"",0):u.addFile(o+f,Buffer.alloc(0),"",0))})}else throw Z.Errors.FILE_NOT_FOUND.replace("%s",s)},addFile:function(s,o,a,c){var u=new aE;u.entryName=s,u.comment=a||"",c||(u.isDirectory?c=16877<<16|16:c=420<<16),u.attr=c,u.setData(o),e.setEntry(u)},getEntries:function(){return e?e.entries:[]},getEntry:function(s){return i(s)},extractEntryTo:function(s,o,a,c){c=c||!1,a=typeof a>"u"?!0:a;var u=i(s);if(!u)throw Z.Errors.NO_ENTRY;var l=u.entryName,f=n(o,a?l:we.basename(l));if(u.isDirectory){f=we.resolve(f,"..");var m=e.getEntryChildren(u);return m.forEach(function(h){if(!h.isDirectory){var E=h.getData();if(!E)throw Z.Errors.CANT_EXTRACT_FILE;var w=n(o,a?h.entryName:we.basename(h.entryName));Z.writeFileTo(w,E,c)}}),!0}var d=u.getData();if(!d)throw Z.Errors.CANT_EXTRACT_FILE;if(be.existsSync(f)&&!c)throw Z.Errors.CANT_OVERRIDE;return Z.writeFileTo(f,d,c),!0},test:function(){if(!e)return!1;for(var s in e.entries)try{if(s.isDirectory)continue;var o=e.entries[s].getData();if(!o)return!1}catch{return!1}return!0},extractAllTo:function(s,o){if(o=o||!1,!e)throw Z.Errors.NO_ZIP;e.entries.forEach(function(a){var c=n(s,a.entryName.toString());if(a.isDirectory){Z.makeDir(c);return}var u=a.getData();if(!u)throw Z.Errors.CANT_EXTRACT_FILE;Z.writeFileTo(c,u,o),be.utimesSync(c,a.header.time,a.header.time)})},extractAllToAsync:function(s,o,a){if(a||(a=function(){}),o=o||!1,!e){a(new Error(Z.Errors.NO_ZIP));return}var c=e.entries,u=c.length;c.forEach(function(l){if(!(u<=0)){var f=we.normalize(l.entryName.toString());if(l.isDirectory){Z.makeDir(n(s,f)),--u===0&&a(void 0);return}l.getDataAsync(function(m){if(!(u<=0)){if(!m){u=0,a(new Error(Z.Errors.CANT_EXTRACT_FILE));return}Z.writeFileToAsync(n(s,f),m,o,function(d){if(be.utimesSync(we.resolve(s,f),l.header.time,l.header.time),!(u<=0)){if(!d){u=0,a(new Error("Unable to write"));return}--u===0&&a(void 0)}})}})}})},writeZip:function(s,o){if(arguments.length===1&&typeof s=="function"&&(o=s,s=""),!s&&r&&(s=r),!!s){var a=e.compressToBuffer();if(a){var c=Z.writeFileTo(s,a,!0);typeof o=="function"&&o(c?null:new Error("failed"),"")}}},toBuffer:function(s,o,a,c){return this.valueOf=2,typeof s=="function"?(e.toAsyncBuffer(s,o,a,c),null):e.compressToBuffer()}}}});var H=require("node:path"),yr=require("node:fs/promises"),gr=require("node:child_process"),Fu=require("node:os"),Y=Q(qs());var ks=require("events");function _r(t){return t==null?[]:Array.isArray(t)?t:[t]}function oh(t,e,r,n){var i,s=t[e],o=~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((i=+r,i*0===0?i:r)),!!r):(i=+r,i*0===0?i:r);t[e]=s==null?o:Array.isArray(s)?s.concat(o):[s,o]}function ah(t,e){t=t||[],e=e||{};var r,n,i,s,o,a={_:[]},c=0,u=0,l=0,f=t.length;let m=e.alias!==void 0,d=e.unknown!==void 0,h=e.default!==void 0;if(e.alias=e.alias||{},e.string=_r(e.string),e.boolean=_r(e.boolean),m)for(r in e.alias)for(n=e.alias[r]=_r(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]]||[],u=n.length;u-- >0;)e.boolean.push(n[u]);for(c=e.string.length;c-- >0;)for(n=e.alias[e.string[c]]||[],u=n.length;u-- >0;)e.string.push(n[u]);if(h){for(r in e.default)if(s=typeof e.default[r],n=e.alias[r]=e.alias[r]||[],e[s]!==void 0)for(e[s].push(r),c=0;c<n.length;c++)e[s].push(n[c])}let E=d?Object.keys(e.alias):[];for(c=0;c<f;c++){if(i=t[c],i==="--"){a._=a._.concat(t.slice(++c));break}for(u=0;u<i.length&&i.charCodeAt(u)===45;u++);if(u===0)a._.push(i);else if(i.substring(u,u+3)==="no-"){if(s=i.substring(u+3),d&&!~E.indexOf(s))return e.unknown(i);a[s]=!1}else{for(l=u+1;l<i.length&&i.charCodeAt(l)!==61;l++);for(s=i.substring(u,l),o=i.substring(++l)||c+1===f||(""+t[c+1]).charCodeAt(0)===45||t[++c],n=u===2?[s]:s,l=0;l<n.length;l++){if(s=n[l],d&&!~E.indexOf(s))return e.unknown("-".repeat(u)+s);oh(a,s,l+1<n.length||o,e)}}}if(h)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 Us=t=>t.replace(/[<[].+/,"").trim(),ch=t=>{let e=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,n=[],i=a=>{let c=!1,u=a[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:a[0].startsWith("<"),value:u,variadic:c}},s;for(;s=e.exec(t);)n.push(i(s));let o;for(;o=r.exec(t);)n.push(i(o));return n},uh=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((s,o)=>o!==r&&s.names.some(a=>n.names.includes(a))&&typeof s.required=="boolean")||e.boolean.push(n.names[0]));return e},_s=t=>t.sort((e,r)=>e.length>r.length?-1:1)[0],Ps=(t,e)=>t.length>=e?t:`${t}${" ".repeat(e-t.length)}`,lh=t=>t.replace(/([a-z])-([a-z])/g,(e,r,n)=>r+n.toUpperCase()),fh=(t,e,r)=>{let n=0,i=e.length,s=t,o;for(;n<i;++n)o=s[e[n]],s=s[e[n]]=n===i-1?r:o??(~e[n+1].indexOf(".")||!(+e[n+1]>-1)?{}:[])},hh=(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)))}},dh=t=>{let e=/([^\\\/]+)$/.exec(t);return e?e[1]:""},Bs=t=>t.split(".").map((e,r)=>r===0?lh(e):e).join("."),wt=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}},Pr=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=Us(e).split(",").map(i=>{let s=i.trim().replace(/^-{1,2}/,"");return s.startsWith("no-")&&(this.negated=!0,s=s.replace(/^no-/,"")),Bs(s)}).sort((i,s)=>i.length>s.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}},mh=process.argv,ph=`${process.platform}-${process.arch} node-${process.version}`,Xt=class{constructor(e,r,n={},i){this.rawName=e,this.description=r,this.config=n,this.cli=i,this.options=[],this.aliasNames=[],this.name=Us(e),this.args=ch(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 i=new Pr(e,r,n);return this.options.push(i),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 zt}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:i,helpCallback:s}=this.cli.globalCommand,o=[{body:`${e}${n?`/${n}`:""}`}];if(o.push({title:"Usage",body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=_s(r.map(l=>l.rawName));o.push({title:"Commands",body:r.map(l=>` ${Ps(l.rawName,u.length)} ${l.description}`).join(`
|
|
48
|
+
`)}),o.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${e}${l.name===""?"":` ${l.name}`} --help`).join(`
|
|
49
|
+
`)})}let c=this.isGlobalCommand?i:[...this.options,...i||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=_s(c.map(l=>l.rawName));o.push({title:"Options",body:c.map(l=>` ${Ps(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
|
|
50
|
+
`)})}this.examples.length>0&&o.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(e):u).join(`
|
|
51
|
+
`)}),s&&(o=s(o)||o),console.log(o.map(u=>u.title?`${u.title}:
|
|
52
52
|
${u.body}`:u.body).join(`
|
|
53
53
|
|
|
54
|
-
`))}outputVersion(){let{name:
|
|
55
|
-
`)),process.stdout.write(
|
|
56
|
-
`)),process.exit(1));let
|
|
57
|
-
${
|
|
58
|
-
`))}),{process:
|
|
59
|
-
\u2691 ${
|
|
54
|
+
`))}outputVersion(){let{name:e}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${e}/${r} ${ph}`)}checkRequiredArgs(){let e=this.args.filter(r=>r.required).length;if(this.cli.args.length<e)throw new wt(`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 wt(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:e,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let i of n){let s=e[i.name.split(".")[0]];if(i.required){let o=n.some(a=>a.negated&&a.names.includes(i.name));if(s===!0||s===!1&&!o)throw new wt(`option \`${i.rawName}\` value is missing`)}}}},zt=class extends Xt{constructor(e){super("@@global@@","",{},e)}},jt=Object.assign,kr=class extends ks.EventEmitter{constructor(e=""){super(),this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new zt(this),this.globalCommand.usage("<command> [options]")}usage(e){return this.globalCommand.usage(e),this}command(e,r,n){let i=new Xt(e,r||"",n,this);return i.globalCommand=this.globalCommand,this.commands.push(i),i}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,i){return this.args=e,this.options=r,n&&(this.matchedCommand=n),i&&(this.matchedCommandName=i),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e=mh,{run:r=!0}={}){this.rawArgs=e,this.name||(this.name=e[1]?dh(e[1]):"cli");let n=!0;for(let s of this.commands){let o=this.mri(e.slice(2),s),a=o.args[0];if(s.isMatched(a)){n=!1;let c=jt(jt({},o),{args:o.args.slice(1)});this.setParsedInfo(c,s,a),this.emit(`command:${a}`,s)}}if(n){for(let s of this.commands)if(s.name===""){n=!1;let o=this.mri(e.slice(2),s);this.setParsedInfo(o,s),this.emit("command:!",s)}}if(n){let s=this.mri(e.slice(2));this.setParsedInfo(s)}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 i={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),i}mri(e,r){let n=[...this.globalCommand.options,...r?r.options:[]],i=uh(n),s=[],o=e.indexOf("--");o>-1&&(s=e.slice(o+1),e=e.slice(0,o));let a=ah(e,i);a=Object.keys(a).reduce((m,d)=>jt(jt({},m),{[Bs(d)]:a[d]}),{_:[]});let c=a._,u={"--":s},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let m of n){if(!l&&m.config.default!==void 0)for(let d of m.names)u[d]=m.config.default;Array.isArray(m.config.type)&&f[m.name]===void 0&&(f[m.name]=Object.create(null),f[m.name].shouldTransform=!0,f[m.name].transformFunction=m.config.type[0])}for(let m of Object.keys(a))if(m!=="_"){let d=m.split(".");fh(u,d,a[m]),hh(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:e,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let i=[];return n.args.forEach((s,o)=>{s.variadic?i.push(e.slice(o)):i.push(e[o])}),i.push(r),n.commandAction.apply(this,i)}},Ms=(t="")=>new kr(t);var wr=Q(Ta()),F=Q(Fa()),qu=Q(vc()),_u=Q(Dc()),cE=!1,mr="https",Pu=!0,ku=__dirname,uE=(0,H.join)(ku,"bin"),Sr=Ms("wallaby"),Uu=require((0,H.join)(ku,"package.json")).version,Un=(0,H.join)((0,Fu.homedir)(),".wallaby"),ke=(0,H.join)(Un,"cli"),qn=(0,H.join)(ke,"downloads"),Bu=(0,H.join)(Un,"key.lic"),Mu=(0,H.join)(ke,"wallaby.json"),_n=(0,H.join)(ke,"core.json"),At=(0,H.join)(ke,"pinned.version"),bu=()=>mr+"://update.wallabyjs.com/",lE=10*60*1e3,pr,Fn=0,bt,Tt;Sr.command("[start]","start wallaby").alias("start").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 <version>","if no version is provided, forces a Wallaby Core update to the latest version before starting. Otherwise, installs and pins the specified Wallaby Core version before starting",{type:[String]}).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)=>{yE(e),e.useHttp&&(mr="http"),e.useNonStrictSSL&&(Pu=!1),Y.default.ensureDirSync(Un),Y.default.ensureDirSync(ke),await Vu(e)});Sr.help();Sr.version(Uu);Sr.parse();function Hu(t){clearTimeout(pr),pr=setTimeout(async()=>{await Gu(t)},lE)}async function Gu(t){try{Tt=await zu(t),Tt?.updated&&(bt?.process.send({type:"coreUpdated",version:Er(Tt.path)}),Fn=0)}catch{Fn++}finally{Fn<=3&&Hu(Tt?.path||t)}}async function Vu(t){clearTimeout(pr),bt?.process.removeAllListeners(),bt?.process.kill();let e=!1,r=t.update.trim();if(r==="undefined"||r==="0")e=!1;else if(r==="true")await Pn(),e=!0;else{let s=r.startsWith("v")?r.replace("v",""):r;e=!1,(0,wr.valid)(s)?await NE(s):await Pn()}let{path:n,type:i}=Tt||await hE({forceUpdate:e});bt=fE(n,t),i==="dist"&&Hu(bt.path)}function fE(t,e){let r=["--cli=true","--lkp="+Bu];e.smart&&r.push("--smartStart=true"),e.config&&r.push("--configPath="+(0,H.resolve)(e.config));let n=Bn();n&&r.push("--pinned="+n);let i=Er((0,H.dirname)(t)),[,,s]=i.split(".");parseInt(s,10)<1608&&(process.stdout.write(F.red(`${F.bold("Wallaby Core")} v${i} is not supported.
|
|
55
|
+
`)),process.stdout.write(F.red(`Run with ${F.bold("--update")} flag to get the latest version of Wallaby Core.
|
|
56
|
+
`)),process.exit(1));let o=(0,gr.fork)(t,r,{env:process.env,silent:!0});return e.printLinks=!0,o.on("message",a=>{switch(a?.type){case"uiStarted":e.port=a.port,EE(e,i);break;case"notification":pE(e,a.notification);break;case"restart":Vu(e);break;case"licenseChanged":clearTimeout(pr),Gu(t);break;case"stopped":break;default:break}}),o.on("exit",()=>{process.stdout.write(F.gray(`
|
|
57
|
+
${F.bold("WALLABY CORE")} stopped
|
|
58
|
+
`))}),{process:o,path:t}}async function hE(t){if(cE)return{path:require.resolve("../wallaby/server"),type:"dev"};let e=dE();return e?{path:e,type:"npm"}:{path:await mE(t),type:"dist"}}function dE(){try{let t=require.resolve("@wallabyjs/core"),e=(0,H.join)(t,"server.js");if(Y.default.existsSync(e))return e}catch{}}async function mE(t){let e=Xu(),r=await zu(e,{forceLatestVersion:t?.forceUpdate,useInstalledVersion:!0});if(!r)throw new Error("Could not resolve Wallaby Core");return(0,H.join)(r.path,"server.js")}function pE(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,(s,o)=>(o.startsWith("http")&&r.push({url:o}),s)).replace(/<[^>]*>/g,"");let i=e.type==="error"?F.red:e.type==="warning"?F.yellow:F.green;if(process.stdout.write(i(`
|
|
59
|
+
\u2691 ${e.text}
|
|
60
60
|
|
|
61
|
-
`)),r.length)for(let
|
|
62
|
-
`)}function
|
|
63
|
-
`)),
|
|
64
|
-
`),process.stdout.write(`${
|
|
65
|
-
`)),
|
|
61
|
+
`)),r.length)for(let s of r)process.stdout.write(`${F.green(" \u279C ")}${F.bold(F.yellow(s.title?s.title+": ":""))}${F.cyan(s.url)}
|
|
62
|
+
`)}function EE(t,e){let r=`http://localhost:${t.port}`;process.stdout.write(F.green(` ${F.bold("WALLABY CORE")} v${e}
|
|
63
|
+
`)),t.printLinks&&(process.stdout.write(`${F.green(" \u279C ")}${F.bold(F.yellow("UI:"))} ${F.cyan(r)}
|
|
64
|
+
`),process.stdout.write(`${F.green(" \u279C ")}${F.bold(F.dim("Docs:"))} ${F.cyan("https://wallabyjs.com/docs")}
|
|
65
|
+
`)),t.doNotOpen||gE(r)}function yE(t){for(let[e,r]of Object.entries(t))Array.isArray(r)&&(t[e]=r[r.length-1])}function gE(t){let e=process.env.BROWSER||"";if(e.toLowerCase().endsWith(".js"))wE(e,t);else if(e.toLowerCase()!=="none"){let r=process.env.BROWSER_ARGS?process.env.BROWSER_ARGS.split(" "):[];SE(e,r,t)}}function wE(t,e){let r=process.argv.slice(2);(0,qu.default)(process.execPath,[t,...r,e],{stdio:"inherit"}).on("close",i=>{i!==0&&process.stdout.write(F.red(`
|
|
66
66
|
The script specified as BROWSER environment variable failed.
|
|
67
67
|
|
|
68
|
-
${
|
|
69
|
-
`)[2]}catch{}}function
|
|
68
|
+
${F.cyan(t)} exited with code ${i}.`))})}var Tu=["Google Chrome Canary","Google Chrome Dev","Google Chrome Beta","Google Chrome","Microsoft Edge","Brave Browser","Vivaldi","Chromium"];async function SE(t,e,r){let n=t==="google chrome"?"Google Chrome":t;if(process.platform==="darwin"&&(!n||Tu.includes(n)))try{let s=await Au("ps cax"),o=n&&s.includes(n)?n:Tu.find(a=>s.includes(a));if(o)return await Au(`osascript openChrome.applescript "${encodeURI(r)}" "${o}"`,{cwd:uE}),!0}catch{}process.platform==="darwin"&&t==="open"&&(t=void 0);try{let s=t?{app:{name:t,arguments:e}}:{};return new Promise(async(o,a)=>{let c;try{c=(su(),nl(iu)).default}catch{try{c=(await eval?.("import('open')")).default}catch{}}c&&c(r,s).then(u=>{u.on("error",a)}).catch(a)}).catch(o=>{process.stderr.write(o.stack||o.message)}),!0}catch{return!1}}function Au(t,e){return new Promise((r,n)=>{(0,gr.exec)(t,e,(i,s)=>{i?n(i):r(s.toString())})})}function Wu(){try{let t=r=>r&&r.replace(/^\s+|\s+$/gm,""),e=Y.default.readFileSync(Bu).toString();if(e){let r=e.split(":");r.length===2&&(e=t(r[1]))}return Buffer.from(e,"base64").toString().split(`
|
|
69
|
+
`)[2]}catch{}}function xE(){try{let[t,e,r]=Wu().split("/");return new Date(Date.UTC(parseInt(r,10),parseInt(e,10)-1,parseInt(t,10)))}catch{}}async function ju(t,e){try{await Y.default.remove(t)}catch(r){if(e)throw r;await ju(t,!0)}}function Xu(t,e){let r;if(!t)try{t=JSON.parse(Y.default.readFileSync(_n).toString())}catch{}t||(t={});let n=xE()?.getTime(),i=Bn(),s=Object.keys(t).map(c=>{let u=(0,H.join)(ke,"wallaby"+c),l=(0,H.join)(u,"package.json"),f=i&&Y.default.existsSync(l)?require(l).version:void 0;return{id:c,pinned:i?f===i:!1,package:l,...t[c]}}).sort((c,u)=>u.releaseDate-c.releaseDate),o=new Date().getTime()-1e3*60*60*24*5;s.forEach(c=>{if(!Y.default.existsSync(c.package))e=!0,delete t[c.id];else if(!c.pinned&&c.invalidated&&Object.keys(c.expiry).length===0&&c.invalidated<o){e=!0,delete t[c.id];try{ju((0,H.dirname)(c.package),!0)}catch{}}});let a=s.filter(c=>(!n||c.releaseDate<n)&&t[c.id]);if(a.length){if(n&&n<new Date().getTime()&&!t[a[0].id].expiry[n]){t[a[0].id].expiry[n]=!0;for(let u=1;u<a.length;u++)delete t[a[u].id].expiry[n];e=!0}let c=i?(a.find(u=>u.pinned)||a.find(u=>!u.invalidated)||a[0]).id:(a.find(u=>!u.invalidated)||a[0]).id;r=(0,H.join)(ke,"wallaby"+c)}return e&&Y.default.writeFileSync(_n,JSON.stringify(t)),r}async function zu(t,e){let r=!1,n=t,i=e?.forceLatestVersion,s=e?.useInstalledVersion,o=Wu(),a=bu(),c=d=>CE({name:"version",from:`${d}wallaby.json?${o?"expiry="+o.replace(/\//g,"-"):""}`,to:Mu}),u=Bn(),l=i?!1:n&&Y.default.existsSync(n),f=(0,H.join)(qn,"wallaby.zip");if(!l&&!i&&Y.default.existsSync(f))try{n=await Yu(f),l=!!n&&Y.default.existsSync(n),r=!0}catch{}let m;if(s&&l)m={core:l&&Er(n)||"unknown"};else{let d=kn("Downloading version file");try{try{await c(bu())}catch{a=`${mr}://s3.amazonaws.com/wallaby-downloads/`,await c("http://update.wallabyjs.com/")}}finally{d()}m=vE()}if(u&&(m.core&&(0,wr.gt)(u,m.core)?await Pn():m.core=u),!(l&&Er(n)===m.core))try{n=await $u({name:"core",from:`${a}wallaby-v${m.core}.zip`}),r=!0}catch{n=await $u({name:"core",from:`${mr}://s3.amazonaws.com/wallaby-downloads/wallaby-v${m.core}.zip`}),r=!0}return{path:n,updated:r,type:"dist"}}function vE(){let t=JSON.parse(Y.default.readFileSync(Mu).toString()),e;return t.latestServer.forEach(r=>{r.substring(0,r.lastIndexOf("."))===Uu.substring(0,r.lastIndexOf("."))&&(e=r)}),{core:e}}function Er(t){return JSON.parse(Y.default.readFileSync((0,H.join)(t,"package.json")).toString()).version}async function $u(t){let e=kn("Downloading core"),r=(0,H.join)(qn,"wallaby.zip");try{Y.default.ensureDirSync(qn),await Zu(t.from,t.name,r,2e6)}finally{e()}let n=kn("Extracting core");try{return await Yu(r)}catch(i){throw new Error(`Error while unzipping wallaby.js ${t.name} file: ${i.message}`)}finally{n()}}async function CE(t){return await Zu(t.from,t.name,t.to)}function Zu(t,e,r,n){let i=!1,s=()=>!i&&(i=!0),o="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(t.startsWith("https:")){let m=require("https");Pu===!1&&(l.agent=new m.Agent({rejectUnauthorized:!1}))}let f=await u(t,l);if(!f.ok||f.status!==200)throw new Error(`Error while downloading wallaby.js ${e}, status code: ${f.status}. ${o}`);if(n&&f.headers.get("content-length")&&parseInt(f.headers.get("content-length"),10)<n)throw new Error(`Error while downloading wallaby.js ${e}, file is corrupt. ${o}`);{let m=await f.arrayBuffer();Y.default.writeFileSync(r,Buffer.from(m)),s()&&a(r)}}catch(u){s()&&c(u)}})}async function Yu(t){let e=Ru(),r=new e(t),n=new Date(r.getEntry("package.json").header.time);n.setMinutes(n.getMinutes()-n.getTimezoneOffset());let i=JSON.parse(r.readAsText("package.json")).version,[s,o,a]=i.split(".").map(m=>parseInt(m)),c=require("crypto");if(s>1||o>0||a>1091){let m=`-----BEGIN RSA PUBLIC KEY-----
|
|
70
70
|
MIIBCgKCAQEAngwMnSkF1zlHJggr7kXXO02ytYIlzMdvQxHu6hli+TFIeO72HNfK
|
|
71
71
|
P27g+f8EtlPRB0UwnpAHtkJHNCdwpo04eU8hS8g9vbmNf00luUJGuUHnf62Pp0EI
|
|
72
72
|
KbGKJvzkdPgfs62MItfi4uf+XiHa8rN0Bk7hRbddI1zA4Wupf/E0wZ7UorgCE9XB
|
|
73
73
|
EM6VULphGdHorpmHBW5deeCHIledtMOpOfDSM5lvjiqgVqmjNYT+WXCwjN8yCcyU
|
|
74
74
|
oedY3afSHTyqiuInKcpXd+VJQb2+d7y583Pb3+kDGraBMGFJaWGewm7+IYIlgk5C
|
|
75
75
|
uk54FsjCvwvaa0SKr2rkIBKuyFX3ZGymyQIDAQAB
|
|
76
|
-
-----END RSA PUBLIC KEY-----`,
|
|
76
|
+
-----END RSA PUBLIC KEY-----`,d=r.getEntries();d.sort((w,p)=>w.entryName.localeCompare(p.entryName));let h=r.readAsText("signature.txt"),E=c.createVerify("RSA-SHA512");if(d.forEach(w=>{w.entryName!=="signature.txt"&&E.update(w.getData())}),!E.verify(m,Buffer.from(h,"base64")))throw new Error("could not verify core version")}let l=c.randomBytes(3).toString("hex");for(;Y.default.existsSync((0,H.join)(ke,"wallaby"+l));)l=c.randomBytes(3).toString("hex");let f=(0,H.join)(ke,"wallaby"+l);return await new Promise((m,d)=>{r.extractAllToAsync(f,!0,h=>{h?d(h):m(void 0)})}),IE(l,n.getTime())}function IE(t,e){let r;try{r=JSON.parse(Y.default.readFileSync(_n).toString());let n=new Date().getTime();Object.keys(r).forEach(i=>{!r[i].invalidated&&r[i].releaseDate<=e&&(r[i].invalidated=n)})}catch{r={}}return r[t]={releaseDate:e,invalidated:!1,expiry:{}},Xu(r,!0)}async function NE(t){await(0,yr.writeFile)(At,t)}async function Pn(){if(Y.default.existsSync(At))return await(0,yr.unlink)(At)}function Bn(){if(Y.default.existsSync(At))return Y.default.readFileSync(At,"utf-8")}function kn(t){var e=new _u.Spinner;return e.setSpinnerString(4),e.setSpinnerDelay(250),e.setSpinnerTitle(` ${F.green("%s")} ${t}`),e.start(),()=>e.stop(!0)}
|