@gadgetinc/ggt 1.3.3 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +2 -2
  2. package/dist/add-HUMZSYPA.js +78 -0
  3. package/dist/{add-R6TZAGXK.js.map → add-HUMZSYPA.js.map} +2 -2
  4. package/dist/chunk-2V7EFUWO.js +6 -0
  5. package/dist/chunk-2V7EFUWO.js.map +7 -0
  6. package/dist/chunk-56W5U2JG.js +2 -0
  7. package/dist/chunk-56W5U2JG.js.map +7 -0
  8. package/dist/chunk-C4CHGCKD.js +65 -0
  9. package/dist/chunk-C4CHGCKD.js.map +7 -0
  10. package/dist/chunk-DAFEHCX5.js +18 -0
  11. package/dist/{chunk-AGPFNOXG.js.map → chunk-DAFEHCX5.js.map} +2 -2
  12. package/dist/chunk-DNS7DZ7M.js +121 -0
  13. package/dist/chunk-DNS7DZ7M.js.map +7 -0
  14. package/dist/chunk-E3RC22HP.js +12 -0
  15. package/dist/{chunk-AGRDDZFS.js.map → chunk-E3RC22HP.js.map} +2 -2
  16. package/dist/chunk-F3F5GSUN.js +8 -0
  17. package/dist/{chunk-TMPKLC3N.js.map → chunk-F3F5GSUN.js.map} +2 -2
  18. package/dist/chunk-GPJRJAHB.js +2 -0
  19. package/dist/{chunk-B6XQEEUK.js.map → chunk-GPJRJAHB.js.map} +2 -2
  20. package/dist/chunk-O63J4YN5.js +2 -0
  21. package/dist/{chunk-P5OUQ5XQ.js.map → chunk-O63J4YN5.js.map} +2 -2
  22. package/dist/chunk-Q5CNYV3H.js +50 -0
  23. package/dist/{chunk-RIIVR43B.js.map → chunk-Q5CNYV3H.js.map} +4 -4
  24. package/dist/chunk-U43YGCFP.js +187 -0
  25. package/dist/chunk-U43YGCFP.js.map +7 -0
  26. package/dist/chunk-WGSJ2P6E.js +11 -0
  27. package/dist/{chunk-HCQR6OPH.js.map → chunk-WGSJ2P6E.js.map} +2 -2
  28. package/dist/{chunk-NGYGSK7A.js → chunk-XGAPULF7.js} +7 -5
  29. package/dist/chunk-XGAPULF7.js.map +7 -0
  30. package/dist/chunk-YLVZEUX7.js +2 -0
  31. package/dist/{chunk-NO72UU5F.js.map → chunk-YLVZEUX7.js.map} +2 -2
  32. package/dist/chunk-ZCRXH55K.js +2 -0
  33. package/dist/chunk-ZCRXH55K.js.map +7 -0
  34. package/dist/deploy-HTVGCFPH.js +25 -0
  35. package/dist/{deploy-2SXBPB5C.js.map → deploy-HTVGCFPH.js.map} +2 -2
  36. package/dist/dev-MTMQ4VKF.js +58 -0
  37. package/dist/{dev-I23ZQELT.js.map → dev-MTMQ4VKF.js.map} +2 -2
  38. package/dist/esm-OUX6XF3H.js +37 -0
  39. package/dist/esm-OUX6XF3H.js.map +7 -0
  40. package/dist/list-Q3ZPCSNL.js +11 -0
  41. package/dist/{list-ML7QUWEU.js.map → list-Q3ZPCSNL.js.map} +2 -2
  42. package/dist/login-5G4ANYDD.js +2 -0
  43. package/dist/logout-2U2LIOQ5.js +7 -0
  44. package/dist/{logout-PPA6JCDY.js.map → logout-2U2LIOQ5.js.map} +2 -2
  45. package/dist/main.js +11 -11
  46. package/dist/main.js.map +2 -2
  47. package/dist/{open-5DTFJE26.js → open-L5IB23E5.js} +7 -7
  48. package/dist/{open-5DTFJE26.js.map → open-L5IB23E5.js.map} +2 -2
  49. package/dist/{pull-TC2GVZRD.js → pull-K5U5GMEP.js} +7 -7
  50. package/dist/pull-K5U5GMEP.js.map +7 -0
  51. package/dist/push-ADPB3Y24.js +2 -0
  52. package/dist/status-HSABHX5Y.js +14 -0
  53. package/dist/{status-2CZXUGSZ.js.map → status-HSABHX5Y.js.map} +2 -2
  54. package/dist/version-E5ZPB4IG.js +11 -0
  55. package/dist/{version-CXGPMLMK.js.map → version-E5ZPB4IG.js.map} +2 -2
  56. package/dist/whoami-UFOCKGBK.js +7 -0
  57. package/dist/{whoami-NI52A6U4.js.map → whoami-UFOCKGBK.js.map} +2 -2
  58. package/package.json +34 -34
  59. package/dist/add-R6TZAGXK.js +0 -78
  60. package/dist/chunk-3V7YWBUK.js +0 -2
  61. package/dist/chunk-3V7YWBUK.js.map +0 -7
  62. package/dist/chunk-AGPFNOXG.js +0 -18
  63. package/dist/chunk-AGRDDZFS.js +0 -12
  64. package/dist/chunk-B6XQEEUK.js +0 -2
  65. package/dist/chunk-E3I3MPQD.js +0 -117
  66. package/dist/chunk-E3I3MPQD.js.map +0 -7
  67. package/dist/chunk-FQ2LR3BI.js +0 -6
  68. package/dist/chunk-FQ2LR3BI.js.map +0 -7
  69. package/dist/chunk-GIAIN3IJ.js +0 -65
  70. package/dist/chunk-GIAIN3IJ.js.map +0 -7
  71. package/dist/chunk-HCQR6OPH.js +0 -11
  72. package/dist/chunk-IPKFNVOS.js +0 -187
  73. package/dist/chunk-IPKFNVOS.js.map +0 -7
  74. package/dist/chunk-NGYGSK7A.js.map +0 -7
  75. package/dist/chunk-NO72UU5F.js +0 -2
  76. package/dist/chunk-P5OUQ5XQ.js +0 -2
  77. package/dist/chunk-RIIVR43B.js +0 -50
  78. package/dist/chunk-SGMPMYEU.js +0 -2
  79. package/dist/chunk-SGMPMYEU.js.map +0 -7
  80. package/dist/chunk-TMPKLC3N.js +0 -8
  81. package/dist/deploy-2SXBPB5C.js +0 -25
  82. package/dist/dev-I23ZQELT.js +0 -58
  83. package/dist/esm-46TFUFSK.js +0 -36
  84. package/dist/esm-46TFUFSK.js.map +0 -7
  85. package/dist/list-ML7QUWEU.js +0 -11
  86. package/dist/login-CEGC4DIJ.js +0 -2
  87. package/dist/logout-PPA6JCDY.js +0 -7
  88. package/dist/pull-TC2GVZRD.js.map +0 -7
  89. package/dist/push-DUSAXZ3K.js +0 -2
  90. package/dist/status-2CZXUGSZ.js +0 -14
  91. package/dist/version-CXGPMLMK.js +0 -11
  92. package/dist/whoami-NI52A6U4.js +0 -7
  93. /package/dist/{login-CEGC4DIJ.js.map → login-5G4ANYDD.js.map} +0 -0
  94. /package/dist/{push-DUSAXZ3K.js.map → push-ADPB3Y24.js.map} +0 -0
