@gadgetinc/ggt 1.1.0 → 1.3.0

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 (112) hide show
  1. package/README.md +4 -0
  2. package/dist/add-VYOF3CRL.js +78 -0
  3. package/dist/add-VYOF3CRL.js.map +7 -0
  4. package/dist/{chunk-FLXIAZND.js → chunk-3B5DKR5D.js} +2 -2
  5. package/dist/{chunk-FLXIAZND.js.map → chunk-3B5DKR5D.js.map} +4 -4
  6. package/dist/chunk-3V7YWBUK.js +2 -0
  7. package/dist/{chunk-BSCZOMV4.js.map → chunk-3V7YWBUK.js.map} +1 -1
  8. package/dist/chunk-B6XQEEUK.js +2 -0
  9. package/dist/chunk-B6XQEEUK.js.map +7 -0
  10. package/dist/chunk-CQH5IRAO.js +50 -0
  11. package/dist/chunk-CQH5IRAO.js.map +7 -0
  12. package/dist/{chunk-5ONACLO6.js → chunk-ENT5WEIR.js} +2 -2
  13. package/dist/chunk-FQ2LR3BI.js +6 -0
  14. package/dist/chunk-FQ2LR3BI.js.map +7 -0
  15. package/dist/chunk-J5XIQ6N4.js +187 -0
  16. package/dist/chunk-J5XIQ6N4.js.map +7 -0
  17. package/dist/chunk-JU6IEBE5.js +65 -0
  18. package/dist/chunk-JU6IEBE5.js.map +7 -0
  19. package/dist/{chunk-TRHAPK2F.js → chunk-LQDBD3BI.js} +4 -4
  20. package/dist/{chunk-TRHAPK2F.js.map → chunk-LQDBD3BI.js.map} +2 -2
  21. package/dist/chunk-P5OUQ5XQ.js +2 -0
  22. package/dist/chunk-SGMPMYEU.js +2 -0
  23. package/dist/chunk-SGMPMYEU.js.map +7 -0
  24. package/dist/chunk-VE2URKOG.js +117 -0
  25. package/dist/chunk-VE2URKOG.js.map +7 -0
  26. package/dist/{chunk-JKDJXJKF.js → chunk-WBESFPTY.js} +2 -2
  27. package/dist/chunk-YQO2R55C.js +18 -0
  28. package/dist/{chunk-M2OJZLL7.js.map → chunk-YQO2R55C.js.map} +3 -3
  29. package/dist/chunk-ZHG3WLFU.js +2 -0
  30. package/dist/chunk-ZHG3WLFU.js.map +7 -0
  31. package/dist/deploy-EEJCK2MG.js +25 -0
  32. package/dist/deploy-EEJCK2MG.js.map +7 -0
  33. package/dist/dev-G77WSGIC.js +58 -0
  34. package/dist/{dev-5UFCKF4X.js.map → dev-G77WSGIC.js.map} +4 -4
  35. package/dist/esm-3OYJEC4Z.js +36 -0
  36. package/dist/esm-3OYJEC4Z.js.map +7 -0
  37. package/dist/list-3AI2FD3F.js +11 -0
  38. package/dist/list-3AI2FD3F.js.map +7 -0
  39. package/dist/login-UGTNK3B3.js +2 -0
  40. package/dist/logout-CN5DL7Z2.js +7 -0
  41. package/dist/{logout-YXDH5ZZI.js.map → logout-CN5DL7Z2.js.map} +1 -1
  42. package/dist/main.js +10 -10
  43. package/dist/main.js.map +3 -3
  44. package/dist/open-PM56SR6Z.js +74 -0
  45. package/dist/open-PM56SR6Z.js.map +7 -0
  46. package/dist/{pull-UAKKKJJP.js → pull-TAW6KHZO.js} +4 -4
  47. package/dist/{pull-UAKKKJJP.js.map → pull-TAW6KHZO.js.map} +2 -2
  48. package/dist/push-2NCJSDGS.js +2 -0
  49. package/dist/status-WDYI4EOU.js +14 -0
  50. package/dist/status-WDYI4EOU.js.map +7 -0
  51. package/dist/{version-VE55GG37.js → version-3FBGIVXT.js} +2 -2
  52. package/dist/{version-VE55GG37.js.map → version-3FBGIVXT.js.map} +1 -1
  53. package/dist/whoami-UALRX2FT.js +7 -0
  54. package/dist/{whoami-OAH55L4M.js.map → whoami-UALRX2FT.js.map} +1 -1
  55. package/package.json +19 -18
  56. package/dist/add-RDTHYTCK.js +0 -78
  57. package/dist/add-RDTHYTCK.js.map +0 -7
  58. package/dist/build-4BGA4IZE.js +0 -3
  59. package/dist/build-4BGA4IZE.js.map +0 -7
  60. package/dist/chunk-3Q3GPB6Z.js +0 -2
  61. package/dist/chunk-3Q3GPB6Z.js.map +0 -7
  62. package/dist/chunk-457GEPUN.js +0 -9
  63. package/dist/chunk-457GEPUN.js.map +0 -7
  64. package/dist/chunk-57XALM2W.js +0 -2
  65. package/dist/chunk-57XALM2W.js.map +0 -7
  66. package/dist/chunk-5WC5D4WL.js +0 -2
  67. package/dist/chunk-5WC5D4WL.js.map +0 -7
  68. package/dist/chunk-BSCZOMV4.js +0 -2
  69. package/dist/chunk-CQLM5U6T.js +0 -67
  70. package/dist/chunk-CQLM5U6T.js.map +0 -7
  71. package/dist/chunk-D2K5XPNJ.js +0 -2
  72. package/dist/chunk-D2K5XPNJ.js.map +0 -7
  73. package/dist/chunk-F3EZ4KS3.js +0 -2
  74. package/dist/chunk-F3EZ4KS3.js.map +0 -7
  75. package/dist/chunk-GOBNB5VT.js +0 -2
  76. package/dist/chunk-GOBNB5VT.js.map +0 -7
  77. package/dist/chunk-HKBXEZNF.js +0 -2
  78. package/dist/chunk-LWW4E6P5.js +0 -173
  79. package/dist/chunk-LWW4E6P5.js.map +0 -7
  80. package/dist/chunk-M2OJZLL7.js +0 -18
  81. package/dist/chunk-M4PNFOA5.js +0 -6
  82. package/dist/chunk-M4PNFOA5.js.map +0 -7
  83. package/dist/chunk-NGTOMLDS.js +0 -33
  84. package/dist/chunk-NGTOMLDS.js.map +0 -7
  85. package/dist/chunk-RYQWS5BH.js +0 -117
  86. package/dist/chunk-RYQWS5BH.js.map +0 -7
  87. package/dist/chunk-VICN6LTV.js +0 -12
  88. package/dist/chunk-VICN6LTV.js.map +0 -7
  89. package/dist/context-GN36UFJL.js +0 -2
  90. package/dist/deploy-BAMMI3ZA.js +0 -24
  91. package/dist/deploy-BAMMI3ZA.js.map +0 -7
  92. package/dist/dev-5UFCKF4X.js +0 -55
  93. package/dist/esm-GJ7RK6IC.js +0 -34
  94. package/dist/esm-GJ7RK6IC.js.map +0 -7
  95. package/dist/list-WGRXHV2B.js +0 -11
  96. package/dist/list-WGRXHV2B.js.map +0 -7
  97. package/dist/login-5YZOB4XB.js +0 -2
  98. package/dist/logout-YXDH5ZZI.js +0 -7
  99. package/dist/open-EOH3Q5KP.js +0 -74
  100. package/dist/open-EOH3Q5KP.js.map +0 -7
  101. package/dist/push-7X4P2364.js +0 -2
  102. package/dist/push-7X4P2364.js.map +0 -7
  103. package/dist/status-UJUGP24U.js +0 -14
  104. package/dist/status-UJUGP24U.js.map +0 -7
  105. package/dist/user-B2RIDVTH.js +0 -2
  106. package/dist/user-B2RIDVTH.js.map +0 -7
  107. package/dist/whoami-OAH55L4M.js +0 -7
  108. /package/dist/{chunk-5ONACLO6.js.map → chunk-ENT5WEIR.js.map} +0 -0
  109. /package/dist/{chunk-HKBXEZNF.js.map → chunk-P5OUQ5XQ.js.map} +0 -0
  110. /package/dist/{chunk-JKDJXJKF.js.map → chunk-WBESFPTY.js.map} +0 -0
  111. /package/dist/{context-GN36UFJL.js.map → login-UGTNK3B3.js.map} +0 -0
  112. /package/dist/{login-5YZOB4XB.js.map → push-2NCJSDGS.js.map} +0 -0
