UNPKG

@e2b/cli

Version:

CLI for managing e2b sandbox templates

3 lines 2.95 MB
#!/usr/bin/env -S node --enable-source-maps "use strict";var mle=Object.create;var Fm=Object.defineProperty;var hle=Object.getOwnPropertyDescriptor;var _le=Object.getOwnPropertyNames;var gle=Object.getPrototypeOf,Ele=Object.prototype.hasOwnProperty;var kw=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zb=(t,e)=>{for(var r in e)Fm(t,r,{get:e[r],enumerable:!0})},Bw=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _le(e))!Ele.call(t,i)&&i!==r&&Fm(t,i,{get:()=>e[i],enumerable:!(n=hle(e,i))||n.enumerable});return t};var J=(t,e,r)=>(r=t!=null?mle(gle(t)):{},Bw(e||!t||!t.__esModule?Fm(r,"default",{value:t,enumerable:!0}):r,t)),Uw=t=>Bw(Fm({},"__esModule",{value:!0}),t);var Sle,importMetaUrl,u=kw(()=>{"use strict";Sle=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,importMetaUrl=Sle()});var Hw=_((uqe,Gw)=>{"use strict";u();var da=require("constants"),ble=process.cwd,km=null,Tle=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return km||(km=ble.call(process)),km};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Jb=process.chdir,process.chdir=function(t){km=null,Jb.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Jb));var Jb;Gw.exports=yle;function yle(t){da.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=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=o(t.stat),t.fstat=o(t.fstat),t.lstat=o(t.lstat),t.statSync=c(t.statSync),t.fstatSync=c(t.fstatSync),t.lstatSync=c(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(d,f,m){m&&process.nextTick(m)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(d,f,m,p){p&&process.nextTick(p)},t.lchownSync=function(){}),Tle==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(d){function f(m,p,h){var g=Date.now(),S=0;d(m,p,function b(C){if(C&&(C.code==="EACCES"||C.code==="EPERM"||C.code==="EBUSY")&&Date.now()-g<6e4){setTimeout(function(){t.stat(p,function(D,N){D&&D.code==="ENOENT"?d(m,p,b):h(C)})},S),S<100&&(S+=10);return}h&&h(C)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,d),f}(t.rename)),t.read=typeof t.read!="function"?t.read:function(d){function f(m,p,h,g,S,b){var C;if(b&&typeof b=="function"){var D=0;C=function(N,U,z){if(N&&N.code==="EAGAIN"&&D<10)return D++,d.call(t,m,p,h,g,S,C);b.apply(this,arguments)}}return d.call(t,m,p,h,g,S,C)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,d),f}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(d){return function(f,m,p,h,g){for(var S=0;;)try{return d.call(t,f,m,p,h,g)}catch(b){if(b.code==="EAGAIN"&&S<10){S++;continue}throw b}}}(t.readSync);function e(d){d.lchmod=function(f,m,p){d.open(f,da.O_WRONLY|da.O_SYMLINK,m,function(h,g){if(h){p&&p(h);return}d.fchmod(g,m,function(S){d.close(g,function(b){p&&p(S||b)})})})},d.lchmodSync=function(f,m){var p=d.openSync(f,da.O_WRONLY|da.O_SYMLINK,m),h=!0,g;try{g=d.fchmodSync(p,m),h=!1}finally{if(h)try{d.closeSync(p)}catch{}else d.closeSync(p)}return g}}function r(d){da.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(f,m,p,h){d.open(f,da.O_SYMLINK,function(g,S){if(g){h&&h(g);return}d.futimes(S,m,p,function(b){d.close(S,function(C){h&&h(b||C)})})})},d.lutimesSync=function(f,m,p){var h=d.openSync(f,da.O_SYMLINK),g,S=!0;try{g=d.futimesSync(h,m,p),S=!1}finally{if(S)try{d.closeSync(h)}catch{}else d.closeSync(h)}return g}):d.futimes&&(d.lutimes=function(f,m,p,h){h&&process.nextTick(h)},d.lutimesSync=function(){})}function n(d){return d&&function(f,m,p){return d.call(t,f,m,function(h){l(h)&&(h=null),p&&p.apply(this,arguments)})}}function i(d){return d&&function(f,m){try{return d.call(t,f,m)}catch(p){if(!l(p))throw p}}}function s(d){return d&&function(f,m,p,h){return d.call(t,f,m,p,function(g){l(g)&&(g=null),h&&h.apply(this,arguments)})}}function a(d){return d&&function(f,m,p){try{return d.call(t,f,m,p)}catch(h){if(!l(h))throw h}}}function o(d){return d&&function(f,m,p){typeof m=="function"&&(p=m,m=null);function h(g,S){S&&(S.uid<0&&(S.uid+=4294967296),S.gid<0&&(S.gid+=4294967296)),p&&p.apply(this,arguments)}return m?d.call(t,f,m,h):d.call(t,f,h)}}function c(d){return d&&function(f,m){var p=m?d.call(t,f,m):d.call(t,f);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function l(d){if(!d||d.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(d.code==="EINVAL"||d.code==="EPERM"))}}});var Yw=_((fqe,$w)=>{"use strict";u();var qw=require("stream").Stream;$w.exports=xle;function xle(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);qw.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 a=Object.keys(i),o=0,c=a.length;o<c;o++){var l=a[o];this[l]=i[l]}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(d,f){if(d){s.emit("error",d),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);qw.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),a=0,o=s.length;a<o;a++){var c=s[a];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 Ww=_((mqe,Vw)=>{"use strict";u();Vw.exports=Dle;var Cle=Object.getPrototypeOf||function(t){return t.__proto__};function Dle(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:Cle(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var Qw=_((_qe,rT)=>{"use strict";u();var Wt=require("fs"),Ale=Hw(),Rle=Yw(),Ole=Ww(),Bm=require("util"),Pr,Gm;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Pr=Symbol.for("graceful-fs.queue"),Gm=Symbol.for("graceful-fs.previous")):(Pr="___graceful-fs.queue",Gm="___graceful-fs.previous");function Nle(){}function jw(t,e){Object.defineProperty(t,Pr,{get:function(){return e}})}var Eo=Nle;Bm.debuglog?Eo=Bm.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Eo=function(){var t=Bm.format.apply(Bm,arguments);t="GFS4: "+t.split(/\n/).join(` GFS4: `),console.error(t)});Wt[Pr]||(Kw=global[Pr]||[],jw(Wt,Kw),Wt.close=function(t){function e(r,n){return t.call(Wt,r,function(i){i||zw(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,Gm,{value:t}),e}(Wt.close),Wt.closeSync=function(t){function e(r){t.apply(Wt,arguments),zw()}return Object.defineProperty(e,Gm,{value:t}),e}(Wt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Eo(Wt[Pr]),require("assert").equal(Wt[Pr].length,0)}));var Kw;global[Pr]||jw(global,Wt[Pr]);rT.exports=eT(Ole(Wt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Wt.__patched&&(rT.exports=eT(Wt),Wt.__patched=!0);function eT(t){Ale(t),t.gracefulify=eT,t.createReadStream=U,t.createWriteStream=z;var e=t.readFile;t.readFile=r;function r(R,v,G){return typeof v=="function"&&(G=v,v=null),te(R,v,G);function te(se,oe,re,ge){return e(se,oe,function(le){le&&(le.code==="EMFILE"||le.code==="ENFILE")?qc([te,[se,oe,re],le,ge||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(R,v,G,te){return typeof G=="function"&&(te=G,G=null),se(R,v,G,te);function se(oe,re,ge,le,Ee){return n(oe,re,ge,function(be){be&&(be.code==="EMFILE"||be.code==="ENFILE")?qc([se,[oe,re,ge,le],be,Ee||Date.now(),Date.now()]):typeof le=="function"&&le.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=a);function a(R,v,G,te){return typeof G=="function"&&(te=G,G=null),se(R,v,G,te);function se(oe,re,ge,le,Ee){return s(oe,re,ge,function(be){be&&(be.code==="EMFILE"||be.code==="ENFILE")?qc([se,[oe,re,ge,le],be,Ee||Date.now(),Date.now()]):typeof le=="function"&&le.apply(this,arguments)})}}var o=t.copyFile;o&&(t.copyFile=c);function c(R,v,G,te){return typeof G=="function"&&(te=G,G=0),se(R,v,G,te);function se(oe,re,ge,le,Ee){return o(oe,re,ge,function(be){be&&(be.code==="EMFILE"||be.code==="ENFILE")?qc([se,[oe,re,ge,le],be,Ee||Date.now(),Date.now()]):typeof le=="function"&&le.apply(this,arguments)})}}var l=t.readdir;t.readdir=f;var d=/^v[0-5]\./;function f(R,v,G){typeof v=="function"&&(G=v,v=null);var te=d.test(process.version)?function(re,ge,le,Ee){return l(re,se(re,ge,le,Ee))}:function(re,ge,le,Ee){return l(re,ge,se(re,ge,le,Ee))};return te(R,v,G);function se(oe,re,ge,le){return function(Ee,be){Ee&&(Ee.code==="EMFILE"||Ee.code==="ENFILE")?qc([te,[oe,re,ge],Ee,le||Date.now(),Date.now()]):(be&&be.sort&&be.sort(),typeof ge=="function"&&ge.call(this,Ee,be))}}}if(process.version.substr(0,4)==="v0.8"){var m=Rle(t);b=m.ReadStream,D=m.WriteStream}var p=t.ReadStream;p&&(b.prototype=Object.create(p.prototype),b.prototype.open=C);var h=t.WriteStream;h&&(D.prototype=Object.create(h.prototype),D.prototype.open=N),Object.defineProperty(t,"ReadStream",{get:function(){return b},set:function(R){b=R},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return D},set:function(R){D=R},enumerable:!0,configurable:!0});var g=b;Object.defineProperty(t,"FileReadStream",{get:function(){return g},set:function(R){g=R},enumerable:!0,configurable:!0});var S=D;Object.defineProperty(t,"FileWriteStream",{get:function(){return S},set:function(R){S=R},enumerable:!0,configurable:!0});function b(R,v){return this instanceof b?(p.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function C(){var R=this;w(R.path,R.flags,R.mode,function(v,G){v?(R.autoClose&&R.destroy(),R.emit("error",v)):(R.fd=G,R.emit("open",G),R.read())})}function D(R,v){return this instanceof D?(h.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}function N(){var R=this;w(R.path,R.flags,R.mode,function(v,G){v?(R.destroy(),R.emit("error",v)):(R.fd=G,R.emit("open",G))})}function U(R,v){return new t.ReadStream(R,v)}function z(R,v){return new t.WriteStream(R,v)}var q=t.open;t.open=w;function w(R,v,G,te){return typeof G=="function"&&(te=G,G=null),se(R,v,G,te);function se(oe,re,ge,le,Ee){return q(oe,re,ge,function(be,ut){be&&(be.code==="EMFILE"||be.code==="ENFILE")?qc([se,[oe,re,ge,le],be,Ee||Date.now(),Date.now()]):typeof le=="function"&&le.apply(this,arguments)})}}return t}function qc(t){Eo("ENQUEUE",t[0].name,t[1]),Wt[Pr].push(t),tT()}var Um;function zw(){for(var t=Date.now(),e=0;e<Wt[Pr].length;++e)Wt[Pr][e].length>2&&(Wt[Pr][e][3]=t,Wt[Pr][e][4]=t);tT()}function tT(){if(clearTimeout(Um),Um=void 0,Wt[Pr].length!==0){var t=Wt[Pr].shift(),e=t[0],r=t[1],n=t[2],i=t[3],s=t[4];if(i===void 0)Eo("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){Eo("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var o=Date.now()-s,c=Math.max(s-i,1),l=Math.min(c*1.2,100);o>=l?(Eo("RETRY",e.name,r),e.apply(null,r.concat([i]))):Wt[Pr].push(t)}Um===void 0&&(Um=setTimeout(tT,0))}}});var Jw=_((xqe,nT)=>{"use strict";u();(function(){var t;function e(r,n){var i=this instanceof e?this:t;if(i.reset(n),typeof r=="string"&&r.length>0&&i.hash(r),i!==this)return i}e.prototype.hash=function(r){var n,i,s,a,o;switch(o=r.length,this.len+=o,i=this.k1,s=0,this.rem){case 0:i^=o>s?r.charCodeAt(s++)&65535:0;case 1:i^=o>s?(r.charCodeAt(s++)&65535)<<8:0;case 2:i^=o>s?(r.charCodeAt(s++)&65535)<<16:0;case 3:i^=o>s?(r.charCodeAt(s)&255)<<24:0,i^=o>s?(r.charCodeAt(s++)&65280)>>8:0}if(this.rem=o+this.rem&3,o-=this.rem,o>0){for(n=this.h1;i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,n^=i,n=n<<13|n>>>19,n=n*5+3864292196&4294967295,!(s>=o);)i=r.charCodeAt(s++)&65535^(r.charCodeAt(s++)&65535)<<8^(r.charCodeAt(s++)&65535)<<16,a=r.charCodeAt(s++),i^=(a&255)<<24^(a&65280)>>8;switch(i=0,this.rem){case 3:i^=(r.charCodeAt(s+2)&65535)<<16;case 2:i^=(r.charCodeAt(s+1)&65535)<<8;case 1:i^=r.charCodeAt(s)&65535}this.h1=n}return this.k1=i,this},e.prototype.result=function(){var r,n;return r=this.k1,n=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,n^=r),n^=this.len,n^=n>>>16,n=n*51819+(n&65535)*2246770688&4294967295,n^=n>>>13,n=n*44597+(n&65535)*3266445312&4294967295,n^=n>>>16,n>>>0},e.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},t=new e,typeof nT<"u"?nT.exports=e:this.MurmurHash3=e})()});var eL=_((Dqe,Hm)=>{"use strict";u();Hm.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Hm.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Hm.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vm=_((Rqe,Wc)=>{"use strict";u();var Mt=global.process,bo=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};bo(Mt)?(tL=require("assert"),Yc=eL(),rL=/^win/i.test(Mt.platform),rd=require("events"),typeof rd!="function"&&(rd=rd.EventEmitter),Mt.__signal_exit_emitter__?Cr=Mt.__signal_exit_emitter__:(Cr=Mt.__signal_exit_emitter__=new rd,Cr.count=0,Cr.emitted={}),Cr.infinite||(Cr.setMaxListeners(1/0),Cr.infinite=!0),Wc.exports=function(t,e){if(!bo(global.process))return function(){};tL.equal(typeof t,"function","a callback must be provided for exit handler"),Vc===!1&&iT();var r="exit";e&&e.alwaysLast&&(r="afterexit");var n=function(){Cr.removeListener(r,t),Cr.listeners("exit").length===0&&Cr.listeners("afterexit").length===0&&qm()};return Cr.on(r,t),n},qm=function(){!Vc||!bo(global.process)||(Vc=!1,Yc.forEach(function(e){try{Mt.removeListener(e,$m[e])}catch{}}),Mt.emit=Ym,Mt.reallyExit=sT,Cr.count-=1)},Wc.exports.unload=qm,To=function(e,r,n){Cr.emitted[e]||(Cr.emitted[e]=!0,Cr.emit(e,r,n))},$m={},Yc.forEach(function(t){$m[t]=function(){if(bo(global.process)){var r=Mt.listeners(t);r.length===Cr.count&&(qm(),To("exit",null,t),To("afterexit",null,t),rL&&t==="SIGHUP"&&(t="SIGINT"),Mt.kill(Mt.pid,t))}}}),Wc.exports.signals=function(){return Yc},Vc=!1,iT=function(){Vc||!bo(global.process)||(Vc=!0,Cr.count+=1,Yc=Yc.filter(function(e){try{return Mt.on(e,$m[e]),!0}catch{return!1}}),Mt.emit=iL,Mt.reallyExit=nL)},Wc.exports.load=iT,sT=Mt.reallyExit,nL=function(e){bo(global.process)&&(Mt.exitCode=e||0,To("exit",Mt.exitCode,null),To("afterexit",Mt.exitCode,null),sT.call(Mt,Mt.exitCode))},Ym=Mt.emit,iL=function(e,r){if(e==="exit"&&bo(global.process)){r!==void 0&&(Mt.exitCode=r);var n=Ym.apply(this,arguments);return To("exit",Mt.exitCode,null),To("afterexit",Mt.exitCode,null),n}else return Ym.apply(this,arguments)}):Wc.exports=function(){return function(){}};var tL,Yc,rL,rd,Cr,qm,To,$m,Vc,iT,sT,nL,Ym,iL});var oT=_((Nqe,oL)=>{"use strict";u();oL.exports=aT;aT.strict=sL;aT.loose=aL;var wle=Object.prototype.toString,Lle={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function aT(t){return sL(t)||aL(t)}function sL(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function aL(t){return Lle[wle.call(t)]}});var lL=_((Iqe,cL)=>{"use strict";u();var Ple=oT().strict;cL.exports=function(e){if(Ple(e)){var r=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(r=r.slice(e.byteOffset,e.byteOffset+e.byteLength)),r}else return Buffer.from(e)}});var pL=_((Lqe,nd)=>{"use strict";u();nd.exports=Hle;nd.exports.sync=qle;nd.exports._getTmpname=cT;nd.exports._cleanupOnExit=lT;var Ft=require("fs"),Mle=Jw(),uL=Vm(),Fle=require("path"),dL=oT(),fL=lL(),{promisify:Xn}=require("util"),pa={},kle=function(){try{return require("worker_threads").threadId}catch{return 0}}(),Ble=0;function cT(t){return t+"."+Mle(__filename).hash(String(process.pid)).hash(String(kle)).hash(String(++Ble)).result()}function lT(t){return()=>{try{Ft.unlinkSync(typeof t=="function"?t():t)}catch{}}}function Ule(t){return new Promise(e=>{pa[t]||(pa[t]=[]),pa[t].push(e),pa[t].length===1&&e()})}function Wm(t){return t.code==="ENOSYS"||(!process.getuid||process.getuid()!==0)&&(t.code==="EINVAL"||t.code==="EPERM")}async function Gle(t,e,r={}){typeof r=="string"&&(r={encoding:r});let n,i,s=uL(lT(()=>i)),a=Fle.resolve(t);try{await Ule(a);let o=await Xn(Ft.realpath)(t).catch(()=>t);if(i=cT(o),!r.mode||!r.chown){let c=await Xn(Ft.stat)(o).catch(()=>{});c&&(r.mode==null&&(r.mode=c.mode),r.chown==null&&process.getuid&&(r.chown={uid:c.uid,gid:c.gid}))}n=await Xn(Ft.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),dL(e)&&(e=fL(e)),Buffer.isBuffer(e)?await Xn(Ft.write)(n,e,0,e.length,0):e!=null&&await Xn(Ft.write)(n,String(e),0,String(r.encoding||"utf8")),r.fsync!==!1&&await Xn(Ft.fsync)(n),await Xn(Ft.close)(n),n=null,r.chown&&await Xn(Ft.chown)(i,r.chown.uid,r.chown.gid).catch(c=>{if(!Wm(c))throw c}),r.mode&&await Xn(Ft.chmod)(i,r.mode).catch(c=>{if(!Wm(c))throw c}),await Xn(Ft.rename)(i,o)}finally{n&&await Xn(Ft.close)(n).catch(()=>{}),s(),await Xn(Ft.unlink)(i).catch(()=>{}),pa[a].shift(),pa[a].length>0?pa[a][0]():delete pa[a]}}function Hle(t,e,r,n){r instanceof Function&&(n=r,r={});let i=Gle(t,e,r);return n&&i.then(n,n),i}function qle(t,e,r){typeof r=="string"?r={encoding:r}:r||(r={});try{t=Ft.realpathSync(t)}catch{}let n=cT(t);if(!r.mode||!r.chown)try{let c=Ft.statSync(t);r=Object.assign({},r),r.mode||(r.mode=c.mode),!r.chown&&process.getuid&&(r.chown={uid:c.uid,gid:c.gid})}catch{}let i,s=lT(n),a=uL(s),o=!0;try{if(i=Ft.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),dL(e)&&(e=fL(e)),Buffer.isBuffer(e)?Ft.writeSync(i,e,0,e.length,0):e!=null&&Ft.writeSync(i,String(e),0,String(r.encoding||"utf8")),r.fsync!==!1&&Ft.fsyncSync(i),Ft.closeSync(i),i=null,r.chown)try{Ft.chownSync(n,r.chown.uid,r.chown.gid)}catch(c){if(!Wm(c))throw c}if(r.mode)try{Ft.chmodSync(n,r.mode)}catch(c){if(!Wm(c))throw c}Ft.renameSync(n,t),o=!1}finally{if(i)try{Ft.closeSync(i)}catch{}a(),o&&s()}}});var hL=_((Mqe,mL)=>{"use strict";u();mL.exports=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")}});var gL=_((kqe,_L)=>{"use strict";u();var yo=hL(),$le=new Set(["__proto__","prototype","constructor"]),Yle=t=>!t.some(e=>$le.has(e));function Km(t){let e=t.split("."),r=[];for(let n=0;n<e.length;n++){let i=e[n];for(;i[i.length-1]==="\\"&&e[n+1]!==void 0;)i=i.slice(0,-1)+".",i+=e[++n];r.push(i)}return Yle(r)?r:[]}_L.exports={get(t,e,r){if(!yo(t)||typeof e!="string")return r===void 0?t:r;let n=Km(e);if(n.length!==0){for(let i=0;i<n.length;i++)if(t=t[n[i]],t==null){if(i!==n.length-1)return r;break}return t===void 0?r:t}},set(t,e,r){if(!yo(t)||typeof e!="string")return t;let n=t,i=Km(e);for(let s=0;s<i.length;s++){let a=i[s];yo(t[a])||(t[a]={}),s===i.length-1&&(t[a]=r),t=t[a]}return n},delete(t,e){if(!yo(t)||typeof e!="string")return!1;let r=Km(e);for(let n=0;n<r.length;n++){let i=r[n];if(n===r.length-1)return delete t[i],!0;if(t=t[i],!yo(t))return!1}},has(t,e){if(!yo(t)||typeof e!="string")return!1;let r=Km(e);if(r.length===0)return!1;for(let n=0;n<r.length;n++)if(yo(t)){if(!(r[n]in t))return!1;t=t[r[n]]}else return!1;return!0}}});var od=_((o$e,kL)=>{"use strict";u();var gue="2.0.0",Eue=Number.MAX_SAFE_INTEGER||9007199254740991,Sue=16,bue=250,Tue=["major","premajor","minor","preminor","patch","prepatch","prerelease"];kL.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Sue,MAX_SAFE_BUILD_LENGTH:bue,MAX_SAFE_INTEGER:Eue,RELEASE_TYPES:Tue,SEMVER_SPEC_VERSION:gue,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var cd=_((l$e,BL)=>{"use strict";u();var yue=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};BL.exports=yue});var Xc=_((Xi,UL)=>{"use strict";u();var{MAX_SAFE_COMPONENT_LENGTH:gT,MAX_SAFE_BUILD_LENGTH:xue,MAX_LENGTH:Cue}=od(),Due=cd();Xi=UL.exports={};var Aue=Xi.re=[],Rue=Xi.safeRe=[],xe=Xi.src=[],Oue=Xi.safeSrc=[],Ce=Xi.t={},Nue=0,ET="[a-zA-Z0-9-]",vue=[["\\s",1],["\\d",Cue],[ET,xue]],Iue=t=>{for(let[e,r]of vue)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Ke=(t,e,r)=>{let n=Iue(e),i=Nue++;Due(t,i,e),Ce[t]=i,xe[i]=e,Oue[i]=n,Aue[i]=new RegExp(e,r?"g":void 0),Rue[i]=new RegExp(n,r?"g":void 0)};Ke("NUMERICIDENTIFIER","0|[1-9]\\d*");Ke("NUMERICIDENTIFIERLOOSE","\\d+");Ke("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ET}*`);Ke("MAINVERSION",`(${xe[Ce.NUMERICIDENTIFIER]})\\.(${xe[Ce.NUMERICIDENTIFIER]})\\.(${xe[Ce.NUMERICIDENTIFIER]})`);Ke("MAINVERSIONLOOSE",`(${xe[Ce.NUMERICIDENTIFIERLOOSE]})\\.(${xe[Ce.NUMERICIDENTIFIERLOOSE]})\\.(${xe[Ce.NUMERICIDENTIFIERLOOSE]})`);Ke("PRERELEASEIDENTIFIER",`(?:${xe[Ce.NUMERICIDENTIFIER]}|${xe[Ce.NONNUMERICIDENTIFIER]})`);Ke("PRERELEASEIDENTIFIERLOOSE",`(?:${xe[Ce.NUMERICIDENTIFIERLOOSE]}|${xe[Ce.NONNUMERICIDENTIFIER]})`);Ke("PRERELEASE",`(?:-(${xe[Ce.PRERELEASEIDENTIFIER]}(?:\\.${xe[Ce.PRERELEASEIDENTIFIER]})*))`);Ke("PRERELEASELOOSE",`(?:-?(${xe[Ce.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${xe[Ce.PRERELEASEIDENTIFIERLOOSE]})*))`);Ke("BUILDIDENTIFIER",`${ET}+`);Ke("BUILD",`(?:\\+(${xe[Ce.BUILDIDENTIFIER]}(?:\\.${xe[Ce.BUILDIDENTIFIER]})*))`);Ke("FULLPLAIN",`v?${xe[Ce.MAINVERSION]}${xe[Ce.PRERELEASE]}?${xe[Ce.BUILD]}?`);Ke("FULL",`^${xe[Ce.FULLPLAIN]}$`);Ke("LOOSEPLAIN",`[v=\\s]*${xe[Ce.MAINVERSIONLOOSE]}${xe[Ce.PRERELEASELOOSE]}?${xe[Ce.BUILD]}?`);Ke("LOOSE",`^${xe[Ce.LOOSEPLAIN]}$`);Ke("GTLT","((?:<|>)?=?)");Ke("XRANGEIDENTIFIERLOOSE",`${xe[Ce.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ke("XRANGEIDENTIFIER",`${xe[Ce.NUMERICIDENTIFIER]}|x|X|\\*`);Ke("XRANGEPLAIN",`[v=\\s]*(${xe[Ce.XRANGEIDENTIFIER]})(?:\\.(${xe[Ce.XRANGEIDENTIFIER]})(?:\\.(${xe[Ce.XRANGEIDENTIFIER]})(?:${xe[Ce.PRERELEASE]})?${xe[Ce.BUILD]}?)?)?`);Ke("XRANGEPLAINLOOSE",`[v=\\s]*(${xe[Ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${xe[Ce.XRANGEIDENTIFIERLOOSE]})(?:\\.(${xe[Ce.XRANGEIDENTIFIERLOOSE]})(?:${xe[Ce.PRERELEASELOOSE]})?${xe[Ce.BUILD]}?)?)?`);Ke("XRANGE",`^${xe[Ce.GTLT]}\\s*${xe[Ce.XRANGEPLAIN]}$`);Ke("XRANGELOOSE",`^${xe[Ce.GTLT]}\\s*${xe[Ce.XRANGEPLAINLOOSE]}$`);Ke("COERCEPLAIN",`(^|[^\\d])(\\d{1,${gT}})(?:\\.(\\d{1,${gT}}))?(?:\\.(\\d{1,${gT}}))?`);Ke("COERCE",`${xe[Ce.COERCEPLAIN]}(?:$|[^\\d])`);Ke("COERCEFULL",xe[Ce.COERCEPLAIN]+`(?:${xe[Ce.PRERELEASE]})?(?:${xe[Ce.BUILD]})?(?:$|[^\\d])`);Ke("COERCERTL",xe[Ce.COERCE],!0);Ke("COERCERTLFULL",xe[Ce.COERCEFULL],!0);Ke("LONETILDE","(?:~>?)");Ke("TILDETRIM",`(\\s*)${xe[Ce.LONETILDE]}\\s+`,!0);Xi.tildeTrimReplace="$1~";Ke("TILDE",`^${xe[Ce.LONETILDE]}${xe[Ce.XRANGEPLAIN]}$`);Ke("TILDELOOSE",`^${xe[Ce.LONETILDE]}${xe[Ce.XRANGEPLAINLOOSE]}$`);Ke("LONECARET","(?:\\^)");Ke("CARETTRIM",`(\\s*)${xe[Ce.LONECARET]}\\s+`,!0);Xi.caretTrimReplace="$1^";Ke("CARET",`^${xe[Ce.LONECARET]}${xe[Ce.XRANGEPLAIN]}$`);Ke("CARETLOOSE",`^${xe[Ce.LONECARET]}${xe[Ce.XRANGEPLAINLOOSE]}$`);Ke("COMPARATORLOOSE",`^${xe[Ce.GTLT]}\\s*(${xe[Ce.LOOSEPLAIN]})$|^$`);Ke("COMPARATOR",`^${xe[Ce.GTLT]}\\s*(${xe[Ce.FULLPLAIN]})$|^$`);Ke("COMPARATORTRIM",`(\\s*)${xe[Ce.GTLT]}\\s*(${xe[Ce.LOOSEPLAIN]}|${xe[Ce.XRANGEPLAIN]})`,!0);Xi.comparatorTrimReplace="$1$2$3";Ke("HYPHENRANGE",`^\\s*(${xe[Ce.XRANGEPLAIN]})\\s+-\\s+(${xe[Ce.XRANGEPLAIN]})\\s*$`);Ke("HYPHENRANGELOOSE",`^\\s*(${xe[Ce.XRANGEPLAINLOOSE]})\\s+-\\s+(${xe[Ce.XRANGEPLAINLOOSE]})\\s*$`);Ke("STAR","(<|>)?=?\\s*\\*");Ke("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ke("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Zm=_((f$e,GL)=>{"use strict";u();var wue=Object.freeze({loose:!0}),Lue=Object.freeze({}),Pue=t=>t?typeof t!="object"?wue:t:Lue;GL.exports=Pue});var ST=_((m$e,$L)=>{"use strict";u();var HL=/^[0-9]+$/,qL=(t,e)=>{let r=HL.test(t),n=HL.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},Mue=(t,e)=>qL(e,t);$L.exports={compareIdentifiers:qL,rcompareIdentifiers:Mue}});var jr=_((_$e,KL)=>{"use strict";u();var Jm=cd(),{MAX_LENGTH:YL,MAX_SAFE_INTEGER:eh}=od(),{safeRe:VL,safeSrc:WL,t:th}=Xc(),Fue=Zm(),{compareIdentifiers:Zc}=ST(),bT=class t{constructor(e,r){if(r=Fue(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>YL)throw new TypeError(`version is longer than ${YL} characters`);Jm("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?VL[th.LOOSE]:VL[th.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>eh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>eh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>eh||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<eh)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(Jm("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)),Zc(this.major,e.major)||Zc(this.minor,e.minor)||Zc(this.patch,e.patch)}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(Jm("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 Zc(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(Jm("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 Zc(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=new RegExp(`^${this.options.loose?WL[th.PRERELEASELOOSE]:WL[th.PRERELEASE]}$`),s=`-${r}`.match(i);if(!s||s[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]),Zc(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}};KL.exports=bT});var Co=_((E$e,jL)=>{"use strict";u();var zL=jr(),kue=(t,e,r=!1)=>{if(t instanceof zL)return t;try{return new zL(t,e)}catch(n){if(!r)return null;throw n}};jL.exports=kue});var XL=_((b$e,QL)=>{"use strict";u();var Bue=Co(),Uue=(t,e)=>{let r=Bue(t,e);return r?r.version:null};QL.exports=Uue});var JL=_((y$e,ZL)=>{"use strict";u();var Gue=Co(),Hue=(t,e)=>{let r=Gue(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ZL.exports=Hue});var r9=_((C$e,t9)=>{"use strict";u();var e9=jr(),que=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new e9(t instanceof e9?t.version:t,r).inc(e,n,i).version}catch{return null}};t9.exports=que});var s9=_((A$e,i9)=>{"use strict";u();var n9=Co(),$ue=(t,e)=>{let r=n9(t,null,!0),n=n9(e,null,!0),i=r.compare(n);if(i===0)return null;let s=i>0,a=s?r:n,o=s?n:r,c=!!a.prerelease.length;if(!!o.prerelease.length&&!c){if(!o.patch&&!o.minor)return"major";if(o.compareMain(a)===0)return o.minor&&!o.patch?"minor":"patch"}let d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};i9.exports=$ue});var o9=_((O$e,a9)=>{"use strict";u();var Yue=jr(),Vue=(t,e)=>new Yue(t,e).major;a9.exports=Vue});var l9=_((v$e,c9)=>{"use strict";u();var Wue=jr(),Kue=(t,e)=>new Wue(t,e).minor;c9.exports=Kue});var d9=_((w$e,u9)=>{"use strict";u();var zue=jr(),jue=(t,e)=>new zue(t,e).patch;u9.exports=jue});var p9=_((P$e,f9)=>{"use strict";u();var Que=Co(),Xue=(t,e)=>{let r=Que(t,e);return r&&r.prerelease.length?r.prerelease:null};f9.exports=Xue});var Jn=_((F$e,h9)=>{"use strict";u();var m9=jr(),Zue=(t,e,r)=>new m9(t,r).compare(new m9(e,r));h9.exports=Zue});var g9=_((B$e,_9)=>{"use strict";u();var Jue=Jn(),ede=(t,e,r)=>Jue(e,t,r);_9.exports=ede});var S9=_((G$e,E9)=>{"use strict";u();var tde=Jn(),rde=(t,e)=>tde(t,e,!0);E9.exports=rde});var rh=_((q$e,T9)=>{"use strict";u();var b9=jr(),nde=(t,e,r)=>{let n=new b9(t,r),i=new b9(e,r);return n.compare(i)||n.compareBuild(i)};T9.exports=nde});var x9=_((Y$e,y9)=>{"use strict";u();var ide=rh(),sde=(t,e)=>t.sort((r,n)=>ide(r,n,e));y9.exports=sde});var D9=_((W$e,C9)=>{"use strict";u();var ade=rh(),ode=(t,e)=>t.sort((r,n)=>ade(n,r,e));C9.exports=ode});var ld=_((z$e,A9)=>{"use strict";u();var cde=Jn(),lde=(t,e,r)=>cde(t,e,r)>0;A9.exports=lde});var nh=_((Q$e,R9)=>{"use strict";u();var ude=Jn(),dde=(t,e,r)=>ude(t,e,r)<0;R9.exports=dde});var TT=_((Z$e,O9)=>{"use strict";u();var fde=Jn(),pde=(t,e,r)=>fde(t,e,r)===0;O9.exports=pde});var yT=_((eYe,N9)=>{"use strict";u();var mde=Jn(),hde=(t,e,r)=>mde(t,e,r)!==0;N9.exports=hde});var ih=_((rYe,v9)=>{"use strict";u();var _de=Jn(),gde=(t,e,r)=>_de(t,e,r)>=0;v9.exports=gde});var sh=_((iYe,I9)=>{"use strict";u();var Ede=Jn(),Sde=(t,e,r)=>Ede(t,e,r)<=0;I9.exports=Sde});var xT=_((aYe,w9)=>{"use strict";u();var bde=TT(),Tde=yT(),yde=ld(),xde=ih(),Cde=nh(),Dde=sh(),Ade=(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 bde(t,r,n);case"!=":return Tde(t,r,n);case">":return yde(t,r,n);case">=":return xde(t,r,n);case"<":return Cde(t,r,n);case"<=":return Dde(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};w9.exports=Ade});var P9=_((cYe,L9)=>{"use strict";u();var Rde=jr(),Ode=Co(),{safeRe:ah,t:oh}=Xc(),Nde=(t,e)=>{if(t instanceof Rde)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?ah[oh.COERCEFULL]:ah[oh.COERCE]);else{let c=e.includePrerelease?ah[oh.COERCERTLFULL]:ah[oh.COERCERTL],l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],i=r[3]||"0",s=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",o=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Ode(`${n}.${i}.${s}${a}${o}`,e)};L9.exports=Nde});var F9=_((uYe,M9)=>{"use strict";u();var CT=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}};M9.exports=CT});var ei=_((fYe,G9)=>{"use strict";u();var vde=/\s+/g,DT=class t{constructor(e,r){if(r=wde(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof AT)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(vde," "),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=>!B9(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&&Ude(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&&kde)|(this.options.loose&&Bde))+":"+e,i=k9.get(n);if(i)return i;let s=this.options.loose,a=s?yn[on.HYPHENRANGELOOSE]:yn[on.HYPHENRANGE];e=e.replace(a,jde(this.options.includePrerelease)),Nt("hyphen replace",e),e=e.replace(yn[on.COMPARATORTRIM],Pde),Nt("comparator trim",e),e=e.replace(yn[on.TILDETRIM],Mde),Nt("tilde trim",e),e=e.replace(yn[on.CARETTRIM],Fde),Nt("caret trim",e);let o=e.split(" ").map(f=>Gde(f,this.options)).join(" ").split(/\s+/).map(f=>zde(f,this.options));s&&(o=o.filter(f=>(Nt("loose invalid filter",f,this.options),!!f.match(yn[on.COMPARATORLOOSE])))),Nt("range list",o);let c=new Map,l=o.map(f=>new AT(f,this.options));for(let f of l){if(B9(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let d=[...c.values()];return k9.set(n,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>U9(n,r)&&e.set.some(i=>U9(i,r)&&n.every(s=>i.every(a=>s.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Lde(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Qde(this.set[r],e,this.options))return!0;return!1}};G9.exports=DT;var Ide=F9(),k9=new Ide,wde=Zm(),AT=ud(),Nt=cd(),Lde=jr(),{safeRe:yn,t:on,comparatorTrimReplace:Pde,tildeTrimReplace:Mde,caretTrimReplace:Fde}=Xc(),{FLAG_INCLUDE_PRERELEASE:kde,FLAG_LOOSE:Bde}=od(),B9=t=>t.value==="<0.0.0-0",Ude=t=>t.value==="",U9=(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},Gde=(t,e)=>(Nt("comp",t,e),t=$de(t,e),Nt("caret",t),t=Hde(t,e),Nt("tildes",t),t=Vde(t,e),Nt("xrange",t),t=Kde(t,e),Nt("stars",t),t),cn=t=>!t||t.toLowerCase()==="x"||t==="*",Hde=(t,e)=>t.trim().split(/\s+/).map(r=>qde(r,e)).join(" "),qde=(t,e)=>{let r=e.loose?yn[on.TILDELOOSE]:yn[on.TILDE];return t.replace(r,(n,i,s,a,o)=>{Nt("tilde",t,n,i,s,a,o);let c;return cn(i)?c="":cn(s)?c=`>=${i}.0.0 <${+i+1}.0.0-0`:cn(a)?c=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:o?(Nt("replaceTilde pr",o),c=`>=${i}.${s}.${a}-${o} <${i}.${+s+1}.0-0`):c=`>=${i}.${s}.${a} <${i}.${+s+1}.0-0`,Nt("tilde return",c),c})},$de=(t,e)=>t.trim().split(/\s+/).map(r=>Yde(r,e)).join(" "),Yde=(t,e)=>{Nt("caret",t,e);let r=e.loose?yn[on.CARETLOOSE]:yn[on.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(i,s,a,o,c)=>{Nt("caret",t,i,s,a,o,c);let l;return cn(s)?l="":cn(a)?l=`>=${s}.0.0${n} <${+s+1}.0.0-0`:cn(o)?s==="0"?l=`>=${s}.${a}.0${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.0${n} <${+s+1}.0.0-0`:c?(Nt("replaceCaret pr",c),s==="0"?a==="0"?l=`>=${s}.${a}.${o}-${c} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}-${c} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o}-${c} <${+s+1}.0.0-0`):(Nt("no pr"),s==="0"?a==="0"?l=`>=${s}.${a}.${o}${n} <${s}.${a}.${+o+1}-0`:l=`>=${s}.${a}.${o}${n} <${s}.${+a+1}.0-0`:l=`>=${s}.${a}.${o} <${+s+1}.0.0-0`),Nt("caret return",l),l})},Vde=(t,e)=>(Nt("replaceXRanges",t,e),t.split(/\s+/).map(r=>Wde(r,e)).join(" ")),Wde=(t,e)=>{t=t.trim();let r=e.loose?yn[on.XRANGELOOSE]:yn[on.XRANGE];return t.replace(r,(n,i,s,a,o,c)=>{Nt("xRange",t,n,i,s,a,o,c);let l=cn(s),d=l||cn(a),f=d||cn(o),m=f;return i==="="&&m&&(i=""),c=e.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&m?(d&&(a=0),o=0,i===">"?(i=">=",d?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):i==="<="&&(i="<",d?s=+s+1:a=+a+1),i==="<"&&(c="-0"),n=`${i+s}.${a}.${o}${c}`):d?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:f&&(n=`>=${s}.${a}.0${c} <${s}.${+a+1}.0-0`),Nt("xRange return",n),n})},Kde=(t,e)=>(Nt("replaceStars",t,e),t.trim().replace(yn[on.STAR],"")),zde=(t,e)=>(Nt("replaceGTE0",t,e),t.trim().replace(yn[e.includePrerelease?on.GTE0PRE:on.GTE0],"")),jde=t=>(e,r,n,i,s,a,o,c,l,d,f,m)=>(cn(n)?r="":cn(i)?r=`>=${n}.0.0${t?"-0":""}`:cn(s)?r=`>=${n}.${i}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,cn(l)?c="":cn(d)?c=`<${+l+1}.0.0-0`:cn(f)?c=`<${l}.${+d+1}.0-0`:m?c=`<=${l}.${d}.${f}-${m}`:t?c=`<${l}.${d}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),Qde=(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(Nt(t[n].semver),t[n].semver!==AT.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 ud=_((mYe,W9)=>{"use strict";u();var dd=Symbol("SemVer ANY"),NT=class t{static get ANY(){return dd}constructor(e,r){if(r=H9(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),OT("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===dd?this.value="":this.value=this.operator+this.semver.version,OT("comp",this)}parse(e){let r=this.options.loose?q9[$9.COMPARATORLOOSE]:q9[$9.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 Y9(n[2],this.options.loose):this.semver=dd}toString(){return this.value}test(e){if(OT("Comparator.test",e,this.options.loose),this.semver===dd||e===dd)return!0;if(typeof e=="string")try{e=new Y9(e,this.options)}catch{return!1}return RT(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 V9(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new V9(this.value,r).test(e.semver):(r=H9(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("=")||RT(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||RT(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};W9.exports=NT;var H9=Zm(),{safeRe:q9,t:$9}=Xc(),RT=xT(),OT=cd(),Y9=jr(),V9=ei()});var fd=_((_Ye,K9)=>{"use strict";u();var Xde=ei(),Zde=(t,e,r)=>{try{e=new Xde(e,r)}catch{return!1}return e.test(t)};K9.exports=Zde});var j9=_((EYe,z9)=>{"use strict";u();var Jde=ei(),efe=(t,e)=>new Jde(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));z9.exports=efe});var X9=_((bYe,Q9)=>{"use strict";u();var tfe=jr(),rfe=ei(),nfe=(t,e,r)=>{let n=null,i=null,s=null;try{s=new rfe(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new tfe(n,r))}),n};Q9.exports=nfe});var J9=_((yYe,Z9)=>{"use strict";u();var ife=jr(),sfe=ei(),afe=(t,e,r)=>{let n=null,i=null,s=null;try{s=new sfe(e,r)}catch{return null}return t.forEach(a=>{s.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new ife(n,r))}),n};Z9.exports=afe});var r5=_((CYe,t5)=>{"use strict";u();var vT=jr(),ofe=ei(),e5=ld(),cfe=(t,e)=>{t=new ofe(t,e);let r=new vT("0.0.0");if(t.test(r)||(r=new vT("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(a=>{let o=new vT(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!s||e5(o,s))&&(s=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),s&&(!r||e5(r,s))&&(r=s)}return r&&t.test(r)?r:null};t5.exports=cfe});var i5=_((AYe,n5)=>{"use strict";u();var lfe=ei(),ufe=(t,e)=>{try{return new lfe(t,e).range||"*"}catch{return null}};n5.exports=ufe});var ch=_((OYe,c5)=>{"use strict";u();var dfe=jr(),o5=ud(),{ANY:ffe}=o5,pfe=ei(),mfe=fd(),s5=ld(),a5=nh(),hfe=sh(),_fe=ih(),gfe=(t,e,r,n)=>{t=new dfe(t,n),e=new pfe(e,n);let i,s,a,o,c;switch(r){case">":i=s5,s=hfe,a=a5,o=">",c=">=";break;case"<":i=a5,s=_fe,a=s5,o="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(mfe(t,e,n))return!1;for(let l=0;l<e.set.length;++l){let d=e.set[l],f=null,m=null;if(d.forEach(p=>{p.semver===ffe&&(p=new o5(">=0.0.0")),f=f||p,m=m||p,i(p.semver,f.semver,n)?f=p:a(p.semver,m.semver,n)&&(m=p)}),f.operator===o||f.operator===c||(!m.operator||m.operator===o)&&s(t,m.semver))return!1;if(m.operator===c&&a(t,m.semver))return!1}return!0};c5.exports=gfe});var u5=_((vYe,l5)=>{"use strict";u();var Efe=ch(),Sfe=(t,e,r)=>Efe(t,e,">",r);l5.exports=Sfe});var f5=_((wYe,d5)=>{"use strict";u();var bfe=ch(),Tfe=(t,e,r)=>bfe(t,e,"<",r);d5.exports=Tfe});var h5=_((PYe,m5)=>{"use strict";u();var p5=ei(),yfe=(t,e,r)=>(t=new p5(t,r),e=new p5(e,r),t.intersects(e,r));m5.exports=yfe});var g5=_((FYe,_5)=>{"use strict";u();var xfe=fd(),Cfe=Jn();_5.exports=(t,e,r)=>{let n=[],i=null,s=null,a=t.sort((d,f)=>Cfe(d,f,r));for(let d of a)xfe(d,e,r)?(s=d,i||(i=d)):(s&&n.push([i,s]),s=null,i=null);i&&n.push([i,null]);let o=[];for(let[d,f]of n)d===f?o.push(d):!f&&d===a[0]?o.push("*"):f?d===a[0]?o.push(`<=${f}`):o.push(`${d} - ${f}`):o.push(`>=${d}`);let c=o.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e}});var x5=_((BYe,y5)=>{"use strict";u();var E5=ei(),wT=ud(),{ANY:IT}=wT,pd=fd(),LT=Jn(),Dfe=(t,e,r={})=>{if(t===e)return!0;t=new E5(t,r),e=new E5(e,r);let n=!1;e:for(let i of t.set){for(let s of e.set){let a=Rfe(i,s,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},Afe=[new wT(">=0.0.0-0")],S5=[new wT(">=0.0.0")],Rfe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===IT){if(e.length===1&&e[0].semver===IT)return!0;r.includePrerelease?t=Afe:t=S5}if(e.length===1&&e[0].semver===IT){if(r.includePrerelease)return!0;e=S5}let n=new Set,i,s;for(let p of t)p.operator===">"||p.operator===">="?i=b5(i,p,r):p.operator==="<"||p.operator==="<="?s=T5(s,p,r):n.add(p.semver);if(n.size>1)return null;let a;if(i&&s){if(a=LT(i.semver,s.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||s.operator!=="<="))return null}for(let p of n){if(i&&!pd(p,String(i),r)||s&&!pd(p,String(s),r))return null;for(let h of e)if(!pd(p,String(h),r))return!1;return!0}let o,c,l,d,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 p of e){if(d=d||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",i){if(m&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===m.major&&p.semver.minor===m.minor&&p.semver.patch===m.patch&&(m=!1),p.operator===">"||p.operator===">="){if(o=b5(i,p,r),o===p&&o!==i)return!1}else if(i.operator===">="&&!pd(i.semver,String(p),r))return!1}if(s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(c=T5(s,p,r),c===p&&c!==s)return!1}else if(s.operator==="<="&&!pd(s.semver,String(p),r))return!1}if(!p.operator&&(s||i)&&a!==0)return!1}return!(i&&l&&!s&&a!==0||s&&d&&!i&&a!==0||m||f)},b5=(t,e,r)=>{if(!t)return e;let n=LT(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},T5=(t,e,r)=>{if(!t)return e;let n=LT(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};y5.exports=Dfe});var MT=_((GYe,A5)=>{"use strict";u();var PT=Xc(),C5=od(),Ofe=jr(),D5=ST(),Nfe=Co(),vfe=XL(),Ife=JL(),wfe=r9(),Lfe=s9(),Pfe=o9(),Mfe=l9(),Ffe=d9(),kfe=p9(),Bfe=Jn(),Ufe=g9(),Gfe=S9(),Hfe=rh(),qfe=x9(),$fe=D9(),Yfe=ld(),Vfe=nh(),Wfe=TT(),Kfe=yT(),zfe=ih(),jfe=sh(),Qfe=xT(),Xfe=P9(),Zfe=ud(),Jfe=ei(),epe=fd(),tpe=j9(),rpe=X9(),npe=J9(),ipe=r5(),spe=i5(),ape=ch(),ope=u5(),cpe=f5(),lpe=h5(),upe=g5(),dpe=x5();A5.exports={parse:Nfe,valid:vfe,clean:Ife,inc:wfe,diff:Lfe,major:Pfe,minor:Mfe,patch:Ffe,prerelease:kfe,compare:Bfe,rcompare:Ufe,compareLoose:Gfe,compareBuild:Hfe,sort:qfe,rsort:$fe,gt:Yfe,lt:Vfe,eq:Wfe,neq:Kfe,gte:zfe,lte:jfe,cmp:Qfe,coerce:Xfe,Comparator:Zfe,Range:Jfe,satisfies:epe,toComparators:tpe,maxSatisfying:rpe,minSatisfying:npe,minVersion:ipe,validRange:spe,outside:ape,gtr:ope,ltr:cpe,intersects:lpe,simplifyRange:upe,subset:dpe,SemVer:Ofe,re:PT.re,src:PT.src,tokens:PT.t,SEMVER_SPEC_VERSION:C5.SEMVER_SPEC_VERSION,RELEASE_TYPES:C5.RELEASE_TYPES,compareIdentifiers:D5.compareIdentifiers,rcompareIdentifiers:D5.rcompareIdentifiers}});var v5=_((UT,GT)=>{"use strict";u();Object.defineProperty(UT,"__esModule",{value:!0});function Dpe(t){return t.encrypted}var BT=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let n=typeof r.connect=="function",i=typeof r.secureConnect=="function",s=typeof r.close=="function",a=()=>{n&&r.connect(),Dpe(t)&&i&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),s&&t.once("close",r.close)};t.writable&&!t.connecting?a():t.connecting?t.once("connect",a):t.destroyed&&s&&r.close(t._hadError)};UT.default=BT;GT.exports=BT;GT.exports.default=BT});var F5=_((rVe,M5)=>{"use strict";u();var{PassThrough:wpe}=require("stream");M5.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,n=r==="buffer",i=!1;e?i=!(r||n):r=r||"utf8",n&&(r=null);let s=new wpe({objectMode:i});r&&s.setEncoding(r);let a=0,o=[];return s.on("data",c=>{o.push(c),i?a=o.length:a+=c.length}),s.getBufferedValue=()=>e?o:n?Buffer.concat(o,a):o.join(""),s.getBufferedLength=()=>a,s}});var Sd=_((iVe,Ed)=>{"use strict";u();var{constants:Lpe}=require("buffer"),Ppe=require("stream"),{promisify:Mpe}=require("util"),Fpe=F5(),kpe=Mpe(Ppe.pipeline),mh=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function $T(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,n=Fpe(e);return await new Promise((i,s)=>{let a=o=>{o&&n.getBufferedLength()<=Lpe.MAX_LENGTH&&(o.bufferedData=n.getBufferedValue()),s(o)};(async()=>{try{await kpe(t,n),i()}catch(o){a(o)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new mh)})}),n.getBufferedValue()}Ed.exports=$T;Ed.exports.buffer=(t,e)=>$T(t,{...e,encoding:"buffer"});Ed.exports.array=(t,e)=>$T(t,{...e,array:!0});Ed.exports.MaxBufferError=mh});var B5=_((oVe,k5)=>{"use strict";u();var Bpe=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),Upe=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),Gpe=new Set([500,502,503,504]),Hpe={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},qpe={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Do(t){let e=parseInt(t,10);return isFinite(e)?e:0}function $pe(t){return t?Gpe.has(t.status):!0}function YT(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let n of r){let[i,s]=n.split(/=/,2);e[i.trim()]=s===void 0?!0:s.trim().replace(/^"|"$/g,"")}return e}function Ype(t){let e=[];for(let r in t){let n=t[r];e.push(n===!0?r:r+"="+n)}if(e.length)return e.join(", ")}k5.exports=class{constructor(e,r,{shared:n,cacheHeuristic:i,immutableMinTimeToLive:s,ignoreCargoCult:a,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),thi