@@ -1,65 +0,0 @@
1
- import{a as P,c as b,e as be,g as c,o as Cd,p as bd}from"./chunk-SGMPMYEU.js";var ie=b(Ps=>{"use strict";c();Ps.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{t.push((s,i)=>s!=null?n(s):r(i)),e.apply(this,t)})},"name",{value:e.name})};Ps.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(n=>r(null,n),r)},"name",{value:e.name})}});var Eu=b((Vb,Fu)=>{c();var Qe=P("constants"),KD=process.cwd,mn=null,XD=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return mn||(mn=KD.call(process)),mn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Ls=process.chdir,process.chdir=function(e){mn=null,Ls.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Ls));var Ls;Fu.exports=QD;function QD(e){Qe.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=o(e.chownSync),e.fchownSync=o(e.fchownSync),e.lchownSync=o(e.lchownSync),e.chmodSync=s(e.chmodSync),e.fchmodSync=s(e.fchmodSync),e.lchmodSync=s(e.lchmodSync),e.stat=u(e.stat),e.fstat=u(e.fstat),e.lstat=u(e.lstat),e.statSync=a(e.statSync),e.fstatSync=a(e.fstatSync),e.lstatSync=a(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(f,y,p){p&&process.nextTick(p)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(f,y,p,m){m&&process.nextTick(m)},e.lchownSync=function(){}),XD==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(f){function y(p,m,g){var d=Date.now(),E=0;f(p,m,function F(A){if(A&&(A.code==="EACCES"||A.code==="EPERM"||A.code==="EBUSY")&&Date.now()-d<6e4){setTimeout(function(){e.stat(m,function(x,k){x&&x.code==="ENOENT"?f(p,m,F):g(A)})},E),E<100&&(E+=10);return}g&&g(A)})}return Object.setPrototypeOf&&Object.setPrototypeOf(y,f),y}(e.rename)),e.read=typeof e.read!="function"?e.read:function(f){function y(p,m,g,d,E,F){var A;if(F&&typeof F=="function"){var x=0;A=function(k,I,K){if(k&&k.code==="EAGAIN"&&x<10)return x++,f.call(e,p,m,g,d,E,A);F.apply(this,arguments)}}return f.call(e,p,m,g,d,E,A)}return Object.setPrototypeOf&&Object.setPrototypeOf(y,f),y}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(f){return function(y,p,m,g,d){for(var E=0;;)try{return f.call(e,y,p,m,g,d)}catch(F){if(F.code==="EAGAIN"&&E<10){E++;continue}throw F}}}(e.readSync);function t(f){f.lchmod=function(y,p,m){f.open(y,Qe.O_WRONLY|Qe.O_SYMLINK,p,function(g,d){if(g){m&&m(g);return}f.fchmod(d,p,function(E){f.close(d,function(F){m&&m(E||F)})})})},f.lchmodSync=function(y,p){var m=f.openSync(y,Qe.O_WRONLY|Qe.O_SYMLINK,p),g=!0,d;try{d=f.fchmodSync(m,p),g=!1}finally{if(g)try{f.closeSync(m)}catch{}else f.closeSync(m)}return d}}function r(f){Qe.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(y,p,m,g){f.open(y,Qe.O_SYMLINK,function(d,E){if(d){g&&g(d);return}f.futimes(E,p,m,function(F){f.close(E,function(A){g&&g(F||A)})})})},f.lutimesSync=function(y,p,m){var g=f.openSync(y,Qe.O_SYMLINK),d,E=!0;try{d=f.futimesSync(g,p,m),E=!1}finally{if(E)try{f.closeSync(g)}catch{}else f.closeSync(g)}return d}):f.futimes&&(f.lutimes=function(y,p,m,g){g&&process.nextTick(g)},f.lutimesSync=function(){})}function n(f){return f&&function(y,p,m){return f.call(e,y,p,function(g){l(g)&&(g=null),m&&m.apply(this,arguments)})}}function s(f){return f&&function(y,p){try{return f.call(e,y,p)}catch(m){if(!l(m))throw m}}}function i(f){return f&&function(y,p,m,g){return f.call(e,y,p,m,function(d){l(d)&&(d=null),g&&g.apply(this,arguments)})}}function o(f){return f&&function(y,p,m){try{return f.call(e,y,p,m)}catch(g){if(!l(g))throw g}}}function u(f){return f&&function(y,p,m){typeof p=="function"&&(m=p,p=null);function g(d,E){E&&(E.uid<0&&(E.uid+=4294967296),E.gid<0&&(E.gid+=4294967296)),m&&m.apply(this,arguments)}return p?f.call(e,y,p,g):f.call(e,y,g)}}function a(f){return f&&function(y,p){var m=p?f.call(e,y,p):f.call(e,y);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function l(f){if(!f||f.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;return!!(y&&(f.code==="EINVAL"||f.code==="EPERM"))}}});var wu=b((Yb,bu)=>{c();var Cu=P("stream").Stream;bu.exports=ep;function ep(e){return{ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);Cu.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,s=s||{};for(var o=Object.keys(s),u=0,a=o.length;u<a;u++){var l=o[u];this[l]=s[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(){i._read()});return}e.open(this.path,this.flags,this.mode,function(f,y){if(f){i.emit("error",f),i.readable=!1;return}i.fd=y,i.emit("open",y),i._read()})}function r(n,s){if(!(this instanceof r))return new r(n,s);Cu.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,s=s||{};for(var i=Object.keys(s),o=0,u=i.length;o<u;o++){var a=i[o];this[a]=s[a]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var xu=b((Kb,_u)=>{"use strict";c();_u.exports=rp;var tp=Object.getPrototypeOf||function(e){return e.__proto__};function rp(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:tp(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Jt=b((Qb,Rs)=>{c();var ee=P("fs"),np=Eu(),sp=wu(),ip=xu(),yn=P("util"),le,Fn;typeof Symbol=="function"&&typeof Symbol.for=="function"?(le=Symbol.for("graceful-fs.queue"),Fn=Symbol.for("graceful-fs.previous")):(le="___graceful-fs.queue",Fn="___graceful-fs.previous");function op(){}function Au(e,t){Object.defineProperty(e,le,{get:function(){return t}})}var At=op;yn.debuglog?At=yn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(At=function(){var e=yn.format.apply(yn,arguments);e="GFS4: "+e.split(/\n/).join(`
2
- GFS4: `),console.error(e)});ee[le]||(Su=global[le]||[],Au(ee,Su),ee.close=function(e){function t(r,n){return e.call(ee,r,function(s){s||vu(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,Fn,{value:e}),t}(ee.close),ee.closeSync=function(e){function t(r){e.apply(ee,arguments),vu()}return Object.defineProperty(t,Fn,{value:e}),t}(ee.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){At(ee[le]),P("assert").equal(ee[le].length,0)}));var Su;global[le]||Au(global,ee[le]);Rs.exports=Bs(ip(ee));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ee.__patched&&(Rs.exports=Bs(ee),ee.__patched=!0);function Bs(e){np(e),e.gracefulify=Bs,e.createReadStream=I,e.createWriteStream=K;var t=e.readFile;e.readFile=r;function r(L,$,q){return typeof $=="function"&&(q=$,$=null),ue(L,$,q);function ue(ae,se,X,te){return t(ae,se,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?Yt([ue,[ae,se,X],z,te||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=s;function s(L,$,q,ue){return typeof q=="function"&&(ue=q,q=null),ae(L,$,q,ue);function ae(se,X,te,z,ce){return n(se,X,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Yt([ae,[se,X,te,z],Z,ce||Date.now(),Date.now()]):typeof z=="function"&&z.apply(this,arguments)})}}var i=e.appendFile;i&&(e.appendFile=o);function o(L,$,q,ue){return typeof q=="function"&&(ue=q,q=null),ae(L,$,q,ue);function ae(se,X,te,z,ce){return i(se,X,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Yt([ae,[se,X,te,z],Z,ce||Date.now(),Date.now()]):typeof z=="function"&&z.apply(this,arguments)})}}var u=e.copyFile;u&&(e.copyFile=a);function a(L,$,q,ue){return typeof q=="function"&&(ue=q,q=0),ae(L,$,q,ue);function ae(se,X,te,z,ce){return u(se,X,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Yt([ae,[se,X,te,z],Z,ce||Date.now(),Date.now()]):typeof z=="function"&&z.apply(this,arguments)})}}var l=e.readdir;e.readdir=y;var f=/^v[0-5]\./;function y(L,$,q){typeof $=="function"&&(q=$,$=null);var ue=f.test(process.version)?function(X,te,z,ce){return l(X,ae(X,te,z,ce))}:function(X,te,z,ce){return l(X,te,ae(X,te,z,ce))};return ue(L,$,q);function ae(se,X,te,z){return function(ce,Z){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?Yt([ue,[se,X,te],ce,z||Date.now(),Date.now()]):(Z&&Z.sort&&Z.sort(),typeof te=="function"&&te.call(this,ce,Z))}}}if(process.version.substr(0,4)==="v0.8"){var p=sp(e);F=p.ReadStream,x=p.WriteStream}var m=e.ReadStream;m&&(F.prototype=Object.create(m.prototype),F.prototype.open=A);var g=e.WriteStream;g&&(x.prototype=Object.create(g.prototype),x.prototype.open=k),Object.defineProperty(e,"ReadStream",{get:function(){return F},set:function(L){F=L},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return x},set:function(L){x=L},enumerable:!0,configurable:!0});var d=F;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(L){d=L},enumerable:!0,configurable:!0});var E=x;Object.defineProperty(e,"FileWriteStream",{get:function(){return E},set:function(L){E=L},enumerable:!0,configurable:!0});function F(L,$){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function A(){var L=this;Ie(L.path,L.flags,L.mode,function($,q){$?(L.autoClose&&L.destroy(),L.emit("error",$)):(L.fd=q,L.emit("open",q),L.read())})}function x(L,$){return this instanceof x?(g.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function k(){var L=this;Ie(L.path,L.flags,L.mode,function($,q){$?(L.destroy(),L.emit("error",$)):(L.fd=q,L.emit("open",q))})}function I(L,$){return new e.ReadStream(L,$)}function K(L,$){return new e.WriteStream(L,$)}var ne=e.open;e.open=Ie;function Ie(L,$,q,ue){return typeof q=="function"&&(ue=q,q=null),ae(L,$,q,ue);function ae(se,X,te,z,ce){return ne(se,X,te,function(Z,AC){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Yt([ae,[se,X,te,z],Z,ce||Date.now(),Date.now()]):typeof z=="function"&&z.apply(this,arguments)})}}return e}function Yt(e){At("ENQUEUE",e[0].name,e[1]),ee[le].push(e),Os()}var gn;function vu(){for(var e=Date.now(),t=0;t<ee[le].length;++t)ee[le][t].length>2&&(ee[le][t][3]=e,ee[le][t][4]=e);Os()}function Os(){if(clearTimeout(gn),gn=void 0,ee[le].length!==0){var e=ee[le].shift(),t=e[0],r=e[1],n=e[2],s=e[3],i=e[4];if(s===void 0)At("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-s>=6e4){At("TIMEOUT",t.name,r);var o=r.pop();typeof o=="function"&&o.call(null,n)}else{var u=Date.now()-i,a=Math.max(i-s,1),l=Math.min(a*1.2,100);u>=l?(At("RETRY",t.name,r),t.apply(null,r.concat([s]))):ee[le].push(e)}gn===void 0&&(gn=setTimeout(Os,0))}}});var ye=b(We=>{"use strict";c();var Tu=ie().fromCallback,me=Jt(),up=["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 me[e]=="function");Object.assign(We,me);up.forEach(e=>{We[e]=Tu(me[e])});We.exists=function(e,t){return typeof t=="function"?me.exists(e,t):new Promise(r=>me.exists(e,r))};We.read=function(e,t,r,n,s,i){return typeof i=="function"?me.read(e,t,r,n,s,i):new Promise((o,u)=>{me.read(e,t,r,n,s,(a,l,f)=>{if(a)return u(a);o({bytesRead:l,buffer:f})})})};We.write=function(e,t,...r){return typeof r[r.length-1]=="function"?me.write(e,t,...r):new Promise((n,s)=>{me.write(e,t,...r,(i,o,u)=>{if(i)return s(i);n({bytesWritten:o,buffer:u})})})};We.readv=function(e,t,...r){return typeof r[r.length-1]=="function"?me.readv(e,t,...r):new Promise((n,s)=>{me.readv(e,t,...r,(i,o,u)=>{if(i)return s(i);n({bytesRead:o,buffers:u})})})};We.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?me.writev(e,t,...r):new Promise((n,s)=>{me.writev(e,t,...r,(i,o,u)=>{if(i)return s(i);n({bytesWritten:o,buffers:u})})})};typeof me.realpath.native=="function"?We.realpath.native=Tu(me.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Pu=b((nw,ku)=>{"use strict";c();var ap=P("path");ku.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(ap.parse(t).root,""))){let n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}}});var Ru=b((iw,Ns)=>{"use strict";c();var Lu=ye(),{checkPath:Bu}=Pu(),Ou=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};Ns.exports.makeDir=async(e,t)=>(Bu(e),Lu.mkdir(e,{mode:Ou(t),recursive:!0}));Ns.exports.makeDirSync=(e,t)=>(Bu(e),Lu.mkdirSync(e,{mode:Ou(t),recursive:!0}))});var Oe=b((uw,Nu)=>{"use strict";c();var cp=ie().fromPromise,{makeDir:lp,makeDirSync:Is}=Ru(),js=cp(lp);Nu.exports={mkdirs:js,mkdirsSync:Is,mkdirp:js,mkdirpSync:Is,ensureDir:js,ensureDirSync:Is}});var et=b((cw,ju)=>{"use strict";c();var fp=ie().fromPromise,Iu=ye();function hp(e){return Iu.access(e).then(()=>!0).catch(()=>!1)}ju.exports={pathExists:fp(hp),pathExistsSync:Iu.existsSync}});var $s=b((fw,$u)=>{"use strict";c();var Kt=ye(),dp=ie().fromPromise;async function Dp(e,t,r){let n=await Kt.open(e,"r+"),s=null;try{await Kt.futimes(n,t,r)}finally{try{await Kt.close(n)}catch(i){s=i}}if(s)throw s}function pp(e,t,r){let n=Kt.openSync(e,"r+");return Kt.futimesSync(n,t,r),Kt.closeSync(n)}$u.exports={utimesMillis:dp(Dp),utimesMillisSync:pp}});var Tt=b((dw,Gu)=>{"use strict";c();var Xt=ye(),oe=P("path"),Mu=ie().fromPromise;function mp(e,t,r){let n=r.dereference?s=>Xt.stat(s,{bigint:!0}):s=>Xt.lstat(s,{bigint:!0});return Promise.all([n(e),n(t).catch(s=>{if(s.code==="ENOENT")return null;throw s})]).then(([s,i])=>({srcStat:s,destStat:i}))}function yp(e,t,r){let n,s=r.dereference?o=>Xt.statSync(o,{bigint:!0}):o=>Xt.lstatSync(o,{bigint:!0}),i=s(e);try{n=s(t)}catch(o){if(o.code==="ENOENT")return{srcStat:i,destStat:null};throw o}return{srcStat:i,destStat:n}}async function gp(e,t,r,n){let{srcStat:s,destStat:i}=await mp(e,t,n);if(i){if(vr(s,i)){let o=oe.basename(e),u=oe.basename(t);if(r==="move"&&o!==u&&o.toLowerCase()===u.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(s.isDirectory()&&Ms(e,t))throw new Error(En(e,t,r));return{srcStat:s,destStat:i}}function Fp(e,t,r,n){let{srcStat:s,destStat:i}=yp(e,t,n);if(i){if(vr(s,i)){let o=oe.basename(e),u=oe.basename(t);if(r==="move"&&o!==u&&o.toLowerCase()===u.toLowerCase())return{srcStat:s,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!s.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(s.isDirectory()&&Ms(e,t))throw new Error(En(e,t,r));return{srcStat:s,destStat:i}}async function Uu(e,t,r,n){let s=oe.resolve(oe.dirname(e)),i=oe.resolve(oe.dirname(r));if(i===s||i===oe.parse(i).root)return;let o;try{o=await Xt.stat(i,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(vr(t,o))throw new Error(En(e,r,n));return Uu(e,t,i,n)}function qu(e,t,r,n){let s=oe.resolve(oe.dirname(e)),i=oe.resolve(oe.dirname(r));if(i===s||i===oe.parse(i).root)return;let o;try{o=Xt.statSync(i,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(vr(t,o))throw new Error(En(e,r,n));return qu(e,t,i,n)}function vr(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Ms(e,t){let r=oe.resolve(e).split(oe.sep).filter(s=>s),n=oe.resolve(t).split(oe.sep).filter(s=>s);return r.every((s,i)=>n[i]===s)}function En(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}Gu.exports={checkPaths:Mu(gp),checkPathsSync:Fp,checkParentPaths:Mu(Uu),checkParentPathsSync:qu,isSrcSubdir:Ms,areIdentical:vr}});var Zu=b((pw,Vu)=>{"use strict";c();var De=ye(),Ar=P("path"),{mkdirs:Ep}=Oe(),{pathExists:Cp}=et(),{utimesMillis:bp}=$s(),Tr=Tt();async function wp(e,t,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
3
-
4
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:s}=await Tr.checkPaths(e,t,"copy",r);if(await Tr.checkParentPaths(e,n,t,"copy"),!await zu(e,t,r))return;let o=Ar.dirname(t);await Cp(o)||await Ep(o),await Wu(s,e,t,r)}async function zu(e,t,r){return r.filter?r.filter(e,t):!0}async function Wu(e,t,r,n){let i=await(n.dereference?De.stat:De.lstat)(t);if(i.isDirectory())return vp(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return _p(i,e,t,r,n);if(i.isSymbolicLink())return Ap(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function _p(e,t,r,n,s){if(!t)return Hu(e,r,n,s);if(s.overwrite)return await De.unlink(n),Hu(e,r,n,s);if(s.errorOnExist)throw new Error(`'${n}' already exists`)}async function Hu(e,t,r,n){if(await De.copyFile(t,r),n.preserveTimestamps){xp(e.mode)&&await Sp(r,e.mode);let s=await De.stat(t);await bp(r,s.atime,s.mtime)}return De.chmod(r,e.mode)}function xp(e){return(e&128)===0}function Sp(e,t){return De.chmod(e,t|128)}async function vp(e,t,r,n,s){t||await De.mkdir(n);let i=await De.readdir(r);await Promise.all(i.map(async o=>{let u=Ar.join(r,o),a=Ar.join(n,o);if(!await zu(u,a,s))return;let{destStat:f}=await Tr.checkPaths(u,a,"copy",s);return Wu(f,u,a,s)})),t||await De.chmod(n,e.mode)}async function Ap(e,t,r,n){let s=await De.readlink(t);if(n.dereference&&(s=Ar.resolve(process.cwd(),s)),!e)return De.symlink(s,r);let i=null;try{i=await De.readlink(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return De.symlink(s,r);throw o}if(n.dereference&&(i=Ar.resolve(process.cwd(),i)),Tr.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Tr.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return await De.unlink(r),De.symlink(s,r)}Vu.exports=wp});var Qu=b((yw,Xu)=>{"use strict";c();var ge=Jt(),kr=P("path"),Tp=Oe().mkdirsSync,kp=$s().utimesMillisSync,Pr=Tt();function Pp(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
5
-
6
- see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:s}=Pr.checkPathsSync(e,t,"copy",r);if(Pr.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;let i=kr.dirname(t);return ge.existsSync(i)||Tp(i),Yu(s,e,t,r)}function Yu(e,t,r,n){let i=(n.dereference?ge.statSync:ge.lstatSync)(t);if(i.isDirectory())return jp(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Lp(i,e,t,r,n);if(i.isSymbolicLink())return Up(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function Lp(e,t,r,n,s){return t?Bp(e,r,n,s):Ju(e,r,n,s)}function Bp(e,t,r,n){if(n.overwrite)return ge.unlinkSync(r),Ju(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Ju(e,t,r,n){return ge.copyFileSync(t,r),n.preserveTimestamps&&Op(e.mode,t,r),Us(r,e.mode)}function Op(e,t,r){return Rp(e)&&Np(r,e),Ip(t,r)}function Rp(e){return(e&128)===0}function Np(e,t){return Us(e,t|128)}function Us(e,t){return ge.chmodSync(e,t)}function Ip(e,t){let r=ge.statSync(e);return kp(t,r.atime,r.mtime)}function jp(e,t,r,n,s){return t?Ku(r,n,s):$p(e.mode,r,n,s)}function $p(e,t,r,n){return ge.mkdirSync(r),Ku(t,r,n),Us(r,e)}function Ku(e,t,r){ge.readdirSync(e).forEach(n=>Mp(n,e,t,r))}function Mp(e,t,r,n){let s=kr.join(t,e),i=kr.join(r,e);if(n.filter&&!n.filter(s,i))return;let{destStat:o}=Pr.checkPathsSync(s,i,"copy",n);return Yu(o,s,i,n)}function Up(e,t,r,n){let s=ge.readlinkSync(t);if(n.dereference&&(s=kr.resolve(process.cwd(),s)),e){let i;try{i=ge.readlinkSync(r)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return ge.symlinkSync(s,r);throw o}if(n.dereference&&(i=kr.resolve(process.cwd(),i)),Pr.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Pr.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return qp(s,r)}else return ge.symlinkSync(s,r)}function qp(e,t){return ge.unlinkSync(t),ge.symlinkSync(e,t)}Xu.exports=Pp});var Cn=b((Fw,ea)=>{"use strict";c();var Gp=ie().fromPromise;ea.exports={copy:Gp(Zu()),copySync:Qu()}});var Lr=b((Cw,ra)=>{"use strict";c();var ta=Jt(),Hp=ie().fromCallback;function zp(e,t){ta.rm(e,{recursive:!0,force:!0},t)}function Wp(e){ta.rmSync(e,{recursive:!0,force:!0})}ra.exports={remove:Hp(zp),removeSync:Wp}});var la=b((ww,ca)=>{"use strict";c();var Vp=ie().fromPromise,ia=ye(),oa=P("path"),ua=Oe(),aa=Lr(),na=Vp(async function(t){let r;try{r=await ia.readdir(t)}catch{return ua.mkdirs(t)}return Promise.all(r.map(n=>aa.remove(oa.join(t,n))))});function sa(e){let t;try{t=ia.readdirSync(e)}catch{return ua.mkdirsSync(e)}t.forEach(r=>{r=oa.join(e,r),aa.removeSync(r)})}ca.exports={emptyDirSync:sa,emptydirSync:sa,emptyDir:na,emptydir:na}});var Da=b((xw,da)=>{"use strict";c();var Zp=ie().fromPromise,fa=P("path"),Ve=ye(),ha=Oe();async function Yp(e){let t;try{t=await Ve.stat(e)}catch{}if(t&&t.isFile())return;let r=fa.dirname(e),n=null;try{n=await Ve.stat(r)}catch(s){if(s.code==="ENOENT"){await ha.mkdirs(r),await Ve.writeFile(e,"");return}else throw s}n.isDirectory()?await Ve.writeFile(e,""):await Ve.readdir(r)}function Jp(e){let t;try{t=Ve.statSync(e)}catch{}if(t&&t.isFile())return;let r=fa.dirname(e);try{Ve.statSync(r).isDirectory()||Ve.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")ha.mkdirsSync(r);else throw n}Ve.writeFileSync(e,"")}da.exports={createFile:Zp(Yp),createFileSync:Jp}});var Fa=b((vw,ga)=>{"use strict";c();var Kp=ie().fromPromise,pa=P("path"),tt=ye(),ma=Oe(),{pathExists:Xp}=et(),{areIdentical:ya}=Tt();async function Qp(e,t){let r;try{r=await tt.lstat(t)}catch{}let n;try{n=await tt.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}if(r&&ya(n,r))return;let s=pa.dirname(t);await Xp(s)||await ma.mkdirs(s),await tt.link(e,t)}function em(e,t){let r;try{r=tt.lstatSync(t)}catch{}try{let i=tt.lstatSync(e);if(r&&ya(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=pa.dirname(t);return tt.existsSync(n)||ma.mkdirsSync(n),tt.linkSync(e,t)}ga.exports={createLink:Kp(Qp),createLinkSync:em}});var Ca=b((Tw,Ea)=>{"use strict";c();var rt=P("path"),Br=ye(),{pathExists:tm}=et(),rm=ie().fromPromise;async function nm(e,t){if(rt.isAbsolute(e)){try{await Br.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:e}}let r=rt.dirname(t),n=rt.join(r,e);if(await tm(n))return{toCwd:n,toDst:e};try{await Br.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:rt.relative(r,e)}}function sm(e,t){if(rt.isAbsolute(e)){if(!Br.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let r=rt.dirname(t),n=rt.join(r,e);if(Br.existsSync(n))return{toCwd:n,toDst:e};if(!Br.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:rt.relative(r,e)}}Ea.exports={symlinkPaths:rm(nm),symlinkPathsSync:sm}});var _a=b((Pw,wa)=>{"use strict";c();var ba=ye(),im=ie().fromPromise;async function om(e,t){if(t)return t;let r;try{r=await ba.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function um(e,t){if(t)return t;let r;try{r=ba.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}wa.exports={symlinkType:im(om),symlinkTypeSync:um}});var Aa=b((Bw,va)=>{"use strict";c();var am=ie().fromPromise,xa=P("path"),Me=ye(),{mkdirs:cm,mkdirsSync:lm}=Oe(),{symlinkPaths:fm,symlinkPathsSync:hm}=Ca(),{symlinkType:dm,symlinkTypeSync:Dm}=_a(),{pathExists:pm}=et(),{areIdentical:Sa}=Tt();async function mm(e,t,r){let n;try{n=await Me.lstat(t)}catch{}if(n&&n.isSymbolicLink()){let[u,a]=await Promise.all([Me.stat(e),Me.stat(t)]);if(Sa(u,a))return}let s=await fm(e,t);e=s.toDst;let i=await dm(s.toCwd,r),o=xa.dirname(t);return await pm(o)||await cm(o),Me.symlink(e,t,i)}function ym(e,t,r){let n;try{n=Me.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){let u=Me.statSync(e),a=Me.statSync(t);if(Sa(u,a))return}let s=hm(e,t);e=s.toDst,r=Dm(s.toCwd,r);let i=xa.dirname(t);return Me.existsSync(i)||lm(i),Me.symlinkSync(e,t,r)}va.exports={createSymlink:am(mm),createSymlinkSync:ym}});var Na=b((Rw,Ra)=>{"use strict";c();var{createFile:Ta,createFileSync:ka}=Da(),{createLink:Pa,createLinkSync:La}=Fa(),{createSymlink:Ba,createSymlinkSync:Oa}=Aa();Ra.exports={createFile:Ta,createFileSync:ka,ensureFile:Ta,ensureFileSync:ka,createLink:Pa,createLinkSync:La,ensureLink:Pa,ensureLinkSync:La,createSymlink:Ba,createSymlinkSync:Oa,ensureSymlink:Ba,ensureSymlinkSync:Oa}});var bn=b((Iw,Ia)=>{c();function gm(e,{EOL:t=`
7
- `,finalEOL:r=!0,replacer:n=null,spaces:s}={}){let i=r?t:"";return JSON.stringify(e,n,s).replace(/\n/g,t)+i}function Fm(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Ia.exports={stringify:gm,stripBom:Fm}});var Ua=b(($w,Ma)=>{c();var Qt;try{Qt=Jt()}catch{Qt=P("fs")}var wn=ie(),{stringify:ja,stripBom:$a}=bn();async function Em(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Qt,n="throws"in t?t.throws:!0,s=await wn.fromCallback(r.readFile)(e,t);s=$a(s);let i;try{i=JSON.parse(s,t?t.reviver:null)}catch(o){if(n)throw o.message=`${e}: ${o.message}`,o;return null}return i}var Cm=wn.fromPromise(Em);function bm(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Qt,n="throws"in t?t.throws:!0;try{let s=r.readFileSync(e,t);return s=$a(s),JSON.parse(s,t.reviver)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}}async function wm(e,t,r={}){let n=r.fs||Qt,s=ja(t,r);await wn.fromCallback(n.writeFile)(e,s,r)}var _m=wn.fromPromise(wm);function xm(e,t,r={}){let n=r.fs||Qt,s=ja(t,r);return n.writeFileSync(e,s,r)}var Sm={readFile:Cm,readFileSync:bm,writeFile:_m,writeFileSync:xm};Ma.exports=Sm});var Ga=b((Uw,qa)=>{"use strict";c();var _n=Ua();qa.exports={readJson:_n.readFile,readJsonSync:_n.readFileSync,writeJson:_n.writeFile,writeJsonSync:_n.writeFileSync}});var xn=b((Gw,Wa)=>{"use strict";c();var vm=ie().fromPromise,qs=ye(),Ha=P("path"),za=Oe(),Am=et().pathExists;async function Tm(e,t,r="utf-8"){let n=Ha.dirname(e);return await Am(n)||await za.mkdirs(n),qs.writeFile(e,t,r)}function km(e,...t){let r=Ha.dirname(e);qs.existsSync(r)||za.mkdirsSync(r),qs.writeFileSync(e,...t)}Wa.exports={outputFile:vm(Tm),outputFileSync:km}});var Za=b((zw,Va)=>{"use strict";c();var{stringify:Pm}=bn(),{outputFile:Lm}=xn();async function Bm(e,t,r={}){let n=Pm(t,r);await Lm(e,n,r)}Va.exports=Bm});var Ja=b((Vw,Ya)=>{"use strict";c();var{stringify:Om}=bn(),{outputFileSync:Rm}=xn();function Nm(e,t,r){let n=Om(t,r);Rm(e,n,r)}Ya.exports=Nm});var Xa=b((Yw,Ka)=>{"use strict";c();var Im=ie().fromPromise,Fe=Ga();Fe.outputJson=Im(Za());Fe.outputJsonSync=Ja();Fe.outputJSON=Fe.outputJson;Fe.outputJSONSync=Fe.outputJsonSync;Fe.writeJSON=Fe.writeJson;Fe.writeJSONSync=Fe.writeJsonSync;Fe.readJSON=Fe.readJson;Fe.readJSONSync=Fe.readJsonSync;Ka.exports=Fe});var nc=b((Kw,rc)=>{"use strict";c();var jm=ye(),Qa=P("path"),{copy:$m}=Cn(),{remove:tc}=Lr(),{mkdirp:Mm}=Oe(),{pathExists:Um}=et(),ec=Tt();async function qm(e,t,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=await ec.checkPaths(e,t,"move",r);await ec.checkParentPaths(e,s,t,"move");let o=Qa.dirname(t);return Qa.parse(o).root!==o&&await Mm(o),Gm(e,t,n,i)}async function Gm(e,t,r,n){if(!n){if(r)await tc(t);else if(await Um(t))throw new Error("dest already exists.")}try{await jm.rename(e,t)}catch(s){if(s.code!=="EXDEV")throw s;await Hm(e,t,r)}}async function Hm(e,t,r){return await $m(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),tc(e)}rc.exports=qm});var ac=b((Qw,uc)=>{"use strict";c();var ic=Jt(),Hs=P("path"),zm=Cn().copySync,oc=Lr().removeSync,Wm=Oe().mkdirpSync,sc=Tt();function Vm(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=sc.checkPathsSync(e,t,"move",r);return sc.checkParentPathsSync(e,s,t,"move"),Zm(t)||Wm(Hs.dirname(t)),Ym(e,t,n,i)}function Zm(e){let t=Hs.dirname(e);return Hs.parse(t).root===t}function Ym(e,t,r,n){if(n)return Gs(e,t,r);if(r)return oc(t),Gs(e,t,r);if(ic.existsSync(t))throw new Error("dest already exists.");return Gs(e,t,r)}function Gs(e,t,r){try{ic.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return Jm(e,t,r)}}function Jm(e,t,r){return zm(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),oc(e)}uc.exports=Vm});var lc=b((t2,cc)=>{"use strict";c();var Km=ie().fromPromise;cc.exports={move:Km(nc()),moveSync:ac()}});var hc=b((n2,fc)=>{"use strict";c();fc.exports={...ye(),...Cn(),...la(),...Na(),...Xa(),...Oe(),...lc(),...xn(),...et(),...Lr()}});var zs=b((i2,Xm)=>{Xm.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-Schema","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRWD","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIT","MIT-0","MIT-CMU","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMLNJ","SMPPL","SNIA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","gnuplot","gtkbook","hdparm","iMatix","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","metamail","mpi-permissive","mpich2","mplus","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]});var dc=b((o2,Qm)=>{Qm.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]});var Dc=b((u2,ey)=>{ey.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]});var mc=b((a2,pc)=>{"use strict";c();var ty=[].concat(zs()).concat(dc()),ry=Dc();pc.exports=function(e){var t=0;function r(){return t<e.length}function n(g){if(g instanceof RegExp){var d=e.slice(t),E=d.match(g);if(E)return t+=E[0].length,E[0]}else if(e.indexOf(g,t)===t)return t+=g.length,g}function s(){n(/[ ]*/)}function i(){for(var g,d=["WITH","AND","OR","(",")",":","+"],E=0;E<d.length&&(g=n(d[E]),!g);E++);if(g==="+"&&t>1&&e[t-2]===" ")throw new Error("Space before `+`");return g&&{type:"OPERATOR",string:g}}function o(){return n(/[A-Za-z0-9-.]+/)}function u(){var g=o();if(!g)throw new Error("Expected idstring at offset "+t);return g}function a(){if(n("DocumentRef-")){var g=u();return{type:"DOCUMENTREF",string:g}}}function l(){if(n("LicenseRef-")){var g=u();return{type:"LICENSEREF",string:g}}}function f(){var g=t,d=o();if(ty.indexOf(d)!==-1)return{type:"LICENSE",string:d};if(ry.indexOf(d)!==-1)return{type:"EXCEPTION",string:d};t=g}function y(){return i()||a()||l()||f()}for(var p=[];r()&&(s(),!!r());){var m=y();if(!m)throw new Error("Unexpected `"+e[t]+"` at offset "+t);p.push(m)}return p}});var gc=b((l2,yc)=>{"use strict";c();yc.exports=function(e){var t=0;function r(){return t<e.length}function n(){return r()?e[t]:null}function s(){if(!r())throw new Error;t++}function i(d){var E=n();if(E&&E.type==="OPERATOR"&&d===E.string)return s(),E.string}function o(){if(i("WITH")){var d=n();if(d&&d.type==="EXCEPTION")return s(),d.string;throw new Error("Expected exception after `WITH`")}}function u(){var d=t,E="",F=n();if(F.type==="DOCUMENTREF"&&(s(),E+="DocumentRef-"+F.string+":",!i(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(F=n(),F.type==="LICENSEREF")return s(),E+="LicenseRef-"+F.string,{license:E};t=d}function a(){var d=n();if(d&&d.type==="LICENSE"){s();var E={license:d.string};i("+")&&(E.plus=!0);var F=o();return F&&(E.exception=F),E}}function l(){var d=i("(");if(d){var E=m();if(!i(")"))throw new Error("Expected `)`");return E}}function f(){return l()||u()||a()}function y(d,E){return function F(){var A=E();if(A){if(!i(d))return A;var x=F();if(!x)throw new Error("Expected expression");return{left:A,conjunction:d.toLowerCase(),right:x}}}}var p=y("AND",f),m=y("OR",p),g=m();if(!g||r())throw new Error("Syntax error");return g}});var Ws=b((h2,Fc)=>{"use strict";c();var ny=mc(),sy=gc();Fc.exports=function(e){return sy(ny(e))}});var Ac=b((D2,vc)=>{c();var iy=Ws(),oy=zs();function Sn(e){try{return iy(e),!0}catch{return!1}}function Sc(e,t){var r=t[0].length-e[0].length;return r!==0?r:e[0].toUpperCase().localeCompare(t[0].toUpperCase())}var Ec=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(Sc),uy=0,ay=1,Cc=[function(e){return e.toUpperCase()},function(e){return e.trim()},function(e){return e.replace(/\./g,"")},function(e){return e.replace(/\s+/g,"")},function(e){return e.replace(/\s+/g,"-")},function(e){return e.replace("v","-")},function(e){return e.replace(/,?\s*(\d)/,"-$1")},function(e){return e.replace(/,?\s*(\d)/,"-$1.0")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(e){return e[0].toUpperCase()+e.slice(1)},function(e){return e.replace("/","-")},function(e){return e.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(e){return e.indexOf("3.0")!==-1?e+"-or-later":e+"-only"},function(e){return e+"only"},function(e){return e.replace(/(\d)$/,"-$1.0")},function(e){return e.replace(/(-| )?(\d)$/,"-$2-Clause")},function(e){return e.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(e){return e.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(e){return e.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(e){return e.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(e){return e.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(e){return e.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(e){return"CC-"+e},function(e){return"CC-"+e+"-4.0"},function(e){return e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(e){return"CC-"+e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],Vs=oy.map(function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]}).reduce(function(e,t){var r=t[1];return e[r]=e[r]||[],e[r].push(t[0]),e},{}),cy=Object.keys(Vs).map(function(t){return[t,Vs[t]]}).filter(function(t){return t[1].length===1&&t[0]!==null&&t[0]!=="APL"}).map(function(t){return[t[0],t[1][0]]});Vs=void 0;var bc=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(cy).sort(Sc),ly=0,fy=1,wc=function(e){for(var t=0;t<Cc.length;t++){var r=Cc[t](e).trim();if(r!==e&&Sn(r))return r}return null},_c=function(e){for(var t=e.toUpperCase(),r=0;r<bc.length;r++){var n=bc[r];if(t.indexOf(n[ly])>-1)return n[fy]}return null},xc=function(e,t){for(var r=0;r<Ec.length;r++){var n=Ec[r],s=n[uy];if(e.indexOf(s)>-1){var i=e.replace(s,n[ay]),o=t(i);if(o!==null)return o}}return null};vc.exports=function(e,t){t=t||{};var r=t.upgrade===void 0?!0:!!t.upgrade;function n(u){return r?hy(u):u}var s=typeof e=="string"&&e.trim().length!==0;if(!s)throw Error("Invalid argument. Expected non-empty string.");if(e=e.trim(),Sn(e))return n(e);var i=e.replace(/\+$/,"").trim();if(Sn(i))return n(i);var o=wc(e);return o!==null||(o=xc(e,function(u){return Sn(u)?u:wc(u)}),o!==null)||(o=_c(e),o!==null)||(o=xc(e,_c),o!==null)?n(o):null};function hy(e){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(e)!==-1?e+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(e)!==-1?e.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(e)!==-1?e+"-or-later":e}});var Lc=b((m2,Pc)=>{c();var dy=Ws(),Dy=Ac(),Tc='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',py=/^SEE LICEN[CS]E IN (.+)$/;function kc(e,t){return t.slice(0,e.length)===e}function Zs(e){if(e.hasOwnProperty("license")){var t=e.license;return kc("LicenseRef",t)||kc("DocumentRef",t)}else return Zs(e.left)||Zs(e.right)}Pc.exports=function(e){var t;try{t=dy(e)}catch{var r;if(e==="UNLICENSED"||e==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=py.exec(e))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var n={validForOldPackages:!1,validForNewPackages:!1,warnings:[Tc]};if(e.trim().length!==0){var s=Dy(e);s&&n.warnings.push('license is similar to the valid expression "'+s+'"')}return n}return Zs(t)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[Tc]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var Ic=b(An=>{"use strict";c();Object.defineProperty(An,"__esModule",{value:!0});An.LRUCache=void 0;var er=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oc=new Set,Ys=typeof process=="object"&&process?process:{},Rc=(e,t,r,n)=>{typeof Ys.emitWarning=="function"?Ys.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},vn=globalThis.AbortController,Bc=globalThis.AbortSignal;if(typeof vn>"u"){Bc=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},vn=class{constructor(){t()}signal=new Bc;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let e=Ys.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{e&&(e=!1,Rc("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var my=e=>!Oc.has(e),E2=Symbol("type"),nt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Nc=e=>nt(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?tr:null:null,tr=class extends Array{constructor(t){super(t),this.fill(0)}},Js=class e{heap;length;static#r=!1;static create(t){let r=Nc(t);if(!r)return[];e.#r=!0;let n=new e(t,r);return e.#r=!1,n}constructor(t,r){if(!e.#r)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},Ks=class e{#r;#n;#e;#a;#w;#g;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#D;#u;#o;#t;#h;#p;#f;#c;#F;#l;#E;#C;#m;#b;#A;#d;static unsafeExposeInternals(t){return{starts:t.#C,ttls:t.#m,sizes:t.#E,keyMap:t.#u,keyList:t.#o,valList:t.#t,next:t.#h,prev:t.#p,get head(){return t.#f},get tail(){return t.#c},free:t.#F,isBackgroundFetch:r=>t.#s(r),backgroundFetch:(r,n,s,i)=>t.#O(r,n,s,i),moveToTail:r=>t.#P(r),indexes:r=>t.#_(r),rindexes:r=>t.#x(r),isStale:r=>t.#y(r)}}get max(){return this.#r}get maxSize(){return this.#n}get calculatedSize(){return this.#D}get size(){return this.#i}get fetchMethod(){return this.#w}get memoMethod(){return this.#g}get dispose(){return this.#e}get disposeAfter(){return this.#a}constructor(t){let{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:a,dispose:l,disposeAfter:f,noDisposeOnSet:y,noUpdateTTL:p,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:d,fetchMethod:E,memoMethod:F,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:I,ignoreFetchAbort:K}=t;if(r!==0&&!nt(r))throw new TypeError("max option must be a nonnegative integer");let ne=r?Nc(r):Array;if(!ne)throw new Error("invalid max value: "+r);if(this.#r=r,this.#n=m,this.maxEntrySize=g||this.#n,this.sizeCalculation=d,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#g=F,E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#w=E,this.#A=!!E,this.#u=new Map,this.#o=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#h=new ne(r),this.#p=new ne(r),this.#f=0,this.#c=0,this.#F=Js.create(r),this.#i=0,this.#D=0,typeof l=="function"&&(this.#e=l),typeof f=="function"?(this.#a=f,this.#l=[]):(this.#a=void 0,this.#l=void 0),this.#b=!!this.#e,this.#d=!!this.#a,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!K,this.maxEntrySize!==0){if(this.#n!==0&&!nt(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!nt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=nt(s)||s===0?s:1,this.ttlAutopurge=!!i,this.ttl=n||0,this.ttl){if(!nt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#R()}if(this.#r===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#r&&!this.#n){let Ie="LRU_CACHE_UNBOUNDED";my(Ie)&&(Oc.add(Ie),Rc("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ie,e))}}getRemainingTTL(t){return this.#u.has(t)?1/0:0}#R(){let t=new tr(this.#r),r=new tr(this.#r);this.#m=t,this.#C=r,this.#N=(i,o,u=er.now())=>{if(r[i]=o!==0?u:0,t[i]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#y(i)&&this.#S(this.#o[i],"expire")},o+1);a.unref&&a.unref()}},this.#T=i=>{r[i]=t[i]!==0?er.now():0},this.#v=(i,o)=>{if(t[o]){let u=t[o],a=r[o];if(!u||!a)return;i.ttl=u,i.start=a,i.now=n||s();let l=i.now-a;i.remainingTTL=u-l}};let n=0,s=()=>{let i=er.now();if(this.ttlResolution>0){n=i;let o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return i};this.getRemainingTTL=i=>{let o=this.#u.get(i);if(o===void 0)return 0;let u=t[o],a=r[o];if(!u||!a)return 1/0;let l=(n||s())-a;return u-l},this.#y=i=>{let o=r[i],u=t[i];return!!u&&!!o&&(n||s())-o>u}}#T=()=>{};#v=()=>{};#N=()=>{};#y=()=>!1;#U(){let t=new tr(this.#r);this.#D=0,this.#E=t,this.#k=r=>{this.#D-=t[r],t[r]=0},this.#I=(r,n,s,i)=>{if(this.#s(n))return 0;if(!nt(s))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(s=i(n,r),!nt(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#L=(r,n,s)=>{if(t[r]=n,this.#n){let i=this.#n-t[r];for(;this.#D>i;)this.#B(!0)}this.#D+=t[r],s&&(s.entrySize=n,s.totalCalculatedSize=this.#D)}}#k=t=>{};#L=(t,r,n)=>{};#I=(t,r,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#_({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#c;!(!this.#j(r)||((t||!this.#y(r))&&(yield r),r===this.#f));)r=this.#p[r]}*#x({allowStale:t=this.allowStale}={}){if(this.#i)for(let r=this.#f;!(!this.#j(r)||((t||!this.#y(r))&&(yield r),r===this.#c));)r=this.#h[r]}#j(t){return t!==void 0&&this.#u.get(this.#o[t])===t}*entries(){for(let t of this.#_())this.#t[t]!==void 0&&this.#o[t]!==void 0&&!this.#s(this.#t[t])&&(yield[this.#o[t],this.#t[t]])}*rentries(){for(let t of this.#x())this.#t[t]!==void 0&&this.#o[t]!==void 0&&!this.#s(this.#t[t])&&(yield[this.#o[t],this.#t[t]])}*keys(){for(let t of this.#_()){let r=this.#o[t];r!==void 0&&!this.#s(this.#t[t])&&(yield r)}}*rkeys(){for(let t of this.#x()){let r=this.#o[t];r!==void 0&&!this.#s(this.#t[t])&&(yield r)}}*values(){for(let t of this.#_())this.#t[t]!==void 0&&!this.#s(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#x())this.#t[t]!==void 0&&!this.#s(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,r={}){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;if(i!==void 0&&t(i,this.#o[n],this))return this.get(this.#o[n],r)}}forEach(t,r=this){for(let n of this.#_()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(r,i,this.#o[n],this)}}rforEach(t,r=this){for(let n of this.#x()){let s=this.#t[n],i=this.#s(s)?s.__staleWhileFetching:s;i!==void 0&&t.call(r,i,this.#o[n],this)}}purgeStale(){let t=!1;for(let r of this.#x({allowStale:!0}))this.#y(r)&&(this.#S(this.#o[r],"expire"),t=!0);return t}info(t){let r=this.#u.get(t);if(r===void 0)return;let n=this.#t[r],s=this.#s(n)?n.__staleWhileFetching:n;if(s===void 0)return;let i={value:s};if(this.#m&&this.#C){let o=this.#m[r],u=this.#C[r];if(o&&u){let a=o-(er.now()-u);i.ttl=a,i.start=Date.now()}}return this.#E&&(i.size=this.#E[r]),i}dump(){let t=[];for(let r of this.#_({allowStale:!0})){let n=this.#o[r],s=this.#t[r],i=this.#s(s)?s.__staleWhileFetching:s;if(i===void 0||n===void 0)continue;let o={value:i};if(this.#m&&this.#C){o.ttl=this.#m[r];let u=er.now()-this.#C[r];o.start=Math.floor(Date.now()-u)}this.#E&&(o.size=this.#E[r]),t.unshift([n,o])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let s=Date.now()-n.start;n.start=er.now()-s}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:a}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,f=this.#I(t,r,n.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#S(t,"set"),this;let y=this.#i===0?void 0:this.#u.get(t);if(y===void 0)y=this.#i===0?this.#c:this.#F.length!==0?this.#F.pop():this.#i===this.#r?this.#B(!1):this.#i,this.#o[y]=t,this.#t[y]=r,this.#u.set(t,y),this.#h[this.#c]=y,this.#p[y]=this.#c,this.#c=y,this.#i++,this.#L(y,f,a),a&&(a.set="add"),l=!1;else{this.#P(y);let p=this.#t[y];if(r!==p){if(this.#A&&this.#s(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!o&&(this.#b&&this.#e?.(m,t,"set"),this.#d&&this.#l?.push([m,t,"set"]))}else o||(this.#b&&this.#e?.(p,t,"set"),this.#d&&this.#l?.push([p,t,"set"]));if(this.#k(y),this.#L(y,f,a),this.#t[y]=r,a){a.set="replace";let m=p&&this.#s(p)?p.__staleWhileFetching:p;m!==void 0&&(a.oldValue=m)}}else a&&(a.set="update")}if(s!==0&&!this.#m&&this.#R(),this.#m&&(l||this.#N(y,s,i),a&&this.#v(a,y)),!o&&this.#d&&this.#l){let p=this.#l,m;for(;m=p?.shift();)this.#a?.(...m)}return this}pop(){try{for(;this.#i;){let t=this.#t[this.#f];if(this.#B(!0),this.#s(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#d&&this.#l){let t=this.#l,r;for(;r=t?.shift();)this.#a?.(...r)}}}#B(t){let r=this.#f,n=this.#o[r],s=this.#t[r];return this.#A&&this.#s(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(s,n,"evict"),this.#d&&this.#l?.push([s,n,"evict"])),this.#k(r),t&&(this.#o[r]=void 0,this.#t[r]=void 0,this.#F.push(r)),this.#i===1?(this.#f=this.#c=0,this.#F.length=0):this.#f=this.#h[r],this.#u.delete(n),this.#i--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=r,i=this.#u.get(t);if(i!==void 0){let o=this.#t[i];if(this.#s(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#y(i))s&&(s.has="stale",this.#v(s,i));else return n&&this.#T(i),s&&(s.has="hit",this.#v(s,i)),!0}else s&&(s.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,s=this.#u.get(t);if(s===void 0||!n&&this.#y(s))return;let i=this.#t[s];return this.#s(i)?i.__staleWhileFetching:i}#O(t,r,n,s){let i=r===void 0?void 0:this.#t[r];if(this.#s(i))return i;let o=new vn,{signal:u}=n;u?.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});let a={signal:o.signal,options:n,context:s},l=(d,E=!1)=>{let{aborted:F}=o.signal,A=n.ignoreFetchAbort&&d!==void 0;if(n.status&&(F&&!E?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,A&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),F&&!A&&!E)return y(o.signal.reason);let x=m;return this.#t[r]===m&&(d===void 0?x.__staleWhileFetching?this.#t[r]=x.__staleWhileFetching:this.#S(t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,d,a.options))),d},f=d=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=d),y(d)),y=d=>{let{aborted:E}=o.signal,F=E&&n.allowStaleOnFetchAbort,A=F||n.allowStaleOnFetchRejection,x=A||n.noDeleteOnFetchRejection,k=m;if(this.#t[r]===m&&(!x||k.__staleWhileFetching===void 0?this.#S(t,"fetch"):F||(this.#t[r]=k.__staleWhileFetching)),A)return n.status&&k.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw d},p=(d,E)=>{let F=this.#w?.(t,i,a);F&&F instanceof Promise&&F.then(A=>d(A===void 0?void 0:A),E),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(d(void 0),n.allowStaleOnFetchAbort&&(d=A=>l(A,!0)))})};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(l,f),g=Object.assign(m,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return r===void 0?(this.set(t,g,{...a.options,status:void 0}),r=this.#u.get(t)):this.#t[r]=g,g}#s(t){if(!this.#A)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof vn}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:d,forceRefresh:E=!1,status:F,signal:A}=r;if(!this.#A)return F&&(F.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,status:F});let x={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:u,size:a,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:F,signal:A},k=this.#u.get(t);if(k===void 0){F&&(F.fetch="miss");let I=this.#O(t,k,x,d);return I.__returned=I}else{let I=this.#t[k];if(this.#s(I)){let $=n&&I.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",$&&(F.returnedStale=!0)),$?I.__staleWhileFetching:I.__returned=I}let K=this.#y(k);if(!E&&!K)return F&&(F.fetch="hit"),this.#P(k),s&&this.#T(k),F&&this.#v(F,k),I;let ne=this.#O(t,k,x,d),L=ne.__staleWhileFetching!==void 0&&n;return F&&(F.fetch=K?"stale":"refresh",L&&K&&(F.returnedStale=!0)),L?ne.__staleWhileFetching:ne.__returned=ne}}async forceFetch(t,r={}){let n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){let n=this.#g;if(!n)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:i,...o}=r,u=this.get(t,o);if(!i&&u!==void 0)return u;let a=n(t,u,{options:o,context:s});return this.set(t,a,o),a}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=r,u=this.#u.get(t);if(u!==void 0){let a=this.#t[u],l=this.#s(a);return o&&this.#v(o,u),this.#y(u)?(o&&(o.get="stale"),l?(o&&n&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?a.__staleWhileFetching:void 0):(i||this.#S(t,"expire"),o&&n&&(o.returnedStale=!0),n?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#P(u),s&&this.#T(u),a))}else o&&(o.get="miss")}#$(t,r){this.#p[r]=t,this.#h[t]=r}#P(t){t!==this.#c&&(t===this.#f?this.#f=this.#h[t]:this.#$(this.#p[t],this.#h[t]),this.#$(this.#c,t),this.#c=t)}delete(t){return this.#S(t,"delete")}#S(t,r){let n=!1;if(this.#i!==0){let s=this.#u.get(t);if(s!==void 0)if(n=!0,this.#i===1)this.#M(r);else{this.#k(s);let i=this.#t[s];if(this.#s(i)?i.__abortController.abort(new Error("deleted")):(this.#b||this.#d)&&(this.#b&&this.#e?.(i,t,r),this.#d&&this.#l?.push([i,t,r])),this.#u.delete(t),this.#o[s]=void 0,this.#t[s]=void 0,s===this.#c)this.#c=this.#p[s];else if(s===this.#f)this.#f=this.#h[s];else{let o=this.#p[s];this.#h[o]=this.#h[s];let u=this.#h[s];this.#p[u]=this.#p[s]}this.#i--,this.#F.push(s)}}if(this.#d&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#a?.(...i)}return n}clear(){return this.#M("delete")}#M(t){for(let r of this.#x({allowStale:!0})){let n=this.#t[r];if(this.#s(n))n.__abortController.abort(new Error("deleted"));else{let s=this.#o[r];this.#b&&this.#e?.(n,s,t),this.#d&&this.#l?.push([n,s,t])}}if(this.#u.clear(),this.#t.fill(void 0),this.#o.fill(void 0),this.#m&&this.#C&&(this.#m.fill(0),this.#C.fill(0)),this.#E&&this.#E.fill(0),this.#f=0,this.#c=0,this.#F.length=0,this.#D=0,this.#i=0,this.#d&&this.#l){let r=this.#l,n;for(;n=r?.shift();)this.#a?.(...n)}}};An.LRUCache=Ks});var Mc=b((w2,$c)=>{"use strict";c();var U=(...e)=>e.every(t=>t)?e.join(""):"",re=e=>e?encodeURIComponent(e):"",jc=e=>e.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),yy={sshtemplate:({domain:e,user:t,project:r,committish:n})=>`git@${e}:${t}/${r}.git${U("#",n)}`,sshurltemplate:({domain:e,user:t,project:r,committish:n})=>`git+ssh://git@${e}/${t}/${r}.git${U("#",n)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:s,path:i})=>`https://${e}/${t}/${r}${U("/",s,"/",re(n||"HEAD"),"/",i)}`,browsetemplate:({domain:e,user:t,project:r,committish:n,treepath:s})=>`https://${e}/${t}/${r}${U("/",s,"/",re(n))}`,browsetreetemplate:({domain:e,user:t,project:r,committish:n,treepath:s,path:i,fragment:o,hashformat:u})=>`https://${e}/${t}/${r}/${s}/${re(n||"HEAD")}/${i}${U("#",u(o||""))}`,browseblobtemplate:({domain:e,user:t,project:r,committish:n,blobpath:s,path:i,fragment:o,hashformat:u})=>`https://${e}/${t}/${r}/${s}/${re(n||"HEAD")}/${i}${U("#",u(o||""))}`,docstemplate:({domain:e,user:t,project:r,treepath:n,committish:s})=>`https://${e}/${t}/${r}${U("/",n,"/",re(s))}#readme`,httpstemplate:({auth:e,domain:t,user:r,project:n,committish:s})=>`git+https://${U(e,"@")}${t}/${r}/${n}.git${U("#",s)}`,filetemplate:({domain:e,user:t,project:r,committish:n,path:s})=>`https://${e}/${t}/${r}/raw/${re(n||"HEAD")}/${s}`,shortcuttemplate:({type:e,user:t,project:r,committish:n})=>`${e}:${t}/${r}${U("#",n)}`,pathtemplate:({user:e,project:t,committish:r})=>`${e}/${t}${U("#",r)}`,bugstemplate:({domain:e,user:t,project:r})=>`https://${e}/${t}/${r}/issues`,hashformat:jc},st={};st.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:e,user:t,project:r,committish:n,path:s})=>`https://${U(e,"@")}raw.githubusercontent.com/${t}/${r}/${re(n||"HEAD")}/${s}`,gittemplate:({auth:e,domain:t,user:r,project:n,committish:s})=>`git://${U(e,"@")}${t}/${r}/${n}.git${U("#",s)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://codeload.${e}/${t}/${r}/tar.gz/${re(n||"HEAD")}`,extract:e=>{let[,t,r,n,s]=e.pathname.split("/",5);if(!(n&&n!=="tree")&&(n||(s=e.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:s}}};st.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:e,user:t,project:r,committish:n,treepath:s,path:i,editpath:o})=>`https://${e}/${t}/${r}${U("/",s,"/",re(n||"HEAD"),"/",i,o)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/get/${re(n||"HEAD")}.tar.gz`,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(!["get"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:e.hash.slice(1)}}};st.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:e,domain:t,user:r,project:n,committish:s})=>`git+https://${U(e,"@")}${t}/${r}/${n}.git${U("#",s)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/repository/archive.tar.gz?ref=${re(n||"HEAD")}`,extract:e=>{let t=e.pathname.slice(1);if(t.includes("/-/")||t.includes("/archive.tar.gz"))return;let r=t.split("/"),n=r.pop();n.endsWith(".git")&&(n=n.slice(0,-4));let s=r.join("/");if(!(!s||!n))return{user:s,project:n,committish:e.hash.slice(1)}}};st.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:e,project:t,committish:r})=>`git@${e}:${t}.git${U("#",r)}`,sshurltemplate:({domain:e,project:t,committish:r})=>`git+ssh://git@${e}/${t}.git${U("#",r)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:s})=>`https://${e}/${t}/${r}${U("/",re(n))}/${s}`,browsetemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${U("/",re(r))}`,browsetreetemplate:({domain:e,project:t,committish:r,path:n,hashformat:s})=>`https://${e}/${t}${U("/",re(r))}${U("#",s(n))}`,browseblobtemplate:({domain:e,project:t,committish:r,path:n,hashformat:s})=>`https://${e}/${t}${U("/",re(r))}${U("#",s(n))}`,docstemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${U("/",re(r))}`,httpstemplate:({domain:e,project:t,committish:r})=>`git+https://${e}/${t}.git${U("#",r)}`,filetemplate:({user:e,project:t,committish:r,path:n})=>`https://gist.githubusercontent.com/${e}/${t}/raw${U("/",re(r))}/${n}`,shortcuttemplate:({type:e,project:t,committish:r})=>`${e}:${t}${U("#",r)}`,pathtemplate:({project:e,committish:t})=>`${e}${U("#",t)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:t,committish:r})=>`git://${e}/${t}.git${U("#",r)}`,tarballtemplate:({project:e,committish:t})=>`https://codeload.github.com/gist/${e}/tar.gz/${re(t||"HEAD")}`,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(n!=="raw"){if(!r){if(!t)return;r=t,t=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:t,project:r,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&"file-"+jc(e)}};st.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:e,user:t,project:r,committish:n,path:s})=>`https://${e}/${t}/${r}/blob/${re(n)||"HEAD"}/${s}`,httpstemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}.git${U("#",n)}`,tarballtemplate:({domain:e,user:t,project:r,committish:n})=>`https://${e}/${t}/${r}/archive/${re(n)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,r,n]=e.pathname.split("/",4);if(!["archive"].includes(n)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!t||!r)))return{user:t,project:r,committish:e.hash.slice(1)}}};for(let[e,t]of Object.entries(st))st[e]=Object.assign({},yy,t);$c.exports=st});var Qs=b((x2,qc)=>{c();var gy=P("url"),Xs=(e,t,r)=>{let n=e.indexOf(r);return e.lastIndexOf(t,n>-1?n:1/0)},Uc=e=>{try{return new gy.URL(e)}catch{}},Fy=(e,t)=>{let r=e.indexOf(":"),n=e.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(t,n))return e;let s=e.indexOf("@");return s>-1?s>r?`git+ssh://${e}`:e:e.indexOf("//")===r+1?e:`${e.slice(0,r+1)}//${e.slice(r+1)}`},Ey=e=>{let t=Xs(e,"@","#"),r=Xs(e,":","#");return r>t&&(e=e.slice(0,r)+"/"+e.slice(r+1)),Xs(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`git+ssh://${e}`),e};qc.exports=(e,t)=>{let r=t?Fy(e,t):e;return Uc(r)||Uc(Ey(r))}});var Hc=b((v2,Gc)=>{"use strict";c();var Cy=Qs(),by=e=>{let t=e.indexOf("#"),r=e.indexOf("/"),n=e.indexOf("/",r+1),s=e.indexOf(":"),i=/\s/.exec(e),o=e.indexOf("@"),u=!i||t>-1&&i.index>t,a=o===-1||t>-1&&o>t,l=s===-1||t>-1&&s>t,f=n===-1||t>-1&&n>t,y=r>0,p=t>-1?e[t-1]!=="/":!e.endsWith("/"),m=!e.startsWith(".");return u&&y&&p&&m&&a&&l&&f};Gc.exports=(e,t,{gitHosts:r,protocols:n})=>{if(!e)return;let s=by(e)?`github:${e}`:e,i=Cy(s,n);if(!i)return;let o=r.byShortcut[i.protocol],u=r.byDomain[i.hostname.startsWith("www.")?i.hostname.slice(4):i.hostname],a=o||u;if(!a)return;let l=r[o||u],f=null;n[i.protocol]?.auth&&(i.username||i.password)&&(f=`${i.username}${i.password?":"+i.password:""}`);let y=null,p=null,m=null,g=null;try{if(o){let d=i.pathname.startsWith("/")?i.pathname.slice(1):i.pathname,E=d.indexOf("@");E>-1&&(d=d.slice(E+1));let F=d.lastIndexOf("/");F>-1?(p=decodeURIComponent(d.slice(0,F)),p||(p=null),m=decodeURIComponent(d.slice(F+1))):m=decodeURIComponent(d),m.endsWith(".git")&&(m=m.slice(0,-4)),i.hash&&(y=decodeURIComponent(i.hash.slice(1))),g="shortcut"}else{if(!l.protocols.includes(i.protocol))return;let d=l.extract(i);if(!d)return;p=d.user&&decodeURIComponent(d.user),m=decodeURIComponent(d.project),y=decodeURIComponent(d.committish),g=n[i.protocol]?.name||i.protocol.slice(0,-1)}}catch(d){if(d instanceof URIError)return;throw d}return[a,p,f,m,y,g,t]}});var Wc=b((T2,zc)=>{"use strict";c();var{LRUCache:wy}=Ic(),_y=Mc(),xy=Hc(),Sy=Qs(),ei=new wy({max:1e3}),Tn=class e{constructor(t,r,n,s,i,o,u={}){Object.assign(this,e.#r[t],{type:t,user:r,auth:n,project:s,committish:i,default:o,opts:u})}static#r={byShortcut:{},byDomain:{}};static#n={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(t,r){e.#r[t]=r,e.#r.byDomain[r.domain]=t,e.#r.byShortcut[`${t}:`]=t,e.#n[`${t}:`]={name:t}}static fromUrl(t,r){if(typeof t!="string")return;let n=t+JSON.stringify(r||{});if(!ei.has(n)){let s=xy(t,r,{gitHosts:e.#r,protocols:e.#n});ei.set(n,s?new e(...s):void 0)}return ei.get(n)}static parseUrl(t){return Sy(t)}#e(t,r){if(typeof t!="function")return null;let n={...this,...this.opts,...r};n.path||(n.path=""),n.path.startsWith("/")&&(n.path=n.path.slice(1)),n.noCommittish&&(n.committish=null);let s=t(n);return n.noGitPlus&&s.startsWith("git+")?s.slice(4):s}hash(){return this.committish?`#${this.committish}`:""}ssh(t){return this.#e(this.sshtemplate,t)}sshurl(t){return this.#e(this.sshurltemplate,t)}browse(t,...r){return typeof t!="string"?this.#e(this.browsetemplate,t):typeof r[0]!="string"?this.#e(this.browsetreetemplate,{...r[0],path:t}):this.#e(this.browsetreetemplate,{...r[1],fragment:r[0],path:t})}browseFile(t,...r){return typeof r[0]!="string"?this.#e(this.browseblobtemplate,{...r[0],path:t}):this.#e(this.browseblobtemplate,{...r[1],fragment:r[0],path:t})}docs(t){return this.#e(this.docstemplate,t)}bugs(t){return this.#e(this.bugstemplate,t)}https(t){return this.#e(this.httpstemplate,t)}git(t){return this.#e(this.gittemplate,t)}shortcut(t){return this.#e(this.shortcuttemplate,t)}path(t){return this.#e(this.pathtemplate,t)}tarball(t){return this.#e(this.tarballtemplate,{...t,noCommittish:!1})}file(t,r){return this.#e(this.filetemplate,{...r,path:t})}edit(t,r){return this.#e(this.edittemplate,{...r,path:t})}getDefaultRepresentation(){return this.default}toString(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)}};for(let[e,t]of Object.entries(_y))Tn.addHost(e,t);zc.exports=Tn});var Zc=b((P2,Vc)=>{c();Vc.exports=vy;function vy(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
8
- `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;let r=e.length,n=t+1;for(;n<r&&e[n].trim();)n++;return e.slice(t,n).join(" ").trim()}});var Yc=b((B2,Ay)=>{Ay.exports={topLevel:{dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},bugs:{web:"url",name:"url"},script:{server:"start",tests:"test"}}});var Qc=b((O2,Xc)=>{c();var Ty=Cd(),ky=bd(),Py=Lc(),kn=Wc(),Ly=P("node:module"),By=["dependencies","devDependencies","optionalDependencies"],Oy=Zc(),ti=P("url"),it=Yc(),Jc=e=>e.includes("@")&&e.indexOf("@")<e.lastIndexOf(".");Xc.exports={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn("repositories"),e.repository=e.repositories[0]),!e.repository)return this.warn("missingRepository");typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository});var t=e.repository.url||"";if(t){var r=kn.fromUrl(t);r&&(t=e.repository.url=r.getDefaultRepresentation()==="shortcut"?r.https():r.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",t)},fixTypos:function(e){Object.keys(it.topLevel).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn("typo",t,it.topLevel[t])},this)},fixScriptsField:function(e){if(e.scripts){if(typeof e.scripts!="object"){this.warn("nonObjectScripts"),delete e.scripts;return}Object.keys(e.scripts).forEach(function(t){typeof e.scripts[t]!="string"?(this.warn("nonStringScript"),delete e.scripts[t]):it.script[t]&&!e.scripts[it.script[t]]&&this.warn("typo",t,it.script[t],"scripts")},this)}},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn("nonArrayFiles"),delete e.files):e.files&&(e.files=e.files.filter(function(r){return!r||typeof r!="string"?(this.warn("invalidFilename",r),!1):!0},this))},fixBinField:function(e){if(e.bin&&typeof e.bin=="string"){var t={},r;(r=e.name.match(/^@[^/]+[/](.*)$/))?t[r[1]]=e.bin:t[e.name]=e.bin,e.bin=t}},fixManField:function(e){e.man&&typeof e.man=="string"&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t="bundledDependencies",r="bundleDependencies";e[t]&&!e[r]&&(e[r]=e[t],delete e[t]),e[r]&&!Array.isArray(e[r])?(this.warn("nonArrayBundleDependencies"),delete e[r]):e[r]&&(e[r]=e[r].filter(function(n){return!n||typeof n!="string"?(this.warn("nonStringBundleDependency",n),!1):(e.dependencies||(e.dependencies={}),Object.prototype.hasOwnProperty.call(e.dependencies,n)||(this.warn("nonDependencyBundleDependency",n),e.dependencies[n]="*"),!0)},this))},fixDependencies:function(e){qy(e,this.warn),My(e,this.warn),this.fixBundleDependenciesField(e),["dependencies","devDependencies"].forEach(function(t){if(t in e){if(!e[t]||typeof e[t]!="object"){this.warn("nonObjectDependencies",t),delete e[t];return}Object.keys(e[t]).forEach(function(r){var n=e[t][r];typeof n!="string"&&(this.warn("nonStringDependency",r,JSON.stringify(n)),delete e[t][r]);var s=kn.fromUrl(e[t][r]);s&&(e[t][r]=s.toString())},this)}},this)},fixModulesField:function(e){e.modules&&(this.warn("deprecatedModules"),delete e.modules)},fixKeywordsField:function(e){typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn("nonArrayKeywords")):e.keywords&&(e.keywords=e.keywords.filter(function(t){return typeof t!="string"||!t?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(e,t){var r=!t;if(!e.version)return e.version="",!0;if(!Ty(e.version,r))throw new Error('Invalid version: "'+e.version+'"');return e.version=ky(e.version,r),!0},fixPeople:function(e){Kc(e,jy),Kc(e,$y)},fixNameField:function(e,t){typeof t=="boolean"?t={strict:t}:typeof t>"u"&&(t={});var r=t.strict;if(!e.name&&!r){e.name="";return}if(typeof e.name!="string")throw new Error("name field must be a string.");r||(e.name=e.name.trim()),Iy(e.name,r,t.allowLegacyCase),Ly.builtinModules.includes(e.name)&&this.warn("conflictingName",e.name)},fixDescriptionField:function(e){e.description&&typeof e.description!="string"&&(this.warn("nonStringDescription"),delete e.description),e.readme&&!e.description&&(e.description=Oy(e.readme)),e.description===void 0&&delete e.description,e.description||this.warn("missingDescription")},fixReadmeField:function(e){e.readme||(this.warn("missingReadme"),e.readme="ERROR: No README data found!")},fixBugsField:function(e){if(!e.bugs&&e.repository&&e.repository.url){var t=kn.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if(typeof e.bugs=="string")Jc(e.bugs)?e.bugs={email:e.bugs}:ti.parse(e.bugs).protocol?e.bugs={url:e.bugs}:this.warn("nonEmailUrlBugsString");else{Gy(e.bugs,this.warn);var r=e.bugs;e.bugs={},r.url&&(typeof r.url=="string"&&ti.parse(r.url).protocol?e.bugs.url=r.url:this.warn("nonUrlBugsUrlField")),r.email&&(typeof r.email=="string"&&Jc(r.email)?e.bugs.email=r.email:this.warn("nonEmailBugsEmailField"))}!e.bugs.email&&!e.bugs.url&&(delete e.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(e){if(!e.homepage&&e.repository&&e.repository.url){var t=kn.fromUrl(e.repository.url);t&&t.docs()&&(e.homepage=t.docs())}if(e.homepage){if(typeof e.homepage!="string")return this.warn("nonUrlHomepage"),delete e.homepage;ti.parse(e.homepage).protocol||(e.homepage="http://"+e.homepage)}},fixLicenseField:function(e){let t=e.license||e.licence;if(!t)return this.warn("missingLicense");if(typeof t!="string"||t.length<1||t.trim()==="")return this.warn("invalidLicense");if(!Py(t).validForNewPackages)return this.warn("invalidLicense")}};function Ry(e){if(e.charAt(0)!=="@")return!1;var t=e.slice(1).split("/");return t.length!==2?!1:t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1])}function Ny(e){return!e.match(/[/@\s+%:]/)&&e===encodeURIComponent(e)}function Iy(e,t,r){if(e.charAt(0)==="."||!(Ry(e)||Ny(e))||t&&!r&&e!==e.toLowerCase()||e.toLowerCase()==="node_modules"||e.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(e))}function Kc(e,t){return e.author&&(e.author=t(e.author)),["maintainers","contributors"].forEach(function(r){Array.isArray(e[r])&&(e[r]=e[r].map(t))}),e}function jy(e){if(typeof e=="string")return e;var t=e.name||"",r=e.url||e.web,n=r?" ("+r+")":"",s=e.email||e.mail,i=s?" <"+s+">":"";return t+i+n}function $y(e){if(typeof e!="string")return e;var t=e.match(/^([^(<]+)/),r=e.match(/\(([^()]+)\)/),n=e.match(/<([^<>]+)>/),s={};return t&&t[0].trim()&&(s.name=t[0].trim()),n&&(s.email=n[1]),r&&(s.url=r[1]),s}function My(e){var t=e.optionalDependencies;if(t){var r=e.dependencies||{};Object.keys(t).forEach(function(n){r[n]=t[n]}),e.dependencies=r}}function Uy(e,t,r){if(!e)return{};if(typeof e=="string"&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;r("deprecatedArrayDependencies",t);var n={};return e.filter(function(s){return typeof s=="string"}).forEach(function(s){s=s.trim().split(/(:?[@\s><=])/);var i=s.shift(),o=s.join("");o=o.trim(),o=o.replace(/^@/,""),n[i]=o}),n}function qy(e,t){By.forEach(function(r){e[r]&&(e[r]=Uy(e[r],r,t))})}function Gy(e,t){e&&Object.keys(e).forEach(function(r){it.bugs[r]&&(t("typo",r,it.bugs[r],"bugs"),e[it.bugs[r]]=e[r],delete e[r])})}});var el=b((N2,Hy)=>{Hy.exports={repositories:"'repositories' (plural) Not supported. Please pick one as the 'repository' field",missingRepository:"No repository field.",brokenGitUrl:"Probably broken git url: %s",nonObjectScripts:"scripts must be an object",nonStringScript:"script values must be string commands",nonArrayFiles:"Invalid 'files' member",invalidFilename:"Invalid filename in 'files' list: %s",nonArrayBundleDependencies:"Invalid 'bundleDependencies' list. Must be array of package names",nonStringBundleDependency:"Invalid bundleDependencies member: %s",nonDependencyBundleDependency:"Non-dependency in bundleDependencies: %s",nonObjectDependencies:"%s field must be an object",nonStringDependency:"Invalid dependency: %s %s",deprecatedArrayDependencies:"specifying %s as array is deprecated",deprecatedModules:"modules field is deprecated",nonArrayKeywords:"keywords should be an array of strings",nonStringKeyword:"keywords should be an array of strings",conflictingName:"%s is also the name of a node core module.",nonStringDescription:"'description' field should be a string",missingDescription:"No description",missingReadme:"No README data",missingLicense:"No license field.",nonEmailUrlBugsString:"Bug string field must be url, email, or {email,url}",nonUrlBugsUrlField:"bugs.url field must be a string url. Deleted.",nonEmailBugsEmailField:"bugs.email field must be a string email. Deleted.",emptyNormalizedBugs:"Normalized value of bugs field is an empty object. Deleted.",nonUrlHomepage:"homepage field must be a string url. Deleted.",invalidLicense:"license should be a valid SPDX license expression",typo:"%s should probably be %s."}});var nl=b((I2,rl)=>{c();var tl=P("util"),ri=el();rl.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if(t==="typo")return zy.apply(null,e);var r=ri[t]?ri[t]:t+": '%s'";return e.unshift(r),tl.format.apply(null,e)};function zy(e,t,r){return r&&(e=r+"['"+e+"']",t=r+"['"+t+"']"),tl.format(ri.typo,e,t)}});var ul=b(($2,ol)=>{c();ol.exports=sl;var ni=Qc();sl.fixer=ni;var Wy=nl(),Vy=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],Zy=["dependencies","people","typos"],si=Vy.map(function(e){return il(e)+"Field"});si=si.concat(Zy);function sl(e,t,r){t===!0&&(t=null,r=!0),r||(r=!1),(!t||e.private)&&(t=function(){}),e.scripts&&e.scripts.install==="node-gyp rebuild"&&!e.scripts.preinstall&&(e.gypfile=!0),ni.warn=function(){t(Wy.apply(null,arguments))},si.forEach(function(n){ni["fix"+il(n)](e,r)}),e._id=e.name+"@"+e.version}function il(e){return e.charAt(0).toUpperCase()+e.slice(1)}});var kl=b((mx,Tl)=>{c();Tl.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Ll=b(($x,w0)=>{w0.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var Si=b((Mx,xi)=>{"use strict";c();var Bl=Ll();xi.exports=Bl;xi.exports.default=Bl});var $l=b((Hx,jl)=>{"use strict";c();jl.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Ul=b((Wx,Ml)=>{"use strict";c();var k0=$l();Ml.exports=e=>typeof e=="string"?e.replace(k0(),""):e});var Gl=b((Zx,Ti)=>{"use strict";c();var ql=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);Ti.exports=ql;Ti.exports.default=ql});var zl=b((Jx,Hl)=>{"use strict";c();Hl.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Vl=b((Xx,ki)=>{"use strict";c();var P0=Ul(),L0=Gl(),B0=zl(),Wl=e=>{if(typeof e!="string"||e.length===0||(e=P0(e),e.length===0))return 0;e=e.replace(B0()," ");let t=0;for(let r=0;r<e.length;r++){let n=e.codePointAt(r);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&r++,t+=L0(n)?2:1)}return t};ki.exports=Wl;ki.exports.default=Wl});var Yl=b((eS,Zl)=>{"use strict";c();var O0=Vl();function Lt(e,t){if(!e)return e;t=t||{};let r=t.align||"center";if(r==="left")return e;let n=t.split||`
9
- `,s=t.pad||" ",i=r!=="right"?R0:N0,o=!1;Array.isArray(e)||(o=!0,e=String(e).split(n));let u,a=0;return e=e.map(function(l){return l=String(l),u=O0(l),a=Math.max(u,a),{str:l,width:u}}).map(function(l){return new Array(i(a,l.width)+1).join(s)+l.str}),o?e.join(n):e}Lt.left=function(t){return Lt(t,{align:"left"})};Lt.center=function(t){return Lt(t,{align:"center"})};Lt.right=function(t){return Lt(t,{align:"right"})};Zl.exports=Lt;function R0(e,t){return Math.floor((e-t)/2)}function N0(e,t){return e-t}});var mf=b(Nr=>{"use strict";c();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.dedent=void 0;function pf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Array.from(typeof e=="string"?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var s=n.reduce(function(u,a){var l=a.match(/\n([\t ]+|(?!\s).)/g);return l?u.concat(l.map(function(f){var y,p;return(p=(y=f.match(/[\t ]/g))===null||y===void 0?void 0:y.length)!==null&&p!==void 0?p:0})):u},[]);if(s.length){var i=new RegExp(`
10
- [ ]{`+Math.min.apply(Math,s)+"}","g");n=n.map(function(u){return u.replace(i,`
11
- `)})}n[0]=n[0].replace(/^\r?\n/,"");var o=n[0];return t.forEach(function(u,a){var l=o.match(/(?:^|\n)( *)$/),f=l?l[1]:"",y=u;typeof u=="string"&&u.includes(`
12
- `)&&(y=String(u).split(`
13
- `).map(function(p,m){return m===0?p:""+f+p}).join(`
14
- `)),o+=y+n[a+1]}),o}Nr.dedent=pf;Nr.default=pf});var wf=b((Ui,qi)=>{"use strict";c();Object.defineProperty(Ui,"__esModule",{value:!0});function _g(e){return e.encrypted}var Mi=(e,t)=>{let r;typeof t=="function"?r={connect:t}:r=t;let n=typeof r.connect=="function",s=typeof r.secureConnect=="function",i=typeof r.close=="function",o=()=>{n&&r.connect(),_g(e)&&s&&(e.authorized?r.secureConnect():e.authorizationError||e.once("secureConnect",r.secureConnect)),i&&e.once("close",r.close)};e.writable&&!e.connecting?o():e.connecting?e.once("connect",o):e.destroyed&&i&&r.close(e._hadError)};Ui.default=Mi;qi.exports=Mi;qi.exports.default=Mi});var vf=b((ZS,Sf)=>{"use strict";c();var{PassThrough:Bg}=P("stream");Sf.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,n=r==="buffer",s=!1;t?s=!(r||n):r=r||"utf8",n&&(r=null);let i=new Bg({objectMode:s});r&&i.setEncoding(r);let o=0,u=[];return i.on("data",a=>{u.push(a),s?o=u.length:o+=a.length}),i.getBufferedValue=()=>t?u:n?Buffer.concat(u,o):u.join(""),i.getBufferedLength=()=>o,i}});var Wi=b((JS,Mr)=>{"use strict";c();var{constants:Og}=P("buffer"),Rg=P("stream"),{promisify:Ng}=P("util"),Ig=vf(),jg=Ng(Rg.pipeline),Kn=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function zi(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=Ig(t);return await new Promise((s,i)=>{let o=u=>{u&&n.getBufferedLength()<=Og.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)};(async()=>{try{await jg(e,n),s()}catch(u){o(u)}})(),n.on("data",()=>{n.getBufferedLength()>r&&o(new Kn)})}),n.getBufferedValue()}Mr.exports=zi;Mr.exports.buffer=(e,t)=>zi(e,{...t,encoding:"buffer"});Mr.exports.array=(e,t)=>zi(e,{...t,array:!0});Mr.exports.MaxBufferError=Kn});var Tf=b((QS,Af)=>{"use strict";c();var $g=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),Mg=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),Ug=new Set([500,502,503,504]),qg={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},Gg={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Bt(e){let t=parseInt(e,10);return isFinite(t)?t:0}function Hg(e){return e?Ug.has(e.status):!0}function Vi(e){let t={};if(!e)return t;let r=e.trim().split(/,/);for(let n of r){let[s,i]=n.split(/=/,2);t[s.trim()]=i===void 0?!0:i.trim().replace(/^"|"$/g,"")}return t}function zg(e){let t=[];for(let r in e){let n=e[r];t.push(n===!0?r:r+"="+n)}if(t.length)return t.join(", ")}Af.exports=class{constructor(t,r,{shared:n,cacheHeuristic:s,immutableMinTimeToLive:i,ignoreCargoCult:o,_fromObject:u}={}){if(u){this._fromObject(u);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(t),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=i!==void 0?i:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=Vi(r.headers["cache-control"]),this._method="method"in t?t.method:"GET",this._url=t.url,this._host=t.headers.host,this._noAuthorization=!t.headers.authorization,this._reqHeaders=r.headers.vary?t.headers:null,this._reqcc=Vi(t.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":zg(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&Mg.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||$g.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(t){if(!t||!t.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(t){this._assertRequestHasHeaders(t);let r=Vi(t.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(t.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(t,!1)}_requestMatches(t,r){return(!this._url||this._url===t.url)&&this._host===t.headers.host&&(!t.method||this._method===t.method||r&&t.method==="HEAD")&&this._varyMatches(t)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(t){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of r)if(t.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(t){let r={};for(let n in t)qg[n]||(r[n]=t[n]);if(t.connection){let n=t.connection.trim().split(/\s*,\s*/);for(let s of n)delete r[s]}if(r.warning){let n=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));n.length?r.warning=n.join(",").trim():delete r.warning}return r}responseHeaders(){let t=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(t.warning=(t.warning?`${t.warning}, `:"")+'113 - "rfc7234 5.5.4"'),t.age=`${Math.round(r)}`,t.date=new Date(this.now()).toUTCString(),t}date(){let t=Date.parse(this._resHeaders.date);return isFinite(t)?t:this._responseTime}age(){let t=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return t+r}_ageValue(){return Bt(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Bt(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Bt(this._rescc["max-age"]);let t=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<r?0:Math.max(t,(n-r)/1e3)}if(this._resHeaders["last-modified"]){let n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&r>n)return Math.max(t,(r-n)/1e3*this._cacheHeuristic)}return t}timeToLive(){let t=this.maxAge()-this.age(),r=t+Bt(this._rescc["stale-if-error"]),n=t+Bt(this._rescc["stale-while-revalidate"]);return Math.max(0,t,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Bt(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Bt(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(t){return new this(void 0,void 0,{_fromObject:t})}_fromObject(t){if(this._responseTime)throw Error("Reinitialized");if(!t||t.v!==1)throw Error("Invalid serialization");this._responseTime=t.t,this._isShared=t.sh,this._cacheHeuristic=t.ch,this._immutableMinTtl=t.imm!==void 0?t.imm:24*3600*1e3,this._status=t.st,this._resHeaders=t.resh,this._rescc=t.rescc,this._method=t.m,this._url=t.u,this._host=t.h,this._noAuthorization=t.a,this._reqHeaders=t.reqh,this._reqcc=t.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(t){this._assertRequestHasHeaders(t);let r=this._copyWithoutHopByHopHeaders(t.headers);if(delete r["if-range"],!this._requestMatches(t,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(i=>!/^\s*W\//.test(i));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(t,r){if(this._assertRequestHasHeaders(t),this._useStaleIfError()&&Hg(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let n=!1;if(r.status!==void 0&&r.status!=304?n=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(t,r),modified:r.status!=304,matches:!1};let s={};for(let o in this._resHeaders)s[o]=o in r.headers&&!Gg[o]?r.headers[o]:this._resHeaders[o];let i=Object.assign({},r,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(t,i,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var kf=b(Zi=>{c();Zi.stringify=function e(t){if(typeof t>"u")return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&typeof t=="object"){var r="",n=Array.isArray(t);r=n?"[":"{";var s=!0;for(var i in t){var o=typeof t[i]=="function"||!n&&typeof t[i]>"u";Object.hasOwnProperty.call(t,i)&&!o&&(s||(r+=","),s=!1,n?t[i]==null?r+="null":r+=e(t[i]):t[i]!==void 0&&(r+=e(i)+":"+e(t[i])))}return r+=n?"]":"}",r}else return typeof t=="string"?JSON.stringify(/^:/.test(t)?":"+t:t):typeof t>"u"?"null":JSON.stringify(t)};Zi.parse=function(e){return JSON.parse(e,function(t,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var Of=b((cv,Bf)=>{"use strict";c();var Vg=P("events"),Pf=kf(),Zg=e=>{let t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){let r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(P(t[r]))(e)}return new Map},Lf=["sqlite","postgres","mysql","mongo","redis","tiered"],Yi=class extends Vg{constructor(t,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:Pf.stringify,deserialize:Pf.parse,...typeof t=="string"?{uri:t}:t,...n},!this.opts.store){let i={...this.opts};this.opts.store=Zg(i)}if(this.opts.compression){let i=this.opts.compression;this.opts.serialize=i.serialize.bind(i),this.opts.deserialize=i.deserialize.bind(i)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace;let s=i=>async function*(){for await(let[o,u]of typeof i=="function"?i(this.opts.store.namespace):i){let a=await this.opts.deserialize(u);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(o);continue}yield[this._getKeyUnprefix(o),a.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return Lf.includes(this.opts.store.opts.dialect)||Lf.findIndex(t=>this.opts.store.opts.url.includes(t))>=0}_getKeyPrefix(t){return`${this.opts.namespace}:${t}`}_getKeyPrefixArray(t){return t.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(t){return t.split(":").splice(1).join(":")}get(t,r){let{store:n}=this.opts,s=Array.isArray(t),i=s?this._getKeyPrefixArray(t):this._getKeyPrefix(t);if(s&&n.getMany===void 0){let o=[];for(let u of i)o.push(Promise.resolve().then(()=>n.get(u)).then(a=>typeof a=="string"?this.opts.deserialize(a):this.opts.compression?this.opts.deserialize(a):a).then(a=>{if(a!=null)return typeof a.expires=="number"&&Date.now()>a.expires?this.delete(u).then(()=>{}):r&&r.raw?a:a.value}));return Promise.allSettled(o).then(u=>{let a=[];for(let l of u)a.push(l.value);return a})}return Promise.resolve().then(()=>s?n.getMany(i):n.get(i)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null)return s?o.map((u,a)=>{if(typeof u=="string"&&(u=this.opts.deserialize(u)),u!=null){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(t[a]).then(()=>{});return}return r&&r.raw?u:u.value}}):typeof o.expires=="number"&&Date.now()>o.expires?this.delete(t).then(()=>{}):r&&r.raw?o:o.value})}set(t,r,n){let s=this._getKeyPrefix(t);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:i}=this.opts;return Promise.resolve().then(()=>{let o=typeof n=="number"?Date.now()+n:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>i.set(s,o,n)).then(()=>!0)}delete(t){let{store:r}=this.opts;if(Array.isArray(t)){let s=this._getKeyPrefixArray(t);if(r.deleteMany===void 0){let i=[];for(let o of s)i.push(r.delete(o));return Promise.allSettled(i).then(o=>o.every(u=>u.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let n=this._getKeyPrefix(t);return Promise.resolve().then(()=>r.delete(n))}clear(){let{store:t}=this.opts;return Promise.resolve().then(()=>t.clear())}has(t){let r=this._getKeyPrefix(t),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(r):await n.get(r)!==void 0)}disconnect(){let{store:t}=this.opts;if(typeof t.disconnect=="function")return t.disconnect()}};Bf.exports=Yi});var $f=b((vv,jf)=>{"use strict";c();var nF=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];jf.exports=(e,t)=>{if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(e).concat(nF)),n={};for(let s of r)s in t||(n[s]={get(){let i=e[s];return typeof i=="function"?i.bind(e):i},set(i){e[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(t,n),e.once("aborted",()=>{t.destroy(),t.emit("aborted")}),e.once("close",()=>{e.complete&&t.readable?t.once("end",()=>{t.emit("close")}):t.emit("close")}),t}});var Uf=b((Tv,Mf)=>{"use strict";c();var{Transform:sF,PassThrough:iF}=P("stream"),Qi=P("zlib"),oF=$f();Mf.exports=e=>{let t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t))return e;let r=t==="br";if(r&&typeof Qi.createBrotliDecompress!="function")return e.destroy(new Error("Brotli is not supported on Node.js < 12")),e;let n=!0,s=new sF({transform(u,a,l){n=!1,l(null,u)},flush(u){u()}}),i=new iF({autoDestroy:!1,destroy(u,a){e.destroy(),a(u)}}),o=r?Qi.createBrotliDecompress():Qi.createUnzip();return o.once("error",u=>{if(n&&!e.readable){i.end();return}i.destroy(u)}),oF(e,i),e.pipe(s).pipe(o).pipe(i),i}});var fo=b((IA,rh)=>{"use strict";c();var lo=class{constructor(t={}){if(!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=t.maxSize,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(t,r){if(this.cache.set(t,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[n,s]of this.oldCache.entries())this.onEviction(n,s);this.oldCache=this.cache,this.cache=new Map}}get(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t)){let r=this.oldCache.get(t);return this.oldCache.delete(t),this._set(t,r),r}}set(t,r){return this.cache.has(t)?this.cache.set(t,r):this._set(t,r),this}has(t){return this.cache.has(t)||this.oldCache.has(t)}peek(t){if(this.cache.has(t))return this.cache.get(t);if(this.oldCache.has(t))return this.oldCache.get(t)}delete(t){let r=this.cache.delete(t);return r&&this._size--,this.oldCache.delete(t)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[t]of this)yield t}*values(){for(let[,t]of this)yield t}*[Symbol.iterator](){for(let t of this.cache)yield t;for(let t of this.oldCache){let[r]=t;this.cache.has(r)||(yield t)}}get size(){let t=0;for(let r of this.oldCache.keys())this.cache.has(r)||t++;return Math.min(this._size+t,this.maxSize)}};rh.exports=lo});var ho=b(($A,nh)=>{"use strict";c();nh.exports=e=>{if(e.listenerCount("error")!==0)return e;e.__destroy=e._destroy,e._destroy=(...r)=>{let n=r.pop();e.__destroy(...r,async s=>{await Promise.resolve(),n(s)})};let t=r=>{Promise.resolve().then(()=>{e.emit("error",r)})};return e.once("error",t),Promise.resolve().then(()=>{e.off("error",t)}),e}});var Rt=b((UA,ch)=>{"use strict";c();var{URL:sh}=P("url"),vF=P("events"),AF=P("tls"),TF=P("http2"),kF=fo(),PF=ho(),Ee=Symbol("currentStreamCount"),ih=Symbol("request"),Ce=Symbol("cachedOriginSet"),ft=Symbol("gracefullyClosing"),os=Symbol("length"),oh=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],LF=(e,t,r)=>{let n=0,s=e.length;for(;n<s;){let i=n+s>>>1;r(e[i],t)?n=i+1:s=i}return n},BF=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,Do=(e,t)=>{for(let r=0;r<e.length;r++){let n=e[r];n[Ce].length>0&&n[Ce].length<t[Ce].length&&n[Ce].every(s=>t[Ce].includes(s))&&n[Ee]+t[Ee]<=t.remoteSettings.maxConcurrentStreams&&ah(n)}},uh=(e,t)=>{for(let r=0;r<e.length;r++){let n=e[r];if(t[Ce].length>0&&t[Ce].length<n[Ce].length&&t[Ce].every(s=>n[Ce].includes(s))&&t[Ee]+n[Ee]<=n.remoteSettings.maxConcurrentStreams)return ah(t),!0}return!1},ah=e=>{e[ft]=!0,e[Ee]===0&&e.close()},fr=class e extends vF{constructor({timeout:t=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=t,this.maxSessions=r,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new kF({maxSize:s})}get protocol(){return"https:"}normalizeOptions(t){let r="";for(let n=0;n<oh.length;n++){let s=oh[n];r+=":",t&&t[s]!==void 0&&(r+=t[s])}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let t in this.queue)for(let r in this.queue[t]){let n=this.queue[t][r];n.completed||(n.completed=!0,n())}}_isBetterSession(t,r){return t>r}_accept(t,r,n,s){let i=0;for(;i<r.length&&t[Ee]<t.remoteSettings.maxConcurrentStreams;)r[i].resolve(t),i++;r.splice(0,i),r.length>0&&(this.getSession(n,s,r),r.length=0)}getSession(t,r,n){return new Promise((s,i)=>{Array.isArray(n)&&n.length>0?(n=[...n],s()):n=[{resolve:s,reject:i}];try{if(typeof t=="string")t=new sh(t);else if(!(t instanceof sh))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:f}=r,{hostname:y}=t;if(f&&y!==f)throw new Error(`Origin ${y} differs from servername ${f}`)}}catch(f){for(let y=0;y<n.length;y++)n[y].reject(f);return}let o=this.normalizeOptions(r),u=t.origin;if(o in this.sessions){let f=this.sessions[o],y=-1,p=-1,m;for(let g=0;g<f.length;g++){let d=f[g],E=d.remoteSettings.maxConcurrentStreams;if(E<y)break;if(!d[Ce].includes(u))continue;let F=d[Ee];F>=E||d[ft]||d.destroyed||(m||(y=E),this._isBetterSession(F,p)&&(m=d,p=F))}if(m){this._accept(m,n,u,r);return}}if(o in this.queue){if(u in this.queue[o]){this.queue[o][u].listeners.push(...n);return}}else this.queue[o]={[os]:0};let a=()=>{o in this.queue&&this.queue[o][u]===l&&(delete this.queue[o][u],--this.queue[o][os]===0&&delete this.queue[o])},l=async()=>{this._sessionCount++;let f=`${u}:${o}`,y=!1,p;try{let m={...r};m.settings===void 0&&(m.settings=this.settings),m.session===void 0&&(m.session=this.tlsSessionCache.get(f)),p=await(m.createConnection||this.createConnection).call(this,t,m),m.createConnection=()=>p;let d=TF.connect(t,m);d[Ee]=0,d[ft]=!1;let E=()=>{let{socket:x}=d,k;return x.servername===!1?(x.servername=x.remoteAddress,k=d.originSet,x.servername=!1):k=d.originSet,k},F=()=>d[Ee]<d.remoteSettings.maxConcurrentStreams;d.socket.once("session",x=>{this.tlsSessionCache.set(f,x)}),d.once("error",x=>{for(let k=0;k<n.length;k++)n[k].reject(x);this.tlsSessionCache.delete(f)}),d.setTimeout(this.timeout,()=>{d.destroy()}),d.once("close",()=>{if(this._sessionCount--,y){this._emptySessionCount--;let x=this.sessions[o];x.length===1?delete this.sessions[o]:x.splice(x.indexOf(d),1)}else{a();let x=new Error("Session closed without receiving a SETTINGS frame");x.code="HTTP2WRAPPER_NOSETTINGS";for(let k=0;k<n.length;k++)n[k].reject(x)}this._processQueue()});let A=()=>{let x=this.queue[o];if(!x)return;let k=d[Ce];for(let I=0;I<k.length;I++){let K=k[I];if(K in x){let{listeners:ne,completed:Ie}=x[K],L=0;for(;L<ne.length&&F();)ne[L].resolve(d),L++;if(x[K].listeners.splice(0,L),x[K].listeners.length===0&&!Ie&&(delete x[K],--x[os]===0)){delete this.queue[o];break}if(!F())break}}};d.on("origin",()=>{d[Ce]=E()||[],d[ft]=!1,uh(this.sessions[o],d),!(d[ft]||!F())&&(A(),F()&&Do(this.sessions[o],d))}),d.once("remoteSettings",()=>{if(l.destroyed){let x=new Error("Agent has been destroyed");for(let k=0;k<n.length;k++)n[k].reject(x);d.destroy();return}if(d.setLocalWindowSize&&d.setLocalWindowSize(1024*1024*4),d[Ce]=E()||[],d.socket.encrypted){let x=d[Ce][0];if(x!==u){let k=new Error(`Requested origin ${u} does not match server ${x}`);for(let I=0;I<n.length;I++)n[I].reject(k);d.destroy();return}}a();{let x=this.sessions;if(o in x){let k=x[o];k.splice(LF(k,d,BF),0,d)}else x[o]=[d]}y=!0,this._emptySessionCount++,this.emit("session",d),this._accept(d,n,u,r),d[Ee]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),d.on("remoteSettings",()=>{F()&&(A(),F()&&Do(this.sessions[o],d))})}),d[ih]=d.request,d.request=(x,k)=>{if(d[ft])throw new Error("The session is gracefully closing. No new streams are allowed.");let I=d[ih](x,k);return d.ref(),d[Ee]++===0&&this._emptySessionCount--,I.once("close",()=>{if(--d[Ee]===0&&(this._emptySessionCount++,d.unref(),this._emptySessionCount>this.maxEmptySessions||d[ft])){d.close();return}d.destroyed||d.closed||F()&&!uh(this.sessions[o],d)&&(Do(this.sessions[o],d),A(),d[Ee]===0&&this._processQueue())}),I}}catch(m){a(),this._sessionCount--;for(let g=0;g<n.length;g++)n[g].reject(m)}};l.listeners=n,l.completed=!1,l.destroyed=!1,this.queue[o][u]=l,this.queue[o][os]++,this._processQueue()})}request(t,r,n,s){return new Promise((i,o)=>{this.getSession(t,r,[{reject:o,resolve:u=>{try{let a=u.request(n,s);PF(a),i(a)}catch(a){o(a)}}}])})}async createConnection(t,r){return e.connect(t,r)}static connect(t,r){r.ALPNProtocols=["h2"];let n=t.port||443,s=t.hostname;typeof r.servername>"u"&&(r.servername=s);let i=AF.connect(n,s,r);return r.socket&&(i._peername={family:void 0,address:void 0,port:n}),i}closeEmptySessions(t=Number.POSITIVE_INFINITY){let r=0,{sessions:n}=this;for(let s in n){let i=n[s];for(let o=0;o<i.length;o++){let u=i[o];if(u[Ee]===0&&(r++,u.close(),r>=t))return r}}return r}destroy(t){let{sessions:r,queue:n}=this;for(let s in r){let i=r[s];for(let o=0;o<i.length;o++)i[o].destroy(t)}for(let s in n){let i=n[s];for(let o in i)i[o].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};fr.kCurrentStreamCount=Ee;fr.kGracefullyClosing=ft;ch.exports={Agent:fr,globalAgent:new fr}});var mo=b((GA,lh)=>{"use strict";c();var{Readable:OF}=P("stream"),po=class extends OF{constructor(t,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=t,this._dumped=!1}get connection(){return this.socket}set connection(t){this.socket=t}_destroy(t,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(t)}setTimeout(t,r){return this.req.setTimeout(t,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};lh.exports=po});var hh=b((zA,fh)=>{"use strict";c();fh.exports=(e,t,r)=>{for(let n of r)e.on(n,(...s)=>t.emit(n,...s))}});var Qr=b((ZA,dh)=>{"use strict";c();var Nt=(e,t,r)=>{dh.exports[t]=class extends e{constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${t}]`,this.code=t}}};Nt(TypeError,"ERR_INVALID_ARG_TYPE",e=>{let t=e[0].includes(".")?"property":"argument",r=e[1],n=Array.isArray(r);return n&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${e[0]}" ${t} must be ${n?"one of":"of"} type ${r}. Received ${typeof e[2]}`});Nt(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`);Nt(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`);Nt(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`);Nt(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`);Nt(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`);Nt(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")});var ph=b((JA,Dh)=>{"use strict";c();Dh.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var yo=b((XA,mh)=>{"use strict";c();var{ERR_INVALID_HTTP_TOKEN:RF}=Qr(),NF=ph(),IF=/^[\^`\-\w!#$%&*+.|~]+$/;mh.exports=e=>{if(typeof e!="string"||!IF.test(e)&&!NF(e))throw new RF("Header name",e)}});var go=b((e3,yh)=>{"use strict";c();var{ERR_HTTP_INVALID_HEADER_VALUE:jF,ERR_INVALID_CHAR:$F}=Qr(),MF=/[^\t\u0020-\u007E\u0080-\u00FF]/;yh.exports=(e,t)=>{if(typeof t>"u")throw new jF(t,e);if(MF.test(t))throw new $F("header content",e)}});var Eh=b((r3,Fh)=>{"use strict";c();var{ERR_HTTP2_NO_SOCKET_MANIPULATION:gh}=Qr(),UF={has(e,t){let r=e.session===void 0?e:e.session.socket;return t in e||t in r},get(e,t){switch(t){case"on":case"once":case"end":case"emit":case"destroy":return e[t].bind(e);case"writable":case"destroyed":return e[t];case"readable":return e.destroyed?!1:e.readable;case"setTimeout":{let{session:r}=e;return r!==void 0?r.setTimeout.bind(r):e.setTimeout.bind(e)}case"write":case"read":case"pause":case"resume":throw new gh;default:{let r=e.session===void 0?e:e.session.socket,n=r[t];return typeof n=="function"?n.bind(r):n}}},getPrototypeOf(e){return e.session!==void 0?Reflect.getPrototypeOf(e.session.socket):Reflect.getPrototypeOf(e)},set(e,t,r){switch(t){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return e[t]=r,!0;case"setTimeout":{let{session:n}=e;return n===void 0?e.setTimeout=r:n.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new gh;default:{let n=e.session===void 0?e:e.session.socket;return n[t]=r,!0}}}};Fh.exports=UF});var bo=b((s3,Sh)=>{"use strict";c();var{URL:Fo,urlToHttpOptions:Ch}=P("url"),qF=P("http2"),{Writable:GF}=P("stream"),{Agent:HF,globalAgent:zF}=Rt(),WF=mo(),VF=hh(),{ERR_INVALID_ARG_TYPE:us,ERR_INVALID_PROTOCOL:ZF,ERR_HTTP_HEADERS_SENT:bh}=Qr(),YF=yo(),JF=go(),KF=Eh(),{HTTP2_HEADER_STATUS:wh,HTTP2_HEADER_METHOD:_h,HTTP2_HEADER_PATH:xh,HTTP2_HEADER_AUTHORITY:en,HTTP2_METHOD_CONNECT:XF}=qF.constants,he=Symbol("headers"),hr=Symbol("origin"),tn=Symbol("session"),Eo=Symbol("options"),as=Symbol("flushedHeaders"),dr=Symbol("jobs"),rn=Symbol("pendingAgentPromise"),Co=class extends GF{constructor(t,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof t=="string"?t=Ch(new Fo(t)):t instanceof Fo?t=Ch(t):t={...t},typeof r=="function"||r===void 0?(n=r,r=t):r=Object.assign(t,r),r.h2session){if(this[tn]=r.h2session,this[tn].destroyed)throw new Error("The session has been closed already");this.protocol=this[tn].socket.encrypted?"https:":"http:"}else if(r.agent===!1)this.agent=new HF({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=zF;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new us("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new ZF(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[he]=Object.create(null),this[dr]=[],this[rn]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:i}=r;if(i)for(let u in i)this.setHeader(u,i[u]);r.auth&&!("authorization"in this[he])&&(this[he].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[Eo]=r,this[hr]=new Fo(`${this.protocol}//${r.servername||r.host}:${r.port}`);let o=r._reuseSocket;o&&(r.createConnection=(...u)=>o.destroyed?this.agent.createConnection(...u):o,this.agent.getSession(this[hr],this[Eo]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[as]=!1}get method(){return this[he][_h]}set method(t){t&&(this[he][_h]=t.toUpperCase())}get path(){let t=this.method==="CONNECT"?en:xh;return this[he][t]}set path(t){if(t){let r=this.method==="CONNECT"?en:xh;this[he][r]=t}}get host(){return this[hr].hostname}set host(t){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(t,r,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=()=>this._request.write(t,r,n);this._request?s():this[dr].push(s)}_final(t){this.flushHeaders();let r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){t();return}this._request.end(t)};this._request?r():this[dr].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(t,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[rn]}catch(n){this.aborted&&(t=n)}r(t)}async flushHeaders(){if(this[as]||this.destroyed)return;this[as]=!0;let t=this.method===XF,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}t||VF(n,this,["timeout","continue"]),n.once("error",i=>{this.destroy(i)}),n.once("aborted",()=>{let{res:i}=this;i?(i.aborted=!0,i.emit("aborted"),i.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});let s=(i,o,u)=>{let a=new WF(this.socket,n.readableHighWaterMark);this.res=a,a.url=`${this[hr].origin}${this.path}`,a.req=this,a.statusCode=i[wh],a.headers=i,a.rawHeaders=u,a.once("end",()=>{a.complete=!0,a.socket=null,a.connection=null}),t?(a.upgrade=!0,this.emit("connect",a,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",l=>{!a._dumped&&!a.push(l)&&n.pause()}),n.once("end",()=>{this.aborted||a.push(null)}),this.emit("response",a)||a._dump())};n.once("response",s),n.once("headers",i=>this.emit("information",{statusCode:i[wh]})),n.once("trailers",(i,o,u)=>{let{res:a}=this;if(a===null){s(i,o,u);return}a.trailers=i,a.rawTrailers=u}),n.once("close",()=>{let{aborted:i,res:o}=this;if(o){i&&(o.aborted=!0,o.emit("aborted"),o.destroy());let u=()=>{o.emit("close"),this.destroy(),this.emit("close")};o.readable?o.once("end",u):u();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close")}),this.socket=new Proxy(n,KF);for(let i of this[dr])i();this[dr].length=0,this.emit("socket",this.socket)};if(!(en in this[he])&&!t&&(this[he][en]=this[hr].host),this[tn])try{r(this[tn].request(this[he]))}catch(n){this.destroy(n)}else{this.reusedSocket=!0;try{let n=this.agent.request(this[hr],this[Eo],this[he]);this[rn]=n,r(await n),this[rn]=!1}catch(n){this[rn]=!1,this.destroy(n)}}}get connection(){return this.socket}set connection(t){this.socket=t}getHeaderNames(){return Object.keys(this[he])}hasHeader(t){if(typeof t!="string")throw new us("name","string",t);return!!this[he][t.toLowerCase()]}getHeader(t){if(typeof t!="string")throw new us("name","string",t);return this[he][t.toLowerCase()]}get headersSent(){return this[as]}removeHeader(t){if(typeof t!="string")throw new us("name","string",t);if(this.headersSent)throw new bh("remove");delete this[he][t.toLowerCase()]}setHeader(t,r){if(this.headersSent)throw new bh("set");YF(t),JF(t,r);let n=t.toLowerCase();if(n==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}n==="host"&&this.method==="CONNECT"?this[he][en]=r:this[he][n]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(t,r){let n=()=>this._request.setTimeout(t,r);return this._request?n():this[dr].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(t){}};Sh.exports=Co});var Ah=b((o3,vh)=>{"use strict";c();var QF=P("tls");vh.exports=(e={},t=QF.connect)=>new Promise((r,n)=>{let s=!1,i,o=async()=>{await a,i.off("timeout",u),i.off("error",n),e.resolveSocket?(r({alpnProtocol:i.alpnProtocol,socket:i,timeout:s}),s&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),r({alpnProtocol:i.alpnProtocol,timeout:s}))},u=async()=>{s=!0,o()},a=(async()=>{try{i=await t(e,o),i.on("error",n),i.once("timeout",u)}catch(l){n(l)}})()})});var kh=b((a3,Th)=>{"use strict";c();var{isIP:eE}=P("net"),tE=P("assert"),rE=e=>{if(e[0]==="["){let r=e.indexOf("]");return tE(r!==-1),e.slice(1,r)}let t=e.indexOf(":");return t===-1?e:e.slice(0,t)};Th.exports=e=>{let t=rE(e);return eE(t)?"":t}});var jh=b((l3,nn)=>{"use strict";c();var{URL:Ph,urlToHttpOptions:Lh}=P("url"),Bh=P("http"),wo=P("https"),nE=Ah(),sE=fo(),{Agent:iE,globalAgent:oE}=Rt(),uE=bo(),aE=kh(),Oh=ho(),Rh=new sE({maxSize:100}),cE=new Map,lE=(e,t,r)=>{t._httpMessage={shouldKeepAlive:!0};let n=()=>{e.emit("free",t,r)};t.on("free",n);let s=()=>{e.removeSocket(t,r)};t.on("close",s);let i=()=>{let{freeSockets:u}=e;for(let a of Object.values(u))if(a.includes(t)){t.destroy();return}};t.on("timeout",i);let o=()=>{e.removeSocket(t,r),t.off("close",s),t.off("free",n),t.off("timeout",i),t.off("agentRemove",o)};t.on("agentRemove",o),e.emit("free",t,r)},Nh=(e,t=new Map,r=void 0)=>async n=>{let s=`${n.host}:${n.port}:${n.ALPNProtocols.sort()}`;if(!e.has(s)){if(t.has(s))return{alpnProtocol:(await t.get(s)).alpnProtocol};let{path:i}=n;n.path=n.socketPath;let o=nE(n,r);t.set(s,o);try{let u=await o;return e.set(s,u.alpnProtocol),t.delete(s),n.path=i,u}catch(u){throw t.delete(s),n.path=i,u}}return{alpnProtocol:e.get(s)}},Ih=Nh(Rh,cE);nn.exports=async(e,t,r)=>{if(typeof e=="string"?e=Lh(new Ph(e)):e instanceof Ph?e=Lh(e):e={...e},typeof t=="function"||t===void 0?(r=t,t=e):t=Object.assign(e,t),t.ALPNProtocols=t.ALPNProtocols||["h2","http/1.1"],!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");t.protocol=t.protocol||"https:";let n=t.protocol==="https:";t.host=t.hostname||t.host||"localhost",t.session=t.tlsSession,t.servername=t.servername||aE(t.headers&&t.headers.host||t.host),t.port=t.port||(n?443:80),t._defaultAgent=n?wo.globalAgent:Bh.globalAgent;let s=t.resolveProtocol||Ih,{agent:i}=t;if(i!==void 0&&i!==!1&&i.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(n){t.resolveSocket=!0;let{socket:o,alpnProtocol:u,timeout:a}=await s(t);if(a){o&&o.destroy();let f=new Error(`Timed out resolving ALPN: ${t.timeout} ms`);throw f.code="ETIMEDOUT",f.ms=t.timeout,f}o&&t.createConnection&&(o.destroy(),o=void 0),delete t.resolveSocket;let l=u==="h2";if(i&&(i=l?i.http2:i.https,t.agent=i),i===void 0&&(i=l?oE:wo.globalAgent),o)if(i===!1)o.destroy();else{let f=(l?iE:wo.Agent).prototype.createConnection;i.createConnection===f?l?t._reuseSocket=o:lE(i,o,t):o.destroy()}if(l)return Oh(new uE(t,r))}else i&&(t.agent=i.http);return t.headers&&(t.headers={...t.headers},t.headers[":authority"]&&(t.headers.host||(t.headers.host=t.headers[":authority"]),delete t.headers[":authority"]),delete t.headers[":method"],delete t.headers[":scheme"],delete t.headers[":path"]),Oh(Bh.request(t,r))};nn.exports.protocolCache=Rh;nn.exports.resolveProtocol=Ih;nn.exports.createResolveProtocol=Nh});var _o=b((h3,$h)=>{"use strict";c();var fE=P("stream"),hE=P("tls"),dE=new hE.TLSSocket(new fE.PassThrough)._handle._parentWrap.constructor;$h.exports=dE});var So=b((D3,Mh)=>{"use strict";c();var xo=class extends Error{constructor(t,r=""){super(`The proxy server rejected the request with status code ${t} (${r||"empty status message"})`),this.statusCode=t,this.statusMessage=r}};Mh.exports=xo});var qh=b((m3,Uh)=>{"use strict";c();var DE=(e,t,r)=>{if(!r.some(s=>typeof s==="string"?typeof t===s:t instanceof s)){let s=r.map(i=>typeof i=="string"?i:i.name);throw new TypeError(`Expected '${e}' to be a type of ${s.join(" or ")}, got ${typeof t}`)}};Uh.exports=DE});var vo=b((g3,Hh)=>{"use strict";c();var{URL:Gh}=P("url"),cs=qh();Hh.exports=(e,t)=>{cs("proxyOptions",t,["object"]),cs("proxyOptions.headers",t.headers,["object","undefined"]),cs("proxyOptions.raw",t.raw,["boolean","undefined"]),cs("proxyOptions.url",t.url,[Gh,"string"]);let r=new Gh(t.url);e.proxyOptions={raw:!0,...t,headers:{...t.headers},url:r}}});var ls=b((E3,zh)=>{"use strict";c();zh.exports=e=>{let{username:t,password:r}=e.proxyOptions.url;if(t||r){let n=`${t}:${r}`,s=`Basic ${Buffer.from(n).toString("base64")}`;return{"proxy-authorization":s,authorization:s}}return{}}});var Jh=b((b3,Yh)=>{"use strict";c();var pE=P("tls"),mE=P("http"),Wh=P("https"),yE=_o(),{globalAgent:gE}=Rt(),FE=So(),Vh=vo(),EE=ls(),Zh=(e,t,r)=>{(async()=>{try{let{proxyOptions:n}=e,{url:s,headers:i,raw:o}=n,u=await gE.request(s,n,{...EE(e),...i,":method":"CONNECT",":authority":`${t.host}:${t.port}`});u.once("error",r),u.once("response",a=>{let l=a[":status"];if(l!==200){r(new FE(l,""));return}let f=e instanceof Wh.Agent;if(o&&f){t.socket=u;let p=pE.connect(t);p.once("close",()=>{u.destroy()}),r(null,p);return}let y=new yE(u);y.encrypted=!1,y._handle.getpeername=p=>{p.family=void 0,p.address=void 0,p.port=void 0},r(null,y)})}catch(n){r(n)}})()},Ao=class extends mE.Agent{constructor(t){super(t),Vh(this,t.proxyOptions)}createConnection(t,r){Zh(this,t,r)}},To=class extends Wh.Agent{constructor(t){super(t),Vh(this,t.proxyOptions)}createConnection(t,r){Zh(this,t,r)}};Yh.exports={HttpOverHttp2:Ao,HttpsOverHttp2:To}});var Po=b((_3,Kh)=>{"use strict";c();var{Agent:CE}=Rt(),bE=_o(),wE=So(),_E=vo(),ko=class extends CE{constructor(t){super(t),_E(this,t.proxyOptions)}async createConnection(t,r){let n=`${t.hostname}:${t.port||443}`,[s,i,o]=await this._getProxyStream(n);if(i!==200)throw new wE(i,o);if(this.proxyOptions.raw)r.socket=s;else{let u=new bE(s);return u.encrypted=!1,u._handle.getpeername=a=>{a.family=void 0,a.address=void 0,a.port=void 0},u}return super.createConnection(t,r)}};Kh.exports=ko});var Qh=b((S3,Xh)=>{"use strict";c();var{globalAgent:xE}=Rt(),SE=Po(),vE=ls(),AE=e=>new Promise((t,r)=>{e.once("error",r),e.once("response",n=>{e.off("error",r),t(n[":status"])})}),Lo=class extends SE{async _getProxyStream(t){let{proxyOptions:r}=this,n={...vE(this),...r.headers,":method":"CONNECT",":authority":t},s=await xE.request(r.url,r,n),i=await AE(s);return[s,i,""]}};Xh.exports=Lo});var td=b((A3,ed)=>{"use strict";c();var TE=P("http"),kE=P("https"),PE=Po(),LE=ls(),BE=e=>new Promise((t,r)=>{let n=(s,i,o)=>{i.unshift(o),e.off("error",r),t([i,s.statusCode,s.statusMessage])};e.once("error",r),e.once("connect",n)}),fs=class extends PE{async _getProxyStream(t){let{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,o=(n.protocol==="https:"?kE:TE).request({...r,hostname:n.hostname,port:n.port,path:t,headers:{...LE(this),...s,host:t},method:"CONNECT"}).end();return BE(o)}};ed.exports={Http2OverHttp:fs,Http2OverHttps:fs}});var nd=b((k3,rd)=>{"use strict";c();var OE=P("http2"),{Agent:RE,globalAgent:NE}=Rt(),Bo=bo(),IE=mo(),jE=jh(),{HttpOverHttp2:$E,HttpsOverHttp2:ME}=Jh(),UE=Qh(),{Http2OverHttp:qE,Http2OverHttps:GE}=td(),HE=yo(),zE=go(),WE=(e,t,r)=>new Bo(e,t,r),VE=(e,t,r)=>{let n=new Bo(e,t,r);return n.end(),n};rd.exports={...OE,ClientRequest:Bo,IncomingMessage:IE,Agent:RE,globalAgent:NE,request:WE,get:VE,auto:jE,proxies:{HttpOverHttp2:$E,HttpsOverHttp2:ME,Http2OverHttp2:UE,Http2OverHttp:qE,Http2OverHttps:GE},validateHeaderName:HE,validateHeaderValue:zE}});c();c();var qo=(e=0)=>t=>`\x1B[${t+e}m`,Go=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ho=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Y={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},TC=Object.keys(Y.modifier),wd=Object.keys(Y.color),_d=Object.keys(Y.bgColor),kC=[...wd,..._d];function xd(){let e=new Map;for(let[t,r]of Object.entries(Y)){for(let[n,s]of Object.entries(r))Y[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=Y[n],e.set(s[0],s[1]);Object.defineProperty(Y,t,{value:r,enumerable:!1})}return Object.defineProperty(Y,"codes",{value:e,enumerable:!1}),Y.color.close="\x1B[39m",Y.bgColor.close="\x1B[49m",Y.color.ansi=qo(),Y.color.ansi256=Go(),Y.color.ansi16m=Ho(),Y.bgColor.ansi=qo(10),Y.bgColor.ansi256=Go(10),Y.bgColor.ansi16m=Ho(10),Object.defineProperties(Y,{rgbToAnsi256:{value(t,r,n){return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>Y.rgbToAnsi256(...Y.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,s;if(t>=232)r=((t-232)*10+8)/255,n=r,s=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,n=Math.floor(u/6)/5,s=u%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>Y.ansi256ToAnsi(Y.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Y.ansi256ToAnsi(Y.hexToAnsi256(t)),enumerable:!1}}),Y}var Sd=xd(),Le=Sd;c();import gs from"node:process";import vd from"node:os";import zo from"node:tty";function ve(e,t=globalThis.Deno?globalThis.Deno.args:gs.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return n!==-1&&(s===-1||n<s)}var{env:Q}=gs,on;ve("no-color")||ve("no-colors")||ve("color=false")||ve("color=never")?on=0:(ve("color")||ve("colors")||ve("color=true")||ve("color=always"))&&(on=1);function Ad(){if("FORCE_COLOR"in Q)return Q.FORCE_COLOR==="true"?1:Q.FORCE_COLOR==="false"?0:Q.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Q.FORCE_COLOR,10),3)}function Td(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function kd(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Ad();n!==void 0&&(on=n);let s=r?on:n;if(s===0)return 0;if(r){if(ve("color=16m")||ve("color=full")||ve("color=truecolor"))return 3;if(ve("color=256"))return 2}if("TF_BUILD"in Q&&"AGENT_NAME"in Q)return 1;if(e&&!t&&s===void 0)return 0;let i=s||0;if(Q.TERM==="dumb")return i;if(gs.platform==="win32"){let o=vd.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Q)return"GITHUB_ACTIONS"in Q||"GITEA_ACTIONS"in Q?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Q)||Q.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Q)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Q.TEAMCITY_VERSION)?1:0;if(Q.COLORTERM==="truecolor"||Q.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Q){let o=Number.parseInt((Q.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Q.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Q.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Q.TERM)||"COLORTERM"in Q?1:i}function Wo(e,t={}){let r=kd(e,{streamIsTTY:e&&e.isTTY,...t});return Td(r)}var Pd={stdout:Wo({isTTY:zo.isatty(1)}),stderr:Wo({isTTY:zo.isatty(2)})},Vo=Pd;c();function Zo(e,t,r){let n=e.indexOf(t);if(n===-1)return e;let s=t.length,i=0,o="";do o+=e.slice(i,n)+t+r,i=n+s,n=e.indexOf(t,i);while(n!==-1);return o+=e.slice(i),o}function Yo(e,t,r,n){let s=0,i="";do{let o=e[n-1]==="\r";i+=e.slice(s,o?n-1:n)+t+(o?`\r
15
- `:`
16
- `)+r,s=n+1,n=e.indexOf(`
17
- `,s)}while(n!==-1);return i+=e.slice(s),i}var{stdout:Jo,stderr:Ko}=Vo,Fs=Symbol("GENERATOR"),jt=Symbol("STYLER"),mr=Symbol("IS_EMPTY"),Xo=["ansi","ansi","ansi256","ansi16m"],$t=Object.create(null),Ld=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Jo?Jo.level:0;e.level=t.level===void 0?r:t.level},Qo=class{constructor(t){return eu(t)}},eu=e=>{let t=(...r)=>r.join(" ");return Ld(t,e),Object.setPrototypeOf(t,yr.prototype),t};function yr(e){return eu(e)}Object.setPrototypeOf(yr.prototype,Function.prototype);for(let[e,t]of Object.entries(Le))$t[e]={get(){let r=un(this,Cs(t.open,t.close,this[jt]),this[mr]);return Object.defineProperty(this,e,{value:r}),r}};$t.visible={get(){let e=un(this,this[jt],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Es=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Le[r].ansi16m(...n):t==="ansi256"?Le[r].ansi256(Le.rgbToAnsi256(...n)):Le[r].ansi(Le.rgbToAnsi(...n)):e==="hex"?Es("rgb",t,r,...Le.hexToRgb(...n)):Le[r][e](...n),Bd=["rgb","hex","ansi256"];for(let e of Bd){$t[e]={get(){let{level:r}=this;return function(...n){let s=Cs(Es(e,Xo[r],"color",...n),Le.color.close,this[jt]);return un(this,s,this[mr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);$t[t]={get(){let{level:r}=this;return function(...n){let s=Cs(Es(e,Xo[r],"bgColor",...n),Le.bgColor.close,this[jt]);return un(this,s,this[mr])}}}}var Od=Object.defineProperties(()=>{},{...$t,level:{enumerable:!0,get(){return this[Fs].level},set(e){this[Fs].level=e}}}),Cs=(e,t,r)=>{let n,s;return r===void 0?(n=e,s=t):(n=r.openAll+e,s=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:s,parent:r}},un=(e,t,r)=>{let n=(...s)=>Rd(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,Od),n[Fs]=e,n[jt]=t,n[mr]=r,n},Rd=(e,t)=>{if(e.level<=0||!t)return e[mr]?"":t;let r=e[jt];if(r===void 0)return t;let{openAll:n,closeAll:s}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Zo(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
18
- `);return i!==-1&&(t=Yo(t,s,n,i)),n+t+s};Object.defineProperties(yr.prototype,$t);var Nd=yr(),tu=yr({level:Ko?Ko.level:0});var qe=Nd;c();import Id from"node:process";var gr={get value(){return Id.env.GGT_ENV||"production"},get productionLike(){return!this.developmentOrTestLike},get developmentLike(){return this.value.startsWith("development")},get testLike(){return this.value.startsWith("test")},get developmentOrTestLike(){return this.developmentLike||this.testLike}};c();c();var j;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function r(s){throw new Error}e.assertNever=r,e.arrayToEnum=s=>{let i={};for(let o of s)i[o]=o;return i},e.getValidEnumValues=s=>{let i=e.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),o={};for(let u of i)o[u]=s[u];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let i=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(let o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(j||(j={}));var ws;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ws||(ws={}));var v=j.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ye=e=>{switch(typeof e){case"undefined":return v.undefined;case"string":return v.string;case"number":return isNaN(e)?v.nan:v.number;case"boolean":return v.boolean;case"function":return v.function;case"bigint":return v.bigint;case"symbol":return v.symbol;case"object":return Array.isArray(e)?v.array:e===null?v.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?v.promise:typeof Map<"u"&&e instanceof Map?v.map:typeof Set<"u"&&e instanceof Set?v.set:typeof Date<"u"&&e instanceof Date?v.date:v.object;default:return v.unknown}},w=j.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),jd=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),_e=class e extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(i){return i.message},n={_errors:[]},s=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let u=n,a=0;for(;a<o.path.length;){let l=o.path[a];a===o.path.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(r(o))):u[l]=u[l]||{_errors:[]},u=u[l],a++}}};return s(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,j.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};_e.create=e=>new _e(e);var qt=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===v.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,j.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:r=`Unrecognized key(s) in object: ${j.joinValues(e.keys,", ")}`;break;case w.invalid_union:r="Invalid input";break;case w.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${j.joinValues(e.options)}`;break;case w.invalid_enum_value:r=`Invalid enum value. Expected ${j.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:r="Invalid function arguments";break;case w.invalid_return_type:r="Invalid function return type";break;case w.invalid_date:r="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:j.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case w.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case w.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case w.custom:r="Invalid input";break;case w.invalid_intersection_types:r="Intersection results could not be merged";break;case w.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:r="Number must be finite";break;default:r=t.defaultError,j.assertNever(e)}return{message:r}},su=qt;function $d(e){su=e}function an(){return su}var cn=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,i=[...r,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let u="",a=n.filter(l=>!!l).slice().reverse();for(let l of a)u=l(o,{data:t,defaultError:u}).message;return{...s,path:i,message:u}},Md=[];function S(e,t){let r=an(),n=cn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===qt?void 0:qt].filter(s=>!!s)});e.common.issues.push(n)}var de=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return O;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r){let i=await s.key,o=await s.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return O;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}},O=Object.freeze({status:"aborted"}),Ut=e=>({status:"dirty",value:e}),pe=e=>({status:"valid",value:e}),_s=e=>e.status==="aborted",xs=e=>e.status==="dirty",Cr=e=>e.status==="valid",br=e=>typeof Promise<"u"&&e instanceof Promise;function ln(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function iu(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r}var T;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(T||(T={}));var Fr,Er,Te=class{constructor(t,r,n,s){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ru=(e,t)=>{if(Cr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new _e(e.common.issues);return this._error=r,this._error}}};function R(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,u)=>{var a,l;let{message:f}=e;return o.code==="invalid_enum_value"?{message:f??u.defaultError}:typeof u.data>"u"?{message:(a=f??n)!==null&&a!==void 0?a:u.defaultError}:o.code!=="invalid_type"?{message:u.defaultError}:{message:(l=f??r)!==null&&l!==void 0?l:u.defaultError}},description:s}}var N=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ye(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ye(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new de,ctx:{common:t.parent.common,data:t.data,parsedType:Ye(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(br(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ye(t)},i=this._parseSync({data:t,path:s.path,parent:s});return ru(s,i)}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ye(t)},s=this._parse({data:t,path:n.path,parent:n}),i=await(br(s)?s:Promise.resolve(s));return ru(n,i)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,i)=>{let o=t(s),u=()=>i.addIssue({code:w.custom,...n(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(a=>a?!0:(u(),!1)):o?!0:(u(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new xe({schema:this,typeName:B.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ae.create(this,this._def)}nullable(){return $e.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ze.create(this,this._def)}promise(){return Xe.create(this,this._def)}or(t){return gt.create([this,t],this._def)}and(t){return Ft.create(this,t,this._def)}transform(t){return new xe({...R(this._def),schema:this,typeName:B.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new _t({...R(this._def),innerType:this,defaultValue:r,typeName:B.ZodDefault})}brand(){return new wr({typeName:B.ZodBranded,type:this,...R(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new xt({...R(this._def),innerType:this,catchValue:r,typeName:B.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _r.create(this,t)}readonly(){return St.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ud=/^c[^\s-]{8,}$/i,qd=/^[0-9a-z]+$/,Gd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Hd=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zd=/^[a-z0-9_-]{21}$/i,Wd=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vd=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Zd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bs,Yd=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jd=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Kd=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ou="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Xd=new RegExp(`^${ou}$`);function uu(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Qd(e){return new RegExp(`^${uu(e)}$`)}function au(e){let t=`${ou}T${uu(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function eD(e,t){return!!((t==="v4"||!t)&&Yd.test(e)||(t==="v6"||!t)&&Jd.test(e))}var Je=class e extends N{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==v.string){let i=this._getOrReturnCtx(t);return S(i,{code:w.invalid_type,expected:v.string,received:i.parsedType}),O}let n=new de,s;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),S(s,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),S(s,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,u=t.data.length<i.value;(o||u)&&(s=this._getOrReturnCtx(t,s),o?S(s,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&S(s,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")Vd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"email",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")bs||(bs=new RegExp(Zd,"u")),bs.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"emoji",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Hd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"uuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")zd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"nanoid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")Ud.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"cuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")qd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"cuid2",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")Gd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"ulid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),S(s,{validation:"url",code:w.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"regex",code:w.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?au(i).test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Xd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Qd(i).test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{code:w.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Wd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"duration",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?eD(t.data,i.version)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"ip",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Kd.test(t.data)||(s=this._getOrReturnCtx(t,s),S(s,{validation:"base64",code:w.invalid_string,message:i.message}),n.dirty()):j.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(s=>t.test(s),{validation:r,code:w.invalid_string,...T.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...T.errToObj(t)})}url(t){return this._addCheck({kind:"url",...T.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...T.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...T.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...T.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...T.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...T.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...T.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...T.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...T.errToObj(t)})}datetime(t){var r,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,local:(n=t?.local)!==null&&n!==void 0?n:!1,...T.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...T.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...T.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...T.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...T.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...T.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...T.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...T.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...T.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...T.errToObj(r)})}nonempty(t){return this.min(1,T.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Je.create=e=>{var t;return new Je({checks:[],typeName:B.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...R(e)})};function tD(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}var ht=class e extends N{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==v.number){let i=this._getOrReturnCtx(t);return S(i,{code:w.invalid_type,expected:v.number,received:i.parsedType}),O}let n,s=new de;for(let i of this._def.checks)i.kind==="int"?j.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),S(n,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?tD(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),S(n,{code:w.not_finite,message:i.message}),s.dirty()):j.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,T.toString(r))}gt(t,r){return this.setLimit("min",t,!1,T.toString(r))}lte(t,r){return this.setLimit("max",t,!0,T.toString(r))}lt(t,r){return this.setLimit("max",t,!1,T.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:T.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:T.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:T.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:T.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:T.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:T.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:T.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:T.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:T.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:T.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&j.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};ht.create=e=>new ht({checks:[],typeName:B.ZodNumber,coerce:e?.coerce||!1,...R(e)});var dt=class e extends N{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==v.bigint){let i=this._getOrReturnCtx(t);return S(i,{code:w.invalid_type,expected:v.bigint,received:i.parsedType}),O}let n,s=new de;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),S(n,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):j.assertNever(i);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,T.toString(r))}gt(t,r){return this.setLimit("min",t,!1,T.toString(r))}lte(t,r){return this.setLimit("max",t,!0,T.toString(r))}lt(t,r){return this.setLimit("max",t,!1,T.toString(r))}setLimit(t,r,n,s){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:T.toString(s)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:T.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:T.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:T.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:T.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:T.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};dt.create=e=>{var t;return new dt({checks:[],typeName:B.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...R(e)})};var Dt=class extends N{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==v.boolean){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.boolean,received:n.parsedType}),O}return pe(t.data)}};Dt.create=e=>new Dt({typeName:B.ZodBoolean,coerce:e?.coerce||!1,...R(e)});var pt=class e extends N{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==v.date){let i=this._getOrReturnCtx(t);return S(i,{code:w.invalid_type,expected:v.date,received:i.parsedType}),O}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return S(i,{code:w.invalid_date}),O}let n=new de,s;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),S(s,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),S(s,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):j.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:T.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:T.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};pt.create=e=>new pt({checks:[],coerce:e?.coerce||!1,typeName:B.ZodDate,...R(e)});var Gt=class extends N{_parse(t){if(this._getType(t)!==v.symbol){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.symbol,received:n.parsedType}),O}return pe(t.data)}};Gt.create=e=>new Gt({typeName:B.ZodSymbol,...R(e)});var mt=class extends N{_parse(t){if(this._getType(t)!==v.undefined){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.undefined,received:n.parsedType}),O}return pe(t.data)}};mt.create=e=>new mt({typeName:B.ZodUndefined,...R(e)});var yt=class extends N{_parse(t){if(this._getType(t)!==v.null){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.null,received:n.parsedType}),O}return pe(t.data)}};yt.create=e=>new yt({typeName:B.ZodNull,...R(e)});var Ke=class extends N{constructor(){super(...arguments),this._any=!0}_parse(t){return pe(t.data)}};Ke.create=e=>new Ke({typeName:B.ZodAny,...R(e)});var He=class extends N{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pe(t.data)}};He.create=e=>new He({typeName:B.ZodUnknown,...R(e)});var Be=class extends N{_parse(t){let r=this._getOrReturnCtx(t);return S(r,{code:w.invalid_type,expected:v.never,received:r.parsedType}),O}};Be.create=e=>new Be({typeName:B.ZodNever,...R(e)});var Ht=class extends N{_parse(t){if(this._getType(t)!==v.undefined){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.void,received:n.parsedType}),O}return pe(t.data)}};Ht.create=e=>new Ht({typeName:B.ZodVoid,...R(e)});var ze=class e extends N{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==v.array)return S(r,{code:w.invalid_type,expected:v.array,received:r.parsedType}),O;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,u=r.data.length<s.exactLength.value;(o||u)&&(S(r,{code:o?w.too_big:w.too_small,minimum:u?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(S(r,{code:w.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(S(r,{code:w.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((o,u)=>s.type._parseAsync(new Te(r,o,r.path,u)))).then(o=>de.mergeArray(n,o));let i=[...r.data].map((o,u)=>s.type._parseSync(new Te(r,o,r.path,u)));return de.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:T.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:T.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:T.toString(r)}})}nonempty(t){return this.min(1,t)}};ze.create=(e,t)=>new ze({type:e,minLength:null,maxLength:null,exactLength:null,typeName:B.ZodArray,...R(t)});function Mt(e){if(e instanceof we){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Ae.create(Mt(n))}return new we({...e._def,shape:()=>t})}else return e instanceof ze?new ze({...e._def,type:Mt(e.element)}):e instanceof Ae?Ae.create(Mt(e.unwrap())):e instanceof $e?$e.create(Mt(e.unwrap())):e instanceof je?je.create(e.items.map(t=>Mt(t))):e}var we=class e extends N{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=j.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==v.object){let l=this._getOrReturnCtx(t);return S(l,{code:w.invalid_type,expected:v.object,received:l.parsedType}),O}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),u=[];if(!(this._def.catchall instanceof Be&&this._def.unknownKeys==="strip"))for(let l in s.data)o.includes(l)||u.push(l);let a=[];for(let l of o){let f=i[l],y=s.data[l];a.push({key:{status:"valid",value:l},value:f._parse(new Te(s,y,s.path,l)),alwaysSet:l in s.data})}if(this._def.catchall instanceof Be){let l=this._def.unknownKeys;if(l==="passthrough")for(let f of u)a.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(l==="strict")u.length>0&&(S(s,{code:w.unrecognized_keys,keys:u}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let f of u){let y=s.data[f];a.push({key:{status:"valid",value:f},value:l._parse(new Te(s,y,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let f of a){let y=await f.key,p=await f.value;l.push({key:y,value:p,alwaysSet:f.alwaysSet})}return l}).then(l=>de.mergeObjectSync(n,l)):de.mergeObjectSync(n,a)}get shape(){return this._def.shape()}strict(t){return T.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,i,o,u;let a=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,r,n).message)!==null&&o!==void 0?o:n.defaultError;return r.code==="unrecognized_keys"?{message:(u=T.errToObj(t).message)!==null&&u!==void 0?u:a}:{message:a}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:B.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return j.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return j.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return Mt(this)}partial(t){let r={};return j.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return j.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ae;)i=i._def.innerType;r[n]=i}}),new e({...this._def,shape:()=>r})}keyof(){return cu(j.objectKeys(this.shape))}};we.create=(e,t)=>new we({shape:()=>e,unknownKeys:"strip",catchall:Be.create(),typeName:B.ZodObject,...R(t)});we.strictCreate=(e,t)=>new we({shape:()=>e,unknownKeys:"strict",catchall:Be.create(),typeName:B.ZodObject,...R(t)});we.lazycreate=(e,t)=>new we({shape:e,unknownKeys:"strip",catchall:Be.create(),typeName:B.ZodObject,...R(t)});var gt=class extends N{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(i){for(let u of i)if(u.result.status==="valid")return u.result;for(let u of i)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let o=i.map(u=>new _e(u.ctx.common.issues));return S(r,{code:w.invalid_union,unionErrors:o}),O}if(r.common.async)return Promise.all(n.map(async i=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let i,o=[];for(let a of n){let l={...r,common:{...r.common,issues:[]},parent:null},f=a._parseSync({data:r.data,path:r.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let u=o.map(a=>new _e(a));return S(r,{code:w.invalid_union,unionErrors:u}),O}}get options(){return this._def.options}};gt.create=(e,t)=>new gt({options:e,typeName:B.ZodUnion,...R(t)});var Ge=e=>e instanceof Et?Ge(e.schema):e instanceof xe?Ge(e.innerType()):e instanceof Ct?[e.value]:e instanceof bt?e.options:e instanceof wt?j.objectValues(e.enum):e instanceof _t?Ge(e._def.innerType):e instanceof mt?[void 0]:e instanceof yt?[null]:e instanceof Ae?[void 0,...Ge(e.unwrap())]:e instanceof $e?[null,...Ge(e.unwrap())]:e instanceof wr||e instanceof St?Ge(e.unwrap()):e instanceof xt?Ge(e._def.innerType):[],fn=class e extends N{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.object)return S(r,{code:w.invalid_type,expected:v.object,received:r.parsedType}),O;let n=this.discriminator,s=r.data[n],i=this.optionsMap.get(s);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(S(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),O)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let i of r){let o=Ge(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of o){if(s.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);s.set(u,i)}}return new e({typeName:B.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...R(n)})}};function Ss(e,t){let r=Ye(e),n=Ye(t);if(e===t)return{valid:!0,data:e};if(r===v.object&&n===v.object){let s=j.objectKeys(t),i=j.objectKeys(e).filter(u=>s.indexOf(u)!==-1),o={...e,...t};for(let u of i){let a=Ss(e[u],t[u]);if(!a.valid)return{valid:!1};o[u]=a.data}return{valid:!0,data:o}}else if(r===v.array&&n===v.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let i=0;i<e.length;i++){let o=e[i],u=t[i],a=Ss(o,u);if(!a.valid)return{valid:!1};s.push(a.data)}return{valid:!0,data:s}}else return r===v.date&&n===v.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Ft=class extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(i,o)=>{if(_s(i)||_s(o))return O;let u=Ss(i.value,o.value);return u.valid?((xs(i)||xs(o))&&r.dirty(),{status:r.value,value:u.data}):(S(n,{code:w.invalid_intersection_types}),O)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ft.create=(e,t,r)=>new Ft({left:e,right:t,typeName:B.ZodIntersection,...R(r)});var je=class e extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.array)return S(n,{code:w.invalid_type,expected:v.array,received:n.parsedType}),O;if(n.data.length<this._def.items.length)return S(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),O;!this._def.rest&&n.data.length>this._def.items.length&&(S(n,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,u)=>{let a=this._def.items[u]||this._def.rest;return a?a._parse(new Te(n,o,n.path,u)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>de.mergeArray(r,o)):de.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};je.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new je({items:e,typeName:B.ZodTuple,rest:null,...R(t)})};var hn=class e extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.object)return S(n,{code:w.invalid_type,expected:v.object,received:n.parsedType}),O;let s=[],i=this._def.keyType,o=this._def.valueType;for(let u in n.data)s.push({key:i._parse(new Te(n,u,n.path,u)),value:o._parse(new Te(n,n.data[u],n.path,u)),alwaysSet:u in n.data});return n.common.async?de.mergeObjectAsync(r,s):de.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof N?new e({keyType:t,valueType:r,typeName:B.ZodRecord,...R(n)}):new e({keyType:Je.create(),valueType:t,typeName:B.ZodRecord,...R(r)})}},zt=class extends N{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.map)return S(n,{code:w.invalid_type,expected:v.map,received:n.parsedType}),O;let s=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([u,a],l)=>({key:s._parse(new Te(n,u,n.path,[l,"key"])),value:i._parse(new Te(n,a,n.path,[l,"value"]))}));if(n.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let a of o){let l=await a.key,f=await a.value;if(l.status==="aborted"||f.status==="aborted")return O;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(l.value,f.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let a of o){let l=a.key,f=a.value;if(l.status==="aborted"||f.status==="aborted")return O;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(l.value,f.value)}return{status:r.value,value:u}}}};zt.create=(e,t,r)=>new zt({valueType:t,keyType:e,typeName:B.ZodMap,...R(r)});var Wt=class e extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==v.set)return S(n,{code:w.invalid_type,expected:v.set,received:n.parsedType}),O;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(S(n,{code:w.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(S(n,{code:w.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let i=this._def.valueType;function o(a){let l=new Set;for(let f of a){if(f.status==="aborted")return O;f.status==="dirty"&&r.dirty(),l.add(f.value)}return{status:r.value,value:l}}let u=[...n.data.values()].map((a,l)=>i._parse(new Te(n,a,n.path,l)));return n.common.async?Promise.all(u).then(a=>o(a)):o(u)}min(t,r){return new e({...this._def,minSize:{value:t,message:T.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:T.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Wt.create=(e,t)=>new Wt({valueType:e,minSize:null,maxSize:null,typeName:B.ZodSet,...R(t)});var dn=class e extends N{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.function)return S(r,{code:w.invalid_type,expected:v.function,received:r.parsedType}),O;function n(u,a){return cn({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,an(),qt].filter(l=>!!l),issueData:{code:w.invalid_arguments,argumentsError:a}})}function s(u,a){return cn({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,an(),qt].filter(l=>!!l),issueData:{code:w.invalid_return_type,returnTypeError:a}})}let i={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Xe){let u=this;return pe(async function(...a){let l=new _e([]),f=await u._def.args.parseAsync(a,i).catch(m=>{throw l.addIssue(n(a,m)),l}),y=await Reflect.apply(o,this,f);return await u._def.returns._def.type.parseAsync(y,i).catch(m=>{throw l.addIssue(s(y,m)),l})})}else{let u=this;return pe(function(...a){let l=u._def.args.safeParse(a,i);if(!l.success)throw new _e([n(a,l.error)]);let f=Reflect.apply(o,this,l.data),y=u._def.returns.safeParse(f,i);if(!y.success)throw new _e([s(f,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:je.create(t).rest(He.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||je.create([]).rest(He.create()),returns:r||He.create(),typeName:B.ZodFunction,...R(n)})}},Et=class extends N{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Et.create=(e,t)=>new Et({getter:e,typeName:B.ZodLazy,...R(t)});var Ct=class extends N{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return S(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),O}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ct.create=(e,t)=>new Ct({value:e,typeName:B.ZodLiteral,...R(t)});function cu(e,t){return new bt({values:e,typeName:B.ZodEnum,...R(t)})}var bt=class e extends N{constructor(){super(...arguments),Fr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return S(r,{expected:j.joinValues(n),received:r.parsedType,code:w.invalid_type}),O}if(ln(this,Fr,"f")||iu(this,Fr,new Set(this._def.values),"f"),!ln(this,Fr,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return S(r,{received:r.data,code:w.invalid_enum_value,options:n}),O}return pe(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};Fr=new WeakMap;bt.create=cu;var wt=class extends N{constructor(){super(...arguments),Er.set(this,void 0)}_parse(t){let r=j.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==v.string&&n.parsedType!==v.number){let s=j.objectValues(r);return S(n,{expected:j.joinValues(s),received:n.parsedType,code:w.invalid_type}),O}if(ln(this,Er,"f")||iu(this,Er,new Set(j.getValidEnumValues(this._def.values)),"f"),!ln(this,Er,"f").has(t.data)){let s=j.objectValues(r);return S(n,{received:n.data,code:w.invalid_enum_value,options:s}),O}return pe(t.data)}get enum(){return this._def.values}};Er=new WeakMap;wt.create=(e,t)=>new wt({values:e,typeName:B.ZodNativeEnum,...R(t)});var Xe=class extends N{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==v.promise&&r.common.async===!1)return S(r,{code:w.invalid_type,expected:v.promise,received:r.parsedType}),O;let n=r.parsedType===v.promise?r.data:Promise.resolve(r.data);return pe(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Xe.create=(e,t)=>new Xe({type:e,typeName:B.ZodPromise,...R(t)});var xe=class extends N{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===B.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{S(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){let o=s.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async u=>{if(r.value==="aborted")return O;let a=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return a.status==="aborted"?O:a.status==="dirty"||r.value==="dirty"?Ut(a.value):a});{if(r.value==="aborted")return O;let u=this._def.schema._parseSync({data:o,path:n.path,parent:n});return u.status==="aborted"?O:u.status==="dirty"||r.value==="dirty"?Ut(u.value):u}}if(s.type==="refinement"){let o=u=>{let a=s.refinement(u,i);if(n.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(n.common.async===!1){let u=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return u.status==="aborted"?O:(u.status==="dirty"&&r.dirty(),o(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(u=>u.status==="aborted"?O:(u.status==="dirty"&&r.dirty(),o(u.value).then(()=>({status:r.value,value:u.value}))))}if(s.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Cr(o))return o;let u=s.transform(o.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>Cr(o)?Promise.resolve(s.transform(o.value,i)).then(u=>({status:r.value,value:u})):o);j.assertNever(s)}};xe.create=(e,t,r)=>new xe({schema:e,typeName:B.ZodEffects,effect:t,...R(r)});xe.createWithPreprocess=(e,t,r)=>new xe({schema:t,effect:{type:"preprocess",transform:e},typeName:B.ZodEffects,...R(r)});var Ae=class extends N{_parse(t){return this._getType(t)===v.undefined?pe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ae.create=(e,t)=>new Ae({innerType:e,typeName:B.ZodOptional,...R(t)});var $e=class extends N{_parse(t){return this._getType(t)===v.null?pe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$e.create=(e,t)=>new $e({innerType:e,typeName:B.ZodNullable,...R(t)});var _t=class extends N{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===v.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};_t.create=(e,t)=>new _t({innerType:e,typeName:B.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...R(t)});var xt=class extends N{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return br(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new _e(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new _e(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};xt.create=(e,t)=>new xt({innerType:e,typeName:B.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...R(t)});var Vt=class extends N{_parse(t){if(this._getType(t)!==v.nan){let n=this._getOrReturnCtx(t);return S(n,{code:w.invalid_type,expected:v.nan,received:n.parsedType}),O}return{status:"valid",value:t.data}}};Vt.create=e=>new Vt({typeName:B.ZodNaN,...R(e)});var rD=Symbol("zod_brand"),wr=class extends N{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},_r=class e extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?O:i.status==="dirty"?(r.dirty(),Ut(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?O:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:B.ZodPipeline})}},St=class extends N{_parse(t){let r=this._def.innerType._parse(t),n=s=>(Cr(s)&&(s.value=Object.freeze(s.value)),s);return br(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};St.create=(e,t)=>new St({innerType:e,typeName:B.ZodReadonly,...R(t)});function lu(e,t={},r){return e?Ke.create().superRefine((n,s)=>{var i,o;if(!e(n)){let u=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,a=(o=(i=u.fatal)!==null&&i!==void 0?i:r)!==null&&o!==void 0?o:!0,l=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...l,fatal:a})}}):Ke.create()}var nD={object:we.lazycreate},B;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(B||(B={}));var sD=(e,t={message:`Input not instance of ${e.name}`})=>lu(r=>r instanceof e,t),fu=Je.create,hu=ht.create,iD=Vt.create,oD=dt.create,du=Dt.create,uD=pt.create,aD=Gt.create,cD=mt.create,lD=yt.create,fD=Ke.create,hD=He.create,dD=Be.create,DD=Ht.create,pD=ze.create,mD=we.create,yD=we.strictCreate,gD=gt.create,FD=fn.create,ED=Ft.create,CD=je.create,bD=hn.create,wD=zt.create,_D=Wt.create,xD=dn.create,SD=Et.create,vD=Ct.create,AD=bt.create,TD=wt.create,kD=Xe.create,nu=xe.create,PD=Ae.create,LD=$e.create,BD=xe.createWithPreprocess,OD=_r.create,RD=()=>fu().optional(),ND=()=>hu().optional(),ID=()=>du().optional(),jD={string:e=>Je.create({...e,coerce:!0}),number:e=>ht.create({...e,coerce:!0}),boolean:e=>Dt.create({...e,coerce:!0}),bigint:e=>dt.create({...e,coerce:!0}),date:e=>pt.create({...e,coerce:!0})},$D=O,M=Object.freeze({__proto__:null,defaultErrorMap:qt,setErrorMap:$d,getErrorMap:an,makeIssue:cn,EMPTY_PATH:Md,addIssueToContext:S,ParseStatus:de,INVALID:O,DIRTY:Ut,OK:pe,isAborted:_s,isDirty:xs,isValid:Cr,isAsync:br,get util(){return j},get objectUtil(){return ws},ZodParsedType:v,getParsedType:Ye,ZodType:N,datetimeRegex:au,ZodString:Je,ZodNumber:ht,ZodBigInt:dt,ZodBoolean:Dt,ZodDate:pt,ZodSymbol:Gt,ZodUndefined:mt,ZodNull:yt,ZodAny:Ke,ZodUnknown:He,ZodNever:Be,ZodVoid:Ht,ZodArray:ze,ZodObject:we,ZodUnion:gt,ZodDiscriminatedUnion:fn,ZodIntersection:Ft,ZodTuple:je,ZodRecord:hn,ZodMap:zt,ZodSet:Wt,ZodFunction:dn,ZodLazy:Et,ZodLiteral:Ct,ZodEnum:bt,ZodNativeEnum:wt,ZodPromise:Xe,ZodEffects:xe,ZodTransformer:xe,ZodOptional:Ae,ZodNullable:$e,ZodDefault:_t,ZodCatch:xt,ZodNaN:Vt,BRAND:rD,ZodBranded:wr,ZodPipeline:_r,ZodReadonly:St,custom:lu,Schema:N,ZodSchema:N,late:nD,get ZodFirstPartyTypeKind(){return B},coerce:jD,any:fD,array:pD,bigint:oD,boolean:du,date:uD,discriminatedUnion:FD,effect:nu,enum:AD,function:xD,instanceof:sD,intersection:ED,lazy:SD,literal:vD,map:wD,nan:iD,nativeEnum:TD,never:dD,null:lD,nullable:LD,number:hu,object:mD,oboolean:ID,onumber:ND,optional:PD,ostring:RD,pipeline:OD,preprocess:BD,promise:kD,record:bD,set:_D,strictObject:yD,string:fu,symbol:aD,transformer:nu,tuple:CD,undefined:cD,union:gD,unknown:hD,void:DD,NEVER:$D,ZodIssueCode:w,quotelessJson:jd,ZodError:_e});var KC=e=>e==null,Zt=e=>typeof e=="string",vt=e=>typeof e=="object"&&e!==null,Du=Array.isArray,pu=e=>typeof e=="function",XC=e=>e instanceof Error,QC=e=>M.object({type:M.string(),code:M.number(),reason:M.string(),wasClean:M.boolean()}).safeParse(e).success,eb=e=>M.object({type:M.string(),message:M.string(),error:M.any()}).safeParse(e).success,tb=e=>M.union([M.object({data:M.record(M.unknown())}),M.object({errors:M.array(M.object({message:M.string()}))}),M.object({data:M.record(M.unknown()),errors:M.array(M.object({message:M.string()}))})]).safeParse(e).success,rb=e=>M.array(M.object({message:M.string(),extensions:M.record(M.unknown()).nullish().transform(t=>t??{})})).min(1).safeParse(e).success,nb=e=>{throw new Error(`Unexpected value: ${e}`)},sb=e=>e instanceof Error&&e.name==="AbortError"||e instanceof Event&&e.type==="abort",ib=e=>vt(e)&&"code"in e&&e.code==="ENOENT",ob=e=>vt(e)&&"code"in e&&e.code==="ENOTEMPTY",ub=e=>vt(e)&&"code"in e&&e.code==="ENOTDIR",ab=e=>vt(e)&&"code"in e&&e.code==="EEXIST",cb=e=>[".js",".jsx",".cjs",".mjs"].some(t=>e.endsWith(t)),lb=e=>[".ts",".tsx",".cts",".mts"].some(t=>e.endsWith(t)&&!e.endsWith(".d.ts")),fb=e=>e.endsWith(".gelly");c();c();import Sr from"node:path";c();import qD from"node:process";import GD from"node:path";import xb,{promises as mu}from"node:fs";import{fileURLToPath as HD}from"node:url";c();c();c();var vs=class{value;next;constructor(t){this.value=t}},xr=class{#r;#n;#e;constructor(){this.clear()}enqueue(t){let r=new vs(t);this.#r?(this.#n.next=r,this.#n=r):(this.#r=r,this.#n=r),this.#e++}dequeue(){let t=this.#r;if(t)return this.#r=this.#r.next,this.#e--,t.value}peek(){if(this.#r)return this.#r.value}clear(){this.#r=void 0,this.#n=void 0,this.#e=0}get size(){return this.#e}*[Symbol.iterator](){let t=this.#r;for(;t;)yield t.value,t=t.next}};function Dn(e){if(!((Number.isInteger(e)||e===Number.POSITIVE_INFINITY)&&e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=new xr,r=0,n=()=>{r--,t.size>0&&t.dequeue()()},s=async(u,a,l)=>{r++;let f=(async()=>u(...l))();a(f);try{await f}catch{}n()},i=(u,a,l)=>{t.enqueue(s.bind(void 0,u,a,l)),(async()=>(await Promise.resolve(),r<e&&t.size>0&&t.dequeue()()))()},o=(u,...a)=>new Promise(l=>{i(u,l,a)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>t.size},clearQueue:{value:()=>{t.clear()}}}),o}var pn=class extends Error{constructor(t){super(),this.value=t}},MD=async(e,t)=>t(await e),UD=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new pn(t[0]);return!1};async function As(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let s=Dn(r),i=[...e].map(u=>[u,s(MD,u,t)]),o=Dn(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(i.map(u=>o(UD,u)))}catch(u){if(u instanceof pn)return u.value;throw u}}var yu={directory:"isDirectory",file:"isFile"};function zD(e){if(!Object.hasOwnProperty.call(yu,e))throw new Error(`Invalid type specified: ${e}`)}var WD=(e,t)=>t[yu[e]](),VD=e=>e instanceof URL?HD(e):e;async function Ts(e,{cwd:t=qD.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:s,preserveOrder:i}={}){zD(r),t=VD(t);let o=n?mu.stat:mu.lstat;return As(e,async u=>{try{let a=await o(GD.resolve(t,u));return WD(r,a)}catch{return!1}},{concurrency:s,preserveOrder:i})}c();import{fileURLToPath as ZD}from"node:url";function ks(e){return e instanceof URL?ZD(e):e}c();var YD=Symbol("findUpStop");async function JD(e,t={}){let r=Sr.resolve(ks(t.cwd)??""),{root:n}=Sr.parse(r),s=Sr.resolve(r,ks(t.stopAt??n)),i=t.limit??Number.POSITIVE_INFINITY,o=[e].flat(),u=async l=>{if(typeof e!="function")return Ts(o,l);let f=await e(l.cwd);return typeof f=="string"?Ts([f],l):f},a=[];for(;;){let l=await u({...t,cwd:r});if(l===YD||(l&&a.push(Sr.resolve(r,l)),r===s||a.length>=i))break;r=Sr.dirname(r)}return a}async function gu(e,t={}){return(await JD(e,{...t,limit:1}))[0]}var al=be(hc(),1),cl=be(ul(),1);import Yy from"node:assert";import{fileURLToPath as Jy}from"node:url";var ii=await gu("package.json",{cwd:Jy(import.meta.url)});Yy(ii!==void 0,"Could not find package.json for the ggt package.");var ll=ii,Pn=await al.default.readJson(ii);(0,cl.default)(Pn,!0);c();c();var Ky=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let s=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Xy(s,i)&&n||Object.defineProperty(e,r,i)},Xy=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Qy=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},e0=(e,t)=>`/* Wrapped ${e}*/
19
- ${t}`,t0=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),r0=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),n0=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,s=e0.bind(null,n,t.toString());Object.defineProperty(s,"name",r0);let{writable:i,enumerable:o,configurable:u}=t0;Object.defineProperty(e,"toString",{value:s,writable:i,enumerable:o,configurable:u})};function rr(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let s of Reflect.ownKeys(t))Ky(e,t,s,r);return Qy(e,t),n0(e,t,n),e}import s0 from"node:assert";c();var i0=new Set;var o0=(...e)=>String(e[0]),hl=(...e)=>e.map(String).join(":");function dl(e,t){let r;t?r=e:(t=e,r=o0);let n=new Map,s=(...i)=>{let o=r(...i);if(n.has(o))return n.get(o);s0(t,"fn shouldn't be undefined");let u=t(...i);return n.set(o,u),u};return s.clear=n.clear.bind(n),i0.add(s),rr(s,t),s}var Q2=(e,t)=>{let r,n,s,i=(...o)=>{n=()=>(n=void 0,r=void 0,s?s=s.then(()=>t(...o)).catch(fl).finally(()=>s=void 0):s=t(...o).catch(fl).finally(()=>s=void 0),s),clearTimeout(r),r=setTimeout(n,e)};return i.flush=async()=>{n&&await n()},rr(i,t),i};var Ln=(e,...t)=>pu(e)?e(...t):e,fl=(...e)=>{};c();c();import ml from"node:process";import f0 from"node:os";import h0 from"node:fs";c();import c0 from"node:fs";c();import Dl from"node:fs";var oi;function u0(){try{return Dl.statSync("/.dockerenv"),!0}catch{return!1}}function a0(){try{return Dl.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function ui(){return oi===void 0&&(oi=u0()||a0()),oi}var ai,l0=()=>{try{return c0.statSync("/run/.containerenv"),!0}catch{return!1}};function Bn(){return ai===void 0&&(ai=l0()||ui()),ai}var pl=()=>{if(ml.platform!=="linux")return!1;if(f0.release().toLowerCase().includes("microsoft"))return!Bn();try{return h0.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Bn():!1}catch{return!1}},ci=ml.env.__IS_WSL_TEST__?pl:pl();import nr from"node:os";import Re from"node:path";import G from"node:process";c();import d0 from"node:assert";c();var yl=(e,t,r)=>Math.max(t,Math.min(r,e));var ot={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,PRINT:6},gl=dl(hl,(e,t)=>{let r=M.enum(["TRACE","DEBUG","INFO","WARN","ERROR"]).transform(n=>ot[n]).safeParse(String(e).toUpperCase());return r.success||(r=M.number().min(ot.TRACE).max(ot.ERROR).safeParse(Number(e))),r.success?r.data:t}),C_=e=>(d0(e>0,"verbosity must be greater than 0"),yl(ot.INFO+1-e,ot.TRACE,ot.INFO));var On={get logLevel(){return gl(G.env.GGT_LOG_LEVEL,ot.PRINT)},get logFormat(){return G.env.GGT_LOG_FORMAT==="json"?"json":"pretty"},get versionFull(){return`${Pn.name}/${Pn.version} ${this.platform}-${this.arch} node-${G.version}`},get arch(){return nr.arch()==="ia32"?"x86":nr.arch()},get platform(){return ci?"wsl":nr.platform()},get windows(){return G.platform==="win32"},get windowsOrWsl(){return this.windows||ci},get macos(){return G.platform==="darwin"},get shell(){let e=G.env.SHELL??nr.userInfo().shell?.split(Re.sep).pop();return e?e.split("/").at(-1):this.windows&&G.env.COMSPEC?G.env.COMSPEC.split(/\\|\//).at(-1):"unknown"},get homeDir(){if(G.env.HOME)return G.env.HOME;if(this.windows){if(G.env.HOMEDRIVE&&G.env.HOMEPATH)return Re.join(G.env.HOMEDRIVE,G.env.HOMEPATH);if(G.env.USERPROFILE)return G.env.USERPROFILE}return nr.homedir()||nr.tmpdir()},get configDir(){if(G.env.GGT_CONFIG_DIR)return G.env.GGT_CONFIG_DIR;let e=G.env.XDG_CONFIG_HOME||this.windows&&G.env.LOCALAPPDATA||Re.join(this.homeDir,".config");return Re.join(e,"ggt")},get cacheDir(){if(G.env.GGT_CACHE_DIR)return G.env.GGT_CACHE_DIR;if(this.macos)return Re.join(this.homeDir,"Library/Caches/ggt");let e=G.env.XDG_CACHE_HOME||this.windows&&G.env.LOCALAPPDATA||Re.join(this.homeDir,".cache");return Re.join(e,"ggt")},get dataDir(){if(G.env.GGT_DATA_DIR)return G.env.GGT_DATA_DIR;let e=G.env.XDG_DATA_HOME||this.windows&&G.env.LOCALAPPDATA||Re.join(this.homeDir,".local/share");return Re.join(e,"ggt")},domains:{get app(){return G.env.GGT_GADGET_APP_DOMAIN||(gr.productionLike?"gadget.app":"ggt.pub")},get services(){return G.env.GGT_GADGET_SERVICES_DOMAIN||(gr.productionLike?"app.gadget.dev":"app.ggt.dev")}}},P_=(...e)=>Re.join(On.configDir,...e),L_=(...e)=>Re.join(On.homeDir,...e);c();c();import _l from"node:process";c();import jn from"node:process";c();var Rn=new WeakMap,Fl=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,s=e.displayName||e.name||"<anonymous>",i=function(...o){if(Rn.set(i,++n),n===1)r=e.apply(this,o),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${s}\` can only be called once`);return r};return rr(i,e),Rn.set(i,n),i};Fl.callCount=e=>{if(!Rn.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Rn.get(e)};var El=Fl;c();c();var kt=[];kt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&kt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&kt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Nn=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",li=Symbol.for("signal-exit emitter"),fi=globalThis,D0=Object.defineProperty.bind(Object),hi=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(fi[li])return fi[li];D0(fi,li,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],s=n.indexOf(r);s!==-1&&(s===0&&n.length===1?n.length=0:n.splice(s,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(let i of this.listeners[t])s=i(r,n)===!0||s;return t==="exit"&&(s=this.emit("afterExit",r,n)||s),s}},In=class{},p0=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),di=class extends In{onExit(){return()=>{}}load(){}unload(){}},Di=class extends In{#r=pi.platform==="win32"?"SIGINT":"SIGHUP";#n=new hi;#e;#a;#w;#g={};#i=!1;constructor(t){super(),this.#e=t,this.#g={};for(let r of kt)this.#g[r]=()=>{let n=this.#e.listeners(r),{count:s}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(s+=i.__signal_exit_emitter__.count),n.length===s){this.unload();let o=this.#n.emit("exit",null,r),u=r==="SIGHUP"?this.#r:r;o||t.kill(t.pid,u)}};this.#w=t.reallyExit,this.#a=t.emit}onExit(t,r){if(!Nn(this.#e))return()=>{};this.#i===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#n.on(n,t),()=>{this.#n.removeListener(n,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of kt)try{let r=this.#g[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#u(t,...r),this.#e.reallyExit=t=>this.#D(t)}}unload(){this.#i&&(this.#i=!1,kt.forEach(t=>{let r=this.#g[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#a,this.#e.reallyExit=this.#w,this.#n.count-=1)}#D(t){return Nn(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#w.call(this.#e,this.#e.exitCode)):0}#u(t,...r){let n=this.#a;if(t==="exit"&&Nn(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let s=n.call(this.#e,t,...r);return this.#n.emit("exit",this.#e.exitCode,null),s}else return n.call(this.#e,t,...r)}},pi=globalThis.process,{onExit:Cl,load:U_,unload:q_}=p0(Nn(pi)?new Di(pi):new di);var bl=jn.stderr.isTTY?jn.stderr:jn.stdout.isTTY?jn.stdout:void 0,m0=bl?El(()=>{Cl(()=>{bl.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},wl=m0;var $n=!1,sr={};sr.show=(e=_l.stderr)=>{e.isTTY&&($n=!1,e.write("\x1B[?25h"))};sr.hide=(e=_l.stderr)=>{e.isTTY&&(wl(),$n=!0,e.write("\x1B[?25l"))};sr.toggle=(e,t)=>{e!==void 0&&($n=e),$n?sr.show(t):sr.hide(t)};var mi=sr;c();function yi({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import Ci from"node:assert";import Ne from"node:process";c();import Ue from"node:process";var y0=3,gi=class{#r=0;start(){this.#r++,this.#r===1&&this.#n()}stop(){if(this.#r<=0)throw new Error("`stop` called more times than `start`");this.#r--,this.#r===0&&this.#e()}#n(){Ue.platform==="win32"||!Ue.stdin.isTTY||(Ue.stdin.setRawMode(!0),Ue.stdin.on("data",this.#a),Ue.stdin.resume())}#e(){Ue.stdin.isTTY&&(Ue.stdin.off("data",this.#a),Ue.stdin.pause(),Ue.stdin.setRawMode(!1))}#a(t){t[0]===y0&&Ue.emit("SIGINT")}},g0=new gi,Fi=g0;c();c();c();function Ei({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var F0=Ei();function Pt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(F0,"")}c();c();function xl(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Sl(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function vl(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function E0(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Al(e,{ambiguousAsWide:t=!1}={}){return E0(e),Sl(e)||vl(e)||t&&xl(e)?2:1}var Pl=be(kl(),1),C0=new Intl.Segmenter,b0=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function fe(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=Pt(e)),e.length===0)return 0;let s=0,i={ambiguousAsWide:!r};for(let{segment:o}of C0.segment(e)){let u=o.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!b0.test(o)){if((0,Pl.default)().test(o)){s+=2;continue}s+=Al(u,i)}}return s}var Mn=!1,bi=class{lastPrintedLineWasEmpty=!0;lastStickyLineWasEmpty=!0;_promptText="";_spinnerText="";_footerText="";_stickyTextLinesToClear=0;constructor(){Ne.stdout.on("error",t=>{if(!(vt(t)&&"code"in t&&t.code==="EPIPE"))throw t}),Ne.stderr.on("error",t=>{if(!(vt(t)&&"code"in t&&t.code==="EPIPE"))throw t})}get isInteractive(){return!gr.testLike&&yi({stream:Ne.stdout})}writeStdout(t){this._clearStickyText(),t=this._stripUnnecessaryNewLines(t,this.lastPrintedLineWasEmpty),this._writeStdout(t),this.lastPrintedLineWasEmpty=t===`
20
- `||t.endsWith(`
21
-
22
- `),this.lastStickyLineWasEmpty=this.lastPrintedLineWasEmpty,this._writeStickyText()}writeStderr(t){this._clearStickyText(),t=this._stripUnnecessaryNewLines(t,this.lastPrintedLineWasEmpty),this._writeStderr(t),this.lastPrintedLineWasEmpty=t===`
23
- `||t.endsWith(`
24
-
25
- `),this.lastStickyLineWasEmpty=this.lastPrintedLineWasEmpty,this._writeStickyText()}updatePrompt(t){Ci(this.isInteractive,"cannot update prompt in non-interactive mode"),this._promptText=Ln(t,this._promptText),this._writeStickyText()}persistPrompt(t=this._promptText){this._promptText="",this.writeStdout(t)}updateSpinner(t){Ci(this.isInteractive,"cannot update spinner in non-interactive mode"),this._spinnerText=Ln(t,this._spinnerText),this._writeStickyText()}persistSpinner(t=this._spinnerText){this._spinnerText="",this.writeStdout(t)}updateFooter(t){Ci(this.isInteractive,"cannot update footer in non-interactive mode"),this._footerText=Ln(t,this._footerText),this._writeStickyText()}persistFooter(t=this._footerText){this._footerText="",this.writeStdout(t)}_writeStdout(t){t!==""&&Ne.stdout.write(t)}_writeStderr(t){t!==""&&Ne.stderr.write(t)}_clearStickyText(){if(this.lastStickyLineWasEmpty=this.lastPrintedLineWasEmpty,this._stickyTextLinesToClear!==0){Ne.stderr.cursorTo(0);for(let t=0;t<this._stickyTextLinesToClear;t++)t>0&&Ne.stderr.moveCursor(0,-1),Ne.stderr.clearLine(1);this._stickyTextLinesToClear=0}}_writeStickyText(){if(!this.isInteractive)return;this._clearStickyText();let t="";this._promptText&&(t+=this._stripUnnecessaryNewLines(this._promptText,this.lastStickyLineWasEmpty),this.lastStickyLineWasEmpty=t===`
26
- `||t.endsWith(`
27
-
28
- `)),this._spinnerText&&(t+=this._stripUnnecessaryNewLines(this._spinnerText,this.lastStickyLineWasEmpty),this.lastStickyLineWasEmpty=t===`
29
- `||t.endsWith(`
30
-
31
- `)),this._footerText&&(t+=this._stripUnnecessaryNewLines(this._footerText,this.lastStickyLineWasEmpty),this.lastStickyLineWasEmpty=t===`
32
- `||t.endsWith(`
33
-
34
- `)),this._writeStderr(t),this._updateStickyTextLinesToClear(t),Mn&&!t?(mi.show(Ne.stderr),Fi.stop(),Mn=!1):!Mn&&t&&(mi.hide(Ne.stderr),Fi.start(),Mn=!0)}_updateStickyTextLinesToClear(t){for(let r of Pt(t).split(/\r?\n/)){let n=fe(r,{countAnsiEscapeCodes:!0}),s=Math.ceil(n/Ne.stderr.columns);this._stickyTextLinesToClear+=Math.max(1,s)}}_stripUnnecessaryNewLines(t,r){let n=-1;for(;(n=t.indexOf(`
35
-
36
-
37
- `))!==-1;)t=t.slice(0,n)+t.slice(n+1);if(r)for(;t.startsWith(`
38
- `);)t=t.slice(1);return t}},wi=new bi;c();function _i(e,t=1,r={}){let{indent:n=" ",includeEmptyLines:s=!1}=r;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof n!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof n}\``);if(t===0)return e;let i=s?/^/gm:/^(?!\s*$)/gm;return e.replace(i,n.repeat(t))}c();c();import zn from"node:process";c();function Un(e){let t=0;for(let r of e.split(`
39
- `))t=Math.max(t,fe(r));return t}var af=be(Si(),1);c();var _0=/[\p{Lu}]/u,x0=/[\p{Ll}]/u,Ol=/^[\p{Lu}](?![\p{Lu}])/gu,Il=/([\p{Alpha}\p{N}_]|$)/u,vi=/[_.\- ]+/,S0=new RegExp("^"+vi.source),Rl=new RegExp(vi.source+Il.source,"gu"),Nl=new RegExp("\\d+"+Il.source,"gu"),v0=(e,t,r,n)=>{let s=!1,i=!1,o=!1,u=!1;for(let a=0;a<e.length;a++){let l=e[a];u=a>2?e[a-3]==="-":!0,s&&_0.test(l)?(e=e.slice(0,a)+"-"+e.slice(a),s=!1,o=i,i=!0,a++):i&&o&&x0.test(l)&&(!u||n)?(e=e.slice(0,a-1)+"-"+e.slice(a-1),o=i,i=!1,s=!0):(s=t(l)===l&&r(l)!==l,o=i,i=r(l)===l&&t(l)!==l)}return e},A0=(e,t)=>(Ol.lastIndex=0,e.replaceAll(Ol,r=>t(r))),T0=(e,t)=>(Rl.lastIndex=0,Nl.lastIndex=0,e.replaceAll(Nl,(r,n,s)=>["_","-"].includes(e.charAt(s+r.length))?r:t(r)).replaceAll(Rl,(r,n)=>t(n)));function Ai(e,t){if(!(typeof e=="string"||Array.isArray(e)))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},Array.isArray(e)?e=e.map(i=>i.trim()).filter(i=>i.length).join("-"):e=e.trim(),e.length===0)return"";let r=t.locale===!1?i=>i.toLowerCase():i=>i.toLocaleLowerCase(t.locale),n=t.locale===!1?i=>i.toUpperCase():i=>i.toLocaleUpperCase(t.locale);return e.length===1?vi.test(e)?"":t.pascalCase?n(e):r(e):(e!==r(e)&&(e=v0(e,r,n,t.preserveConsecutiveUppercase)),e=e.replace(S0,""),e=t.preserveConsecutiveUppercase?A0(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),T0(e,n))}var Bi=be(Yl(),1);c();c();var Jl=(e=0)=>t=>`\x1B[${t+e}m`,Kl=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Xl=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},rS=Object.keys(J.modifier),I0=Object.keys(J.color),j0=Object.keys(J.bgColor),nS=[...I0,...j0];function $0(){let e=new Map;for(let[t,r]of Object.entries(J)){for(let[n,s]of Object.entries(r))J[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=J[n],e.set(s[0],s[1]);Object.defineProperty(J,t,{value:r,enumerable:!1})}return Object.defineProperty(J,"codes",{value:e,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=Jl(),J.color.ansi256=Kl(),J.color.ansi16m=Xl(),J.bgColor.ansi=Jl(10),J.bgColor.ansi256=Kl(10),J.bgColor.ansi16m=Xl(10),Object.defineProperties(J,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:t=>J.rgbToAnsi256(...J.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,s;if(t>=232)r=((t-232)*10+8)/255,n=r,s=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,n=Math.floor(u/6)/5,s=u%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>J.ansi256ToAnsi(J.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>J.ansi256ToAnsi(J.hexToAnsi256(t)),enumerable:!1}}),J}var M0=$0(),Ql=M0;var Gn=new Set(["\x1B","\x9B"]),U0=39,Li="\x07",rf="[",q0="]",nf="m",qn=`${q0}8;;`,ef=e=>`${Gn.values().next().value}${rf}${e}${nf}`,tf=e=>`${Gn.values().next().value}${qn}${e}${Li}`,G0=e=>e.split(" ").map(t=>fe(t)),Pi=(e,t,r)=>{let n=[...t],s=!1,i=!1,o=fe(Pt(e.at(-1)));for(let[u,a]of n.entries()){let l=fe(a);if(o+l<=r?e[e.length-1]+=a:(e.push(a),o=0),Gn.has(a)&&(s=!0,i=n.slice(u+1,u+1+qn.length).join("")===qn),s){i?a===Li&&(s=!1,i=!1):a===nf&&(s=!1);continue}o+=l,o===r&&u<n.length-1&&(e.push(""),o=0)}!o&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},H0=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(fe(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},z0=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",s,i,o=G0(e),u=[""];for(let[y,p]of e.split(" ").entries()){r.trim!==!1&&(u[u.length-1]=u.at(-1).trimStart());let m=fe(u.at(-1));if(y!==0&&(m>=t&&(r.wordWrap===!1||r.trim===!1)&&(u.push(""),m=0),(m>0||r.trim===!1)&&(u[u.length-1]+=" ",m++)),r.hard&&o[y]>t){let g=t-m,d=1+Math.floor((o[y]-g-1)/t);Math.floor((o[y]-1)/t)<d&&u.push(""),Pi(u,p,t);continue}if(m+o[y]>t&&m>0&&o[y]>0){if(r.wordWrap===!1&&m<t){Pi(u,p,t);continue}u.push("")}if(m+o[y]>t&&r.wordWrap===!1){Pi(u,p,t);continue}u[u.length-1]+=p}r.trim!==!1&&(u=u.map(y=>H0(y)));let a=u.join(`
40
- `),l=[...a],f=0;for(let[y,p]of l.entries()){if(n+=p,Gn.has(p)){let{groups:g}=new RegExp(`(?:\\${rf}(?<code>\\d+)m|\\${qn}(?<uri>.*)${Li})`).exec(a.slice(f))||{groups:{}};if(g.code!==void 0){let d=Number.parseFloat(g.code);s=d===U0?void 0:d}else g.uri!==void 0&&(i=g.uri.length===0?void 0:g.uri)}let m=Ql.codes.get(Number(s));l[y+1]===`
41
- `?(i&&(n+=tf("")),s&&m&&(n+=ef(m))):p===`
42
- `&&(s&&m&&(n+=ef(s)),i&&(n+=tf(i))),f+=p.length}return n};function Hn(e,t,r){return String(e).normalize().replaceAll(`\r
43
- `,`
44
- `).split(`
45
- `).map(n=>z0(n,t,r)).join(`
46
- `)}var eg=be(Si(),1),ut=`
47
- `,Se=" ",Or="none",cf=()=>{let{env:e,stdout:t,stderr:r}=zn;return t?.columns?t.columns:r?.columns?r.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},sf=e=>typeof e=="number"?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},Rr=e=>e===Or?0:2,W0=e=>{let t=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],r;if(e===Or){e={};for(let n of t)e[n]=""}if(typeof e=="string"){if(r=af.default[e],!r)throw new TypeError(`Invalid border style: ${e}`)}else{typeof e?.vertical=="string"&&(e.left=e.vertical,e.right=e.vertical),typeof e?.horizontal=="string"&&(e.top=e.horizontal,e.bottom=e.horizontal);for(let n of t)if(e[n]===null||typeof e[n]!="string")throw new TypeError(`Invalid border style: ${n}`);r=e}return r},V0=(e,t,r)=>{let n="",s=fe(e);switch(r){case"left":{n=e+t.slice(s);break}case"right":{n=t.slice(s)+e;break}default:{t=t.slice(s),t.length%2===1?(t=t.slice(Math.floor(t.length/2)),n=t.slice(1)+e+t):(t=t.slice(t.length/2),n=t+e+t);break}}return n},Z0=(e,{padding:t,width:r,textAlignment:n,height:s})=>{e=(0,Bi.default)(e,{align:n});let i=e.split(ut),o=Un(e),u=r-t.left-t.right;if(o>u){let f=[];for(let y of i){let p=Hn(y,u,{hard:!0}),g=(0,Bi.default)(p,{align:n}).split(`
48
- `),d=Math.max(...g.map(E=>fe(E)));for(let E of g){let F;switch(n){case"center":{F=Se.repeat((u-d)/2)+E;break}case"right":{F=Se.repeat(u-d)+E;break}default:{F=E;break}}f.push(F)}}i=f}n==="center"&&o<u?i=i.map(f=>Se.repeat((u-o)/2)+f):n==="right"&&o<u&&(i=i.map(f=>Se.repeat(u-o)+f));let a=Se.repeat(t.left),l=Se.repeat(t.right);return i=i.map(f=>{let y=a+f+l;return y+Se.repeat(r-fe(y))}),t.top>0&&(i=[...Array.from({length:t.top}).fill(Se.repeat(r)),...i]),t.bottom>0&&(i=[...i,...Array.from({length:t.bottom}).fill(Se.repeat(r))]),s&&i.length>s?i=i.slice(0,s):s&&i.length<s&&(i=[...i,...Array.from({length:s-i.length}).fill(Se.repeat(r))]),i.join(ut)},Y0=(e,t,r)=>{let n=f=>{let y=r.borderColor?X0(r.borderColor)(f):f;return r.dimBorder?qe.dim(y):y},s=f=>r.backgroundColor?Q0(r.backgroundColor)(f):f,i=W0(r.borderStyle),o=cf(),u=Se.repeat(r.margin.left);if(r.float==="center"){let f=Math.max((o-t-Rr(r.borderStyle))/2,0);u=Se.repeat(f)}else if(r.float==="right"){let f=Math.max(o-t-r.margin.right-Rr(r.borderStyle),0);u=Se.repeat(f)}let a="";r.margin.top&&(a+=ut.repeat(r.margin.top)),(r.borderStyle!==Or||r.title)&&(a+=n(u+i.topLeft+(r.title?V0(r.title,i.top.repeat(t),r.titleAlignment):i.top.repeat(t))+i.topRight)+ut);let l=e.split(ut);return a+=l.map(f=>u+n(i.left)+s(f)+n(i.right)).join(ut),r.borderStyle!==Or&&(a+=ut+n(u+i.bottomLeft+i.bottom.repeat(t)+i.bottomRight)),r.margin.bottom&&(a+=ut.repeat(r.margin.bottom)),a},J0=e=>{if(e.fullscreen&&zn?.stdout){let t=[zn.stdout.columns,zn.stdout.rows];typeof e.fullscreen=="function"&&(t=e.fullscreen(...t)),e.width||=t[0],e.height||=t[1]}return e.width&&=Math.max(1,e.width-Rr(e.borderStyle)),e.height&&=Math.max(1,e.height-Rr(e.borderStyle)),e},of=(e,t)=>t===Or?e:` ${e} `,K0=(e,t)=>{t=J0(t);let r=t.width!==void 0,n=cf(),s=Rr(t.borderStyle),i=n-t.margin.left-t.margin.right-s,o=Un(Hn(e,n-s,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&r?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=of(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,i-2)),t.title&&(t.title=of(t.title,t.borderStyle),fe(t.title)>o&&(t.width=fe(t.title)))),t.width||=o,!r){if(t.margin.left&&t.margin.right&&t.width>i){let a=(n-t.width-s)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*a)),t.margin.right=Math.max(0,Math.floor(t.margin.right*a))}t.width=Math.min(t.width,n-s-t.margin.left-t.margin.right)}return t.width-(t.padding.left+t.padding.right)<=0&&(t.padding.left=0,t.padding.right=0),t.height&&t.height-(t.padding.top+t.padding.bottom)<=0&&(t.padding.top=0,t.padding.bottom=0),t},Oi=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),uf=e=>typeof e=="string"&&(qe[e]??Oi(e)),X0=e=>Oi(e)?qe.hex(e):qe[e],Q0=e=>Oi(e)?qe.bgHex(e):qe[Ai(["bg",e])];function Ri(e,t){if(t={padding:0,borderStyle:"single",dimBorder:!1,textAlignment:"left",float:"left",titleAlignment:"left",...t},t.align&&(t.textAlignment=t.align),t.borderColor&&!uf(t.borderColor))throw new Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!uf(t.backgroundColor))throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=sf(t.padding),t.margin=sf(t.margin),t=K0(e,t),e=Z0(e,t),Y0(e,t.width,t)}c();var tg=/(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi,lf=/(?:^|\.)(?:(?:(\w+)(?:\(([^)]*)\))?)|(?:#(?=[:a-fA-F\d]{2,})([a-fA-F\d]{6})?(?::([a-fA-F\d]{6}))?))/g,rg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ng=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,sg=new Map([["n",`
49
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function hf(e){let t=e[0]==="u",r=e[1]==="{";return t&&!r&&e.length===5||e[0]==="x"&&e.length===3?String.fromCodePoint(Number.parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(Number.parseInt(e.slice(2,-1),16)):sg.get(e)||e}function ig(e,t){let r=[],n=t.trim().split(/\s*,\s*/g),s;for(let i of n){let o=Number(i);if(!Number.isNaN(o))r.push(o);else if(s=i.match(rg))r.push(s[2].replace(ng,(u,a,l)=>a?hf(a):l));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`)}return r}function ff(e){let t=Number.parseInt(e,16);return[t>>16&255,t>>8&255,t&255]}function og(e){lf.lastIndex=0;let t=[],r;for(;(r=lf.exec(e))!==null;){let n=r[1];r[2]?t.push([n,...ig(n,r[2])]):r[3]||r[4]?(r[3]&&t.push(["rgb",...ff(r[3])]),r[4]&&t.push(["bgRgb",...ff(r[4])])):t.push([n])}return t}function df(e){function t(n){let s={};for(let o of n)for(let u of o.styles)s[u[0]]=o.inverse?null:u.slice(1);let i=e;for(let[o,u]of Object.entries(s))if(Array.isArray(u)){if(!(o in i))throw new Error(`Unknown Chalk style: ${o}`);i=u.length>0?i[o](...u):i[o]}return i}function r(n){let s=[],i=[],o=[];if(n.replace(tg,(u,a,l,f,y,p)=>{if(a)o.push(hf(a));else if(f){let m=o.join("");o=[],i.push(s.length===0?m:t(s)(m)),s.push({inverse:l,styles:og(f)})}else if(y){if(s.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(t(s)(o.join(""))),o=[],s.pop()}else o.push(p)}),i.push(o.join("")),s.length>0)throw new Error(`Chalk template literal is missing ${s.length} closing bracket${s.length===1?"":"s"} (\`}\`)`);return i.join("")}return r}function Df(e){function t(r,...n){if(!Array.isArray(r)||!Array.isArray(r.raw))throw new TypeError("A tagged template literal must be provided");let s=[r.raw[0]];for(let i=1;i<r.raw.length;i++)s.push(String(n[i-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[i]));return e(s.join(""))}return t}var ug=df(qe),Ni=Df(ug),ag=df(tu),ES=Df(ag);var Mo=be(mf(),1);c();c();c();function Ii(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}c();import cg from"node:os";var lg=()=>cg.homedir().replace(/\\/g,"/"),yf=lg;var gf=/\s+at.*[(\s](.*)\)?/,Ff=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function ji(e,{pretty:t=!1,basePath:r,pathFilter:n}={}){let s=r&&new RegExp(`(file://)?${Ii(r.replace(/\\/g,"/"))}/?`,"g"),i=t?yf():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
50
- `).filter(o=>{let u=o.match(gf);if(u===null||!u[1])return!0;let a=u[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")||a.includes("node_modules/electron/dist/resources/electron.asar")||a.includes("node_modules/electron/dist/resources/default_app.asar")?!1:n?!Ff.test(a)&&n(a):!Ff.test(a)}).filter(o=>o.trim()!=="").map(o=>(s&&(o=o.replace(s,"")),t&&(o=o.replace(gf,(u,a)=>u.replace(a,a.replace(i,"~")))),o)).join(`
51
- `)}c();c();c();var Ef=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function fg(e){return Ef.includes(e)}var hg=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...Ef];function dg(e){return hg.includes(e)}var Dg=["null","undefined","string","number","bigint","boolean","symbol"];function pg(e){return Dg.includes(e)}function ir(e){return t=>typeof t===e}var{toString:mg}=Object.prototype,Ir=e=>{let t=mg.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&h.domElement(e))return"HTMLElement";if(dg(t))return t},H=e=>t=>Ir(t)===e;function h(e){if(e===null)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(h.observable(e))return"Observable";if(h.array(e))return"Array";if(h.buffer(e))return"Buffer";let t=Ir(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}h.undefined=ir("undefined");h.string=ir("string");var yg=ir("number");h.number=e=>yg(e)&&!h.nan(e);h.positiveNumber=e=>h.number(e)&&e>0;h.negativeNumber=e=>h.number(e)&&e<0;h.bigint=ir("bigint");h.function_=ir("function");h.null_=e=>e===null;h.class_=e=>h.function_(e)&&e.toString().startsWith("class ");h.boolean=e=>e===!0||e===!1;h.symbol=ir("symbol");h.numericString=e=>h.string(e)&&!h.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));h.array=(e,t)=>Array.isArray(e)?h.function_(t)?e.every(r=>t(r)):!0:!1;h.buffer=e=>e?.constructor?.isBuffer?.(e)??!1;h.blob=e=>H("Blob")(e);h.nullOrUndefined=e=>h.null_(e)||h.undefined(e);h.object=e=>!h.null_(e)&&(typeof e=="object"||h.function_(e));h.iterable=e=>h.function_(e?.[Symbol.iterator]);h.asyncIterable=e=>h.function_(e?.[Symbol.asyncIterator]);h.generator=e=>h.iterable(e)&&h.function_(e?.next)&&h.function_(e?.throw);h.asyncGenerator=e=>h.asyncIterable(e)&&h.function_(e.next)&&h.function_(e.throw);h.nativePromise=e=>H("Promise")(e);var gg=e=>h.function_(e?.then)&&h.function_(e?.catch);h.promise=e=>h.nativePromise(e)||gg(e);h.generatorFunction=H("GeneratorFunction");h.asyncGeneratorFunction=e=>Ir(e)==="AsyncGeneratorFunction";h.asyncFunction=e=>Ir(e)==="AsyncFunction";h.boundFunction=e=>h.function_(e)&&!e.hasOwnProperty("prototype");h.regExp=H("RegExp");h.date=H("Date");h.error=H("Error");h.map=e=>H("Map")(e);h.set=e=>H("Set")(e);h.weakMap=e=>H("WeakMap")(e);h.weakSet=e=>H("WeakSet")(e);h.weakRef=e=>H("WeakRef")(e);h.int8Array=H("Int8Array");h.uint8Array=H("Uint8Array");h.uint8ClampedArray=H("Uint8ClampedArray");h.int16Array=H("Int16Array");h.uint16Array=H("Uint16Array");h.int32Array=H("Int32Array");h.uint32Array=H("Uint32Array");h.float32Array=H("Float32Array");h.float64Array=H("Float64Array");h.bigInt64Array=H("BigInt64Array");h.bigUint64Array=H("BigUint64Array");h.arrayBuffer=H("ArrayBuffer");h.sharedArrayBuffer=H("SharedArrayBuffer");h.dataView=H("DataView");h.enumCase=(e,t)=>Object.values(t).includes(e);h.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;h.urlInstance=e=>H("URL")(e);h.urlString=e=>{if(!h.string(e))return!1;try{return new URL(e),!0}catch{return!1}};h.truthy=e=>!!e;h.falsy=e=>!e;h.nan=e=>Number.isNaN(e);h.primitive=e=>h.null_(e)||pg(typeof e);h.integer=e=>Number.isInteger(e);h.safeInteger=e=>Number.isSafeInteger(e);h.plainObject=e=>{if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};h.typedArray=e=>fg(Ir(e));var Fg=e=>h.safeInteger(e)&&e>=0;h.arrayLike=e=>!h.nullOrUndefined(e)&&!h.function_(e)&&Fg(e.length);h.tupleLike=(e,t)=>h.array(t)&&h.array(e)&&t.length===e.length?t.every((r,n)=>r(e[n])):!1;h.inRange=(e,t)=>{if(h.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(h.array(t)&&t.length===2)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};var Eg=1,Cg=["innerHTML","ownerDocument","style","attributes","nodeValue"];h.domElement=e=>h.object(e)&&e.nodeType===Eg&&h.string(e.nodeName)&&!h.plainObject(e)&&Cg.every(t=>t in e);h.observable=e=>e?e===e[Symbol.observable]?.()||e===e["@@observable"]?.():!1;h.nodeStream=e=>h.object(e)&&h.function_(e.pipe)&&!h.observable(e);h.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;var Cf=e=>t=>h.integer(t)&&Math.abs(t%2)===e;h.evenInteger=Cf(0);h.oddInteger=Cf(1);h.emptyArray=e=>h.array(e)&&e.length===0;h.nonEmptyArray=e=>h.array(e)&&e.length>0;h.emptyString=e=>h.string(e)&&e.length===0;var bg=e=>h.string(e)&&!/\S/.test(e);h.emptyStringOrWhitespace=e=>h.emptyString(e)||bg(e);h.nonEmptyString=e=>h.string(e)&&e.length>0;h.nonEmptyStringAndNotWhitespace=e=>h.string(e)&&!h.emptyStringOrWhitespace(e);h.emptyObject=e=>h.object(e)&&!h.map(e)&&!h.set(e)&&Object.keys(e).length===0;h.nonEmptyObject=e=>h.object(e)&&!h.map(e)&&!h.set(e)&&Object.keys(e).length>0;h.emptySet=e=>h.set(e)&&e.size===0;h.nonEmptySet=e=>h.set(e)&&e.size>0;h.emptyMap=e=>h.map(e)&&e.size===0;h.nonEmptyMap=e=>h.map(e)&&e.size>0;h.propertyKey=e=>h.any([h.string,h.number,h.symbol],e);h.formData=e=>H("FormData")(e);h.urlSearchParams=e=>H("URLSearchParams")(e);var bf=(e,t,r)=>{if(!h.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(r.length===0)throw new TypeError("Invalid number of values");return e.call(r,t)};h.any=(e,...t)=>(h.array(e)?e:[e]).some(n=>bf(Array.prototype.some,n,t));h.all=(e,...t)=>bf(Array.prototype.every,e,t);var _=(e,t,r,n={})=>{if(!e){let{multipleValues:s}=n,i=s?`received values of types ${[...new Set(r.map(o=>`\`${h(o)}\``))].join(", ")}`:`received value of type \`${h(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}},C={undefined:e=>_(h.undefined(e),"undefined",e),string:e=>_(h.string(e),"string",e),number:e=>_(h.number(e),"number",e),positiveNumber:e=>_(h.positiveNumber(e),"positive number",e),negativeNumber:e=>_(h.negativeNumber(e),"negative number",e),bigint:e=>_(h.bigint(e),"bigint",e),function_:e=>_(h.function_(e),"Function",e),null_:e=>_(h.null_(e),"null",e),class_:e=>_(h.class_(e),"Class",e),boolean:e=>_(h.boolean(e),"boolean",e),symbol:e=>_(h.symbol(e),"symbol",e),numericString:e=>_(h.numericString(e),"string with a number",e),array:(e,t)=>{_(h.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>_(h.buffer(e),"Buffer",e),blob:e=>_(h.blob(e),"Blob",e),nullOrUndefined:e=>_(h.nullOrUndefined(e),"null or undefined",e),object:e=>_(h.object(e),"Object",e),iterable:e=>_(h.iterable(e),"Iterable",e),asyncIterable:e=>_(h.asyncIterable(e),"AsyncIterable",e),generator:e=>_(h.generator(e),"Generator",e),asyncGenerator:e=>_(h.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>_(h.nativePromise(e),"native Promise",e),promise:e=>_(h.promise(e),"Promise",e),generatorFunction:e=>_(h.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>_(h.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>_(h.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>_(h.boundFunction(e),"Function",e),regExp:e=>_(h.regExp(e),"RegExp",e),date:e=>_(h.date(e),"Date",e),error:e=>_(h.error(e),"Error",e),map:e=>_(h.map(e),"Map",e),set:e=>_(h.set(e),"Set",e),weakMap:e=>_(h.weakMap(e),"WeakMap",e),weakSet:e=>_(h.weakSet(e),"WeakSet",e),weakRef:e=>_(h.weakRef(e),"WeakRef",e),int8Array:e=>_(h.int8Array(e),"Int8Array",e),uint8Array:e=>_(h.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>_(h.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>_(h.int16Array(e),"Int16Array",e),uint16Array:e=>_(h.uint16Array(e),"Uint16Array",e),int32Array:e=>_(h.int32Array(e),"Int32Array",e),uint32Array:e=>_(h.uint32Array(e),"Uint32Array",e),float32Array:e=>_(h.float32Array(e),"Float32Array",e),float64Array:e=>_(h.float64Array(e),"Float64Array",e),bigInt64Array:e=>_(h.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>_(h.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>_(h.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>_(h.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>_(h.dataView(e),"DataView",e),enumCase:(e,t)=>_(h.enumCase(e,t),"EnumCase",e),urlInstance:e=>_(h.urlInstance(e),"URL",e),urlString:e=>_(h.urlString(e),"string with a URL",e),truthy:e=>_(h.truthy(e),"truthy",e),falsy:e=>_(h.falsy(e),"falsy",e),nan:e=>_(h.nan(e),"NaN",e),primitive:e=>_(h.primitive(e),"primitive",e),integer:e=>_(h.integer(e),"integer",e),safeInteger:e=>_(h.safeInteger(e),"integer",e),plainObject:e=>_(h.plainObject(e),"plain object",e),typedArray:e=>_(h.typedArray(e),"TypedArray",e),arrayLike:e=>_(h.arrayLike(e),"array-like",e),tupleLike:(e,t)=>_(h.tupleLike(e,t),"tuple-like",e),domElement:e=>_(h.domElement(e),"HTMLElement",e),observable:e=>_(h.observable(e),"Observable",e),nodeStream:e=>_(h.nodeStream(e),"Node.js Stream",e),infinite:e=>_(h.infinite(e),"infinite number",e),emptyArray:e=>_(h.emptyArray(e),"empty array",e),nonEmptyArray:e=>_(h.nonEmptyArray(e),"non-empty array",e),emptyString:e=>_(h.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>_(h.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>_(h.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>_(h.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>_(h.emptyObject(e),"empty object",e),nonEmptyObject:e=>_(h.nonEmptyObject(e),"non-empty object",e),emptySet:e=>_(h.emptySet(e),"empty set",e),nonEmptySet:e=>_(h.nonEmptySet(e),"non-empty set",e),emptyMap:e=>_(h.emptyMap(e),"empty map",e),nonEmptyMap:e=>_(h.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>_(h.propertyKey(e),"PropertyKey",e),formData:e=>_(h.formData(e),"FormData",e),urlSearchParams:e=>_(h.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>_(h.evenInteger(e),"even integer",e),oddInteger:e=>_(h.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>_(h.directInstanceOf(e,t),"T",e),inRange:(e,t)=>_(h.inRange(e,t),"in range",e),any:(e,...t)=>_(h.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>_(h.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(h,{class:{value:h.class_},function:{value:h.function_},null:{value:h.null_}});Object.defineProperties(C,{class:{value:C.class_},function:{value:C.function_},null:{value:C.null_}});var D=h;c();import{EventEmitter as pC}from"node:events";c();var $i=class extends Error{constructor(t){super(t||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},or=class e{static fn(t){return(...r)=>new e((n,s,i)=>{r.push(i),t(...r).then(n,s)})}constructor(t){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,n)=>{this._reject=n;let s=u=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(u))},i=u=>{this._isPending=!1,n(u)},o=u=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(u)};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:u=>{this._rejectOnCancel=u}}}),t(s,i,o)})}then(t,r){return this._promise.then(t,r)}catch(t){return this._promise.catch(t)}finally(t){return this._promise.finally(t)}cancel(t){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new $i(t))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(or.prototype,Promise.prototype);c();function wg(e){return D.object(e)&&"_onResponse"in e}var W=class extends Error{constructor(t,r,n){if(super(t),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code??"ERR_GOT_REQUEST_ERROR",this.input=r.input,wg(n)?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,D.string(r.stack)&&D.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,i=this.stack.slice(s).split(`
52
- `).reverse(),o=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
53
- `).reverse();for(;o.length>0&&o[0]===i[0];)i.shift();this.stack=`${this.stack.slice(0,s)}${i.reverse().join(`
54
- `)}${o.reverse().join(`
55
- `)}`}}},Wn=class extends W{constructor(t){super(`Redirected ${t.options.maxRedirects} times. Aborting.`,{},t),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}},at=class extends W{constructor(t){super(`Response code ${t.statusCode} (${t.statusMessage})`,{},t.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}},Vn=class extends W{constructor(t,r){super(t.message,t,r),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}},jr=class extends W{constructor(t,r){super(t.message,t,r),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}},Zn=class extends W{constructor(t,r,n){super(t.message,t,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=t.event,this.timings=r}},$r=class extends W{constructor(t,r){super(t.message,t,r),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}},Yn=class extends W{constructor(t){super("Retrying",{},t),this.name="RetryError",this.code="ERR_RETRYING"}},Jn=class extends W{constructor(t){super("This operation was aborted.",{},t),this.code="ERR_ABORTED",this.name="AbortError"}};c();import ld from"node:process";import{Buffer as No}from"node:buffer";import{Duplex as aC}from"node:stream";import cC,{ServerResponse as cd}from"node:http";c();var _f=be(wf(),1);import{errorMonitor as xg}from"events";import{types as Sg}from"util";var vg=e=>{if(e.timings)return e.timings;let t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;let r=o=>{o.once(xg,()=>{t.error=Date.now(),t.phases.total=t.error-t.start})};r(e);let n=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener("abort",n);let s=o=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,Sg.isProxy(o))return;let u=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};o.prependOnceListener("lookup",u),(0,_f.default)(o,{connect:()=>{t.connect=Date.now(),t.lookup===void 0&&(o.removeListener("lookup",u),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?s(e.socket):e.prependOnceListener("socket",s);let i=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};return e.writableFinished?i():e.prependOnceListener("finish",i),e.prependOnceListener("response",o=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,o.timings=t,r(o),o.prependOnceListener("end",()=>{e.off("abort",n),o.off("aborted",n),!t.phases.total&&(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)}),o.prependOnceListener("aborted",n)}),t},xf=vg;c();import Jg from"node:events";import Qn from"node:url";import Kg from"node:crypto";import Xg,{PassThrough as Qg}from"node:stream";c();var Ag="text/plain",Tg="us-ascii",Gi=(e,t)=>t.some(r=>r instanceof RegExp?r.test(e):r===e),kg=new Set(["https:","http:","file:"]),Pg=e=>{try{let{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!kg.has(t)}catch{return!1}},Lg=(e,{stripHash:t})=>{let r=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!r)throw new Error(`Invalid URL: ${e}`);let{type:n,data:s,hash:i}=r.groups,o=n.split(";");i=t?"":i;let u=!1;o[o.length-1]==="base64"&&(o.pop(),u=!0);let a=o.shift()?.toLowerCase()??"",f=[...o.map(y=>{let[p,m=""]=y.split("=").map(g=>g.trim());return p==="charset"&&(m=m.toLowerCase(),m===Tg)?"":`${p}${m?`=${m}`:""}`}).filter(Boolean)];return u&&f.push("base64"),(f.length>0||a&&a!==Ag)&&f.unshift(a),`data:${f.join(";")},${u?s.trim():s}${i?`#${i}`:""}`};function Hi(e,t){if(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t},typeof t.defaultProtocol=="string"&&!t.defaultProtocol.endsWith(":")&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return Lg(e,t);if(Pg(e))return e;let r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let s=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&s.protocol==="https:"&&(s.protocol="http:"),t.forceHttps&&s.protocol==="http:"&&(s.protocol="https:"),t.stripAuthentication&&(s.username="",s.password=""),t.stripHash?s.hash="":t.stripTextFragment&&(s.hash=s.hash.replace(/#?:~:text.*?$/i,"")),s.pathname){let o=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,u=0,a="";for(;;){let f=o.exec(s.pathname);if(!f)break;let y=f[0],p=f.index,m=s.pathname.slice(u,p);a+=m.replace(/\/{2,}/g,"/"),a+=y,u=p+y.length}let l=s.pathname.slice(u,s.pathname.length);a+=l.replace(/\/{2,}/g,"/"),s.pathname=a}if(s.pathname)try{s.pathname=decodeURI(s.pathname)}catch{}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let o=s.pathname.split("/"),u=o[o.length-1];Gi(u,t.removeDirectoryIndex)&&(o=o.slice(0,-1),s.pathname=o.slice(1).join("/")+"/")}if(s.hostname&&(s.hostname=s.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(s.hostname)&&(s.hostname=s.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(let o of[...s.searchParams.keys()])Gi(o,t.removeQueryParameters)&&s.searchParams.delete(o);if(!Array.isArray(t.keepQueryParameters)&&t.removeQueryParameters===!0&&(s.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(let o of[...s.searchParams.keys()])Gi(o,t.keepQueryParameters)||s.searchParams.delete(o);if(t.sortQueryParameters){s.searchParams.sort();try{s.search=decodeURIComponent(s.search)}catch{}}t.removeTrailingSlash&&(s.pathname=s.pathname.replace(/\/$/,"")),t.removeExplicitPort&&s.port&&(s.port="");let i=e;return e=s.toString(),!t.removeSingleSlash&&s.pathname==="/"&&!i.endsWith("/")&&s.hash===""&&(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||s.pathname==="/")&&s.hash===""&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var Nf=be(Wi(),1),es=be(Tf(),1);c();import{Readable as Wg}from"node:stream";c();function ur(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t.toLowerCase(),r]))}var ar=class extends Wg{statusCode;headers;body;url;constructor({statusCode:t,headers:r,body:n,url:s}){if(typeof t!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if(typeof s!="string")throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=t,this.headers=ur(r),this.body=n,this.url=s}};var Ur=be(Of(),1);c();var Yg=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];function Ji(e,t){if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set([...Object.keys(e),...Yg]),n={};for(let s of r)s in t||(n[s]={get(){let i=e[s];return typeof i=="function"?i.bind(e):i},set(i){e[s]=i},enumerable:!0,configurable:!1});return Object.defineProperties(t,n),e.once("aborted",()=>{t.destroy(),t.emit("aborted")}),e.once("close",()=>{e.complete&&t.readable?t.once("end",()=>{t.emit("close")}):t.emit("close")}),t}c();var Xn=class extends Error{constructor(t){super(t.message),Object.assign(this,t)}},Ze=class extends Error{constructor(t){super(t.message),Object.assign(this,t)}};var Xi=class{constructor(t,r){this.hooks=new Map,this.request=()=>(n,s)=>{let i;if(typeof n=="string")i=Ki(Qn.parse(n)),n={};else if(n instanceof Qn.URL)i=Ki(Qn.parse(n.toString())),n={};else{let[p,...m]=(n.path??"").split("?"),g=m.length>0?`?${m.join("?")}`:"";i=Ki({...n,pathname:p,search:g})}n={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...n,...rF(i)},n.headers=Object.fromEntries(eF(n.headers).map(([p,m])=>[p.toLowerCase(),m]));let o=new Jg,u=Hi(Qn.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${n.method}:${u}`;n.body&&n.method!==void 0&&["POST","PATCH","PUT"].includes(n.method)&&(n.body instanceof Xg.Readable?n.cache=!1:a+=`:${Kg.createHash("md5").update(n.body).digest("hex")}`);let l=!1,f=!1,y=p=>{f=!0;let m=!1,g=()=>{},d=new Promise(F=>{g=()=>{m||(m=!0,F())}}),E=async F=>{if(l){F.status=F.statusCode;let x=es.default.fromObject(l.cachePolicy).revalidatedPolicy(p,F);if(!x.modified){F.resume(),await new Promise(I=>{F.once("end",I)});let k=Rf(x.policy.responseHeaders());F=new ar({statusCode:l.statusCode,headers:k,body:l.body,url:l.url}),F.cachePolicy=x.policy,F.fromCache=!0}}F.fromCache||(F.cachePolicy=new es.default(p,F,p),F.fromCache=!1);let A;p.cache&&F.cachePolicy.storable()?(A=tF(F),(async()=>{try{let x=Nf.default.buffer(F);await Promise.race([d,new Promise(ne=>F.once("end",ne)),new Promise(ne=>F.once("close",ne))]);let k=await x,I={url:F.url,statusCode:F.fromCache?l.statusCode:F.statusCode,body:k,cachePolicy:F.cachePolicy.toObject()},K=p.strictTtl?F.cachePolicy.timeToLive():void 0;if(p.maxTtl&&(K=K?Math.min(K,p.maxTtl):p.maxTtl),this.hooks.size>0)for(let ne of this.hooks.keys())I=await this.runHook(ne,I,F);await this.cache.set(a,I,K)}catch(x){o.emit("error",new Ze(x))}})()):p.cache&&l&&(async()=>{try{await this.cache.delete(a)}catch(x){o.emit("error",new Ze(x))}})(),o.emit("response",A??F),typeof s=="function"&&s(A??F)};try{let F=this.cacheRequest(p,E);F.once("error",g),F.once("abort",g),F.once("destroy",g),o.emit("request",F)}catch(F){o.emit("error",new Xn(F))}};return(async()=>{let p=async g=>{await Promise.resolve();let d=g.cache?await this.cache.get(a):void 0;if(d===void 0&&!g.forceRefresh){y(g);return}let E=es.default.fromObject(d.cachePolicy);if(E.satisfiesWithoutRevalidation(g)&&!g.forceRefresh){let F=Rf(E.responseHeaders()),A=new ar({statusCode:d.statusCode,headers:F,body:d.body,url:d.url});A.cachePolicy=E,A.fromCache=!0,o.emit("response",A),typeof s=="function"&&s(A)}else E.satisfiesWithoutRevalidation(g)&&Date.now()>=E.timeToLive()&&g.forceRefresh?(await this.cache.delete(a),g.headers=E.revalidationHeaders(g),y(g)):(l=d,g.headers=E.revalidationHeaders(g),y(g))},m=g=>o.emit("error",new Ze(g));if(this.cache instanceof Ur.default){let g=this.cache;g.once("error",m),o.on("error",()=>g.removeListener("error",m)),o.on("response",()=>g.removeListener("error",m))}try{await p(n)}catch(g){n.automaticFailover&&!f&&y(n),o.emit("error",new Ze(g))}})(),o},this.addHook=(n,s)=>{this.hooks.has(n)||this.hooks.set(n,s)},this.removeHook=n=>this.hooks.delete(n),this.getHook=n=>this.hooks.get(n),this.runHook=async(n,...s)=>this.hooks.get(n)?.(...s),r instanceof Ur.default?this.cache=r:typeof r=="string"?this.cache=new Ur.default({uri:r,namespace:"cacheable-request"}):this.cache=new Ur.default({store:r,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=t}},eF=Object.entries,tF=e=>{let t=new Qg({autoDestroy:!1});return Ji(e,t),e.pipe(t)},rF=e=>{let t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t},Ki=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}),Rf=e=>{let t=[];for(let r of Object.keys(e))t[r.toLowerCase()]=e[r];return t},If=Xi;var fd=be(Uf(),1);var hd=be(Wi(),1);c();c();c();var ke=e=>typeof e=="function";var uF=e=>ke(e[Symbol.asyncIterator]);async function*aF(e){let t=e.getReader();for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}var qf=e=>{if(uF(e))return e;if(ke(e.getReader))return aF(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")};c();var Gf="abcdefghijklmnopqrstuvwxyz0123456789";function Hf(){let e=16,t="";for(;e--;)t+=Gf[Math.random()*Gf.length<<0];return t}c();var eo=e=>String(e).replace(/\r|\n/g,(t,r,n)=>t==="\r"&&n[r+1]!==`
56
- `||t===`
57
- `&&n[r-1]!=="\r"?`\r
58
- `:t);c();var cF=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function to(e){if(cF(e)!=="object")return!1;let t=Object.getPrototypeOf(e);return t==null?!0:(t.constructor&&t.constructor.toString())===Object.toString()}c();function zf(e,t){if(typeof t=="string"){for(let[r,n]of Object.entries(e))if(t.toLowerCase()===r.toLowerCase())return n}}var Wf=e=>new Proxy(e,{get:(t,r)=>zf(t,r),has:(t,r)=>zf(t,r)!==void 0});c();var cr=e=>!!(e&&ke(e.constructor)&&e[Symbol.toStringTag]==="FormData"&&ke(e.append)&&ke(e.getAll)&&ke(e.entries)&&ke(e[Symbol.iterator]));c();var ro=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22");c();var ct=e=>!!(e&&typeof e=="object"&&ke(e.constructor)&&e[Symbol.toStringTag]==="File"&&ke(e.stream)&&e.name!=null);var qr=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},V=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Gr,lt,Hr,ts,zr,Ot,Wr,Vr,rs,no,Vf,lF={enableAdditionalHeaders:!1},ns={writable:!1,configurable:!1},ss=class{constructor(t,r,n){if(Gr.add(this),lt.set(this,`\r
59
- `),Hr.set(this,void 0),ts.set(this,void 0),zr.set(this,"-".repeat(2)),Ot.set(this,new TextEncoder),Wr.set(this,void 0),Vr.set(this,void 0),rs.set(this,void 0),!cr(t))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(to(r)?n=r:s=r,s||(s=Hf()),typeof s!="string")throw new TypeError("Expected boundary argument to be a string.");if(n&&!to(n))throw new TypeError("Expected options argument to be an object.");qr(this,Vr,Array.from(t.entries()),"f"),qr(this,rs,{...lF,...n},"f"),qr(this,Hr,V(this,Ot,"f").encode(V(this,lt,"f")),"f"),qr(this,ts,V(this,Hr,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,qr(this,Wr,V(this,Ot,"f").encode(`${V(this,zr,"f")}${this.boundary}${V(this,zr,"f")}${V(this,lt,"f").repeat(2)}`),"f");let i={"Content-Type":this.contentType},o=V(this,Gr,"m",Vf).call(this);o&&(this.contentLength=o,i["Content-Length"]=o),this.headers=Wf(Object.freeze(i)),Object.defineProperties(this,{boundary:ns,contentType:ns,contentLength:ns,headers:ns})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[t,r]of V(this,Vr,"f")){let n=ct(r)?r:V(this,Ot,"f").encode(eo(r));yield V(this,Gr,"m",no).call(this,t,n),yield n,yield V(this,Hr,"f")}yield V(this,Wr,"f")}async*encode(){for(let t of this.values())ct(t)?yield*qf(t.stream()):yield t}[(lt=new WeakMap,Hr=new WeakMap,ts=new WeakMap,zr=new WeakMap,Ot=new WeakMap,Wr=new WeakMap,Vr=new WeakMap,rs=new WeakMap,Gr=new WeakSet,no=function(r,n){let s="";s+=`${V(this,zr,"f")}${this.boundary}${V(this,lt,"f")}`,s+=`Content-Disposition: form-data; name="${ro(r)}"`,ct(n)&&(s+=`; filename="${ro(n.name)}"${V(this,lt,"f")}`,s+=`Content-Type: ${n.type||"application/octet-stream"}`);let i=ct(n)?n.size:n.byteLength;return V(this,rs,"f").enableAdditionalHeaders===!0&&i!=null&&!isNaN(i)&&(s+=`${V(this,lt,"f")}Content-Length: ${ct(n)?n.size:n.byteLength}`),V(this,Ot,"f").encode(`${s}${V(this,lt,"f").repeat(2)}`)},Vf=function(){let r=0;for(let[n,s]of V(this,Vr,"f")){let i=ct(s)?s:V(this,Ot,"f").encode(eo(s)),o=ct(i)?i.size:i.byteLength;if(o==null||isNaN(o))return;r+=V(this,Gr,"m",no).call(this,n,i).byteLength,r+=o,r+=V(this,ts,"f")}return String(r+V(this,Wr,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}};c();import{Buffer as fF}from"node:buffer";import{promisify as hF}from"node:util";c();function Zr(e){return D.nodeStream(e)&&D.function_(e.getBoundary)}async function so(e,t){if(t&&"content-length"in t)return Number(t["content-length"]);if(!e)return 0;if(D.string(e))return fF.byteLength(e);if(D.buffer(e))return e.length;if(Zr(e))return hF(e.getLength.bind(e))()}c();function Yr(e,t,r){let n={};for(let s of r){let i=(...o)=>{t.emit(s,...o)};n[s]=i,e.on(s,i)}return()=>{for(let[s,i]of Object.entries(n))e.off(s,i)}}c();import dF from"node:net";c();function io(){let e=[];return{once(t,r,n){t.once(r,n),e.push({origin:t,event:r,fn:n})},unhandleAll(){for(let t of e){let{origin:r,event:n,fn:s}=t;r.removeListener(n,s)}e.length=0}}}var Zf=Symbol("reentry"),DF=()=>{},Jr=class extends Error{constructor(t,r){super(`Timeout awaiting '${r}' for ${t}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}};function oo(e,t,r){if(Zf in e)return DF;e[Zf]=!0;let n=[],{once:s,unhandleAll:i}=io(),o=(d,E,F)=>{let A=setTimeout(E,d,d,F);A.unref?.();let x=()=>{clearTimeout(A)};return n.push(x),x},{host:u,hostname:a}=r,l=(d,E)=>{e.destroy(new Jr(d,E))},f=()=>{for(let d of n)d();i()};if(e.once("error",d=>{if(f(),e.listenerCount("error")===0)throw d}),t.request!==void 0){let d=o(t.request,l,"request");s(e,"response",E=>{s(E,"end",d)})}if(t.socket!==void 0){let{socket:d}=t,E=()=>{l(d,"socket")};e.setTimeout(d,E),n.push(()=>{e.removeListener("timeout",E)})}let y=t.lookup!==void 0,p=t.connect!==void 0,m=t.secureConnect!==void 0,g=t.send!==void 0;return(y||p||m||g)&&s(e,"socket",d=>{let{socketPath:E}=e;if(d.connecting){let F=!!(E??dF.isIP(a??u??"")!==0);if(y&&!F&&d.address().address===void 0){let A=o(t.lookup,l,"lookup");s(d,"lookup",A)}if(p){let A=()=>o(t.connect,l,"connect");F?s(d,"connect",A()):s(d,"lookup",x=>{x===null&&s(d,"connect",A())})}m&&r.protocol==="https:"&&s(d,"connect",()=>{let A=o(t.secureConnect,l,"secureConnect");s(d,"secureConnect",A)})}if(g){let F=()=>o(t.send,l,"send");d.connecting?s(d,"connect",()=>{s(e,"upload-complete",F())}):s(e,"upload-complete",F())}}),t.response!==void 0&&s(e,"upload-complete",()=>{let d=o(t.response,l,"response");s(e,"response",d)}),t.read!==void 0&&s(e,"response",d=>{let E=o(t.read,l,"read");s(d,"end",E)}),f}c();function uo(e){e=e;let t={protocol:e.protocol,hostname:D.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return D.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}c();var Kr=class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(t,r){typeof t=="object"?this.weakMap.set(t,r):this.map.set(t,r)}get(t){return typeof t=="object"?this.weakMap.get(t):this.map.get(t)}has(t){return typeof t=="object"?this.weakMap.has(t):this.map.has(t)}};c();var pF=({attemptCount:e,retryOptions:t,error:r,retryAfter:n,computedValue:s})=>{if(r.name==="RetryError")return 1;if(e>t.limit)return 0;let i=t.methods.includes(r.options.method),o=t.errorCodes.includes(r.code),u=r.response&&t.statusCodes.includes(r.response.statusCode);if(!i||!o&&!u)return 0;if(r.response){if(n)return n>s?0:n;if(r.response.statusCode===413)return 0}let a=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+a},Yf=pF;c();import ZE from"node:process";import{promisify as sd,inspect as YE}from"node:util";import{checkServerIdentity as JE}from"node:tls";import KE from"node:http";import XE from"node:https";c();import{V4MAPPED as mF,ADDRCONFIG as yF,ALL as th,promises as gF,lookup as FF}from"node:dns";import{promisify as ao}from"node:util";import EF from"node:os";var{Resolver:Jf}=gF,lr=Symbol("cacheableLookupCreateConnection"),co=Symbol("cacheableLookupInstance"),Kf=Symbol("expires"),CF=typeof th=="number",Xf=e=>{if(!(e&&typeof e.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},bF=e=>{for(let t of e)t.family!==6&&(t.address=`::ffff:${t.address}`,t.family=6)},Qf=()=>{let e=!1,t=!1;for(let r of Object.values(EF.networkInterfaces()))for(let n of r)if(!n.internal&&(n.family==="IPv6"?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},wF=e=>Symbol.iterator in e,is=e=>e.catch(t=>{if(t.code==="ENODATA"||t.code==="ENOTFOUND"||t.code==="ENOENT")return[];throw t}),eh={ttl:!0},_F={all:!0},xF={all:!0,family:4},SF={all:!0,family:6},Xr=class{constructor({cache:t=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new Jf,lookup:o=FF}={}){if(this.maxTtl=r,this.errorTtl=s,this._cache=t,this._resolver=i,this._dnsLookup=o&&ao(o),this.stats={cache:0,query:0},this._resolver instanceof Jf?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=ao(this._resolver.resolve4.bind(this._resolver)),this._resolve6=ao(this._resolver.resolve6.bind(this._resolver))),this._iface=Qf(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){let u=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);u.unref&&u.unref(),this._fallbackInterval=u}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(t){this.clear(),this._resolver.setServers(t)}get servers(){return this._resolver.getServers()}lookup(t,r,n){if(typeof r=="function"?(n=r,r={}):typeof r=="number"&&(r={family:r}),!n)throw new Error("Callback must be a function.");this.lookupAsync(t,r).then(s=>{r.all?n(null,s):n(null,s.address,s.family,s.expires,s.ttl,s.source)},n)}async lookupAsync(t,r={}){typeof r=="number"&&(r={family:r});let n=await this.query(t);if(r.family===6){let s=n.filter(i=>i.family===6);r.hints&mF&&(CF&&r.hints&th||s.length===0)?bF(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&yF){let{_iface:s}=this;n=n.filter(i=>i.family===6?s.has6:s.has4)}if(n.length===0){let s=new Error(`cacheableLookup ENOTFOUND ${t}`);throw s.code="ENOTFOUND",s.hostname=t,s}return r.all?n:n[0]}async query(t){let r="cache",n=await this._cache.get(t);if(n&&this.stats.cache++,!n){let s=this._pending[t];if(s)this.stats.cache++,n=await s;else{r="query";let i=this.queryAndCache(t);this._pending[t]=i,this.stats.query++;try{n=await i}finally{delete this._pending[t]}}}return n=n.map(s=>({...s,source:r})),n}async _resolve(t){let[r,n]=await Promise.all([is(this._resolve4(t,eh)),is(this._resolve6(t,eh))]),s=0,i=0,o=0,u=Date.now();for(let a of r)a.family=4,a.expires=u+a.ttl*1e3,s=Math.max(s,a.ttl);for(let a of n)a.family=6,a.expires=u+a.ttl*1e3,i=Math.max(i,a.ttl);return r.length>0?n.length>0?o=Math.min(s,i):o=s:o=i,{entries:[...r,...n],cacheTtl:o}}async _lookup(t){try{let[r,n]=await Promise.all([is(this._dnsLookup(t,xF)),is(this._dnsLookup(t,SF))]);return{entries:[...r,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(t,r,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,r[Kf]=Date.now()+n;try{await this._cache.set(t,r,n)}catch(s){this.lookupAsync=async()=>{let i=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw i.cause=s,i}}wF(this._cache)&&this._tick(n)}}async queryAndCache(t){if(this._hostnamesToFallback.has(t))return this._dnsLookup(t,_F);let r=await this._resolve(t);r.entries.length===0&&this._dnsLookup&&(r=await this._lookup(t),r.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(t));let n=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(t,r.entries,n),r.entries}_tick(t){let r=this._nextRemovalTime;(!r||t<r)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=t,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let n=1/0,s=Date.now();for(let[i,o]of this._cache){let u=o[Kf];s>=u?this._cache.delete(i):u<n&&(n=u)}n!==1/0&&this._tick(n-s)},t),this._removalTimeout.unref&&this._removalTimeout.unref())}install(t){if(Xf(t),lr in t)throw new Error("CacheableLookup has been already installed");t[lr]=t.createConnection,t[co]=this,t.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),t[lr](r,n))}uninstall(t){if(Xf(t),t[lr]){if(t[co]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");t.createConnection=t[lr],delete t[lr],delete t[co]}}updateInterfaceInfo(){let{_iface:t}=this;this._iface=Qf(),(t.has4&&!this._iface.has4||t.has6&&!this._iface.has6)&&this._cache.clear()}clear(t){if(t){this._cache.delete(t);return}this._cache.clear()}};var ud=be(nd(),1);c();function Oo(e){let t=[],r=e.split(",");for(let n of r){let[s,...i]=n.split(";"),o=s.trim();if(o[0]!=="<"||o[o.length-1]!==">")throw new Error(`Invalid format of the Link header reference: ${o}`);let u=o.slice(1,-1),a={};if(i.length===0)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(let l of i){let f=l.trim(),y=f.indexOf("=");if(y===-1)throw new Error(`Failed to parse Link header: ${e}`);let p=f.slice(0,y).trim(),m=f.slice(y+1).trim();a[p]=m}t.push({reference:u,parameters:a})}return t}var[id,QE]=ZE.versions.node.split(".").map(Number);function eC(e){for(let t in e){let r=e[t];C.any([D.string,D.number,D.boolean,D.null_,D.undefined],r)}}var tC=new Map,hs,rC=()=>hs||(hs=new Xr,hs),nC={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform(e){return e.request.options.responseType==="json"?e.body:JSON.parse(e.body)},paginate({response:e}){let t=e.headers.link;if(typeof t!="string"||t.trim()==="")return!1;let n=Oo(t).find(s=>s.parameters.rel==="next"||s.parameters.rel==='"next"');return n?{url:new URL(n.reference,e.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},sC=e=>{let{hooks:t,retry:r}=e,n={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...r,errorCodes:[...r.errorCodes],methods:[...r.methods],statusCodes:[...r.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return n.url!==void 0&&(n.prefixUrl=""),n},iC=e=>{let{hooks:t,retry:r}=e,n={...e};return D.object(e.context)&&(n.context={...e.context}),D.object(e.cacheOptions)&&(n.cacheOptions={...e.cacheOptions}),D.object(e.https)&&(n.https={...e.https}),D.object(e.cacheOptions)&&(n.cacheOptions={...n.cacheOptions}),D.object(e.agent)&&(n.agent={...e.agent}),D.object(e.headers)&&(n.headers={...e.headers}),D.object(r)&&(n.retry={...r},D.array(r.errorCodes)&&(n.retry.errorCodes=[...r.errorCodes]),D.array(r.methods)&&(n.retry.methods=[...r.methods]),D.array(r.statusCodes)&&(n.retry.statusCodes=[...r.statusCodes])),D.object(e.timeout)&&(n.timeout={...e.timeout}),D.object(t)&&(n.hooks={...t},D.array(t.init)&&(n.hooks.init=[...t.init]),D.array(t.beforeRequest)&&(n.hooks.beforeRequest=[...t.beforeRequest]),D.array(t.beforeError)&&(n.hooks.beforeError=[...t.beforeError]),D.array(t.beforeRedirect)&&(n.hooks.beforeRedirect=[...t.beforeRedirect]),D.array(t.beforeRetry)&&(n.hooks.beforeRetry=[...t.beforeRetry]),D.array(t.afterResponse)&&(n.hooks.afterResponse=[...t.afterResponse])),D.object(e.pagination)&&(n.pagination={...e.pagination}),n},oC=e=>{let t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter(r=>typeof r=="number");if(t.length>0)return Math.min(...t)},od=(e,t,r)=>{let n=e.hooks?.init;if(n)for(let s of n)s(t,r)},Pe=class e{constructor(t,r,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),C.any([D.string,D.urlInstance,D.object,D.undefined],t),C.any([D.object,D.undefined],r),C.any([D.object,D.undefined],n),t instanceof e||r instanceof e)throw new TypeError("The defaults must be passed as the third argument");this._internals=sC(n?._internals??n??nC),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(D.plainObject(t))try{this.merge(t),this.merge(r)}finally{this.url=t.url}else try{this.merge(r)}finally{if(r?.url!==void 0)if(t===void 0)this.url=r.url;else throw new TypeError("The `url` option is mutually exclusive with the `input` argument");else t!==void 0&&(this.url=t)}}catch(s){throw s.options=this,s}}merge(t){if(t){if(t instanceof e){for(let r of t._init)this.merge(r);return}t=iC(t),od(this,t,this),od(t,t,this),this._merging=!0,"isStream"in t&&(this.isStream=t.isStream);try{let r=!1;for(let n in t){if(n==="mutableDefaults"||n==="handlers"||n==="url")continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);let s=t[n];s!==void 0&&(this[n]=s,r=!0)}r&&this._init.push(t)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(t){C.any([D.function_,D.undefined],t),this._internals.request=t}get agent(){return this._internals.agent}set agent(t){C.plainObject(t);for(let r in t){if(!(r in this._internals.agent))throw new TypeError(`Unexpected agent option: ${r}`);C.any([D.object,D.undefined],t[r])}this._merging?Object.assign(this._internals.agent,t):this._internals.agent={...t}}get h2session(){return this._internals.h2session}set h2session(t){this._internals.h2session=t}get decompress(){return this._internals.decompress}set decompress(t){C.boolean(t),this._internals.decompress=t}get timeout(){return this._internals.timeout}set timeout(t){C.plainObject(t);for(let r in t){if(!(r in this._internals.timeout))throw new Error(`Unexpected timeout option: ${r}`);C.any([D.number,D.undefined],t[r])}this._merging?Object.assign(this._internals.timeout,t):this._internals.timeout={...t}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(t){if(C.any([D.string,D.urlInstance],t),t===""){this._internals.prefixUrl="";return}if(t=t.toString(),t.endsWith("/")||(t+="/"),this._internals.prefixUrl&&this._internals.url){let{href:r}=this._internals.url;this._internals.url.href=t+r.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=t}get body(){return this._internals.body}set body(t){C.any([D.string,D.buffer,D.nodeStream,D.generator,D.asyncGenerator,cr,D.undefined],t),D.nodeStream(t)&&C.truthy(t.readable),t!==void 0&&(C.undefined(this._internals.form),C.undefined(this._internals.json)),this._internals.body=t}get form(){return this._internals.form}set form(t){C.any([D.plainObject,D.undefined],t),t!==void 0&&(C.undefined(this._internals.body),C.undefined(this._internals.json)),this._internals.form=t}get json(){return this._internals.json}set json(t){t!==void 0&&(C.undefined(this._internals.body),C.undefined(this._internals.form)),this._internals.json=t}get url(){return this._internals.url}set url(t){if(C.any([D.string,D.urlInstance,D.undefined],t),t===void 0){this._internals.url=void 0;return}if(D.string(t)&&t.startsWith("/"))throw new Error("`url` must not start with a slash");let r=`${this.prefixUrl}${t.toString()}`,n=new URL(r);if(this._internals.url=n,n.protocol==="unix:"&&(n.href=`http://unix${n.pathname}${n.search}`),n.protocol!=="http:"&&n.protocol!=="https:"){let s=new Error(`Unsupported protocol: ${n.protocol}`);throw s.code="ERR_UNSUPPORTED_PROTOCOL",s}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),n.hostname==="unix"){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let s=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(s?.groups){let{socketPath:i,path:o}=s.groups;this._unixOptions={socketPath:i,path:o,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(t){if(C.any([D.object,D.undefined],t),t===void 0){this._internals.cookieJar=void 0;return}let{setCookie:r,getCookieString:n}=t;C.function_(r),C.function_(n),r.length===4&&n.length===0?(r=sd(r.bind(t)),n=sd(n.bind(t)),this._internals.cookieJar={setCookie:r,getCookieString:n}):this._internals.cookieJar=t}get signal(){return this._internals.signal}set signal(t){C.object(t),this._internals.signal=t}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(t){C.boolean(t),this._internals.ignoreInvalidCookies=t}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(t){C.any([D.string,D.object,D.undefined],t);let r=this._internals.url;if(t===void 0){this._internals.searchParams=void 0,r&&(r.search="");return}let n=this.searchParams,s;if(D.string(t))s=new URLSearchParams(t);else if(t instanceof URLSearchParams)s=t;else{eC(t),s=new URLSearchParams;for(let i in t){let o=t[i];o===null?s.append(i,""):o===void 0?n.delete(i):s.append(i,o)}}if(this._merging){for(let i of s.keys())n.delete(i);for(let[i,o]of s)n.append(i,o)}else r?r.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(t){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(t){C.any([D.function_,D.undefined],t),this._internals.dnsLookup=t}get dnsCache(){return this._internals.dnsCache}set dnsCache(t){C.any([D.object,D.boolean,D.undefined],t),t===!0?this._internals.dnsCache=rC():t===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=t}get context(){return this._internals.context}set context(t){C.object(t),this._merging?Object.assign(this._internals.context,t):this._internals.context={...t}}get hooks(){return this._internals.hooks}set hooks(t){C.object(t);for(let r in t){if(!(r in this._internals.hooks))throw new Error(`Unexpected hook event: ${r}`);let n=r,s=t[n];if(C.any([D.array,D.undefined],s),s)for(let i of s)C.function_(i);if(this._merging)s&&this._internals.hooks[n].push(...s);else{if(!s)throw new Error(`Missing hook event: ${r}`);this._internals.hooks[r]=[...s]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(t){C.boolean(t),this._internals.followRedirect=t}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(t){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(t){C.number(t),this._internals.maxRedirects=t}get cache(){return this._internals.cache}set cache(t){C.any([D.object,D.string,D.boolean,D.undefined],t),t===!0?this._internals.cache=tC:t===!1?this._internals.cache=void 0:this._internals.cache=t}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(t){C.boolean(t),this._internals.throwHttpErrors=t}get username(){let t=this._internals.url,r=t?t.username:this._internals.username;return decodeURIComponent(r)}set username(t){C.string(t);let r=this._internals.url,n=encodeURIComponent(t);r?r.username=n:this._internals.username=n}get password(){let t=this._internals.url,r=t?t.password:this._internals.password;return decodeURIComponent(r)}set password(t){C.string(t);let r=this._internals.url,n=encodeURIComponent(t);r?r.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(t){C.boolean(t),this._internals.http2=t}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(t){C.boolean(t),this._internals.allowGetBody=t}get headers(){return this._internals.headers}set headers(t){C.plainObject(t),this._merging?Object.assign(this._internals.headers,ur(t)):this._internals.headers=ur(t)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(t){C.boolean(t),this._internals.methodRewriting=t}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(t){if(t!==void 0&&t!==4&&t!==6)throw new TypeError(`Invalid DNS lookup IP version: ${t}`);this._internals.dnsLookupIpVersion=t}get parseJson(){return this._internals.parseJson}set parseJson(t){C.function_(t),this._internals.parseJson=t}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(t){C.function_(t),this._internals.stringifyJson=t}get retry(){return this._internals.retry}set retry(t){if(C.plainObject(t),C.any([D.function_,D.undefined],t.calculateDelay),C.any([D.number,D.undefined],t.maxRetryAfter),C.any([D.number,D.undefined],t.limit),C.any([D.array,D.undefined],t.methods),C.any([D.array,D.undefined],t.statusCodes),C.any([D.array,D.undefined],t.errorCodes),C.any([D.number,D.undefined],t.noise),t.noise&&Math.abs(t.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${t.noise}`);for(let n in t)if(!(n in this._internals.retry))throw new Error(`Unexpected retry option: ${n}`);this._merging?Object.assign(this._internals.retry,t):this._internals.retry={...t};let{retry:r}=this._internals;r.methods=[...new Set(r.methods.map(n=>n.toUpperCase()))],r.statusCodes=[...new Set(r.statusCodes)],r.errorCodes=[...new Set(r.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(t){C.any([D.string,D.undefined],t),this._internals.localAddress=t}get method(){return this._internals.method}set method(t){C.string(t),this._internals.method=t.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(t){C.any([D.function_,D.undefined],t),this._internals.createConnection=t}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(t){C.plainObject(t),C.any([D.boolean,D.undefined],t.shared),C.any([D.number,D.undefined],t.cacheHeuristic),C.any([D.number,D.undefined],t.immutableMinTimeToLive),C.any([D.boolean,D.undefined],t.ignoreCargoCult);for(let r in t)if(!(r in this._internals.cacheOptions))throw new Error(`Cache option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,t):this._internals.cacheOptions={...t}}get https(){return this._internals.https}set https(t){C.plainObject(t),C.any([D.boolean,D.undefined],t.rejectUnauthorized),C.any([D.function_,D.undefined],t.checkServerIdentity),C.any([D.string,D.object,D.array,D.undefined],t.certificateAuthority),C.any([D.string,D.object,D.array,D.undefined],t.key),C.any([D.string,D.object,D.array,D.undefined],t.certificate),C.any([D.string,D.undefined],t.passphrase),C.any([D.string,D.buffer,D.array,D.undefined],t.pfx),C.any([D.array,D.undefined],t.alpnProtocols),C.any([D.string,D.undefined],t.ciphers),C.any([D.string,D.buffer,D.undefined],t.dhparam),C.any([D.string,D.undefined],t.signatureAlgorithms),C.any([D.string,D.undefined],t.minVersion),C.any([D.string,D.undefined],t.maxVersion),C.any([D.boolean,D.undefined],t.honorCipherOrder),C.any([D.number,D.undefined],t.tlsSessionLifetime),C.any([D.string,D.undefined],t.ecdhCurve),C.any([D.string,D.buffer,D.array,D.undefined],t.certificateRevocationLists);for(let r in t)if(!(r in this._internals.https))throw new Error(`HTTPS option \`${r}\` does not exist`);this._merging?Object.assign(this._internals.https,t):this._internals.https={...t}}get encoding(){return this._internals.encoding}set encoding(t){if(t===null)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");C.any([D.string,D.undefined],t),this._internals.encoding=t}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(t){C.boolean(t),this._internals.resolveBodyOnly=t}get isStream(){return this._internals.isStream}set isStream(t){C.boolean(t),this._internals.isStream=t}get responseType(){return this._internals.responseType}set responseType(t){if(t===void 0){this._internals.responseType="text";return}if(t!=="text"&&t!=="buffer"&&t!=="json")throw new Error(`Invalid \`responseType\` option: ${t}`);this._internals.responseType=t}get pagination(){return this._internals.pagination}set pagination(t){C.object(t),this._merging?Object.assign(this._internals.pagination,t):this._internals.pagination=t}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(t){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(t){C.boolean(t),this._internals.setHost=t}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(t){C.any([D.number,D.undefined],t),this._internals.maxHeaderSize=t}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(t){C.boolean(t),this._internals.enableUnixSockets=t}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](t,r){return YE(this._internals,r)}createNativeRequestOptions(){let t=this._internals,r=t.url,n;r.protocol==="https:"?n=t.http2?t.agent:t.agent.https:n=t.agent.http;let{https:s}=t,{pfx:i}=s;return D.array(i)&&D.plainObject(i[0])&&(i=i.map(o=>({buf:o.buffer,passphrase:o.passphrase}))),{...t.cacheOptions,...this._unixOptions,ALPNProtocols:s.alpnProtocols,ca:s.certificateAuthority,cert:s.certificate,key:s.key,passphrase:s.passphrase,pfx:s.pfx,rejectUnauthorized:s.rejectUnauthorized,checkServerIdentity:s.checkServerIdentity??JE,ciphers:s.ciphers,honorCipherOrder:s.honorCipherOrder,minVersion:s.minVersion,maxVersion:s.maxVersion,sigalgs:s.signatureAlgorithms,sessionTimeout:s.tlsSessionLifetime,dhparam:s.dhparam,ecdhCurve:s.ecdhCurve,crl:s.certificateRevocationLists,lookup:t.dnsLookup??t.dnsCache?.lookup,family:t.dnsLookupIpVersion,agent:n,setHost:t.setHost,method:t.method,maxHeaderSize:t.maxHeaderSize,localAddress:t.localAddress,headers:t.headers,createConnection:t.createConnection,timeout:t.http2?oC(t):void 0,h2session:t.h2session}}getRequestFunction(){let t=this._internals.url,{request:r}=this._internals;return!r&&t?this.getFallbackRequestFunction():r}getFallbackRequestFunction(){let t=this._internals.url;if(t){if(t.protocol==="https:"){if(this._internals.http2){if(id<15||id===15&&QE<10){let r=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw r.code="EUNSUPPORTED",r}return ud.default.auto}return XE.request}return KE.request}}freeze(){let t=this._internals;Object.freeze(t),Object.freeze(t.hooks),Object.freeze(t.hooks.afterResponse),Object.freeze(t.hooks.beforeError),Object.freeze(t.hooks.beforeRedirect),Object.freeze(t.hooks.beforeRequest),Object.freeze(t.hooks.beforeRetry),Object.freeze(t.hooks.init),Object.freeze(t.https),Object.freeze(t.cacheOptions),Object.freeze(t.agent),Object.freeze(t.headers),Object.freeze(t.timeout),Object.freeze(t.retry),Object.freeze(t.retry.errorCodes),Object.freeze(t.retry.methods),Object.freeze(t.retry.statusCodes)}};c();var Dr=e=>{let{statusCode:t}=e,r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304},ds=class extends W{constructor(t,r){let{options:n}=r.request;super(`${t.message} in "${n.url.toString()}"`,t,r.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}},Ro=(e,t,r,n)=>{let{rawBody:s}=e;try{if(t==="text")return s.toString(n);if(t==="json")return s.length===0?"":r(s.toString(n));if(t==="buffer")return s}catch(i){throw new ds(i,e)}throw new ds({message:`Unknown body type '${t}'`,name:"Error"},e)};c();function uC(e){return e.writable&&!e.writableEnded}var ad=uC;c();function Ds(e){return e.protocol==="unix:"||e.hostname==="unix"}var{buffer:lC}=hd.default,fC=D.string(ld.versions.brotli),hC=new Set(["GET","HEAD"]),Io=new Kr,dC=new Set([300,301,302,303,304,307,308]),DC=["socket","connect","continue","information","upgrade"],ps=()=>{},It=class e extends aC{constructor(t,r,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=ps,this._triggerRead=!1,this._cancelTimeouts=ps,this._removeListeners=ps,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=ps,this.on("pipe",i=>{i?.headers&&Object.assign(this.options.headers,i.headers)}),this.on("newListener",i=>{if(i==="retry"&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new Pe(t,r,n),!this.options.url){if(this.options.prefixUrl==="")throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(i){let{options:o}=i;o&&(this.options=o),this.flush=async()=>{this.flush=async()=>{},this.destroy(i)};return}let{body:s}=this.options;if(D.nodeStream(s)&&s.once("error",i=>{this._flushed?this._beforeError(new jr(i,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new jr(i,this))}}),this.options.signal){let i=()=>{this.destroy(new Jn(this))};this.options.signal.aborted?i():(this.options.signal.addEventListener("abort",i),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",i)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed){this._request?.destroy();return}for(let t of this._jobs)t();this._jobs.length=0,this._requestInitialized=!0}catch(t){this._beforeError(t)}}}_beforeError(t){if(this._stopReading)return;let{response:r,options:n}=this,s=this.retryCount+(t.name==="RetryError"?0:1);this._stopReading=!0,t instanceof W||(t=new W(t.message,t,this));let i=t;(async()=>{if(r?.readable&&!r.rawBody&&!this._request?.socket?.destroyed&&(r.setEncoding(this.readableEncoding),await this._setRawBody(r)&&(r.body=r.rawBody.toString())),this.listenerCount("retry")!==0){let o;try{let u;r&&"retry-after"in r.headers&&(u=Number(r.headers["retry-after"]),Number.isNaN(u)?(u=Date.parse(r.headers["retry-after"])-Date.now(),u<=0&&(u=1)):u*=1e3);let a=n.retry;o=await a.calculateDelay({attemptCount:s,retryOptions:a,error:i,retryAfter:u,computedValue:Yf({attemptCount:s,retryOptions:a,error:i,retryAfter:u,computedValue:a.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(u){this._error(new W(u.message,u,this));return}if(o){if(await new Promise(u=>{let a=setTimeout(u,o);this._stopRetry=()=>{clearTimeout(a),u()}}),this.destroyed)return;try{for(let u of this.options.hooks.beforeRetry)await u(i,this.retryCount+1)}catch(u){this._error(new W(u.message,t,this));return}if(this.destroyed)return;this.destroy(),this.emit("retry",this.retryCount+1,t,u=>{let a=new e(n.url,u,n);return a.retryCount=this.retryCount+1,ld.nextTick(()=>{a.flush()}),a});return}}this._error(i)})()}_read(){this._triggerRead=!0;let{response:t}=this;if(t&&!this._stopReading){t.readableLength&&(this._triggerRead=!1);let r;for(;(r=t.read())!==null;){this._downloadedSize+=r.length;let n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(r)}}}_write(t,r,n){let s=()=>{this._writeRequest(t,r,n)};this._requestInitialized?s():this._jobs.push(s)}_final(t){let r=()=>{if(!this._request||this._request.destroyed){t();return}this._request.end(n=>{this._request._writableState?.errored||(n||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),t(n))})};this._requestInitialized?r():this._jobs.push(r)}_destroy(t,r){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:n}=this.options;D.nodeStream(n)&&n.destroy()}this._request&&this._request.destroy(),t!==null&&!D.undefined(t)&&!(t instanceof W)&&(t=new W(t.message,t,this)),r(t)}pipe(t,r){return t instanceof cd&&this._pipedServerResponses.add(t),super.pipe(t,r)}unpipe(t){return t instanceof cd&&this._pipedServerResponses.delete(t),super.unpipe(t),this}async _finalizeBody(){let{options:t}=this,{headers:r}=t,n=!D.undefined(t.form),s=!D.undefined(t.json),i=!D.undefined(t.body),o=hC.has(t.method)&&!(t.method==="GET"&&t.allowGetBody);if(this._cannotHaveBody=o,n||s||i){if(o)throw new TypeError(`The \`${t.method}\` method cannot be used with a body`);let u=!D.string(r["content-type"]);if(i){if(cr(t.body)){let l=new ss(t.body);u&&(r["content-type"]=l.headers["Content-Type"]),"Content-Length"in l.headers&&(r["content-length"]=l.headers["Content-Length"]),t.body=l.encode()}Zr(t.body)&&u&&(r["content-type"]=`multipart/form-data; boundary=${t.body.getBoundary()}`)}else if(n){u&&(r["content-type"]="application/x-www-form-urlencoded");let{form:l}=t;t.form=void 0,t.body=new URLSearchParams(l).toString()}else{u&&(r["content-type"]="application/json");let{json:l}=t;t.json=void 0,t.body=t.stringifyJson(l)}let a=await so(t.body,t.headers);D.undefined(r["content-length"])&&D.undefined(r["transfer-encoding"])&&!o&&!D.undefined(a)&&(r["content-length"]=String(a))}t.responseType==="json"&&!("accept"in t.headers)&&(t.headers.accept="application/json"),this._bodySize=Number(r["content-length"])||void 0}async _onResponseBase(t){if(this.isAborted)return;let{options:r}=this,{url:n}=r;this._nativeResponse=t,r.decompress&&(t=(0,fd.default)(t));let s=t.statusCode,i=t;i.statusMessage=i.statusMessage??cC.STATUS_CODES[s],i.url=r.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=Dr(i),this._isFromCache=i.isFromCache,this._responseSize=Number(t.headers["content-length"])||void 0,this.response=i,t.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),t.once("error",u=>{this._aborted=!0,t.destroy(),this._beforeError(new $r(u,this))}),t.once("aborted",()=>{this._aborted=!0,this._beforeError(new $r({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=t.headers["set-cookie"];if(D.object(r.cookieJar)&&o){let u=o.map(async a=>r.cookieJar.setCookie(a,n.toString()));r.ignoreInvalidCookies&&(u=u.map(async a=>{try{await a}catch{}}));try{await Promise.all(u)}catch(a){this._beforeError(a);return}}if(!this.isAborted){if(r.followRedirect&&t.headers.location&&dC.has(s)){if(t.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=r.maxRedirects){this._beforeError(new Wn(this));return}this._request=void 0;let u=new Pe(void 0,void 0,this.options),a=s===303&&u.method!=="GET"&&u.method!=="HEAD",l=s!==307&&s!==308,f=u.methodRewriting&&l;(a||f)&&(u.method="GET",u.body=void 0,u.json=void 0,u.form=void 0,delete u.headers["content-length"]);try{let y=No.from(t.headers.location,"binary").toString(),p=new URL(y,n);if(!Ds(n)&&Ds(p)){this._beforeError(new W("Cannot redirect to UNIX socket",{},this));return}p.hostname!==n.hostname||p.port!==n.port?("host"in u.headers&&delete u.headers.host,"cookie"in u.headers&&delete u.headers.cookie,"authorization"in u.headers&&delete u.headers.authorization,(u.username||u.password)&&(u.username="",u.password="")):(p.username=u.username,p.password=u.password),this.redirectUrls.push(p),u.prefixUrl="",u.url=p;for(let m of u.hooks.beforeRedirect)await m(u,i);this.emit("redirect",u,i),this.options=u,await this._makeRequest()}catch(y){this._beforeError(y);return}return}if(r.isStream&&r.throwHttpErrors&&!Dr(i)){this._beforeError(new at(i));return}if(t.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{t.resume()}),this.on("pause",()=>{t.pause()}),t.once("end",()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit("response",t);return}this.emit("response",t);for(let u of this._pipedServerResponses)if(!u.headersSent){for(let a in t.headers){let l=r.decompress?a!=="content-encoding":!0,f=t.headers[a];l&&u.setHeader(a,f)}u.statusCode=s}}}async _setRawBody(t=this){if(t.readableEnded)return!1;try{let r=await lC(t);if(!this.isAborted)return this.response.rawBody=r,!0}catch{}return!1}async _onResponse(t){try{await this._onResponseBase(t)}catch(r){this._beforeError(r)}}_onRequest(t){let{options:r}=this,{timeout:n,url:s}=r;xf(t),this.options.http2&&t.setTimeout(0),this._cancelTimeouts=oo(t,n,s);let i=r.cache?"cacheableResponse":"response";t.once(i,o=>{this._onResponse(o)}),t.once("error",o=>{this._aborted=!0,t.destroy(),o=o instanceof Jr?new Zn(o,this.timings,this):new W(o.message,o,this),this._beforeError(o)}),this._unproxyEvents=Yr(t,this,DC),this._request=t,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",t)}async _asyncWrite(t){return new Promise((r,n)=>{super.write(t,s=>{if(s){n(s);return}r()})})}_sendBody(){let{body:t}=this.options,r=this.redirectUrls.length===0?this:this._request??this;D.nodeStream(t)?t.pipe(r):D.generator(t)||D.asyncGenerator(t)?(async()=>{try{for await(let n of t)await this._asyncWrite(n);super.end()}catch(n){this._beforeError(n)}})():D.undefined(t)?(this._cannotHaveBody||this._noPipe)&&r.end():(this._writeRequest(t,void 0,()=>{}),r.end())}_prepareCache(t){if(!Io.has(t)){let r=new If((n,s)=>{let i=n._request(n,s);return D.promise(i)&&(i.once=(o,u)=>{if(o==="error")(async()=>{try{await i}catch(a){u(a)}})();else if(o==="abort")(async()=>{try{(await i).once("abort",u)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${o}`);return i}),i},t);Io.set(t,r.request())}}async _createCacheableRequest(t,r){return new Promise((n,s)=>{Object.assign(r,uo(t));let i,o=Io.get(r.cache)(r,async u=>{if(u._readableState.autoDestroy=!1,i){let a=()=>{u.req&&(u.complete=u.req.res.complete)};u.prependOnceListener("end",a),a(),(await i).emit("cacheableResponse",u)}n(u)});o.once("error",s),o.once("request",async u=>{i=u,n(i)})})}async _makeRequest(){let{options:t}=this,{headers:r,username:n,password:s}=t,i=t.cookieJar;for(let l in r)if(D.undefined(r[l]))delete r[l];else if(D.null_(r[l]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${l}\` header`);if(t.decompress&&D.undefined(r["accept-encoding"])&&(r["accept-encoding"]=fC?"gzip, deflate, br":"gzip, deflate"),n||s){let l=No.from(`${n}:${s}`).toString("base64");r.authorization=`Basic ${l}`}if(i){let l=await i.getCookieString(t.url.toString());D.nonEmptyString(l)&&(r.cookie=l)}t.prefixUrl="";let o;for(let l of t.hooks.beforeRequest){let f=await l(t);if(!D.undefined(f)){o=()=>f;break}}o||(o=t.getRequestFunction());let u=t.url;this._requestOptions=t.createNativeRequestOptions(),t.cache&&(this._requestOptions._request=o,this._requestOptions.cache=t.cache,this._requestOptions.body=t.body,this._prepareCache(t.cache));let a=t.cache?this._createCacheableRequest:o;try{let l=a(u,this._requestOptions);D.promise(l)&&(l=await l),D.undefined(l)&&(l=t.getFallbackRequestFunction()(u,this._requestOptions),D.promise(l)&&(l=await l)),ad(l)?this._onRequest(l):this.writable?(this.once("finish",()=>{this._onResponse(l)}),this._sendBody()):this._onResponse(l)}catch(l){throw l instanceof Ze?new Vn(l,this):l}}async _error(t){try{if(!(t instanceof at&&!this.options.throwHttpErrors))for(let r of this.options.hooks.beforeError)t=await r(t)}catch(r){t=new W(r.message,r,this)}this.destroy(t)}_writeRequest(t,r,n){!this._request||this._request.destroyed||this._request.write(t,r,s=>{if(!s&&!this._request.destroyed){this._uploadedSize+=No.byteLength(t,r);let i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}n(s)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let t;return this._responseSize?t=this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?t=1:t=0,{percent:t,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let t;return this._bodySize?t=this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?t=1:t=0,{percent:t,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}};c();var ms=class extends W{constructor(t){super("Promise was canceled",{},t),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};var mC=["request","response","redirect","uploadProgress","downloadProgress"];function ys(e){let t,r,n,s=new pC,i=new or((u,a,l)=>{l(()=>{t.destroy()}),l.shouldReject=!1,l(()=>{a(new ms(t))});let f=y=>{l(()=>{});let p=e??new It(void 0,void 0,n);p.retryCount=y,p._noPipe=!0,t=p,p.once("response",async d=>{let E=(d.headers["content-encoding"]??"").toLowerCase(),F=E==="gzip"||E==="deflate"||E==="br",{options:A}=p;if(F&&!A.decompress)d.body=d.rawBody;else try{d.body=Ro(d,A.responseType,A.parseJson,A.encoding)}catch(x){if(d.body=d.rawBody.toString(),Dr(d)){p._beforeError(x);return}}try{let x=A.hooks.afterResponse;for(let[k,I]of x.entries())if(d=await I(d,async K=>{throw A.merge(K),A.prefixUrl="",K.url&&(A.url=K.url),A.hooks.afterResponse=A.hooks.afterResponse.slice(0,k),new Yn(p)}),!(D.object(d)&&D.number(d.statusCode)&&!D.nullOrUndefined(d.body)))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(x){p._beforeError(x);return}if(r=d,!Dr(d)){p._beforeError(new at(d));return}p.destroy(),u(p.options.resolveBodyOnly?d.body:d)});let m=d=>{if(i.isCanceled)return;let{options:E}=p;if(d instanceof at&&!E.throwHttpErrors){let{response:F}=d;p.destroy(),u(p.options.resolveBodyOnly?F.body:F);return}a(d)};p.once("error",m);let g=p.options?.body;p.once("retry",(d,E)=>{e=void 0;let F=p.options.body;if(g===F&&D.nodeStream(F)){E.message="Cannot retry with consumed body stream",m(E);return}n=p.options,f(d)}),Yr(p,s,mC),D.undefined(e)&&p.flush()};f(0)});i.on=(u,a)=>(s.on(u,a),i),i.off=(u,a)=>(s.off(u,a),i);let o=u=>{let a=(async()=>{await i;let{options:l}=r.request;return Ro(r,u,l.parseJson,l.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)),a};return i.json=()=>{if(t.options){let{headers:u}=t.options;!t.writableFinished&&!("accept"in u)&&(u.accept="application/json")}return o("json")},i.buffer=()=>o("buffer"),i.text=()=>o("text"),i}var yC=async e=>new Promise(t=>{setTimeout(t,e)}),gC=e=>D.function_(e),FC=["get","post","put","patch","head","delete"],dd=e=>{e={options:new Pe(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});let t=(n,s,i=e.options)=>{let o=new It(n,s,i),u,a=y=>(o.options=y,o._noPipe=!y.isStream,o.flush(),y.isStream?o:(u||(u=ys(o)),u)),l=0,f=y=>{let m=(e.handlers[l++]??a)(y,f);if(D.promise(m)&&!o.options.isStream&&(u||(u=ys(o)),m!==u)){let g=Object.getOwnPropertyDescriptors(u);for(let d in g)d in m&&delete g[d];Object.defineProperties(m,g),m.cancel=u.cancel}return m};return f(o.options)};t.extend=(...n)=>{let s=new Pe(void 0,void 0,e.options),i=[...e.handlers],o;for(let u of n)gC(u)?(s.merge(u.defaults.options),i.push(...u.defaults.handlers),o=u.defaults.mutableDefaults):(s.merge(u),u.handlers&&i.push(...u.handlers),o=u.mutableDefaults);return dd({options:s,handlers:i,mutableDefaults:!!o})};let r=async function*(n,s){let i=new Pe(n,s,e.options);i.resolveBodyOnly=!1;let{pagination:o}=i;C.function_(o.transform),C.function_(o.shouldContinue),C.function_(o.filter),C.function_(o.paginate),C.number(o.countLimit),C.number(o.requestLimit),C.number(o.backoff);let u=[],{countLimit:a}=o,l=0;for(;l<o.requestLimit;){l!==0&&await yC(o.backoff);let f=await t(void 0,void 0,i),y=await o.transform(f),p=[];C.array(y);for(let g of y)if(o.filter({item:g,currentItems:p,allItems:u})&&(!o.shouldContinue({item:g,currentItems:p,allItems:u})||(yield g,o.stackAllItems&&u.push(g),p.push(g),--a<=0)))return;let m=o.paginate({response:f,currentItems:p,allItems:u});if(m===!1)return;m===f.request.options?i=f.request.options:(i.merge(m),C.any([D.urlInstance,D.undefined],m.url),m.url!==void 0&&(i.prefixUrl="",i.url=m.url)),l++}};t.paginate=r,t.paginate.all=async(n,s)=>{let i=[];for await(let o of r(n,s))i.push(o);return i},t.paginate.each=r,t.stream=(n,s)=>t(n,{...s,isStream:!0});for(let n of FC)t[n]=(s,i)=>t(s,{...i,method:n}),t.stream[n]=(s,i)=>t(s,{...i,method:n,isStream:!0});return e.mutableDefaults||(Object.freeze(e.handlers),e.options.freeze()),Object.defineProperty(t,"defaults",{value:e,writable:!1,configurable:!1,enumerable:!0}),t},Dd=dd;var EC={options:new Pe,handlers:[],mutableDefaults:!1},q1=Dd(EC);import{inspect as vC}from"node:util";c();c();var CC=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),bC=new Map(CC),pd=bC;var wC=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],jo=new WeakSet,_C=e=>{jo.add(e);let t=e.toJSON();return jo.delete(e),t},xC=e=>pd.get(e)??Error,yd=({from:e,seen:t,to:r,forceEnumerable:n,maxDepth:s,depth:i,useToJSON:o,serialize:u})=>{if(!r)if(Array.isArray(e))r=[];else if(!u&&md(e)){let l=xC(e.name);r=new l}else r={};if(t.push(e),i>=s)return r;if(o&&typeof e.toJSON=="function"&&!jo.has(e))return _C(e);let a=l=>yd({from:l,seen:[...t],forceEnumerable:n,maxDepth:s,depth:i,useToJSON:o,serialize:u});for(let[l,f]of Object.entries(e)){if(f&&f instanceof Uint8Array&&f.constructor.name==="Buffer"){r[l]="[object Buffer]";continue}if(f!==null&&typeof f=="object"&&typeof f.pipe=="function"){r[l]="[object Stream]";continue}if(typeof f!="function"){if(!f||typeof f!="object"){try{r[l]=f}catch{}continue}if(!t.includes(e[l])){i++,r[l]=a(e[l]);continue}r[l]="[Circular]"}}for(let{property:l,enumerable:f}of wC)typeof e[l]<"u"&&e[l]!==null&&Object.defineProperty(r,l,{value:md(e[l])?a(e[l]):e[l],enumerable:n?!0:f,configurable:!0,writable:!0});return r};function gd(e,t={}){let{maxDepth:r=Number.POSITIVE_INFINITY,useToJSON:n=!0}=t;return typeof e=="object"&&e!==null?yd({from:e,seen:[],forceEnumerable:!0,maxDepth:r,depth:0,useToJSON:n,serialize:!0}):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e}function md(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}c();import Fd from"node:path";var $o=Fd.dirname(ll),SC=(...e)=>Fd.join($o,...e),sT=(...e)=>SC("assets",...e);var hT=(e,t)=>{let r={...e};for(let[n,s]of Object.entries(t))r[n]||(r[n]=s);return r};var Ed=(e,t)=>{let r={...e};for(let n of t)delete r[n];return r};var dT=e=>{Array.isArray(e)&&(e=e[0]);let t=gd(e);return typeof t=="string"&&(t={message:t}),t.stack&&(t.stack=ji(t.stack,{pretty:!0,basePath:$o}).replaceAll(/file:\/\/\//g,"")),e instanceof W&&(t.timings=void 0,t.options={method:e.options.method,url:e.options.url instanceof URL?e.options.url.toJSON():e.options.url},t.responseBody=vC(e.response?.body)),t};var sn=e=>!Zt(e)&&!Du(e),pr=(e,...t)=>{let r,n={ensureNewLine:!1,ensureEmptyLineAbove:!1,indent:0};return sn(e)?(r=e.content,n={...n,...Ed(e,["content"])}):Zt(e)?r=e:r=(0,Mo.dedent)(Ni(e,...t)),n.ensureEmptyLineAbove&&!r.startsWith(`
60
- `)&&(r=`
61
- `+r),n.ensureNewLine&&!r.endsWith(`
62
- `)&&(r+=`
63
- `),n.boxen&&(r=Ri(r,n.boxen)),n.indent&&n.indent>0&&(r=_i(r,n.indent)),r},CT=(e,...t)=>sn(e)?pr({ensureNewLine:!0,...e}):Zt(e)?pr({ensureNewLine:!0,content:e}):pr({ensureNewLine:!0,content:(0,Mo.dedent)(Ni(e,...t))});c();var Uo=(e,...t)=>{if(On.logFormat==="json"){sn(e)&&e.json&&wi.writeStdout(JSON.stringify(e.json)+`
64
- `);return}let r=pr(e,...t);wi.writeStdout(r)},AT=(e,...t)=>{sn(e)?Uo({ensureNewLine:!0,...e}):Zt(e)?Uo({ensureNewLine:!0,content:e}):Uo({ensureNewLine:!0,content:pr(e,...t)})};export{Qo as a,qe as b,ji as c,gr as d,M as e,KC as f,Zt as g,vt as h,XC as i,QC as j,eb as k,tb as l,rb as m,nb as n,sb as o,ib as p,ob as q,ub as r,ab as s,cb as t,lb as u,fb as v,at as w,q1 as x,gu as y,hc as z,Pn as A,$o as B,sT as C,hT as D,dT as E,Bn as F,ci as G,o0 as H,dl as I,Q2 as J,Ln as K,fl as L,ot as M,gl as N,C_ as O,On as P,P_ as Q,L_ as R,Cl as S,Pt as T,wi as U,Vl as V,Ri as W,_i as X,mf as Y,pr as Z,CT as _,AT as $};
65
- //# sourceMappingURL=chunk-GIAIN3IJ.js.map