@@ -1,67 +0,0 @@
1
- import{h as Ed,i as Cd}from"./chunk-GOBNB5VT.js";import{a as O,c as b,e as be,g as c}from"./chunk-5WC5D4WL.js";var ie=b(Os=>{"use strict";c();Os.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})};Os.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 wu=b((Xb,bu)=>{c();var Xe=O("constants"),ip=process.cwd,yn=null,op=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return yn||(yn=ip.call(process)),yn};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Bs=process.chdir,process.chdir=function(e){yn=null,Bs.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Bs));var Bs;bu.exports=up;function up(e){Xe.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(){}),op==="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")&&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,Xe.O_WRONLY|Xe.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,Xe.O_WRONLY|Xe.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){Xe.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(y,p,m,g){f.open(y,Xe.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,Xe.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 vu=b((tw,xu)=>{c();var _u=O("stream").Stream;xu.exports=ap;function ap(e){return{ReadStream:t,WriteStream:r};function t(n,s){if(!(this instanceof t))return new t(n,s);_u.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);_u.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 Au=b((nw,Su)=>{"use strict";c();Su.exports=lp;var cp=Object.getPrototypeOf||function(e){return e.__proto__};function lp(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:cp(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Qt=b((iw,Rs)=>{c();var ee=O("fs"),fp=wu(),hp=vu(),dp=Au(),gn=O("util"),le,En;typeof Symbol=="function"&&typeof Symbol.for=="function"?(le=Symbol.for("graceful-fs.queue"),En=Symbol.for("graceful-fs.previous")):(le="___graceful-fs.queue",En="___graceful-fs.previous");function Dp(){}function Ou(e,t){Object.defineProperty(e,le,{get:function(){return t}})}var At=Dp;gn.debuglog?At=gn.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(At=function(){var e=gn.format.apply(gn,arguments);e="GFS4: "+e.split(/\n/).join(`
2
- GFS4: `),console.error(e)});ee[le]||(Tu=global[le]||[],Ou(ee,Tu),ee.close=function(e){function t(r,n){return e.call(ee,r,function(s){s||ku(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,En,{value:e}),t}(ee.close),ee.closeSync=function(e){function t(r){e.apply(ee,arguments),ku()}return Object.defineProperty(t,En,{value:e}),t}(ee.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){At(ee[le]),O("assert").equal(ee[le].length,0)}));var Tu;global[le]||Ou(global,ee[le]);Rs.exports=Ps(dp(ee));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ee.__patched&&(Rs.exports=Ps(ee),ee.__patched=!0);function Ps(e){fp(e),e.gracefulify=Ps,e.createReadStream=I,e.createWriteStream=K;var t=e.readFile;e.readFile=r;function r(B,$,U){return typeof $=="function"&&(U=$,$=null),ue(B,$,U);function ue(ae,se,Q,te){return t(ae,se,function(z){z&&(z.code==="EMFILE"||z.code==="ENFILE")?Kt([ue,[ae,se,Q],z,te||Date.now(),Date.now()]):typeof Q=="function"&&Q.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=s;function s(B,$,U,ue){return typeof U=="function"&&(ue=U,U=null),ae(B,$,U,ue);function ae(se,Q,te,z,ce){return n(se,Q,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Kt([ae,[se,Q,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(B,$,U,ue){return typeof U=="function"&&(ue=U,U=null),ae(B,$,U,ue);function ae(se,Q,te,z,ce){return i(se,Q,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Kt([ae,[se,Q,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(B,$,U,ue){return typeof U=="function"&&(ue=U,U=0),ae(B,$,U,ue);function ae(se,Q,te,z,ce){return u(se,Q,te,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Kt([ae,[se,Q,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(B,$,U){typeof $=="function"&&(U=$,$=null);var ue=f.test(process.version)?function(Q,te,z,ce){return l(Q,ae(Q,te,z,ce))}:function(Q,te,z,ce){return l(Q,te,ae(Q,te,z,ce))};return ue(B,$,U);function ae(se,Q,te,z){return function(ce,Z){ce&&(ce.code==="EMFILE"||ce.code==="ENFILE")?Kt([ue,[se,Q,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=hp(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(B){F=B},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return x},set:function(B){x=B},enumerable:!0,configurable:!0});var d=F;Object.defineProperty(e,"FileReadStream",{get:function(){return d},set:function(B){d=B},enumerable:!0,configurable:!0});var E=x;Object.defineProperty(e,"FileWriteStream",{get:function(){return E},set:function(B){E=B},enumerable:!0,configurable:!0});function F(B,$){return this instanceof F?(m.apply(this,arguments),this):F.apply(Object.create(F.prototype),arguments)}function A(){var B=this;Ie(B.path,B.flags,B.mode,function($,U){$?(B.autoClose&&B.destroy(),B.emit("error",$)):(B.fd=U,B.emit("open",U),B.read())})}function x(B,$){return this instanceof x?(g.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function k(){var B=this;Ie(B.path,B.flags,B.mode,function($,U){$?(B.destroy(),B.emit("error",$)):(B.fd=U,B.emit("open",U))})}function I(B,$){return new e.ReadStream(B,$)}function K(B,$){return new e.WriteStream(B,$)}var ne=e.open;e.open=Ie;function Ie(B,$,U,ue){return typeof U=="function"&&(ue=U,U=null),ae(B,$,U,ue);function ae(se,Q,te,z,ce){return ne(se,Q,te,function(Z,SC){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Kt([ae,[se,Q,te,z],Z,ce||Date.now(),Date.now()]):typeof z=="function"&&z.apply(this,arguments)})}}return e}function Kt(e){At("ENQUEUE",e[0].name,e[1]),ee[le].push(e),Ls()}var Fn;function ku(){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);Ls()}function Ls(){if(clearTimeout(Fn),Fn=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)}Fn===void 0&&(Fn=setTimeout(Ls,0))}}});var ye=b(We=>{"use strict";c();var Bu=ie().fromCallback,me=Qt(),pp=["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);pp.forEach(e=>{We[e]=Bu(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=Bu(me.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Lu=b((cw,Pu)=>{"use strict";c();var mp=O("path");Pu.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(mp.parse(t).root,""))){let n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}}});var ju=b((fw,Ns)=>{"use strict";c();var Ru=ye(),{checkPath:Nu}=Lu(),Iu=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};Ns.exports.makeDir=async(e,t)=>(Nu(e),Ru.mkdir(e,{mode:Iu(t),recursive:!0}));Ns.exports.makeDirSync=(e,t)=>(Nu(e),Ru.mkdirSync(e,{mode:Iu(t),recursive:!0}))});var Le=b((dw,$u)=>{"use strict";c();var yp=ie().fromPromise,{makeDir:gp,makeDirSync:Is}=ju(),js=yp(gp);$u.exports={mkdirs:js,mkdirsSync:Is,mkdirp:js,mkdirpSync:Is,ensureDir:js,ensureDirSync:Is}});var et=b((pw,qu)=>{"use strict";c();var Fp=ie().fromPromise,Mu=ye();function Ep(e){return Mu.access(e).then(()=>!0).catch(()=>!1)}qu.exports={pathExists:Fp(Ep),pathExistsSync:Mu.existsSync}});var $s=b((yw,Uu)=>{"use strict";c();var Xt=ye(),Cp=ie().fromPromise;async function bp(e,t,r){let n=await Xt.open(e,"r+"),s=null;try{await Xt.futimes(n,t,r)}finally{try{await Xt.close(n)}catch(i){s=i}}if(s)throw s}function wp(e,t,r){let n=Xt.openSync(e,"r+");return Xt.futimesSync(n,t,r),Xt.closeSync(n)}Uu.exports={utimesMillis:Cp(bp),utimesMillisSync:wp}});var Tt=b((Fw,Wu)=>{"use strict";c();var er=ye(),oe=O("path"),Gu=ie().fromPromise;function _p(e,t,r){let n=r.dereference?s=>er.stat(s,{bigint:!0}):s=>er.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 xp(e,t,r){let n,s=r.dereference?o=>er.statSync(o,{bigint:!0}):o=>er.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 vp(e,t,r,n){let{srcStat:s,destStat:i}=await _p(e,t,n);if(i){if(Sr(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(Cn(e,t,r));return{srcStat:s,destStat:i}}function Sp(e,t,r,n){let{srcStat:s,destStat:i}=xp(e,t,n);if(i){if(Sr(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(Cn(e,t,r));return{srcStat:s,destStat:i}}async function Hu(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 er.stat(i,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(Sr(t,o))throw new Error(Cn(e,r,n));return Hu(e,t,i,n)}function zu(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=er.statSync(i,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(Sr(t,o))throw new Error(Cn(e,r,n));return zu(e,t,i,n)}function Sr(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 Cn(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}Wu.exports={checkPaths:Gu(vp),checkPathsSync:Sp,checkParentPaths:Gu(Hu),checkParentPathsSync:zu,isSrcSubdir:Ms,areIdentical:Sr}});var Ku=b((Cw,Ju)=>{"use strict";c();var De=ye(),Ar=O("path"),{mkdirs:Ap}=Le(),{pathExists:Tp}=et(),{utimesMillis:kp}=$s(),Tr=Tt();async function Op(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 Tp(o)||await Ap(o),await Yu(s,e,t,r)}async function Zu(e,t,r){return r.filter?r.filter(e,t):!0}async function Yu(e,t,r,n){let i=await(n.dereference?De.stat:De.lstat)(t);if(i.isDirectory())return Rp(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Bp(i,e,t,r,n);if(i.isSymbolicLink())return Np(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 Bp(e,t,r,n,s){if(!t)return Vu(e,r,n,s);if(s.overwrite)return await De.unlink(n),Vu(e,r,n,s);if(s.errorOnExist)throw new Error(`'${n}' already exists`)}async function Vu(e,t,r,n){if(await De.copyFile(t,r),n.preserveTimestamps){Pp(e.mode)&&await Lp(r,e.mode);let s=await De.stat(t);await kp(r,s.atime,s.mtime)}return De.chmod(r,e.mode)}function Pp(e){return(e&128)===0}function Lp(e,t){return De.chmod(e,t|128)}async function Rp(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 Yu(f,u,a,s)})),t||await De.chmod(n,e.mode)}async function Np(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)}Ju.exports=Op});var ra=b((ww,ta)=>{"use strict";c();var ge=Qt(),kr=O("path"),Ip=Le().mkdirsSync,jp=$s().utimesMillisSync,Or=Tt();function $p(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}=Or.checkPathsSync(e,t,"copy",r);if(Or.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;let i=kr.dirname(t);return ge.existsSync(i)||Ip(i),Qu(s,e,t,r)}function Qu(e,t,r,n){let i=(n.dereference?ge.statSync:ge.lstatSync)(t);if(i.isDirectory())return Wp(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Mp(i,e,t,r,n);if(i.isSymbolicLink())return Yp(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 Mp(e,t,r,n,s){return t?qp(e,r,n,s):Xu(e,r,n,s)}function qp(e,t,r,n){if(n.overwrite)return ge.unlinkSync(r),Xu(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function Xu(e,t,r,n){return ge.copyFileSync(t,r),n.preserveTimestamps&&Up(e.mode,t,r),qs(r,e.mode)}function Up(e,t,r){return Gp(e)&&Hp(r,e),zp(t,r)}function Gp(e){return(e&128)===0}function Hp(e,t){return qs(e,t|128)}function qs(e,t){return ge.chmodSync(e,t)}function zp(e,t){let r=ge.statSync(e);return jp(t,r.atime,r.mtime)}function Wp(e,t,r,n,s){return t?ea(r,n,s):Vp(e.mode,r,n,s)}function Vp(e,t,r,n){return ge.mkdirSync(r),ea(t,r,n),qs(r,e)}function ea(e,t,r){ge.readdirSync(e).forEach(n=>Zp(n,e,t,r))}function Zp(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}=Or.checkPathsSync(s,i,"copy",n);return Qu(o,s,i,n)}function Yp(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)),Or.isSrcSubdir(s,i))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${i}'.`);if(Or.isSrcSubdir(i,s))throw new Error(`Cannot overwrite '${i}' with '${s}'.`);return Jp(s,r)}else return ge.symlinkSync(s,r)}function Jp(e,t){return ge.unlinkSync(t),ge.symlinkSync(e,t)}ta.exports=$p});var bn=b((xw,na)=>{"use strict";c();var Kp=ie().fromPromise;na.exports={copy:Kp(Ku()),copySync:ra()}});var Br=b((Sw,ia)=>{"use strict";c();var sa=Qt(),Qp=ie().fromCallback;function Xp(e,t){sa.rm(e,{recursive:!0,force:!0},t)}function em(e){sa.rmSync(e,{recursive:!0,force:!0})}ia.exports={remove:Qp(Xp),removeSync:em}});var da=b((Tw,ha)=>{"use strict";c();var tm=ie().fromPromise,aa=ye(),ca=O("path"),la=Le(),fa=Br(),oa=tm(async function(t){let r;try{r=await aa.readdir(t)}catch{return la.mkdirs(t)}return Promise.all(r.map(n=>fa.remove(ca.join(t,n))))});function ua(e){let t;try{t=aa.readdirSync(e)}catch{return la.mkdirsSync(e)}t.forEach(r=>{r=ca.join(e,r),fa.removeSync(r)})}ha.exports={emptyDirSync:ua,emptydirSync:ua,emptyDir:oa,emptydir:oa}});var ya=b((Ow,ma)=>{"use strict";c();var rm=ie().fromPromise,Da=O("path"),Ve=ye(),pa=Le();async function nm(e){let t;try{t=await Ve.stat(e)}catch{}if(t&&t.isFile())return;let r=Da.dirname(e),n=null;try{n=await Ve.stat(r)}catch(s){if(s.code==="ENOENT"){await pa.mkdirs(r),await Ve.writeFile(e,"");return}else throw s}n.isDirectory()?await Ve.writeFile(e,""):await Ve.readdir(r)}function sm(e){let t;try{t=Ve.statSync(e)}catch{}if(t&&t.isFile())return;let r=Da.dirname(e);try{Ve.statSync(r).isDirectory()||Ve.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")pa.mkdirsSync(r);else throw n}Ve.writeFileSync(e,"")}ma.exports={createFile:rm(nm),createFileSync:sm}});var ba=b((Pw,Ca)=>{"use strict";c();var im=ie().fromPromise,ga=O("path"),tt=ye(),Fa=Le(),{pathExists:om}=et(),{areIdentical:Ea}=Tt();async function um(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&&Ea(n,r))return;let s=ga.dirname(t);await om(s)||await Fa.mkdirs(s),await tt.link(e,t)}function am(e,t){let r;try{r=tt.lstatSync(t)}catch{}try{let i=tt.lstatSync(e);if(r&&Ea(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=ga.dirname(t);return tt.existsSync(n)||Fa.mkdirsSync(n),tt.linkSync(e,t)}Ca.exports={createLink:im(um),createLinkSync:am}});var _a=b((Rw,wa)=>{"use strict";c();var rt=O("path"),Pr=ye(),{pathExists:cm}=et(),lm=ie().fromPromise;async function fm(e,t){if(rt.isAbsolute(e)){try{await Pr.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 cm(n))return{toCwd:n,toDst:e};try{await Pr.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:rt.relative(r,e)}}function hm(e,t){if(rt.isAbsolute(e)){if(!Pr.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(Pr.existsSync(n))return{toCwd:n,toDst:e};if(!Pr.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:rt.relative(r,e)}}wa.exports={symlinkPaths:lm(fm),symlinkPathsSync:hm}});var Sa=b((Iw,va)=>{"use strict";c();var xa=ye(),dm=ie().fromPromise;async function Dm(e,t){if(t)return t;let r;try{r=await xa.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function pm(e,t){if(t)return t;let r;try{r=xa.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}va.exports={symlinkType:dm(Dm),symlinkTypeSync:pm}});var Oa=b(($w,ka)=>{"use strict";c();var mm=ie().fromPromise,Aa=O("path"),Me=ye(),{mkdirs:ym,mkdirsSync:gm}=Le(),{symlinkPaths:Fm,symlinkPathsSync:Em}=_a(),{symlinkType:Cm,symlinkTypeSync:bm}=Sa(),{pathExists:wm}=et(),{areIdentical:Ta}=Tt();async function _m(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(Ta(u,a))return}let s=await Fm(e,t);e=s.toDst;let i=await Cm(s.toCwd,r),o=Aa.dirname(t);return await wm(o)||await ym(o),Me.symlink(e,t,i)}function xm(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(Ta(u,a))return}let s=Em(e,t);e=s.toDst,r=bm(s.toCwd,r);let i=Aa.dirname(t);return Me.existsSync(i)||gm(i),Me.symlinkSync(e,t,r)}ka.exports={createSymlink:mm(_m),createSymlinkSync:xm}});var $a=b((qw,ja)=>{"use strict";c();var{createFile:Ba,createFileSync:Pa}=ya(),{createLink:La,createLinkSync:Ra}=ba(),{createSymlink:Na,createSymlinkSync:Ia}=Oa();ja.exports={createFile:Ba,createFileSync:Pa,ensureFile:Ba,ensureFileSync:Pa,createLink:La,createLinkSync:Ra,ensureLink:La,ensureLinkSync:Ra,createSymlink:Na,createSymlinkSync:Ia,ensureSymlink:Na,ensureSymlinkSync:Ia}});var wn=b((Gw,Ma)=>{c();function vm(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 Sm(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Ma.exports={stringify:vm,stripBom:Sm}});var Ha=b((zw,Ga)=>{c();var tr;try{tr=Qt()}catch{tr=O("fs")}var _n=ie(),{stringify:qa,stripBom:Ua}=wn();async function Am(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||tr,n="throws"in t?t.throws:!0,s=await _n.fromCallback(r.readFile)(e,t);s=Ua(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 Tm=_n.fromPromise(Am);function km(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||tr,n="throws"in t?t.throws:!0;try{let s=r.readFileSync(e,t);return s=Ua(s),JSON.parse(s,t.reviver)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}}async function Om(e,t,r={}){let n=r.fs||tr,s=qa(t,r);await _n.fromCallback(n.writeFile)(e,s,r)}var Bm=_n.fromPromise(Om);function Pm(e,t,r={}){let n=r.fs||tr,s=qa(t,r);return n.writeFileSync(e,s,r)}var Lm={readFile:Tm,readFileSync:km,writeFile:Bm,writeFileSync:Pm};Ga.exports=Lm});var Wa=b((Vw,za)=>{"use strict";c();var xn=Ha();za.exports={readJson:xn.readFile,readJsonSync:xn.readFileSync,writeJson:xn.writeFile,writeJsonSync:xn.writeFileSync}});var vn=b((Yw,Ya)=>{"use strict";c();var Rm=ie().fromPromise,Us=ye(),Va=O("path"),Za=Le(),Nm=et().pathExists;async function Im(e,t,r="utf-8"){let n=Va.dirname(e);return await Nm(n)||await Za.mkdirs(n),Us.writeFile(e,t,r)}function jm(e,...t){let r=Va.dirname(e);Us.existsSync(r)||Za.mkdirsSync(r),Us.writeFileSync(e,...t)}Ya.exports={outputFile:Rm(Im),outputFileSync:jm}});var Ka=b((Kw,Ja)=>{"use strict";c();var{stringify:$m}=wn(),{outputFile:Mm}=vn();async function qm(e,t,r={}){let n=$m(t,r);await Mm(e,n,r)}Ja.exports=qm});var Xa=b((Xw,Qa)=>{"use strict";c();var{stringify:Um}=wn(),{outputFileSync:Gm}=vn();function Hm(e,t,r){let n=Um(t,r);Gm(e,n,r)}Qa.exports=Hm});var tc=b((t_,ec)=>{"use strict";c();var zm=ie().fromPromise,Fe=Wa();Fe.outputJson=zm(Ka());Fe.outputJsonSync=Xa();Fe.outputJSON=Fe.outputJson;Fe.outputJSONSync=Fe.outputJsonSync;Fe.writeJSON=Fe.writeJson;Fe.writeJSONSync=Fe.writeJsonSync;Fe.readJSON=Fe.readJson;Fe.readJSONSync=Fe.readJsonSync;ec.exports=Fe});var oc=b((n_,ic)=>{"use strict";c();var Wm=ye(),rc=O("path"),{copy:Vm}=bn(),{remove:sc}=Br(),{mkdirp:Zm}=Le(),{pathExists:Ym}=et(),nc=Tt();async function Jm(e,t,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=await nc.checkPaths(e,t,"move",r);await nc.checkParentPaths(e,s,t,"move");let o=rc.dirname(t);return rc.parse(o).root!==o&&await Zm(o),Km(e,t,n,i)}async function Km(e,t,r,n){if(!n){if(r)await sc(t);else if(await Ym(t))throw new Error("dest already exists.")}try{await Wm.rename(e,t)}catch(s){if(s.code!=="EXDEV")throw s;await Qm(e,t,r)}}async function Qm(e,t,r){return await Vm(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),sc(e)}ic.exports=Jm});var fc=b((i_,lc)=>{"use strict";c();var ac=Qt(),Hs=O("path"),Xm=bn().copySync,cc=Br().removeSync,ey=Le().mkdirpSync,uc=Tt();function ty(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:s,isChangingCase:i=!1}=uc.checkPathsSync(e,t,"move",r);return uc.checkParentPathsSync(e,s,t,"move"),ry(t)||ey(Hs.dirname(t)),ny(e,t,n,i)}function ry(e){let t=Hs.dirname(e);return Hs.parse(t).root===t}function ny(e,t,r,n){if(n)return Gs(e,t,r);if(r)return cc(t),Gs(e,t,r);if(ac.existsSync(t))throw new Error("dest already exists.");return Gs(e,t,r)}function Gs(e,t,r){try{ac.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return sy(e,t,r)}}function sy(e,t,r){return Xm(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),cc(e)}lc.exports=ty});var dc=b((u_,hc)=>{"use strict";c();var iy=ie().fromPromise;hc.exports={move:iy(oc()),moveSync:fc()}});var pc=b((c_,Dc)=>{"use strict";c();Dc.exports={...ye(),...bn(),...da(),...$a(),...tc(),...Le(),...dc(),...vn(),...et(),...Br()}});var zs=b((f_,oy)=>{oy.exports=["0BSD","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","AMDPLPA","AML","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","Abstyles","Adobe-2006","Adobe-Glyph","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","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-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-Protection","BSD-Source-Code","BSL-1.0","BUSL-1.1","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","BlueOak-1.0.0","Borceux","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-DE","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-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-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","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","ClArtistic","Community-Spec-1.0","Condor-1.1","Crossword","CrystalStacker","Cube","D-FSL-1.0","DOC","DRL-1.0","DSDP","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","Entessa","ErlPL-1.1","Eurosym","FDK-AAC","FSFAP","FSFUL","FSFULLR","FTL","Fair","Frameworx-1.0","FreeBSD-DOC","FreeImage","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","HPND","HPND-sell-variant","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IJG","IPA","IPL-1.0","ISC","ImageMagick","Imlib2","Info-ZIP","Intel","Intel-ACPI","Interbase-1.0","JPNIC","JSON","JasPer-2.0","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","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","Latex2e","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-copyleft","MIT","MIT-0","MIT-CMU","MIT-Modern-Variant","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MITNFA","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-PL","MS-RL","MTLL","MakeIndex","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCGL-UK-2.0","NCSA","NGPL","NIST-PD","NIST-PD-fallback","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","NTP-0","Naumen","Net-SNMP","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","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","OML","OPL-1.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenSSL","PDDL-1.0","PHP-3.0","PHP-3.01","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","QPL-1.0","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","SAX-PD","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SMLNJ","SMPPL","SNIA","SPL-1.0","SSH-OpenSSH","SSH-short","SSPL-1.0","SWL","Saxpath","Sendmail","Sendmail-8.23","SimPL-2.0","Sleepycat","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","TAPR-OHL-1.0","TCL","TCP-wrappers","TMate","TORQUE-1.1","TOSL","TU-Berlin-1.0","TU-Berlin-2.0","UCL-1.0","UPL-1.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","Unlicense","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Wsuipa","X11","XFree86-1.1","XSkat","Xerox","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","blessing","bzip2-1.0.5","bzip2-1.0.6","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","diffmark","dvipdfm","eGenix","etalab-2.0","gSOAP-1.3b","gnuplot","iMatix","libpng-2.0","libselinux-1.0","libtiff","mpich2","psfrag","psutils","xinetd","xpp","zlib-acknowledgement"]});var mc=b((h_,uy)=>{uy.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","Nunit","StandardML-NJ","eCos-2.0","wxWindows"]});var yc=b((d_,ay)=>{ay.exports=["389-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-3.1","gnu-javamail-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","i2p-gpl-java-exception","Libtool-exception","Linux-syscall-note","LLVM-exception","LZMA-exception","mif-exception","Nokia-Qt-exception-1.1","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","Swift-exception","u-boot-exception-2.0","Universal-FOSS-exception-1.0","WxWindows-exception-3.1"]});var Fc=b((D_,gc)=>{"use strict";c();var cy=[].concat(zs()).concat(mc()),ly=yc();gc.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(cy.indexOf(d)!==-1)return{type:"LICENSE",string:d};if(ly.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 Cc=b((m_,Ec)=>{"use strict";c();Ec.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((g_,bc)=>{"use strict";c();var fy=Fc(),hy=Cc();bc.exports=function(e){return hy(fy(e))}});var kc=b((E_,Tc)=>{c();var dy=Ws(),Dy=zs();function Sn(e){try{return dy(e),!0}catch{return!1}}var wc=[["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/GPL","GPL"],["GNU GLP","GPL"],["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"],["-License",""]],py=0,my=1,_c=[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=Dy.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},{}),yy=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 xc=[["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(yy),gy=0,Fy=1,vc=function(e){for(var t=0;t<_c.length;t++){var r=_c[t](e).trim();if(r!==e&&Sn(r))return r}return null},Sc=function(e){for(var t=e.toUpperCase(),r=0;r<xc.length;r++){var n=xc[r];if(t.indexOf(n[gy])>-1)return n[Fy]}return null},Ac=function(e,t){for(var r=0;r<wc.length;r++){var n=wc[r],s=n[py];if(e.indexOf(s)>-1){var i=e.replace(s,n[my]),o=t(i);if(o!==null)return o}}return null};Tc.exports=function(e,t){t=t||{};var r=t.upgrade===void 0?!0:!!t.upgrade;function n(u){return r?Ey(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=vc(e);return o!==null||(o=Ac(e,function(u){return Sn(u)?u:vc(u)}),o!==null)||(o=Sc(e),o!==null)||(o=Ac(e,Sc),o!==null)?n(o):null};function Ey(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((b_,Pc)=>{c();var Cy=Ws(),by=kc(),Oc='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',wy=/^SEE LICEN[CS]E IN (.+)$/;function Bc(e,t){return t.slice(0,e.length)===e}function Zs(e){if(e.hasOwnProperty("license")){var t=e.license;return Bc("LicenseRef",t)||Bc("DocumentRef",t)}else return Zs(e.left)||Zs(e.right)}Pc.exports=function(e){var t;try{t=Cy(e)}catch{var r;if(e==="UNLICENSED"||e==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(r=wy.exec(e))return{validForOldPackages:!0,validForNewPackages:!0,inFile:r[1]};var n={validForOldPackages:!1,validForNewPackages:!1,warnings:[Oc]};if(e.trim().length!==0){var s=by(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:[Oc]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var $c=b(Tn=>{"use strict";c();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.LRUCache=void 0;var rr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Nc=new Set,Ys=typeof process=="object"&&process?process:{},Ic=(e,t,r,n)=>{typeof Ys.emitWarning=="function"?Ys.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},An=globalThis.AbortController,Rc=globalThis.AbortSignal;if(typeof An>"u"){Rc=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},An=class{constructor(){t()}signal=new Rc;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,Ic("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 _y=e=>!Nc.has(e),v_=Symbol("type"),nt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),jc=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?nr:null:null,nr=class extends Array{constructor(t){super(t),this.fill(0)}},Js=class e{heap;length;static#r=!1;static create(t){let r=jc(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.#L(r,n,s,i),moveToTail:r=>t.#O(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?jc(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.#q()}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";_y(Ie)&&(Nc.add(Ie),Ic("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 nr(this.#r),r=new nr(this.#r);this.#m=t,this.#C=r,this.#N=(i,o,u=rr.now())=>{if(r[i]=o!==0?u:0,t[i]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#y(i)&&this.#v(this.#o[i],"expire")},o+1);a.unref&&a.unref()}},this.#T=i=>{r[i]=t[i]!==0?rr.now():0},this.#S=(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=rr.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=()=>{};#S=()=>{};#N=()=>{};#y=()=>!1;#q(){let t=new nr(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.#B=(r,n,s)=>{if(t[r]=n,this.#n){let i=this.#n-t[r];for(;this.#D>i;)this.#P(!0)}this.#D+=t[r],s&&(s.entrySize=n,s.totalCalculatedSize=this.#D)}}#k=t=>{};#B=(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.#v(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-(rr.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=rr.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=rr.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.#v(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.#P(!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.#B(y,f,a),a&&(a.set="add"),l=!1;else{this.#O(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.#B(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.#S(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.#P(!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)}}}#P(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.#S(s,i));else return n&&this.#T(i),s&&(s.has="hit",this.#S(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}#L(t,r,n,s){let i=r===void 0?void 0:this.#t[r];if(this.#s(i))return i;let o=new An,{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.#v(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.#v(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 An}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.#L(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.#O(k),s&&this.#T(k),F&&this.#S(F,k),I;let ne=this.#L(t,k,x,d),B=ne.__staleWhileFetching!==void 0&&n;return F&&(F.fetch=K?"stale":"refresh",B&&K&&(F.returnedStale=!0)),B?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.#S(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.#v(t,"expire"),o&&n&&(o.returnedStale=!0),n?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#O(u),s&&this.#T(u),a))}else o&&(o.get="miss")}#$(t,r){this.#p[r]=t,this.#h[t]=r}#O(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.#v(t,"delete")}#v(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)}}};Tn.LRUCache=Ks});var Uc=b((T_,qc)=>{"use strict";c();var q=(...e)=>e.every(t=>t)?e.join(""):"",re=e=>e?encodeURIComponent(e):"",Mc=e=>e.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),xy={sshtemplate:({domain:e,user:t,project:r,committish:n})=>`git@${e}:${t}/${r}.git${q("#",n)}`,sshurltemplate:({domain:e,user:t,project:r,committish:n})=>`git+ssh://git@${e}/${t}/${r}.git${q("#",n)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:s,path:i})=>`https://${e}/${t}/${r}${q("/",s,"/",re(n||"HEAD"),"/",i)}`,browsetemplate:({domain:e,user:t,project:r,committish:n,treepath:s})=>`https://${e}/${t}/${r}${q("/",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}${q("#",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}${q("#",u(o||""))}`,docstemplate:({domain:e,user:t,project:r,treepath:n,committish:s})=>`https://${e}/${t}/${r}${q("/",n,"/",re(s))}#readme`,httpstemplate:({auth:e,domain:t,user:r,project:n,committish:s})=>`git+https://${q(e,"@")}${t}/${r}/${n}.git${q("#",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}${q("#",n)}`,pathtemplate:({user:e,project:t,committish:r})=>`${e}/${t}${q("#",r)}`,bugstemplate:({domain:e,user:t,project:r})=>`https://${e}/${t}/${r}/issues`,hashformat:Mc},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://${q(e,"@")}raw.githubusercontent.com/${t}/${r}/${re(n||"HEAD")}/${s}`,gittemplate:({auth:e,domain:t,user:r,project:n,committish:s})=>`git://${q(e,"@")}${t}/${r}/${n}.git${q("#",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}${q("/",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://${q(e,"@")}${t}/${r}/${n}.git${q("#",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${q("#",r)}`,sshurltemplate:({domain:e,project:t,committish:r})=>`git+ssh://git@${e}/${t}.git${q("#",r)}`,edittemplate:({domain:e,user:t,project:r,committish:n,editpath:s})=>`https://${e}/${t}/${r}${q("/",re(n))}/${s}`,browsetemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${q("/",re(r))}`,browsetreetemplate:({domain:e,project:t,committish:r,path:n,hashformat:s})=>`https://${e}/${t}${q("/",re(r))}${q("#",s(n))}`,browseblobtemplate:({domain:e,project:t,committish:r,path:n,hashformat:s})=>`https://${e}/${t}${q("/",re(r))}${q("#",s(n))}`,docstemplate:({domain:e,project:t,committish:r})=>`https://${e}/${t}${q("/",re(r))}`,httpstemplate:({domain:e,project:t,committish:r})=>`git+https://${e}/${t}.git${q("#",r)}`,filetemplate:({user:e,project:t,committish:r,path:n})=>`https://gist.githubusercontent.com/${e}/${t}/raw${q("/",re(r))}/${n}`,shortcuttemplate:({type:e,project:t,committish:r})=>`${e}:${t}${q("#",r)}`,pathtemplate:({project:e,committish:t})=>`${e}${q("#",t)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:t,committish:r})=>`git://${e}/${t}.git${q("#",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-"+Mc(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${q("#",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({},xy,t);qc.exports=st});var Xs=b((O_,Hc)=>{c();var vy=O("url"),Qs=(e,t,r)=>{let n=e.indexOf(r);return e.lastIndexOf(t,n>-1?n:1/0)},Gc=e=>{try{return new vy.URL(e)}catch{}},Sy=(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)}`},Ay=e=>{let t=Qs(e,"@","#"),r=Qs(e,":","#");return r>t&&(e=e.slice(0,r)+"/"+e.slice(r+1)),Qs(e,":","#")===-1&&e.indexOf("//")===-1&&(e=`git+ssh://${e}`),e};Hc.exports=(e,t)=>{let r=t?Sy(e,t):e;return Gc(r)||Gc(Ay(r))}});var Wc=b((P_,zc)=>{"use strict";c();var Ty=Xs(),ky=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};zc.exports=(e,t,{gitHosts:r,protocols:n})=>{if(!e)return;let s=ky(e)?`github:${e}`:e,i=Ty(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 Zc=b((R_,Vc)=>{"use strict";c();var{LRUCache:Oy}=$c(),By=Uc(),Py=Wc(),Ly=Xs(),ei=new Oy({max:1e3}),kn=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=Py(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 Ly(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(By))kn.addHost(e,t);Vc.exports=kn});var Jc=b((I_,Yc)=>{c();Yc.exports=Ry;function Ry(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 Kc=b(($_,Ny)=>{Ny.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 tl=b((M_,el)=>{c();var Iy=Ed(),jy=Cd(),$y=Lc(),On=Zc(),My=O("node:module"),qy=["dependencies","devDependencies","optionalDependencies"],Uy=Jc(),ti=O("url"),it=Kc(),Qc=e=>e.includes("@")&&e.indexOf("@")<e.lastIndexOf(".");el.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=On.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){Jy(e,this.warn),Zy(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=On.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(!Iy(e.version,r))throw new Error('Invalid version: "'+e.version+'"');return e.version=jy(e.version,r),!0},fixPeople:function(e){Xc(e,Wy),Xc(e,Vy)},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()),zy(e.name,r,t.allowLegacyCase),My.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=Uy(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=On.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if(typeof e.bugs=="string")Qc(e.bugs)?e.bugs={email:e.bugs}:ti.parse(e.bugs).protocol?e.bugs={url:e.bugs}:this.warn("nonEmailUrlBugsString");else{Ky(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"&&Qc(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=On.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(!$y(t).validForNewPackages)return this.warn("invalidLicense")}};function Gy(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 Hy(e){return!e.match(/[/@\s+%:]/)&&e===encodeURIComponent(e)}function zy(e,t,r){if(e.charAt(0)==="."||!(Gy(e)||Hy(e))||t&&!r&&e!==e.toLowerCase()||e.toLowerCase()==="node_modules"||e.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(e))}function Xc(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 Wy(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 Vy(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 Zy(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 Yy(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 Jy(e,t){qy.forEach(function(r){e[r]&&(e[r]=Yy(e[r],r,t))})}function Ky(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 rl=b((U_,Qy)=>{Qy.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 il=b((G_,sl)=>{c();var nl=O("util"),ri=rl();sl.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if(t==="typo")return Xy.apply(null,e);var r=ri[t]?ri[t]:t+": '%s'";return e.unshift(r),nl.format.apply(null,e)};function Xy(e,t,r){return r&&(e=r+"['"+e+"']",t=r+"['"+t+"']"),nl.format(ri.typo,e,t)}});var cl=b((z_,al)=>{c();al.exports=ol;var ni=tl();ol.fixer=ni;var e0=il(),t0=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],r0=["dependencies","people","typos"],si=t0.map(function(e){return ul(e)+"Field"});si=si.concat(r0);function ol(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(e0.apply(null,arguments))},si.forEach(function(n){ni["fix"+ul(n)](e,r)}),e._id=e.name+"@"+e.version}function ul(e){return e.charAt(0).toUpperCase()+e.slice(1)}});var Tl=b((px,Al)=>{c();Al.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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDDF5\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](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\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(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\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-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\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 Ol=b((Nx,b0)=>{b0.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 xi=b((Ix,_i)=>{"use strict";c();var Bl=Ol();_i.exports=Bl;_i.exports.default=Bl});var jl=b((qx,Il)=>{"use strict";c();Il.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 Ml=b((Gx,$l)=>{"use strict";c();var T0=jl();$l.exports=e=>typeof e=="string"?e.replace(T0(),""):e});var Ul=b((zx,Ai)=>{"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);Ai.exports=ql;Ai.exports.default=ql});var Hl=b((Vx,Gl)=>{"use strict";c();Gl.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 Wl=b((Yx,Ti)=>{"use strict";c();var k0=Ml(),O0=Ul(),B0=Hl(),zl=e=>{if(typeof e!="string"||e.length===0||(e=k0(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+=O0(n)?2:1)}return t};Ti.exports=zl;Ti.exports.default=zl});var Zl=b((Kx,Vl)=>{"use strict";c();var P0=Wl();function Pt(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"?L0:R0,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=P0(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}Pt.left=function(t){return Pt(t,{align:"left"})};Pt.center=function(t){return Pt(t,{align:"center"})};Pt.right=function(t){return Pt(t,{align:"right"})};Vl.exports=Pt;function L0(e,t){return Math.floor((e-t)/2)}function R0(e,t){return e-t}});var pf=b(Nr=>{"use strict";c();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.dedent=void 0;function Df(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=Df;Nr.default=Df});var bf=b((qi,Ui)=>{"use strict";c();Object.defineProperty(qi,"__esModule",{value:!0});function wg(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(),wg(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)};qi.default=Mi;Ui.exports=Mi;Ui.exports.default=Mi});var vf=b((Vv,xf)=>{"use strict";c();var{PassThrough:Bg}=O("stream");xf.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((Yv,Mr)=>{"use strict";c();var{constants:Pg}=O("buffer"),Lg=O("stream"),{promisify:Rg}=O("util"),Ng=vf(),Ig=Rg(Lg.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=Ng(t);return await new Promise((s,i)=>{let o=u=>{u&&n.getBufferedLength()<=Pg.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)};(async()=>{try{await Ig(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 Af=b((Qv,Sf)=>{"use strict";c();var jg=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),$g=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),Mg=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},Ug={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Lt(e){let t=parseInt(e,10);return isFinite(t)?t:0}function Gg(e){return e?Mg.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 Hg(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(", ")}Sf.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":Hg(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())&&$g.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||jg.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 Lt(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 Lt(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Lt(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+Lt(this._rescc["stale-if-error"]),n=t+Lt(this._rescc["stale-while-revalidate"]);return Math.max(0,t,r,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Lt(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Lt(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()&&Gg(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&&!Ug[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 Tf=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 Pf=b((aS,Bf)=>{"use strict";c();var Wg=O("events"),kf=Tf(),Vg=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(O(t[r]))(e)}return new Map},Of=["sqlite","postgres","mysql","mongo","redis","tiered"],Yi=class extends Wg{constructor(t,{emitErrors:r=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:kf.stringify,deserialize:kf.parse,...typeof t=="string"?{uri:t}:t,...n},!this.opts.store){let i={...this.opts};this.opts.store=Vg(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 Of.includes(this.opts.store.opts.dialect)||Of.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 jf=b((vS,If)=>{"use strict";c();var rF=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];If.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(rF)),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 Mf=b((AS,$f)=>{"use strict";c();var{Transform:nF,PassThrough:sF}=O("stream"),Xi=O("zlib"),iF=jf();$f.exports=e=>{let t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t))return e;let r=t==="br";if(r&&typeof Xi.createBrotliDecompress!="function")return e.destroy(new Error("Brotli is not supported on Node.js < 12")),e;let n=!0,s=new nF({transform(u,a,l){n=!1,l(null,u)},flush(u){u()}}),i=new sF({autoDestroy:!1,destroy(u,a){e.destroy(),a(u)}}),o=r?Xi.createBrotliDecompress():Xi.createUnzip();return o.once("error",u=>{if(n&&!e.readable){i.end();return}i.destroy(u)}),iF(e,i),e.pipe(s).pipe(o).pipe(i),i}});var fo=b((NA,th)=>{"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)}};th.exports=lo});var ho=b((jA,rh)=>{"use strict";c();rh.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 Nt=b((MA,ah)=>{"use strict";c();var{URL:nh}=O("url"),vF=O("events"),SF=O("tls"),AF=O("http2"),TF=fo(),kF=ho(),Ee=Symbol("currentStreamCount"),sh=Symbol("request"),Ce=Symbol("cachedOriginSet"),ft=Symbol("gracefullyClosing"),os=Symbol("length"),ih=["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"],OF=(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&&uh(n)}},oh=(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 uh(t),!0}return!1},uh=e=>{e[ft]=!0,e[Ee]===0&&e.close()},hr=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 TF({maxSize:s})}get protocol(){return"https:"}normalizeOptions(t){let r="";for(let n=0;n<ih.length;n++){let s=ih[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 nh(t);else if(!(t instanceof nh))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=AF.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],B=0;for(;B<ne.length&&F();)ne[B].resolve(d),B++;if(x[K].listeners.splice(0,B),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,oh(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(OF(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[sh]=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[sh](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()&&!oh(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);kF(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=SF.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}};hr.kCurrentStreamCount=Ee;hr.kGracefullyClosing=ft;ah.exports={Agent:hr,globalAgent:new hr}});var mo=b((UA,ch)=>{"use strict";c();var{Readable:PF}=O("stream"),po=class extends PF{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()}};ch.exports=po});var fh=b((HA,lh)=>{"use strict";c();lh.exports=(e,t,r)=>{for(let n of r)e.on(n,(...s)=>t.emit(n,...s))}});var Xr=b((VA,hh)=>{"use strict";c();var It=(e,t,r)=>{hh.exports[t]=class extends e{constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${t}]`,this.code=t}}};It(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]}`});It(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`);It(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`);It(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`);It(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`);It(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`);It(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")});var Dh=b((YA,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((KA,ph)=>{"use strict";c();var{ERR_INVALID_HTTP_TOKEN:LF}=Xr(),RF=Dh(),NF=/^[\^`\-\w!#$%&*+.|~]+$/;ph.exports=e=>{if(typeof e!="string"||!NF.test(e)&&!RF(e))throw new LF("Header name",e)}});var go=b((XA,mh)=>{"use strict";c();var{ERR_HTTP_INVALID_HEADER_VALUE:IF,ERR_INVALID_CHAR:jF}=Xr(),$F=/[^\t\u0020-\u007E\u0080-\u00FF]/;mh.exports=(e,t)=>{if(typeof t>"u")throw new IF(t,e);if($F.test(t))throw new jF("header content",e)}});var Fh=b((t3,gh)=>{"use strict";c();var{ERR_HTTP2_NO_SOCKET_MANIPULATION:yh}=Xr(),MF={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 yh;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 yh;default:{let n=e.session===void 0?e:e.session.socket;return n[t]=r,!0}}}};gh.exports=MF});var bo=b((n3,xh)=>{"use strict";c();var{URL:Fo,urlToHttpOptions:Eh}=O("url"),qF=O("http2"),{Writable:UF}=O("stream"),{Agent:GF,globalAgent:HF}=Nt(),zF=mo(),WF=fh(),{ERR_INVALID_ARG_TYPE:us,ERR_INVALID_PROTOCOL:VF,ERR_HTTP_HEADERS_SENT:Ch}=Xr(),ZF=yo(),YF=go(),JF=Fh(),{HTTP2_HEADER_STATUS:bh,HTTP2_HEADER_METHOD:wh,HTTP2_HEADER_PATH:_h,HTTP2_HEADER_AUTHORITY:en,HTTP2_METHOD_CONNECT:KF}=qF.constants,he=Symbol("headers"),dr=Symbol("origin"),tn=Symbol("session"),Eo=Symbol("options"),as=Symbol("flushedHeaders"),Dr=Symbol("jobs"),rn=Symbol("pendingAgentPromise"),Co=class extends UF{constructor(t,r,n){if(super({autoDestroy:!1,emitClose:!1}),typeof t=="string"?t=Eh(new Fo(t)):t instanceof Fo?t=Eh(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 GF({maxEmptySessions:0});else if(typeof r.agent>"u"||r.agent===null)this.agent=HF;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 VF(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[dr]=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[dr],this[Eo]).catch(()=>{})),s&&this.setTimeout(s),n&&this.once("response",n),this[as]=!1}get method(){return this[he][wh]}set method(t){t&&(this[he][wh]=t.toUpperCase())}get path(){let t=this.method==="CONNECT"?en:_h;return this[he][t]}set path(t){if(t){let r=this.method==="CONNECT"?en:_h;this[he][r]=t}}get host(){return this[dr].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===KF,r=n=>{if(this._request=n,this.destroyed){n.destroy();return}t||WF(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 zF(this.socket,n.readableHighWaterMark);this.res=a,a.url=`${this[dr].origin}${this.path}`,a.req=this,a.statusCode=i[bh],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[bh]})),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,JF);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[dr].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[dr],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 Ch("remove");delete this[he][t.toLowerCase()]}setHeader(t,r){if(this.headersSent)throw new Ch("set");ZF(t),YF(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){}};xh.exports=Co});var Sh=b((i3,vh)=>{"use strict";c();var QF=O("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 Th=b((u3,Ah)=>{"use strict";c();var{isIP:XF}=O("net"),eE=O("assert"),tE=e=>{if(e[0]==="["){let r=e.indexOf("]");return eE(r!==-1),e.slice(1,r)}let t=e.indexOf(":");return t===-1?e:e.slice(0,t)};Ah.exports=e=>{let t=tE(e);return XF(t)?"":t}});var Ih=b((c3,nn)=>{"use strict";c();var{URL:kh,urlToHttpOptions:Oh}=O("url"),Bh=O("http"),wo=O("https"),rE=Sh(),nE=fo(),{Agent:sE,globalAgent:iE}=Nt(),oE=bo(),uE=Th(),Ph=ho(),Lh=new nE({maxSize:100}),aE=new Map,cE=(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)},Rh=(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=rE(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)}},Nh=Rh(Lh,aE);nn.exports=async(e,t,r)=>{if(typeof e=="string"?e=Oh(new kh(e)):e instanceof kh?e=Oh(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||uE(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||Nh,{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?iE:wo.globalAgent),o)if(i===!1)o.destroy();else{let f=(l?sE:wo.Agent).prototype.createConnection;i.createConnection===f?l?t._reuseSocket=o:cE(i,o,t):o.destroy()}if(l)return Ph(new oE(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"]),Ph(Bh.request(t,r))};nn.exports.protocolCache=Lh;nn.exports.resolveProtocol=Nh;nn.exports.createResolveProtocol=Rh});var _o=b((f3,jh)=>{"use strict";c();var lE=O("stream"),fE=O("tls"),hE=new fE.TLSSocket(new lE.PassThrough)._handle._parentWrap.constructor;jh.exports=hE});var vo=b((d3,$h)=>{"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}};$h.exports=xo});var qh=b((p3,Mh)=>{"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}`)}};Mh.exports=dE});var So=b((y3,Gh)=>{"use strict";c();var{URL:Uh}=O("url"),cs=qh();Gh.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,[Uh,"string"]);let r=new Uh(t.url);e.proxyOptions={raw:!0,...t,headers:{...t.headers},url:r}}});var ls=b((F3,Hh)=>{"use strict";c();Hh.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 Yh=b((C3,Zh)=>{"use strict";c();var DE=O("tls"),pE=O("http"),zh=O("https"),mE=_o(),{globalAgent:yE}=Nt(),gE=vo(),Wh=So(),FE=ls(),Vh=(e,t,r)=>{(async()=>{try{let{proxyOptions:n}=e,{url:s,headers:i,raw:o}=n,u=await yE.request(s,n,{...FE(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 gE(l,""));return}let f=e instanceof zh.Agent;if(o&&f){t.socket=u;let p=DE.connect(t);p.once("close",()=>{u.destroy()}),r(null,p);return}let y=new mE(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 pE.Agent{constructor(t){super(t),Wh(this,t.proxyOptions)}createConnection(t,r){Vh(this,t,r)}},To=class extends zh.Agent{constructor(t){super(t),Wh(this,t.proxyOptions)}createConnection(t,r){Vh(this,t,r)}};Zh.exports={HttpOverHttp2:Ao,HttpsOverHttp2:To}});var Oo=b((w3,Jh)=>{"use strict";c();var{Agent:EE}=Nt(),CE=_o(),bE=vo(),wE=So(),ko=class extends EE{constructor(t){super(t),wE(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 bE(i,o);if(this.proxyOptions.raw)r.socket=s;else{let u=new CE(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)}};Jh.exports=ko});var Qh=b((x3,Kh)=>{"use strict";c();var{globalAgent:_E}=Nt(),xE=Oo(),vE=ls(),SE=e=>new Promise((t,r)=>{e.once("error",r),e.once("response",n=>{e.off("error",r),t(n[":status"])})}),Bo=class extends xE{async _getProxyStream(t){let{proxyOptions:r}=this,n={...vE(this),...r.headers,":method":"CONNECT",":authority":t},s=await _E.request(r.url,r,n),i=await SE(s);return[s,i,""]}};Kh.exports=Bo});var ed=b((S3,Xh)=>{"use strict";c();var AE=O("http"),TE=O("https"),kE=Oo(),OE=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 kE{async _getProxyStream(t){let{proxyOptions:r}=this,{url:n,headers:s}=this.proxyOptions,o=(n.protocol==="https:"?TE:AE).request({...r,hostname:n.hostname,port:n.port,path:t,headers:{...OE(this),...s,host:t},method:"CONNECT"}).end();return BE(o)}};Xh.exports={Http2OverHttp:fs,Http2OverHttps:fs}});var rd=b((T3,td)=>{"use strict";c();var PE=O("http2"),{Agent:LE,globalAgent:RE}=Nt(),Po=bo(),NE=mo(),IE=Ih(),{HttpOverHttp2:jE,HttpsOverHttp2:$E}=Yh(),ME=Qh(),{Http2OverHttp:qE,Http2OverHttps:UE}=ed(),GE=yo(),HE=go(),zE=(e,t,r)=>new Po(e,t,r),WE=(e,t,r)=>{let n=new Po(e,t,r);return n.end(),n};td.exports={...PE,ClientRequest:Po,IncomingMessage:NE,Agent:LE,globalAgent:RE,request:zE,get:WE,auto:IE,proxies:{HttpOverHttp2:jE,HttpsOverHttp2:$E,Http2OverHttp2:ME,Http2OverHttp:qE,Http2OverHttps:UE},validateHeaderName:GE,validateHeaderValue:HE}});c();c();var Uo=(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]}},AC=Object.keys(Y.modifier),bd=Object.keys(Y.color),wd=Object.keys(Y.bgColor),TC=[...bd,...wd];function _d(){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=Uo(),Y.color.ansi256=Go(),Y.color.ansi16m=Ho(),Y.bgColor.ansi=Uo(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 xd=_d(),Be=xd;c();import gs from"node:process";import vd from"node:os";import zo from"node:tty";function Se(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:X}=gs,on;Se("no-color")||Se("no-colors")||Se("color=false")||Se("color=never")?on=0:(Se("color")||Se("colors")||Se("color=true")||Se("color=always"))&&(on=1);function Sd(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Ad(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Td(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Sd();n!==void 0&&(on=n);let s=r?on:n;if(s===0)return 0;if(r){if(Se("color=16m")||Se("color=full")||Se("color=truecolor"))return 3;if(Se("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(e&&!t&&s===void 0)return 0;let i=s||0;if(X.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 X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:i}function Wo(e,t={}){let r=Td(e,{streamIsTTY:e&&e.isTTY,...t});return Ad(r)}var kd={stdout:Wo({isTTY:zo.isatty(1)}),stderr:Wo({isTTY:zo.isatty(2)})},Vo=kd;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"),$t=Symbol("STYLER"),yr=Symbol("IS_EMPTY"),Qo=["ansi","ansi","ansi256","ansi16m"],Mt=Object.create(null),Od=(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},Xo=class{constructor(t){return eu(t)}},eu=e=>{let t=(...r)=>r.join(" ");return Od(t,e),Object.setPrototypeOf(t,gr.prototype),t};function gr(e){return eu(e)}Object.setPrototypeOf(gr.prototype,Function.prototype);for(let[e,t]of Object.entries(Be))Mt[e]={get(){let r=un(this,Cs(t.open,t.close,this[$t]),this[yr]);return Object.defineProperty(this,e,{value:r}),r}};Mt.visible={get(){let e=un(this,this[$t],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Es=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Be[r].ansi16m(...n):t==="ansi256"?Be[r].ansi256(Be.rgbToAnsi256(...n)):Be[r].ansi(Be.rgbToAnsi(...n)):e==="hex"?Es("rgb",t,r,...Be.hexToRgb(...n)):Be[r][e](...n),Bd=["rgb","hex","ansi256"];for(let e of Bd){Mt[e]={get(){let{level:r}=this;return function(...n){let s=Cs(Es(e,Qo[r],"color",...n),Be.color.close,this[$t]);return un(this,s,this[yr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Mt[t]={get(){let{level:r}=this;return function(...n){let s=Cs(Es(e,Qo[r],"bgColor",...n),Be.bgColor.close,this[$t]);return un(this,s,this[yr])}}}}var Pd=Object.defineProperties(()=>{},{...Mt,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)=>Ld(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,Pd),n[Fs]=e,n[$t]=t,n[yr]=r,n},Ld=(e,t)=>{if(e.level<=0||!t)return e[yr]?"":t;let r=e[$t];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(gr.prototype,Mt);var Rd=gr(),tu=gr({level:Ko?Ko.level:0});var Ue=Rd;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 S=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 S.undefined;case"string":return S.string;case"number":return isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(e)?S.array:e===null?S.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?S.promise:typeof Map<"u"&&e instanceof Map?S.map:typeof Set<"u"&&e instanceof Set?S.set:typeof Date<"u"&&e instanceof Date?S.date:S.object;default:return S.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"]),Nd=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 Gt=(e,t)=>{let r;switch(e.code){case w.invalid_type:e.received===S.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=Gt;function Id(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}},jd=[];function v(e,t){let r=an(),n=cn({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Gt?void 0:Gt].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 L;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 L;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}}},L=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:P.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 Qe.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:P.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:P.ZodDefault})}brand(){return new wr({typeName:P.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:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _r.create(this,t)}readonly(){return vt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},$d=/^c[^\s-]{8,}$/i,Md=/^[0-9a-z]+$/,qd=/^[0-9A-HJKMNP-TV-Z]{26}$/,Ud=/^[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,Gd=/^[a-z0-9_-]{21}$/i,Hd=/^[-+]?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)?)??$/,zd=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bs,Vd=/^(?:(?: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])$/,Zd=/^(([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})))$/,Yd=/^([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])))",Jd=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 Kd(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 Qd(e,t){return!!((t==="v4"||!t)&&Vd.test(e)||(t==="v6"||!t)&&Zd.test(e))}var Je=class e extends N{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let i=this._getOrReturnCtx(t);return v(i,{code:w.invalid_type,expected:S.string,received:i.parsedType}),L}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),v(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),v(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?v(s,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&v(s,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")zd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"email",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")bs||(bs=new RegExp(Wd,"u")),bs.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"emoji",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Ud.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"uuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")Gd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"nanoid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$d.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"cuid",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")Md.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"cuid2",code:w.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")qd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(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),v(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),v(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),v(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),v(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),v(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),v(s,{code:w.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?Jd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{code:w.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?Kd(i).test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{code:w.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?Hd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"duration",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Qd(t.data,i.version)||(s=this._getOrReturnCtx(t,s),v(s,{validation:"ip",code:w.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?Yd.test(t.data)||(s=this._getOrReturnCtx(t,s),v(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:P.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...R(e)})};function Xd(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)!==S.number){let i=this._getOrReturnCtx(t);return v(i,{code:w.invalid_type,expected:S.number,received:i.parsedType}),L}let n,s=new de;for(let i of this._def.checks)i.kind==="int"?j.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),v(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),v(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),v(n,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Xd(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),v(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),v(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:P.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)!==S.bigint){let i=this._getOrReturnCtx(t);return v(i,{code:w.invalid_type,expected:S.bigint,received:i.parsedType}),L}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),v(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),v(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),v(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:P.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)!==S.boolean){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.boolean,received:n.parsedType}),L}return pe(t.data)}};Dt.create=e=>new Dt({typeName:P.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)!==S.date){let i=this._getOrReturnCtx(t);return v(i,{code:w.invalid_type,expected:S.date,received:i.parsedType}),L}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return v(i,{code:w.invalid_date}),L}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),v(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),v(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:P.ZodDate,...R(e)});var Ht=class extends N{_parse(t){if(this._getType(t)!==S.symbol){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.symbol,received:n.parsedType}),L}return pe(t.data)}};Ht.create=e=>new Ht({typeName:P.ZodSymbol,...R(e)});var mt=class extends N{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.undefined,received:n.parsedType}),L}return pe(t.data)}};mt.create=e=>new mt({typeName:P.ZodUndefined,...R(e)});var yt=class extends N{_parse(t){if(this._getType(t)!==S.null){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.null,received:n.parsedType}),L}return pe(t.data)}};yt.create=e=>new yt({typeName:P.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:P.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:P.ZodUnknown,...R(e)});var Pe=class extends N{_parse(t){let r=this._getOrReturnCtx(t);return v(r,{code:w.invalid_type,expected:S.never,received:r.parsedType}),L}};Pe.create=e=>new Pe({typeName:P.ZodNever,...R(e)});var zt=class extends N{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.void,received:n.parsedType}),L}return pe(t.data)}};zt.create=e=>new zt({typeName:P.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!==S.array)return v(r,{code:w.invalid_type,expected:S.array,received:r.parsedType}),L;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,u=r.data.length<s.exactLength.value;(o||u)&&(v(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&&(v(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&&(v(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:P.ZodArray,...R(t)});function qt(e){if(e instanceof we){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Ae.create(qt(n))}return new we({...e._def,shape:()=>t})}else return e instanceof ze?new ze({...e._def,type:qt(e.element)}):e instanceof Ae?Ae.create(qt(e.unwrap())):e instanceof $e?$e.create(qt(e.unwrap())):e instanceof je?je.create(e.items.map(t=>qt(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)!==S.object){let l=this._getOrReturnCtx(t);return v(l,{code:w.invalid_type,expected:S.object,received:l.parsedType}),L}let{status:n,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),u=[];if(!(this._def.catchall instanceof Pe&&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 Pe){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&&(v(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:P.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 qt(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:Pe.create(),typeName:P.ZodObject,...R(t)});we.strictCreate=(e,t)=>new we({shape:()=>e,unknownKeys:"strict",catchall:Pe.create(),typeName:P.ZodObject,...R(t)});we.lazycreate=(e,t)=>new we({shape:e,unknownKeys:"strip",catchall:Pe.create(),typeName:P.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 v(r,{code:w.invalid_union,unionErrors:o}),L}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 v(r,{code:w.invalid_union,unionErrors:u}),L}}get options(){return this._def.options}};gt.create=(e,t)=>new gt({options:e,typeName:P.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 vt?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!==S.object)return v(r,{code:w.invalid_type,expected:S.object,received:r.parsedType}),L;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}):(v(r,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L)}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:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...R(n)})}};function vs(e,t){let r=Ye(e),n=Ye(t);if(e===t)return{valid:!0,data:e};if(r===S.object&&n===S.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=vs(e[u],t[u]);if(!a.valid)return{valid:!1};o[u]=a.data}return{valid:!0,data:o}}else if(r===S.array&&n===S.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=vs(o,u);if(!a.valid)return{valid:!1};s.push(a.data)}return{valid:!0,data:s}}else return r===S.date&&n===S.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 L;let u=vs(i.value,o.value);return u.valid?((xs(i)||xs(o))&&r.dirty(),{status:r.value,value:u.data}):(v(n,{code:w.invalid_intersection_types}),L)};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:P.ZodIntersection,...R(r)});var je=class e extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.array)return v(n,{code:w.invalid_type,expected:S.array,received:n.parsedType}),L;if(n.data.length<this._def.items.length)return v(n,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),L;!this._def.rest&&n.data.length>this._def.items.length&&(v(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:P.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!==S.object)return v(n,{code:w.invalid_type,expected:S.object,received:n.parsedType}),L;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:P.ZodRecord,...R(n)}):new e({keyType:Je.create(),valueType:t,typeName:P.ZodRecord,...R(r)})}},Wt=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!==S.map)return v(n,{code:w.invalid_type,expected:S.map,received:n.parsedType}),L;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 L;(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 L;(l.status==="dirty"||f.status==="dirty")&&r.dirty(),u.set(l.value,f.value)}return{status:r.value,value:u}}}};Wt.create=(e,t,r)=>new Wt({valueType:t,keyType:e,typeName:P.ZodMap,...R(r)});var Vt=class e extends N{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.set)return v(n,{code:w.invalid_type,expected:S.set,received:n.parsedType}),L;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(v(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&&(v(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 L;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)}};Vt.create=(e,t)=>new Vt({valueType:e,minSize:null,maxSize:null,typeName:P.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!==S.function)return v(r,{code:w.invalid_type,expected:S.function,received:r.parsedType}),L;function n(u,a){return cn({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,an(),Gt].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(),Gt].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 Qe){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:P.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:P.ZodLazy,...R(t)});var Ct=class extends N{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return v(r,{received:r.data,code:w.invalid_literal,expected:this._def.value}),L}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ct.create=(e,t)=>new Ct({value:e,typeName:P.ZodLiteral,...R(t)});function cu(e,t){return new bt({values:e,typeName:P.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 v(r,{expected:j.joinValues(n),received:r.parsedType,code:w.invalid_type}),L}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 v(r,{received:r.data,code:w.invalid_enum_value,options:n}),L}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!==S.string&&n.parsedType!==S.number){let s=j.objectValues(r);return v(n,{expected:j.joinValues(s),received:n.parsedType,code:w.invalid_type}),L}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 v(n,{received:n.data,code:w.invalid_enum_value,options:s}),L}return pe(t.data)}get enum(){return this._def.values}};Er=new WeakMap;wt.create=(e,t)=>new wt({values:e,typeName:P.ZodNativeEnum,...R(t)});var Qe=class extends N{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.promise&&r.common.async===!1)return v(r,{code:w.invalid_type,expected:S.promise,received:r.parsedType}),L;let n=r.parsedType===S.promise?r.data:Promise.resolve(r.data);return pe(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Qe.create=(e,t)=>new Qe({type:e,typeName:P.ZodPromise,...R(t)});var xe=class extends N{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.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=>{v(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 L;let a=await this._def.schema._parseAsync({data:u,path:n.path,parent:n});return a.status==="aborted"?L:a.status==="dirty"||r.value==="dirty"?Ut(a.value):a});{if(r.value==="aborted")return L;let u=this._def.schema._parseSync({data:o,path:n.path,parent:n});return u.status==="aborted"?L: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"?L:(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"?L:(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:P.ZodEffects,effect:t,...R(r)});xe.createWithPreprocess=(e,t,r)=>new xe({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...R(r)});var Ae=class extends N{_parse(t){return this._getType(t)===S.undefined?pe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ae.create=(e,t)=>new Ae({innerType:e,typeName:P.ZodOptional,...R(t)});var $e=class extends N{_parse(t){return this._getType(t)===S.null?pe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$e.create=(e,t)=>new $e({innerType:e,typeName:P.ZodNullable,...R(t)});var _t=class extends N{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===S.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:P.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:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...R(t)});var Zt=class extends N{_parse(t){if(this._getType(t)!==S.nan){let n=this._getOrReturnCtx(t);return v(n,{code:w.invalid_type,expected:S.nan,received:n.parsedType}),L}return{status:"valid",value:t.data}}};Zt.create=e=>new Zt({typeName:P.ZodNaN,...R(e)});var eD=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"?L: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"?L: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:P.ZodPipeline})}},vt=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}};vt.create=(e,t)=>new vt({innerType:e,typeName:P.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 tD={object:we.lazycreate},P;(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"})(P||(P={}));var rD=(e,t={message:`Input not instance of ${e.name}`})=>lu(r=>r instanceof e,t),fu=Je.create,hu=ht.create,nD=Zt.create,sD=dt.create,du=Dt.create,iD=pt.create,oD=Ht.create,uD=mt.create,aD=yt.create,cD=Ke.create,lD=He.create,fD=Pe.create,hD=zt.create,dD=ze.create,DD=we.create,pD=we.strictCreate,mD=gt.create,yD=fn.create,gD=Ft.create,FD=je.create,ED=hn.create,CD=Wt.create,bD=Vt.create,wD=dn.create,_D=Et.create,xD=Ct.create,vD=bt.create,SD=wt.create,AD=Qe.create,nu=xe.create,TD=Ae.create,kD=$e.create,OD=xe.createWithPreprocess,BD=_r.create,PD=()=>fu().optional(),LD=()=>hu().optional(),RD=()=>du().optional(),ND={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})},ID=L,M=Object.freeze({__proto__:null,defaultErrorMap:Gt,setErrorMap:Id,getErrorMap:an,makeIssue:cn,EMPTY_PATH:jd,addIssueToContext:v,ParseStatus:de,INVALID:L,DIRTY:Ut,OK:pe,isAborted:_s,isDirty:xs,isValid:Cr,isAsync:br,get util(){return j},get objectUtil(){return ws},ZodParsedType:S,getParsedType:Ye,ZodType:N,datetimeRegex:au,ZodString:Je,ZodNumber:ht,ZodBigInt:dt,ZodBoolean:Dt,ZodDate:pt,ZodSymbol:Ht,ZodUndefined:mt,ZodNull:yt,ZodAny:Ke,ZodUnknown:He,ZodNever:Pe,ZodVoid:zt,ZodArray:ze,ZodObject:we,ZodUnion:gt,ZodDiscriminatedUnion:fn,ZodIntersection:Ft,ZodTuple:je,ZodRecord:hn,ZodMap:Wt,ZodSet:Vt,ZodFunction:dn,ZodLazy:Et,ZodLiteral:Ct,ZodEnum:bt,ZodNativeEnum:wt,ZodPromise:Qe,ZodEffects:xe,ZodTransformer:xe,ZodOptional:Ae,ZodNullable:$e,ZodDefault:_t,ZodCatch:xt,ZodNaN:Zt,BRAND:eD,ZodBranded:wr,ZodPipeline:_r,ZodReadonly:vt,custom:lu,Schema:N,ZodSchema:N,late:tD,get ZodFirstPartyTypeKind(){return P},coerce:ND,any:cD,array:dD,bigint:sD,boolean:du,date:iD,discriminatedUnion:yD,effect:nu,enum:vD,function:wD,instanceof:rD,intersection:gD,lazy:_D,literal:xD,map:CD,nan:nD,nativeEnum:SD,never:fD,null:aD,nullable:kD,number:hu,object:DD,oboolean:RD,onumber:LD,optional:TD,ostring:PD,pipeline:BD,preprocess:OD,promise:AD,record:ED,set:bD,strictObject:pD,string:fu,symbol:oD,transformer:nu,tuple:FD,undefined:uD,union:mD,unknown:lD,void:hD,NEVER:ID,ZodIssueCode:w,quotelessJson:Nd,ZodError:_e});c();var VC=e=>e==null,Yt=e=>typeof e=="string",St=e=>typeof e=="object"&&e!==null,Du=Array.isArray,pu=e=>typeof e=="function",ZC=e=>e instanceof Error,YC=e=>M.object({type:M.string(),code:M.number(),reason:M.string(),wasClean:M.boolean()}).safeParse(e).success,JC=e=>M.object({type:M.string(),message:M.string(),error:M.any()}).safeParse(e).success,KC=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,QC=e=>M.array(M.object({message:M.string(),extensions:M.record(M.unknown()).nullish().transform(t=>t??{})})).min(1).safeParse(e).success,XC=e=>{throw new Error(`Unexpected value: ${e}`)},eb=e=>e instanceof Error&&e.name==="AbortError"||e instanceof Event&&e.type==="abort",tb=e=>St(e)&&"code"in e&&e.code==="ENOENT",rb=e=>St(e)&&"code"in e&&e.code==="ENOTEMPTY",nb=e=>St(e)&&"code"in e&&e.code==="ENOTDIR",sb=e=>St(e)&&"code"in e&&e.code==="EEXIST",ib=e=>[".js",".jsx",".cjs",".mjs"].some(t=>e.endsWith(t)),ob=e=>[".ts",".tsx",".cts",".mts"].some(t=>e.endsWith(t)&&!e.endsWith(".d.ts")),ub=e=>e.endsWith(".gelly");c();c();var jD=(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);!$D(s,i)&&n||Object.defineProperty(e,r,i)},$D=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)},MD=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},qD=(e,t)=>`/* Wrapped ${e}*/
19
- ${t}`,UD=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),GD=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),HD=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,s=qD.bind(null,n,t.toString());Object.defineProperty(s,"name",GD);let{writable:i,enumerable:o,configurable:u}=UD;Object.defineProperty(e,"toString",{value:s,writable:i,enumerable:o,configurable:u})};function Jt(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let s of Reflect.ownKeys(t))jD(e,t,s,r);return MD(e,t),HD(e,t,n),e}import zD from"node:assert";c();var WD=new Set;var VD=(...e)=>String(e[0]),yu=(...e)=>e.map(String).join(":");function gu(e,t){let r;t?r=e:(t=e,r=VD);let n=new Map,s=(...i)=>{let o=r(...i);if(n.has(o))return n.get(o);zD(t,"fn shouldn't be undefined");let u=t(...i);return n.set(o,u),u};return s.clear=n.clear.bind(n),WD.add(s),Jt(s,t),s}var yb=(e,t)=>{let r,n,s,i=(...o)=>{n=()=>(n=void 0,r=void 0,s?s=s.then(()=>t(...o)).catch(mu).finally(()=>s=void 0):s=t(...o).catch(mu).finally(()=>s=void 0),s),clearTimeout(r),r=setTimeout(n,e)};return i.flush=async()=>{n&&await n()},Jt(i,t),i};var Dn=(e,...t)=>pu(e)?e(...t):e,mu=(...e)=>{};c();c();import vr from"node:path";c();import JD from"node:process";import KD from"node:path";import Ob,{promises as Fu}from"node:fs";import{fileURLToPath as QD}from"node:url";c();c();c();var Ss=class{value;next;constructor(t){this.value=t}},xr=class{#r;#n;#e;constructor(){this.clear()}enqueue(t){let r=new Ss(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 pn(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 mn=class extends Error{constructor(t){super(),this.value=t}},ZD=async(e,t)=>t(await e),YD=async e=>{let t=await Promise.all(e);if(t[1]===!0)throw new mn(t[0]);return!1};async function As(e,t,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:n=!0}={}){let s=pn(r),i=[...e].map(u=>[u,s(ZD,u,t)]),o=pn(n?1:Number.POSITIVE_INFINITY);try{await Promise.all(i.map(u=>o(YD,u)))}catch(u){if(u instanceof mn)return u.value;throw u}}var Eu={directory:"isDirectory",file:"isFile"};function XD(e){if(!Object.hasOwnProperty.call(Eu,e))throw new Error(`Invalid type specified: ${e}`)}var ep=(e,t)=>t[Eu[e]](),tp=e=>e instanceof URL?QD(e):e;async function Ts(e,{cwd:t=JD.cwd(),type:r="file",allowSymlinks:n=!0,concurrency:s,preserveOrder:i}={}){XD(r),t=tp(t);let o=n?Fu.stat:Fu.lstat;return As(e,async u=>{try{let a=await o(KD.resolve(t,u));return ep(r,a)}catch{return!1}},{concurrency:s,preserveOrder:i})}c();import{fileURLToPath as rp}from"node:url";function ks(e){return e instanceof URL?rp(e):e}c();var np=Symbol("findUpStop");async function sp(e,t={}){let r=vr.resolve(ks(t.cwd)??""),{root:n}=vr.parse(r),s=vr.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===np||(l&&a.push(vr.resolve(r,l)),r===s||a.length>=i))break;r=vr.dirname(r)}return a}async function Cu(e,t={}){return(await sp(e,{...t,limit:1}))[0]}var ll=be(pc(),1),fl=be(cl(),1);import n0 from"node:assert";import{fileURLToPath as s0}from"node:url";var ii=await Cu("package.json",{cwd:s0(import.meta.url)});n0(ii!==void 0,"Could not find package.json for the ggt package.");var hl=ii,Bn=await ll.default.readJson(ii);(0,fl.default)(Bn,!0);c();c();import pl from"node:process";import c0 from"node:os";import l0 from"node:fs";c();import u0 from"node:fs";c();import dl from"node:fs";var oi;function i0(){try{return dl.statSync("/.dockerenv"),!0}catch{return!1}}function o0(){try{return dl.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function ui(){return oi===void 0&&(oi=i0()||o0()),oi}var ai,a0=()=>{try{return u0.statSync("/run/.containerenv"),!0}catch{return!1}};function Pn(){return ai===void 0&&(ai=a0()||ui()),ai}var Dl=()=>{if(pl.platform!=="linux")return!1;if(c0.release().toLowerCase().includes("microsoft"))return!Pn();try{return l0.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Pn():!1}catch{return!1}},ci=pl.env.__IS_WSL_TEST__?Dl:Dl();import sr from"node:os";import Re from"node:path";import G from"node:process";c();import f0 from"node:assert";c();var ml=(e,t,r)=>Math.max(t,Math.min(r,e));var ot={TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,PRINT:6},yl=gu(yu,(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}),y2=e=>(f0(e>0,"verbosity must be greater than 0"),ml(ot.INFO+1-e,ot.TRACE,ot.INFO));c();import h0 from"node:process";var kt={get value(){return h0.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}};var Ln={get logLevel(){return yl(G.env.GGT_LOG_LEVEL,ot.PRINT)},get logFormat(){return G.env.GGT_LOG_FORMAT==="json"?"json":"pretty"},get versionFull(){return`${Bn.name}/${Bn.version} ${this.platform}-${this.arch} node-${G.version}`},get arch(){return sr.arch()==="ia32"?"x86":sr.arch()},get platform(){return ci?"wsl":sr.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??sr.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 sr.homedir()||sr.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||(kt.productionLike?"gadget.app":"ggt.pub")},get services(){return G.env.GGT_GADGET_SERVICES_DOMAIN||(kt.productionLike?"app.gadget.dev":"app.ggt.dev")}}},k2=(...e)=>Re.join(Ln.configDir,...e),O2=(...e)=>Re.join(Ln.homeDir,...e);c();c();import wl from"node:process";c();import jn from"node:process";c();var Rn=new WeakMap,gl=(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 Jt(i,e),Rn.set(i,n),i};gl.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 Fl=gl;c();c();var Ot=[];Ot.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Ot.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ot.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{},D0=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 Ot)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 Ot)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,Ot.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:El,load:M2,unload:q2}=D0(Nn(pi)?new Di(pi):new di);var Cl=jn.stderr.isTTY?jn.stderr:jn.stdout.isTTY?jn.stdout:void 0,p0=Cl?Fl(()=>{El(()=>{Cl.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},bl=p0;var $n=!1,ir={};ir.show=(e=wl.stderr)=>{e.isTTY&&($n=!1,e.write("\x1B[?25h"))};ir.hide=(e=wl.stderr)=>{e.isTTY&&(bl(),$n=!0,e.write("\x1B[?25l"))};ir.toggle=(e,t)=>{e!==void 0&&($n=e),$n?ir.show(t):ir.hide(t)};var mi=ir;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 qe from"node:process";var m0=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(){qe.platform==="win32"||!qe.stdin.isTTY||(qe.stdin.setRawMode(!0),qe.stdin.on("data",this.#a),qe.stdin.resume())}#e(){qe.stdin.isTTY&&(qe.stdin.off("data",this.#a),qe.stdin.pause(),qe.stdin.setRawMode(!1))}#a(t){t[0]===m0&&qe.emit("SIGINT")}},y0=new gi,Fi=y0;c();c();c();function Ei({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 g0=Ei();function Bt(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(g0,"")}c();c();function _l(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 xl(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 F0(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Sl(e,{ambiguousAsWide:t=!1}={}){return F0(e),xl(e)||vl(e)||t&&_l(e)?2:1}var kl=be(Tl(),1),E0=new Intl.Segmenter,C0=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=Bt(e)),e.length===0)return 0;let s=0,i={ambiguousAsWide:!r};for(let{segment:o}of E0.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)&&!C0.test(o)){if((0,kl.default)().test(o)){s+=2;continue}s+=Sl(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(!(St(t)&&"code"in t&&t.code==="EPIPE"))throw t}),Ne.stderr.on("error",t=>{if(!(St(t)&&"code"in t&&t.code==="EPIPE"))throw t})}get isInteractive(){return!kt.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=Dn(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=Dn(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=Dn(t,this._footerText),this._writeStickyText()}persistFooter(t=this._footerText){this._footerText="",this.writeStdout(t)}_writeStdout(t){if(t!==""){if(!kt.testLike){Ne.stdout.write(t);return}t.endsWith(`
26
- `)&&(t=t.slice(0,-1)),console.log(t)}}_writeStderr(t){if(t!==""){if(!kt.testLike){Ne.stderr.write(t);return}t.endsWith(`
27
- `)&&(t=t.slice(0,-1)),console.error(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===`
28
- `||t.endsWith(`
29
-
30
- `)),this._spinnerText&&(t+=this._stripUnnecessaryNewLines(this._spinnerText,this.lastStickyLineWasEmpty),this.lastStickyLineWasEmpty=t===`
31
- `||t.endsWith(`
32
-
33
- `)),this._footerText&&(t+=this._stripUnnecessaryNewLines(this._footerText,this.lastStickyLineWasEmpty),this.lastStickyLineWasEmpty=t===`
34
- `||t.endsWith(`
35
-
36
- `)),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 Bt(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(`
37
-
38
-
39
- `))!==-1;)t=t.slice(0,n)+t.slice(n+1);if(r)for(;t.startsWith(`
40
- `);)t=t.slice(1);return t}},wi=new bi;c();c();import zn from"node:process";c();function qn(e){let t=0;for(let r of e.split(`
41
- `))t=Math.max(t,fe(r));return t}var uf=be(xi(),1);c();var w0=/[\p{Lu}]/u,_0=/[\p{Ll}]/u,Pl=/^[\p{Lu}](?![\p{Lu}])/gu,Nl=/([\p{Alpha}\p{N}_]|$)/u,vi=/[_.\- ]+/,x0=new RegExp("^"+vi.source),Ll=new RegExp(vi.source+Nl.source,"gu"),Rl=new RegExp("\\d+"+Nl.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&&w0.test(l)?(e=e.slice(0,a)+"-"+e.slice(a),s=!1,o=i,i=!0,a++):i&&o&&_0.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},S0=(e,t)=>(Pl.lastIndex=0,e.replaceAll(Pl,r=>t(r))),A0=(e,t)=>(Ll.lastIndex=0,Rl.lastIndex=0,e.replaceAll(Rl,(r,n,s)=>["_","-"].includes(e.charAt(s+r.length))?r:t(r)).replaceAll(Ll,(r,n)=>t(n)));function Si(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(x0,""),e=t.preserveConsecutiveUppercase?S0(e,r):r(e),t.pascalCase&&(e=n(e.charAt(0))+e.slice(1)),A0(e,n))}var Bi=be(Zl(),1);c();c();var Yl=(e=0)=>t=>`\x1B[${t+e}m`,Jl=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Kl=(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]}},Xx=Object.keys(J.modifier),N0=Object.keys(J.color),I0=Object.keys(J.bgColor),ev=[...N0,...I0];function j0(){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=Yl(),J.color.ansi256=Jl(),J.color.ansi16m=Kl(),J.bgColor.ansi=Yl(10),J.bgColor.ansi256=Jl(10),J.bgColor.ansi16m=Kl(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 $0=j0(),Ql=$0;var Gn=new Set(["\x1B","\x9B"]),M0=39,Oi="\x07",tf="[",q0="]",rf="m",Un=`${q0}8;;`,Xl=e=>`${Gn.values().next().value}${tf}${e}${rf}`,ef=e=>`${Gn.values().next().value}${Un}${e}${Oi}`,U0=e=>e.split(" ").map(t=>fe(t)),ki=(e,t,r)=>{let n=[...t],s=!1,i=!1,o=fe(Bt(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+Un.length).join("")===Un),s){i?a===Oi&&(s=!1,i=!1):a===rf&&(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())},G0=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("")},H0=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",s,i,o=U0(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(""),ki(u,p,t);continue}if(m+o[y]>t&&m>0&&o[y]>0){if(r.wordWrap===!1&&m<t){ki(u,p,t);continue}u.push("")}if(m+o[y]>t&&r.wordWrap===!1){ki(u,p,t);continue}u[u.length-1]+=p}r.trim!==!1&&(u=u.map(y=>G0(y)));let a=u.join(`
42
- `),l=[...a],f=0;for(let[y,p]of l.entries()){if(n+=p,Gn.has(p)){let{groups:g}=new RegExp(`(?:\\${tf}(?<code>\\d+)m|\\${Un}(?<uri>.*)${Oi})`).exec(a.slice(f))||{groups:{}};if(g.code!==void 0){let d=Number.parseFloat(g.code);s=d===M0?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]===`
43
- `?(i&&(n+=ef("")),s&&m&&(n+=Xl(m))):p===`
44
- `&&(s&&m&&(n+=Xl(s)),i&&(n+=ef(i))),f+=p.length}return n};function Hn(e,t,r){return String(e).normalize().replaceAll(`\r
45
- `,`
46
- `).split(`
47
- `).map(n=>H0(n,t,r)).join(`
48
- `)}var X0=be(xi(),1),ut=`
49
- `,ve=" ",Lr="none",af=()=>{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},nf=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===Lr?0:2,z0=e=>{let t=["topLeft","topRight","bottomRight","bottomLeft","left","right","top","bottom"],r;if(e===Lr){e={};for(let n of t)e[n]=""}if(typeof e=="string"){if(r=uf.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},W0=(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},V0=(e,{padding:t,width:r,textAlignment:n,height:s})=>{e=(0,Bi.default)(e,{align:n});let i=e.split(ut),o=qn(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(`
50
- `),d=Math.max(...g.map(E=>fe(E)));for(let E of g){let F;switch(n){case"center":{F=ve.repeat((u-d)/2)+E;break}case"right":{F=ve.repeat(u-d)+E;break}default:{F=E;break}}f.push(F)}}i=f}n==="center"&&o<u?i=i.map(f=>ve.repeat((u-o)/2)+f):n==="right"&&o<u&&(i=i.map(f=>ve.repeat(u-o)+f));let a=ve.repeat(t.left),l=ve.repeat(t.right);return i=i.map(f=>{let y=a+f+l;return y+ve.repeat(r-fe(y))}),t.top>0&&(i=[...Array.from({length:t.top}).fill(ve.repeat(r)),...i]),t.bottom>0&&(i=[...i,...Array.from({length:t.bottom}).fill(ve.repeat(r))]),s&&i.length>s?i=i.slice(0,s):s&&i.length<s&&(i=[...i,...Array.from({length:s-i.length}).fill(ve.repeat(r))]),i.join(ut)},Z0=(e,t,r)=>{let n=f=>{let y=r.borderColor?K0(r.borderColor)(f):f;return r.dimBorder?Ue.dim(y):y},s=f=>r.backgroundColor?Q0(r.backgroundColor)(f):f,i=z0(r.borderStyle),o=af(),u=ve.repeat(r.margin.left);if(r.float==="center"){let f=Math.max((o-t-Rr(r.borderStyle))/2,0);u=ve.repeat(f)}else if(r.float==="right"){let f=Math.max(o-t-r.margin.right-Rr(r.borderStyle),0);u=ve.repeat(f)}let a="";r.margin.top&&(a+=ut.repeat(r.margin.top)),(r.borderStyle!==Lr||r.title)&&(a+=n(u+i.topLeft+(r.title?W0(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!==Lr&&(a+=ut+n(u+i.bottomLeft+i.bottom.repeat(t)+i.bottomRight)),r.margin.bottom&&(a+=ut.repeat(r.margin.bottom)),a},Y0=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},sf=(e,t)=>t===Lr?e:` ${e} `,J0=(e,t)=>{t=Y0(t);let r=t.width!==void 0,n=af(),s=Rr(t.borderStyle),i=n-t.margin.left-t.margin.right-s,o=qn(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&&=sf(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,i-2)),t.title&&(t.title=sf(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},Pi=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),of=e=>typeof e=="string"&&(Ue[e]??Pi(e)),K0=e=>Pi(e)?Ue.hex(e):Ue[e],Q0=e=>Pi(e)?Ue.bgHex(e):Ue[Si(["bg",e])];function Li(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&&!of(t.borderColor))throw new Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!of(t.backgroundColor))throw new Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=nf(t.padding),t.margin=nf(t.margin),t=J0(e,t),e=V0(e,t),Z0(e,t.width,t)}c();var eg=/(?:\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.))|(?:{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(})|((?:.|[\r\n\f])+?)/gi,cf=/(?:^|\.)(?:(?:(\w+)(?:\(([^)]*)\))?)|(?:#(?=[:a-fA-F\d]{2,})([a-fA-F\d]{6})?(?::([a-fA-F\d]{6}))?))/g,tg=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,rg=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ng=new Map([["n",`
51
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ff(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)):ng.get(e)||e}function sg(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(tg))r.push(s[2].replace(rg,(u,a,l)=>a?ff(a):l));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`)}return r}function lf(e){let t=Number.parseInt(e,16);return[t>>16&255,t>>8&255,t&255]}function ig(e){cf.lastIndex=0;let t=[],r;for(;(r=cf.exec(e))!==null;){let n=r[1];r[2]?t.push([n,...sg(n,r[2])]):r[3]||r[4]?(r[3]&&t.push(["rgb",...lf(r[3])]),r[4]&&t.push(["bgRgb",...lf(r[4])])):t.push([n])}return t}function hf(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(eg,(u,a,l,f,y,p)=>{if(a)o.push(ff(a));else if(f){let m=o.join("");o=[],i.push(s.length===0?m:t(s)(m)),s.push({inverse:l,styles:ig(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 og=hf(Ue),Ri=df(og),ug=hf(tu),yv=df(ug);c();function Ni(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))}var Mo=be(pf(),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 ag from"node:os";var cg=()=>ag.homedir().replace(/\\/g,"/"),mf=cg;var yf=/\s+at.*[(\s](.*)\)?/,gf=/^(?:(?:(?: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?mf():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
52
- `).filter(o=>{let u=o.match(yf);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?!gf.test(a)&&n(a):!gf.test(a)}).filter(o=>o.trim()!=="").map(o=>(s&&(o=o.replace(s,"")),t&&(o=o.replace(yf,(u,a)=>u.replace(a,a.replace(i,"~")))),o)).join(`
53
- `)}c();c();c();var Ff=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function lg(e){return Ff.includes(e)}var fg=["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",...Ff];function hg(e){return fg.includes(e)}var dg=["null","undefined","string","number","bigint","boolean","symbol"];function Dg(e){return dg.includes(e)}function or(e){return t=>typeof t===e}var{toString:pg}=Object.prototype,Ir=e=>{let t=pg.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&h.domElement(e))return"HTMLElement";if(hg(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=or("undefined");h.string=or("string");var mg=or("number");h.number=e=>mg(e)&&!h.nan(e);h.positiveNumber=e=>h.number(e)&&e>0;h.negativeNumber=e=>h.number(e)&&e<0;h.bigint=or("bigint");h.function_=or("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=or("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 yg=e=>h.function_(e?.then)&&h.function_(e?.catch);h.promise=e=>h.nativePromise(e)||yg(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)||Dg(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=>lg(Ir(e));var gg=e=>h.safeInteger(e)&&e>=0;h.arrayLike=e=>!h.nullOrUndefined(e)&&!h.function_(e)&&gg(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 Fg=1,Eg=["innerHTML","ownerDocument","style","attributes","nodeValue"];h.domElement=e=>h.object(e)&&e.nodeType===Fg&&h.string(e.nodeName)&&!h.plainObject(e)&&Eg.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 Ef=e=>t=>h.integer(t)&&Math.abs(t%2)===e;h.evenInteger=Ef(0);h.oddInteger=Ef(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 Cg=e=>h.string(e)&&!/\S/.test(e);h.emptyStringOrWhitespace=e=>h.emptyString(e)||Cg(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 Cf=(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=>Cf(Array.prototype.some,n,t));h.all=(e,...t)=>Cf(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 DC}from"node:events";c();var $i=class extends Error{constructor(t){super(t||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},ur=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(ur.prototype,Promise.prototype);c();function bg(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,bg(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(`
54
- `).reverse(),o=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
55
- `).reverse();for(;o.length>0&&o[0]===i[0];)i.shift();this.stack=`${this.stack.slice(0,s)}${i.reverse().join(`
56
- `)}${o.reverse().join(`
57
- `)}`}}},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 cd from"node:process";import{Buffer as No}from"node:buffer";import{Duplex as uC}from"node:stream";import aC,{ServerResponse as ad}from"node:http";c();var wf=be(bf(),1);import{errorMonitor as _g}from"events";import{types as xg}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(_g,()=>{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,xg.isProxy(o))return;let u=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};o.prependOnceListener("lookup",u),(0,wf.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},_f=vg;c();import Yg from"node:events";import Xn from"node:url";import Jg from"node:crypto";import Kg,{PassThrough as Qg}from"node:stream";c();var Sg="text/plain",Ag="us-ascii",Gi=(e,t)=>t.some(r=>r instanceof RegExp?r.test(e):r===e),Tg=new Set(["https:","http:","file:"]),kg=e=>{try{let{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!Tg.has(t)}catch{return!1}},Og=(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===Ag)?"":`${p}${m?`=${m}`:""}`}).filter(Boolean)];return u&&f.push("base64"),(f.length>0||a&&a!==Sg)&&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 Og(e,t);if(kg(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 Rf=be(Wi(),1),es=be(Af(),1);c();import{Readable as zg}from"node:stream";c();function ar(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t.toLowerCase(),r]))}var cr=class extends zg{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=ar(r),this.body=n,this.url=s}};var qr=be(Pf(),1);c();var Zg=["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),...Zg]),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 Qn=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 Qi=class{constructor(t,r){this.hooks=new Map,this.request=()=>(n,s)=>{let i;if(typeof n=="string")i=Ki(Xn.parse(n)),n={};else if(n instanceof Xn.URL)i=Ki(Xn.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,...tF(i)},n.headers=Object.fromEntries(Xg(n.headers).map(([p,m])=>[p.toLowerCase(),m]));let o=new Yg,u=Hi(Xn.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 Kg.Readable?n.cache=!1:a+=`:${Jg.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=Lf(x.policy.responseHeaders());F=new cr({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=eF(F),(async()=>{try{let x=Rf.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 Qn(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=Lf(E.responseHeaders()),A=new cr({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 qr.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 qr.default?this.cache=r:typeof r=="string"?this.cache=new qr.default({uri:r,namespace:"cacheable-request"}):this.cache=new qr.default({store:r,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=t}},Xg=Object.entries,eF=e=>{let t=new Qg({autoDestroy:!1});return Ji(e,t),e.pipe(t)},tF=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}),Lf=e=>{let t=[];for(let r of Object.keys(e))t[r.toLowerCase()]=e[r];return t},Nf=Qi;var ld=be(Mf(),1);var fd=be(Wi(),1);c();c();c();var ke=e=>typeof e=="function";var oF=e=>ke(e[Symbol.asyncIterator]);async function*uF(e){let t=e.getReader();for(;;){let{done:r,value:n}=await t.read();if(r)break;yield n}}var qf=e=>{if(oF(e))return e;if(ke(e.getReader))return uF(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")};c();var Uf="abcdefghijklmnopqrstuvwxyz0123456789";function Gf(){let e=16,t="";for(;e--;)t+=Uf[Math.random()*Uf.length<<0];return t}c();var eo=e=>String(e).replace(/\r|\n/g,(t,r,n)=>t==="\r"&&n[r+1]!==`
58
- `||t===`
59
- `&&n[r-1]!=="\r"?`\r
60
- `:t);c();var aF=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function to(e){if(aF(e)!=="object")return!1;let t=Object.getPrototypeOf(e);return t==null?!0:(t.constructor&&t.constructor.toString())===Object.toString()}c();function Hf(e,t){if(typeof t=="string"){for(let[r,n]of Object.entries(e))if(t.toLowerCase()===r.toLowerCase())return n}}var zf=e=>new Proxy(e,{get:(t,r)=>Hf(t,r),has:(t,r)=>Hf(t,r)!==void 0});c();var lr=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 Ur=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,Rt,Wr,Vr,rs,no,Wf,cF={enableAdditionalHeaders:!1},ns={writable:!1,configurable:!1},ss=class{constructor(t,r,n){if(Gr.add(this),lt.set(this,`\r
61
- `),Hr.set(this,void 0),ts.set(this,void 0),zr.set(this,"-".repeat(2)),Rt.set(this,new TextEncoder),Wr.set(this,void 0),Vr.set(this,void 0),rs.set(this,void 0),!lr(t))throw new TypeError("Expected first argument to be a FormData instance.");let s;if(to(r)?n=r:s=r,s||(s=Gf()),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.");Ur(this,Vr,Array.from(t.entries()),"f"),Ur(this,rs,{...cF,...n},"f"),Ur(this,Hr,V(this,Rt,"f").encode(V(this,lt,"f")),"f"),Ur(this,ts,V(this,Hr,"f").byteLength,"f"),this.boundary=`form-data-boundary-${s}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Ur(this,Wr,V(this,Rt,"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",Wf).call(this);o&&(this.contentLength=o,i["Content-Length"]=o),this.headers=zf(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,Rt,"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,Rt=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,Rt,"f").encode(`${s}${V(this,lt,"f").repeat(2)}`)},Wf=function(){let r=0;for(let[n,s]of V(this,Vr,"f")){let i=ct(s)?s:V(this,Rt,"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 lF}from"node:buffer";import{promisify as fF}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 lF.byteLength(e);if(D.buffer(e))return e.length;if(Zr(e))return fF(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 hF 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 Vf=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(Vf in e)return dF;e[Vf]=!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??hF.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 DF=({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},Zf=DF;c();import VE from"node:process";import{promisify as nd,inspect as ZE}from"node:util";import{checkServerIdentity as YE}from"node:tls";import JE from"node:http";import KE from"node:https";c();import{V4MAPPED as pF,ADDRCONFIG as mF,ALL as eh,promises as yF,lookup as gF}from"node:dns";import{promisify as ao}from"node:util";import FF from"node:os";var{Resolver:Yf}=yF,fr=Symbol("cacheableLookupCreateConnection"),co=Symbol("cacheableLookupInstance"),Jf=Symbol("expires"),EF=typeof eh=="number",Kf=e=>{if(!(e&&typeof e.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},CF=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(FF.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}},bF=e=>Symbol.iterator in e,is=e=>e.catch(t=>{if(t.code==="ENODATA"||t.code==="ENOTFOUND"||t.code==="ENOENT")return[];throw t}),Xf={ttl:!0},wF={all:!0},_F={all:!0,family:4},xF={all:!0,family:6},Qr=class{constructor({cache:t=new Map,maxTtl:r=1/0,fallbackDuration:n=3600,errorTtl:s=.15,resolver:i=new Yf,lookup:o=gF}={}){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 Yf?(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&pF&&(EF&&r.hints&eh||s.length===0)?CF(n):n=s}else r.family===4&&(n=n.filter(s=>s.family===4));if(r.hints&mF){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,Xf)),is(this._resolve6(t,Xf))]),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,_F)),is(this._dnsLookup(t,xF))]);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[Jf]=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}}bF(this._cache)&&this._tick(n)}}async queryAndCache(t){if(this._hostnamesToFallback.has(t))return this._dnsLookup(t,wF);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[Jf];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(Kf(t),fr in t)throw new Error("CacheableLookup has been already installed");t[fr]=t.createConnection,t[co]=this,t.createConnection=(r,n)=>("lookup"in r||(r.lookup=this.lookup),t[fr](r,n))}uninstall(t){if(Kf(t),t[fr]){if(t[co]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");t.createConnection=t[fr],delete t[fr],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 od=be(rd(),1);c();function Lo(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[sd,QE]=VE.versions.node.split(".").map(Number);function XE(e){for(let t in e){let r=e[t];C.any([D.string,D.number,D.boolean,D.null_,D.undefined],r)}}var eC=new Map,hs,tC=()=>hs||(hs=new Qr,hs),rC={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=Lo(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},nC=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},sC=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},iC=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)},id=(e,t,r)=>{let n=e.hooks?.init;if(n)for(let s of n)s(t,r)},Oe=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=nC(n?._internals??n??rC),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=sC(t),id(this,t,this),id(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,lr,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=nd(r.bind(t)),n=nd(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{XE(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=tC():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=eC: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,ar(t)):this._internals.headers=ar(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 ZE(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??YE,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?iC(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(sd<15||sd===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 od.default.auto}return KE.request}return JE.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 pr=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 oC(e){return e.writable&&!e.writableEnded}var ud=oC;c();function Ds(e){return e.protocol==="unix:"||e.hostname==="unix"}var{buffer:cC}=fd.default,lC=D.string(cd.versions.brotli),fC=new Set(["GET","HEAD"]),Io=new Kr,hC=new Set([300,301,302,303,304,307,308]),dC=["socket","connect","continue","information","upgrade"],ps=()=>{},jt=class e extends uC{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 Oe(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:Zf({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,cd.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 ad&&this._pipedServerResponses.add(t),super.pipe(t,r)}unpipe(t){return t instanceof ad&&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=fC.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(lr(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,ld.default)(t));let s=t.statusCode,i=t;i.statusMessage=i.statusMessage??aC.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=pr(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&&hC.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 Oe(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&&!pr(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 cC(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;_f(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 Nf((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"]=lC?"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)),ud(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 pC=["request","response","redirect","uploadProgress","downloadProgress"];function ys(e){let t,r,n,s=new DC,i=new ur((u,a,l)=>{l(()=>{t.destroy()}),l.shouldReject=!1,l(()=>{a(new ms(t))});let f=y=>{l(()=>{});let p=e??new jt(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(),pr(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,!pr(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,pC),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 mC=async e=>new Promise(t=>{setTimeout(t,e)}),yC=e=>D.function_(e),gC=["get","post","put","patch","head","delete"],hd=e=>{e={options:new Oe(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 jt(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 Oe(void 0,void 0,e.options),i=[...e.handlers],o;for(let u of n)yC(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 hd({options:s,handlers:i,mutableDefaults:!!o})};let r=async function*(n,s){let i=new Oe(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 mC(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 gC)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=hd;var FC={options:new Oe,handlers:[],mutableDefaults:!1},q1=dd(FC);import{inspect as vC}from"node:util";c();c();var EC=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,globalThis.DOMException,globalThis.AssertionError,globalThis.SystemError].filter(Boolean).map(e=>[e.name,e]),CC=new Map(EC),Dd=CC;var bC=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}],jo=new WeakSet,wC=e=>{jo.add(e);let t=e.toJSON();return jo.delete(e),t},_C=e=>Dd.get(e)??Error,md=({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&&pd(e)){let l=_C(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 wC(e);let a=l=>md({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 bC)typeof e[l]<"u"&&e[l]!==null&&Object.defineProperty(r,l,{value:pd(e[l])?a(e[l]):e[l],enumerable:n?!0:f,configurable:!0,writable:!0});return r};function yd(e,t={}){let{maxDepth:r=Number.POSITIVE_INFINITY,useToJSON:n=!0}=t;return typeof e=="object"&&e!==null?md({from:e,seen:[],forceEnumerable:!0,maxDepth:r,depth:0,useToJSON:n,serialize:!0}):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e}function pd(e){return!!e&&typeof e=="object"&&"name"in e&&"message"in e&&"stack"in e}c();import gd from"node:path";var $o=gd.dirname(hl),xC=(...e)=>gd.join($o,...e),nT=(...e)=>xC("assets",...e);var fT=(e,t)=>{let r={...e};for(let[n,s]of Object.entries(t))r[n]||(r[n]=s);return r},hT=(e,t)=>{let r={};for(let n of t)r[n]=e[n];return r},Fd=(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=yd(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=>!Yt(e)&&!Du(e),mr=(e,...t)=>{let r,n={ensureNewLine:!1,ensureEmptyLineAbove:!1,indent:0};return sn(e)?(r=e.content,n={...n,...Fd(e,["content"])}):Yt(e)?r=e:r=(0,Mo.dedent)(Ri(e,...t)),n.ensureEmptyLineAbove&&!r.startsWith(`
62
- `)&&(r=`
63
- `+r),n.ensureNewLine&&!r.endsWith(`
64
- `)&&(r+=`
65
- `),n.boxen&&(r=Li(r,n.boxen)),n.indent&&n.indent>0&&(r=Ni(r,n.indent)),r},CT=(e,...t)=>sn(e)?mr({ensureNewLine:!0,...e}):Yt(e)?mr({ensureNewLine:!0,content:e}):mr({ensureNewLine:!0,content:(0,Mo.dedent)(Ri(e,...t))});c();var qo=(e,...t)=>{if(Ln.logFormat==="json"){sn(e)&&e.json&&wi.writeStdout(JSON.stringify(e.json)+`
66
- `);return}let r=mr(e,...t);wi.writeStdout(r)},AT=(e,...t)=>{sn(e)?qo({ensureNewLine:!0,...e}):Yt(e)?qo({ensureNewLine:!0,content:e}):qo({ensureNewLine:!0,content:mr(e,...t)})};export{Xo as a,Ue as b,Pn as c,ci as d,M as e,VC as f,Yt as g,St as h,ZC as i,YC as j,JC as k,KC as l,QC as m,XC as n,eb as o,tb as p,rb as q,nb as r,sb as s,ib as t,ob as u,ub as v,VD as w,gu as x,yb as y,Dn as z,mu as A,ot as B,y2 as C,Cu as D,pc as E,Bn as F,kt as G,Ln as H,k2 as I,O2 as J,El as K,Bt as L,wi as M,Wl as N,Li as O,Ni as P,pf as Q,ji as R,at as S,q1 as T,$o as U,nT as V,fT as W,hT as X,dT as Y,mr as Z,CT as _,AT as $};
67
- //# sourceMappingURL=chunk-CQLM5U6T.js.map