@terai/dev 0.0.0-dev-20251119210119 → 0.0.0-dev-20251120195727

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 (52) hide show
  1. package/bin.js +1 -1
  2. package/dist/cli.default.cjs +71 -0
  3. package/dist/cli.default.cjs.map +1 -0
  4. package/dist/cli.default.d.cts +1 -0
  5. package/dist/cli.default.d.mts +1 -1
  6. package/dist/cli.default.mjs +67 -20936
  7. package/dist/cli.default.mjs.map +1 -1
  8. package/dist/index.cjs +2 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.cts +9 -0
  11. package/dist/index.d.cts.map +1 -0
  12. package/dist/index.d.mts +7 -5
  13. package/dist/index.d.mts.map +1 -0
  14. package/dist/index.mjs +1 -14
  15. package/dist/index.mjs.map +1 -1
  16. package/package.json +21 -16
  17. package/dist/cli.d.mts +0 -3
  18. package/dist/cli.d.ts +0 -3
  19. package/dist/cli.default.d.ts +0 -1
  20. package/dist/cli.default.js +0 -20920
  21. package/dist/cli.default.js.map +0 -1
  22. package/dist/cli.js +0 -20906
  23. package/dist/cli.js.map +0 -1
  24. package/dist/cli.mjs +0 -20914
  25. package/dist/cli.mjs.map +0 -1
  26. package/dist/commands/extract.d.mts +0 -12
  27. package/dist/commands/extract.d.ts +0 -12
  28. package/dist/commands/extract.js +0 -694
  29. package/dist/commands/extract.js.map +0 -1
  30. package/dist/commands/extract.mjs +0 -662
  31. package/dist/commands/extract.mjs.map +0 -1
  32. package/dist/commands/index.d.mts +0 -5
  33. package/dist/commands/index.d.ts +0 -5
  34. package/dist/commands/index.js +0 -1004
  35. package/dist/commands/index.js.map +0 -1
  36. package/dist/commands/index.mjs +0 -966
  37. package/dist/commands/index.mjs.map +0 -1
  38. package/dist/commands/init.d.mts +0 -12
  39. package/dist/commands/init.d.ts +0 -12
  40. package/dist/commands/init.js +0 -784
  41. package/dist/commands/init.js.map +0 -1
  42. package/dist/commands/init.mjs +0 -748
  43. package/dist/commands/init.mjs.map +0 -1
  44. package/dist/commands/translate.d.mts +0 -10
  45. package/dist/commands/translate.d.ts +0 -10
  46. package/dist/commands/translate.js +0 -731
  47. package/dist/commands/translate.js.map +0 -1
  48. package/dist/commands/translate.mjs +0 -693
  49. package/dist/commands/translate.mjs.map +0 -1
  50. package/dist/index.d.ts +0 -7
  51. package/dist/index.js +0 -41
  52. package/dist/index.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`cac`),u=require(`@terai/runtime`),d=require(`node:process`);d=c(d);let f=require(`node:os`);f=c(f);let p=require(`node:tty`);p=c(p);let m=require(`node:child_process`),h=require(`node:url`);h=c(h);let g=require(`node:path`);g=c(g);let _=require(`node:util`),v=require(`path`);v=c(v);let y=require(`os`);y=c(y);let b=require(`util`),x=require(`events`),S=require(`crypto`);S=c(S);let C=require(`node:http`);C=c(C);let w=require(`node:https`);w=c(w);let T=require(`node:events`);T=c(T);let E=require(`node:buffer`),D=require(`node:stream`);D=c(D);let O=require(`node:crypto`);O=c(O);let ee=require(`node:net`);ee=c(ee);let te=require(`node:tls`),ne=require(`node:dns`),re=require(`node:fs`);re=c(re);let ie=require(`@inquirer/prompts`),ae=require(`preferred-pm`);ae=c(ae);let oe=require(`perfect-debounce`),se=require(`@terai/extractor`),ce=require(`@terai/utils`),le=require(`@terai/translator`),ue=require(`node:worker_threads`);const de=(e=0)=>t=>`\u001B[${t+e}m`,fe=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,pe=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,k={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]}};Object.keys(k.modifier);const me=Object.keys(k.color),he=Object.keys(k.bgColor);[...me,...he];function ge(){let e=new Map;for(let[t,n]of Object.entries(k)){for(let[t,r]of Object.entries(n))k[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=k[t],e.set(r[0],r[1]);Object.defineProperty(k,t,{value:n,enumerable:!1})}return Object.defineProperty(k,`codes`,{value:e,enumerable:!1}),k.color.close=`\x1B[39m`,k.bgColor.close=`\x1B[49m`,k.color.ansi=de(),k.color.ansi256=fe(),k.color.ansi16m=pe(),k.bgColor.ansi=de(10),k.bgColor.ansi256=fe(10),k.bgColor.ansi16m=pe(10),Object.defineProperties(k,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>k.rgbToAnsi256(...k.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>k.ansi256ToAnsi(k.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>k.ansi256ToAnsi(k.hexToAnsi256(e)),enumerable:!1}}),k}var A=ge();function j(e,t=globalThis.Deno?globalThis.Deno.args:d.default.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:M}=d.default;let _e;j(`no-color`)||j(`no-colors`)||j(`color=false`)||j(`color=never`)?_e=0:(j(`color`)||j(`colors`)||j(`color=true`)||j(`color=always`))&&(_e=1);function ve(){if(`FORCE_COLOR`in M)return M.FORCE_COLOR===`true`?1:M.FORCE_COLOR===`false`?0:M.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(M.FORCE_COLOR,10),3)}function ye(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function be(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=ve();r!==void 0&&(_e=r);let i=n?_e:r;if(i===0)return 0;if(n){if(j(`color=16m`)||j(`color=full`)||j(`color=truecolor`))return 3;if(j(`color=256`))return 2}if(`TF_BUILD`in M&&`AGENT_NAME`in M)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(M.TERM===`dumb`)return a;if(d.default.platform===`win32`){let e=f.default.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in M)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in M)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in M)||M.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM===`truecolor`||M.TERM===`xterm-kitty`||M.TERM===`xterm-ghostty`||M.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in M){let e=Number.parseInt((M.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(M.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||`COLORTERM`in M?1:a}function xe(e,t={}){return ye(be(e,{streamIsTTY:e&&e.isTTY,...t}))}var Se={stdout:xe({isTTY:p.default.isatty(1)}),stderr:xe({isTTY:p.default.isatty(2)})};function Ce(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function we(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
3
+ `:`
4
+ `)+n,i=r+1,r=e.indexOf(`
5
+ `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:Te,stderr:Ee}=Se,De=Symbol(`GENERATOR`),Oe=Symbol(`STYLER`),ke=Symbol(`IS_EMPTY`),Ae=[`ansi`,`ansi`,`ansi256`,`ansi16m`],je=Object.create(null),Me=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=Te?Te.level:0;e.level=t.level===void 0?n:t.level},Ne=e=>{let t=(...e)=>e.join(` `);return Me(t,e),Object.setPrototypeOf(t,Pe.prototype),t};function Pe(e){return Ne(e)}Object.setPrototypeOf(Pe.prototype,Function.prototype);for(let[e,t]of Object.entries(A))je[e]={get(){let n=Re(this,Le(t.open,t.close,this[Oe]),this[ke]);return Object.defineProperty(this,e,{value:n}),n}};je.visible={get(){let e=Re(this,this[Oe],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const Fe=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?A[n].ansi16m(...r):t===`ansi256`?A[n].ansi256(A.rgbToAnsi256(...r)):A[n].ansi(A.rgbToAnsi(...r)):e===`hex`?Fe(`rgb`,t,n,...A.hexToRgb(...r)):A[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){je[e]={get(){let{level:t}=this;return function(...n){let r=Le(Fe(e,Ae[t],`color`,...n),A.color.close,this[Oe]);return Re(this,r,this[ke])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);je[t]={get(){let{level:t}=this;return function(...n){let r=Le(Fe(e,Ae[t],`bgColor`,...n),A.bgColor.close,this[Oe]);return Re(this,r,this[ke])}}}}const Ie=Object.defineProperties(()=>{},{...je,level:{enumerable:!0,get(){return this[De].level},set(e){this[De].level=e}}}),Le=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},Re=(e,t,n)=>{let r=(...e)=>ze(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,Ie),r[De]=e,r[Oe]=t,r[ke]=n,r},ze=(e,t)=>{if(e.level<=0||!t)return e[ke]?``:t;let n=e[Oe];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=Ce(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
6
+ `);return a!==-1&&(t=we(t,i,r,a)),r+t+i};Object.defineProperties(Pe.prototype,je);const Be=Pe();Pe({level:Ee?Ee.level:0});var N=Be;function Ve(e){return d.default.stdout.write(`${e}\n`)}function He(e){return d.default.stderr.write(`${e}\n`)}function Ue(e,t,n,r,i,a){let o=(Array.isArray(a)?a:[a||``].filter(Boolean)).map(e=>n(e)).join(``);e(`${` `.repeat(3)} ${t(r)} ${t(i)} ${o}`)}function We(e,t){Ue(Ve,N.yellow,N.yellow,`●`,e,t)}function Ge(e,t){Ue(Ve,N.yellow,N.dim,`●`,e,t)}function Ke(e,t){Ue(Ve,N.cyan,N.dim,`◼`,e,t)}function qe(e){Ue(Ve,N.green,N.dim,`✔`,e)}function Je(e,t){Ve(``),Ue(He,N.red,N.red,`▲`,e,t)}function Ye(e,t){return Ve(`\n${N.bgWhite(` ${N.whiteBright(e)} `)} ${N.bold(t)}\n`)}const Xe=e=>()=>{let t=performance.now();return n=>{let r=performance.now()-t;e(`${n} ${N.gray(`(${r.toFixed(2)}ms)`)}`)}},P={colors:N,log:Ve,heading:Ye,debug:Ge,info:Ke,warn:We,success:qe,error:Je,time:{success:Xe(qe),info:Xe(Ke),debug:Xe(Ge)}};var Ze=o(((e,t)=>{var n=require(`constants`),r=process.cwd,i=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||=r.call(process),i};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var o=process.chdir;process.chdir=function(e){i=null,o.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,o)}t.exports=s;function s(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),a===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function o(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),Qe=o(((e,t)=>{var n=require(`stream`).Stream;t.exports=r;function r(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw 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())}}})),$e=o(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),et=o(((e,t)=>{var n=require(`fs`),r=Ze(),i=Qe(),a=$e(),o=require(`util`),s,c;typeof Symbol==`function`&&typeof Symbol.for==`function`?(s=Symbol.for(`graceful-fs.queue`),c=Symbol.for(`graceful-fs.previous`)):(s=`___graceful-fs.queue`,c=`___graceful-fs.previous`);function l(){}function u(e,t){Object.defineProperty(e,s,{get:function(){return t}})}var d=l;o.debuglog?d=o.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(d=function(){var e=o.format.apply(o,arguments);e=`GFS4: `+e.split(/\n/).join(`
7
+ GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||h(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,c,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),h()}return Object.defineProperty(t,c,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){d(n[s]),require(`assert`).equal(n[s].length,0)})),global[s]||u(global,n[s]),t.exports=f(a(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=f(n),n.__patched=!0);function f(e){r(e),e.gracefulify=f,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?p([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=o;function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var m=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=m.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=i(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function p(e){d(`ENQUEUE`,e[0].name,e[1]),n[s].push(e),g()}var m;function h(){for(var e=Date.now(),t=0;t<n[s].length;++t)n[s][t].length>2&&(n[s][t][3]=e,n[s][t][4]=e);g()}function g(){if(clearTimeout(m),m=void 0,n[s].length!==0){var e=n[s].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)d(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){d(`TIMEOUT`,t.name,r);var c=r.pop();typeof c==`function`&&c.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(d(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[s].push(e)}m===void 0&&(m=setTimeout(g,0))}}})),tt=c(et(),1);const F=y.default.homedir(),{env:nt}=process,rt=nt.XDG_DATA_HOME||(F?v.default.join(F,`.local`,`share`):void 0),it=nt.XDG_CONFIG_HOME||(F?v.default.join(F,`.config`):void 0),at=nt.XDG_STATE_HOME||(F?v.default.join(F,`.local`,`state`):void 0),ot=nt.XDG_CACHE_HOME||(F?v.default.join(F,`.cache`):void 0),st=nt.XDG_RUNTIME_DIR||void 0,ct=(nt.XDG_DATA_DIRS||`/usr/local/share/:/usr/share/`).split(`:`);rt&&ct.unshift(rt);const lt=(nt.XDG_CONFIG_DIRS||`/etc/xdg`).split(`:`);it&&lt.unshift(it);var ut=o(((e,t)=>{
8
+ /**
9
+ * @preserve
10
+ * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
11
+ *
12
+ * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
13
+ * @see http://github.com/homebrewing/brauhaus-diff
14
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
15
+ * @see http://github.com/garycourt/murmurhash-js
16
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
17
+ * @see http://sites.google.com/site/murmurhash/
18
+ */
19
+ (function(){var e;function n(t,r){var i=this instanceof n?this:e;if(i.reset(r),typeof t==`string`&&t.length>0&&i.hash(t),i!==this)return i}n.prototype.hash=function(e){var t,n,r,i,a=e.length;switch(this.len+=a,n=this.k1,r=0,this.rem){case 0:n^=a>r?e.charCodeAt(r++)&65535:0;case 1:n^=a>r?(e.charCodeAt(r++)&65535)<<8:0;case 2:n^=a>r?(e.charCodeAt(r++)&65535)<<16:0;case 3:n^=a>r?(e.charCodeAt(r)&255)<<24:0,n^=a>r?(e.charCodeAt(r++)&65280)>>8:0}if(this.rem=a+this.rem&3,a-=this.rem,a>0){for(t=this.h1;n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,t^=n,t=t<<13|t>>>19,t=t*5+3864292196&4294967295,!(r>=a);)n=e.charCodeAt(r++)&65535^(e.charCodeAt(r++)&65535)<<8^(e.charCodeAt(r++)&65535)<<16,i=e.charCodeAt(r++),n^=(i&255)<<24^(i&65280)>>8;switch(n=0,this.rem){case 3:n^=(e.charCodeAt(r+2)&65535)<<16;case 2:n^=(e.charCodeAt(r+1)&65535)<<8;case 1:n^=e.charCodeAt(r)&65535}this.h1=t}return this.k1=n,this},n.prototype.result=function(){var e=this.k1,t=this.h1;return e>0&&(e=e*11601+(e&65535)*3432906752&4294967295,e=e<<15|e>>>17,e=e*13715+(e&65535)*461832192&4294967295,t^=e),t^=this.len,t^=t>>>16,t=t*51819+(t&65535)*2246770688&4294967295,t^=t>>>13,t=t*44597+(t&65535)*3266445312&4294967295,t^=t>>>16,t>>>0},n.prototype.reset=function(e){return this.h1=typeof e==`number`?e:0,this.rem=this.k1=this.len=0,this},e=new n,t===void 0?this.MurmurHash3=n:t.exports=n})()})),dt=o(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),ft=o(((e,t)=>{var n=global.process;let r=function(e){return 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`};if(!r(n))t.exports=function(){return function(){}};else{var i=require(`assert`),a=dt(),o=/^win/i.test(n.platform),s=require(`events`);typeof s!=`function`&&(s=s.EventEmitter);var c;n.__signal_exit_emitter__?c=n.__signal_exit_emitter__:(c=n.__signal_exit_emitter__=new s,c.count=0,c.emitted={}),c.infinite||=(c.setMaxListeners(1/0),!0),t.exports=function(e,t){if(!r(global.process))return function(){};i.equal(typeof e,`function`,`a callback must be provided for exit handler`),f===!1&&p();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),c.on(n,e),function(){c.removeListener(n,e),c.listeners(`exit`).length===0&&c.listeners(`afterexit`).length===0&&l()}};var l=function(){!f||!r(global.process)||(f=!1,a.forEach(function(e){try{n.removeListener(e,d[e])}catch{}}),n.emit=g,n.reallyExit=m,--c.count)};t.exports.unload=l;var u=function(e,t,n){c.emitted[e]||(c.emitted[e]=!0,c.emit(e,t,n))},d={};a.forEach(function(e){d[e]=function(){r(global.process)&&n.listeners(e).length===c.count&&(l(),u(`exit`,null,e),u(`afterexit`,null,e),o&&e===`SIGHUP`&&(e=`SIGINT`),n.kill(n.pid,e))}}),t.exports.signals=function(){return a};var f=!1,p=function(){f||!r(global.process)||(f=!0,c.count+=1,a=a.filter(function(e){try{return n.on(e,d[e]),!0}catch{return!1}}),n.emit=_,n.reallyExit=h)};t.exports.load=p;var m=n.reallyExit,h=function(e){r(global.process)&&(n.exitCode=e||0,u(`exit`,n.exitCode,null),u(`afterexit`,n.exitCode,null),m.call(n,n.exitCode))},g=n.emit,_=function(e,t){if(e===`exit`&&r(global.process)){t!==void 0&&(n.exitCode=t);var i=g.apply(this,arguments);return u(`exit`,n.exitCode,null),u(`afterexit`,n.exitCode,null),i}else return g.apply(this,arguments)}}})),pt=o(((e,t)=>{t.exports=i,i.strict=a,i.loose=o;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return a(e)||o(e)}function a(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return r[n.call(e)]}})),mt=o(((e,t)=>{var n=pt().strict;t.exports=function(e){if(n(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}else return Buffer.from(e)}})),ht=o(((e,t)=>{t.exports=_,t.exports.sync=v,t.exports._getTmpname=f,t.exports._cleanupOnExit=p;let n=require(`fs`),r=ut(),i=ft(),a=require(`path`),o=pt(),s=mt(),{promisify:c}=require(`util`),l={},u=(function(){try{return require(`worker_threads`).threadId}catch{return 0}})(),d=0;function f(e){return e+`.`+r(__filename).hash(String(process.pid)).hash(String(u)).hash(String(++d)).result()}function p(e){return()=>{try{n.unlinkSync(typeof e==`function`?e():e)}catch{}}}function m(e){return new Promise(t=>{l[e]||(l[e]=[]),l[e].push(t),l[e].length===1&&t()})}function h(e){return e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}async function g(e,t,r={}){typeof r==`string`&&(r={encoding:r});let u,d,g=i(p(()=>d)),_=a.resolve(e);try{await m(_);let i=await c(n.realpath)(e).catch(()=>e);if(d=f(i),!r.mode||!r.chown){let e=await c(n.stat)(i).catch(()=>{});e&&(r.mode??=e.mode,r.chown==null&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}u=await c(n.open)(d,`w`,r.mode),r.tmpfileCreated&&await r.tmpfileCreated(d),o(t)&&(t=s(t)),Buffer.isBuffer(t)?await c(n.write)(u,t,0,t.length,0):t!=null&&await c(n.write)(u,String(t),0,String(r.encoding||`utf8`)),r.fsync!==!1&&await c(n.fsync)(u),await c(n.close)(u),u=null,r.chown&&await c(n.chown)(d,r.chown.uid,r.chown.gid).catch(e=>{if(!h(e))throw e}),r.mode&&await c(n.chmod)(d,r.mode).catch(e=>{if(!h(e))throw e}),await c(n.rename)(d,i)}finally{u&&await c(n.close)(u).catch(()=>{}),g(),await c(n.unlink)(d).catch(()=>{}),l[_].shift(),l[_].length>0?l[_][0]():delete l[_]}}function _(e,t,n,r){n instanceof Function&&(r=n,n={});let i=g(e,t,n);return r&&i.then(r,r),i}function v(e,t,r){typeof r==`string`?r={encoding:r}:r||={};try{e=n.realpathSync(e)}catch{}let a=f(e);if(!r.mode||!r.chown)try{let t=n.statSync(e);r=Object.assign({},r),r.mode||=t.mode,!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch{}let c,l=p(a),u=i(l),d=!0;try{if(c=n.openSync(a,`w`,r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(a),o(t)&&(t=s(t)),Buffer.isBuffer(t)?n.writeSync(c,t,0,t.length,0):t!=null&&n.writeSync(c,String(t),0,String(r.encoding||`utf8`)),r.fsync!==!1&&n.fsyncSync(c),n.closeSync(c),c=null,r.chown)try{n.chownSync(a,r.chown.uid,r.chown.gid)}catch(e){if(!h(e))throw e}if(r.mode)try{n.chmodSync(a,r.mode)}catch(e){if(!h(e))throw e}n.renameSync(a,e),d=!1}finally{if(c)try{n.closeSync(c)}catch{}u(),d&&l()}}})),gt=o(((e,t)=>{t.exports=e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)}})),_t=o(((e,t)=>{let n=gt(),r=new Set([`__proto__`,`prototype`,`constructor`]),i=e=>!e.some(e=>r.has(e));function a(e){let t=e.split(`.`),n=[];for(let e=0;e<t.length;e++){let r=t[e];for(;r[r.length-1]===`\\`&&t[e+1]!==void 0;)r=r.slice(0,-1)+`.`,r+=t[++e];n.push(r)}return i(n)?n:[]}t.exports={get(e,t,r){if(!n(e)||typeof t!=`string`)return r===void 0?e:r;let i=a(t);if(i.length!==0){for(let t=0;t<i.length;t++)if(e=e[i[t]],e==null){if(t!==i.length-1)return r;break}return e===void 0?r:e}},set(e,t,r){if(!n(e)||typeof t!=`string`)return e;let i=e,o=a(t);for(let t=0;t<o.length;t++){let i=o[t];n(e[i])||(e[i]={}),t===o.length-1&&(e[i]=r),e=e[i]}return i},delete(e,t){if(!n(e)||typeof t!=`string`)return!1;let r=a(t);for(let t=0;t<r.length;t++){let i=r[t];if(t===r.length-1)return delete e[i],!0;if(e=e[i],!n(e))return!1}},has(e,t){if(!n(e)||typeof t!=`string`)return!1;let r=a(t);if(r.length===0)return!1;for(let t=0;t<r.length;t++)if(n(e)){if(!(r[t]in e))return!1;e=e[r[t]]}else return!1;return!0}}})),vt=c(_t(),1),yt=c(ht(),1);const bt=(0,b.promisify)(S.default.randomBytes),xt=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`.split(``),St=`0123456789`.split(``),Ct=`CDEHKMPRTUWXY012458`.split(``),wt=`!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~`.split(``),Tt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.split(``),Et=(e,t)=>{let n=t.length,r=Math.floor(65536/n)*n-1,i=2*Math.ceil(1.1*e),a=``,o=0;for(;o<e;){let s=S.default.randomBytes(i),c=0;for(;c<i&&o<e;){let e=s.readUInt16LE(c);c+=2,!(e>r)&&(a+=t[e%n],o++)}}return a},Dt=async(e,t)=>{let n=t.length,r=Math.floor(65536/n)*n-1,i=2*Math.ceil(1.1*e),a=``,o=0;for(;o<e;){let s=await bt(i),c=0;for(;c<i&&o<e;){let e=s.readUInt16LE(c);c+=2,!(e>r)&&(a+=t[e%n],o++)}}return a},Ot=(e,t,n)=>S.default.randomBytes(e).toString(t).slice(0,n),kt=async(e,t,n)=>(await bt(e)).toString(t).slice(0,n),At=new Set([void 0,`hex`,`base64`,`url-safe`,`numeric`,`distinguishable`,`ascii-printable`,`alphanumeric`]),jt=(e,t)=>({length:n,type:r,characters:i})=>{if(!(n>=0&&Number.isFinite(n)))throw TypeError("Expected a `length` to be a non-negative finite number");if(r!==void 0&&i!==void 0)throw TypeError("Expected either `type` or `characters`");if(i!==void 0&&typeof i!=`string`)throw TypeError("Expected `characters` to be string");if(!At.has(r))throw TypeError(`Unknown type: ${r}`);if(r===void 0&&i===void 0&&(r=`hex`),r===`hex`||r===void 0&&i===void 0)return t(Math.ceil(n*.5),`hex`,n);if(r===`base64`)return t(Math.ceil(n*.75),`base64`,n);if(r===`url-safe`)return e(n,xt);if(r===`numeric`)return e(n,St);if(r===`distinguishable`)return e(n,Ct);if(r===`ascii-printable`)return e(n,wt);if(r===`alphanumeric`)return e(n,Tt);if(i.length===0)throw TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw TypeError("Expected `characters` string length to be less or equal to 65536");return e(n,i.split(``))},Mt=jt(Et,Ot);Mt.async=jt(Dt,kt);var Nt=Mt;function Pt(){return Nt({length:32})}const Ft=it||v.default.join(y.default.tmpdir(),Pt()),It=`You don't have access to this file.`,Lt={mode:448,recursive:!0},Rt={mode:384};var zt=class{constructor(e,t,n={}){let r=n.globalConfigPath?v.default.join(e,`config.json`):v.default.join(`configstore`,`${e}.json`);this._path=n.configPath||v.default.join(Ft,r),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(tt.default.readFileSync(this._path,`utf8`))}catch(e){if(e.code===`ENOENT`)return{};if(e.code===`EACCES`&&(e.message=`${e.message}\n${It}\n`),e.name===`SyntaxError`)return yt.default.sync(this._path,``,Rt),{};throw e}}set all(e){try{tt.default.mkdirSync(v.default.dirname(this._path),Lt),yt.default.sync(this._path,JSON.stringify(e,void 0,` `),Rt)}catch(e){throw e.code===`EACCES`&&(e.message=`${e.message}\n${It}\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return vt.default.get(this.all,e)}set(e,t){let n=this.all;if(arguments.length===1)for(let t of Object.keys(e))vt.default.set(n,t,e[t]);else vt.default.set(n,e,t);this.all=n}has(e){return vt.default.has(this.all,e)}delete(e){let t=this.all;vt.default.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}};const Bt=10,Vt=(e=0)=>t=>`\u001B[${t+e}m`,Ht=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,Ut=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,I={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]}},Wt=Object.keys(I.modifier),Gt=Object.keys(I.color),Kt=Object.keys(I.bgColor),qt=[...Gt,...Kt];function Jt(){let e=new Map;for(let[t,n]of Object.entries(I)){for(let[t,r]of Object.entries(n))I[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=I[t],e.set(r[0],r[1]);Object.defineProperty(I,t,{value:n,enumerable:!1})}return Object.defineProperty(I,`codes`,{value:e,enumerable:!1}),I.color.close=`\x1B[39m`,I.bgColor.close=`\x1B[49m`,I.color.ansi=Vt(),I.color.ansi256=Ht(),I.color.ansi16m=Ut(),I.bgColor.ansi=Vt(10),I.bgColor.ansi256=Ht(10),I.bgColor.ansi16m=Ut(10),Object.defineProperties(I,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>I.rgbToAnsi256(...I.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>I.ansi256ToAnsi(I.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>I.ansi256ToAnsi(I.hexToAnsi256(e)),enumerable:!1}}),I}const Yt=Jt();var L=Yt;function R(e,t=globalThis.Deno?globalThis.Deno.args:d.default.argv){let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}const{env:z}=d.default;let Xt;R(`no-color`)||R(`no-colors`)||R(`color=false`)||R(`color=never`)?Xt=0:(R(`color`)||R(`colors`)||R(`color=true`)||R(`color=always`))&&(Xt=1);function Zt(){if(`FORCE_COLOR`in z)return z.FORCE_COLOR===`true`?1:z.FORCE_COLOR===`false`?0:z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(z.FORCE_COLOR,10),3)}function Qt(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function $t(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=Zt();r!==void 0&&(Xt=r);let i=n?Xt:r;if(i===0)return 0;if(n){if(R(`color=16m`)||R(`color=full`)||R(`color=truecolor`))return 3;if(R(`color=256`))return 2}if(`TF_BUILD`in z&&`AGENT_NAME`in z)return 1;if(e&&!t&&i===void 0)return 0;let a=i||0;if(z.TERM===`dumb`)return a;if(d.default.platform===`win32`){let e=f.default.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in z)return[`GITHUB_ACTIONS`,`GITEA_ACTIONS`,`CIRCLECI`].some(e=>e in z)?3:[`TRAVIS`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in z)||z.CI_NAME===`codeship`?1:a;if(`TEAMCITY_VERSION`in z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(z.TEAMCITY_VERSION)?1:0;if(z.COLORTERM===`truecolor`||z.TERM===`xterm-kitty`||z.TERM===`xterm-ghostty`||z.TERM===`wezterm`)return 3;if(`TERM_PROGRAM`in z){let e=Number.parseInt((z.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(z.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(z.TERM)||`COLORTERM`in z?1:a}function en(e,t={}){return Qt($t(e,{streamIsTTY:e&&e.isTTY,...t}))}const tn={stdout:en({isTTY:p.default.isatty(1)}),stderr:en({isTTY:p.default.isatty(2)})};var nn=tn;function rn(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function an(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
20
+ `:`
21
+ `)+n,i=r+1,r=e.indexOf(`
22
+ `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:on,stderr:sn}=nn,cn=Symbol(`GENERATOR`),ln=Symbol(`STYLER`),un=Symbol(`IS_EMPTY`),dn=[`ansi`,`ansi`,`ansi256`,`ansi16m`],fn=Object.create(null),pn=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=on?on.level:0;e.level=t.level===void 0?n:t.level},mn=e=>{let t=(...e)=>e.join(` `);return pn(t,e),Object.setPrototypeOf(t,hn.prototype),t};function hn(e){return mn(e)}Object.setPrototypeOf(hn.prototype,Function.prototype);for(let[e,t]of Object.entries(L))fn[e]={get(){let n=yn(this,vn(t.open,t.close,this[ln]),this[un]);return Object.defineProperty(this,e,{value:n}),n}};fn.visible={get(){let e=yn(this,this[ln],!0);return Object.defineProperty(this,`visible`,{value:e}),e}};const gn=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?L[n].ansi16m(...r):t===`ansi256`?L[n].ansi256(L.rgbToAnsi256(...r)):L[n].ansi(L.rgbToAnsi(...r)):e===`hex`?gn(`rgb`,t,n,...L.hexToRgb(...r)):L[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){fn[e]={get(){let{level:t}=this;return function(...n){let r=vn(gn(e,dn[t],`color`,...n),L.color.close,this[ln]);return yn(this,r,this[un])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);fn[t]={get(){let{level:t}=this;return function(...n){let r=vn(gn(e,dn[t],`bgColor`,...n),L.bgColor.close,this[ln]);return yn(this,r,this[un])}}}}const _n=Object.defineProperties(()=>{},{...fn,level:{enumerable:!0,get(){return this[cn].level},set(e){this[cn].level=e}}}),vn=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},yn=(e,t,n)=>{let r=(...e)=>bn(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,_n),r[cn]=e,r[ln]=t,r[un]=n,r},bn=(e,t)=>{if(e.level<=0||!t)return e[un]?``:t;let n=e[ln];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=rn(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
23
+ `);return a!==-1&&(t=an(t,i,r,a)),r+t+i};Object.defineProperties(hn.prototype,fn);const xn=hn(),Sn=hn({level:sn?sn.level:0});var B=xn,Cn=o(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),wn=o(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),Tn=o(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Cn(),a=wn();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),En=o(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),Dn=o(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),V=o(((e,t)=>{let n=wn(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=Cn(),{safeRe:a,t:o}=Tn(),s=En(),{compareIdentifiers:c}=Dn();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),On=o(((e,t)=>{let n=V();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),kn=o(((e,t)=>{let n=On();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),An=o(((e,t)=>{let n=On();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),jn=o(((e,t)=>{let n=V();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Mn=o(((e,t)=>{let n=On();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),Nn=o(((e,t)=>{let n=V();t.exports=(e,t)=>new n(e,t).major})),Pn=o(((e,t)=>{let n=V();t.exports=(e,t)=>new n(e,t).minor})),Fn=o(((e,t)=>{let n=V();t.exports=(e,t)=>new n(e,t).patch})),In=o(((e,t)=>{let n=On();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),H=o(((e,t)=>{let n=V();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),Ln=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(t,e,r)})),Rn=o(((e,t)=>{let n=H();t.exports=(e,t)=>n(e,t,!0)})),zn=o(((e,t)=>{let n=V();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),Bn=o(((e,t)=>{let n=zn();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Vn=o(((e,t)=>{let n=zn();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Hn=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)>0})),Un=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)<0})),Wn=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)===0})),Gn=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)!==0})),Kn=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)>=0})),qn=o(((e,t)=>{let n=H();t.exports=(e,t,r)=>n(e,t,r)<=0})),Jn=o(((e,t)=>{let n=Wn(),r=Gn(),i=Hn(),a=Kn(),o=Un(),s=qn();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Yn=o(((e,t)=>{let n=V(),r=On(),{safeRe:i,t:a}=Tn();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Xn=o(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),U=o(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ee(this.set[t],e,this.options))return!0;return!1}};let r=new(Xn()),i=En(),a=Zn(),o=wn(),s=V(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=Tn(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=Cn(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),ee=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Zn=o(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=En(),{safeRe:i,t:a}=Tn(),o=Jn(),s=wn(),c=V(),l=U()})),Qn=o(((e,t)=>{let n=U();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),$n=o(((e,t)=>{let n=U();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),er=o(((e,t)=>{let n=V(),r=U();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),tr=o(((e,t)=>{let n=V(),r=U();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),nr=o(((e,t)=>{let n=V(),r=U(),i=Hn();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),rr=o(((e,t)=>{let n=U();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),ir=o(((e,t)=>{let n=V(),r=Zn(),{ANY:i}=r,a=U(),o=Qn(),s=Hn(),c=Un(),l=qn(),u=Kn();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),ar=o(((e,t)=>{let n=ir();t.exports=(e,t,r)=>n(e,t,`>`,r)})),or=o(((e,t)=>{let n=ir();t.exports=(e,t,r)=>n(e,t,`<`,r)})),sr=o(((e,t)=>{let n=U();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),cr=o(((e,t)=>{let n=Qn(),r=H();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),lr=o(((e,t)=>{let n=U(),r=Zn(),{ANY:i}=r,a=Qn(),o=H(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),ur=o(((e,t)=>{let n=Tn(),r=Cn(),i=V(),a=Dn();t.exports={parse:On(),valid:kn(),clean:An(),inc:jn(),diff:Mn(),major:Nn(),minor:Pn(),patch:Fn(),prerelease:In(),compare:H(),rcompare:Ln(),compareLoose:Rn(),compareBuild:zn(),sort:Bn(),rsort:Vn(),gt:Hn(),lt:Un(),eq:Wn(),neq:Gn(),gte:Kn(),lte:qn(),cmp:Jn(),coerce:Yn(),Comparator:Zn(),Range:U(),satisfies:Qn(),toComparators:$n(),maxSatisfying:er(),minSatisfying:tr(),minVersion:nr(),validRange:rr(),outside:ir(),gtr:ar(),ltr:or(),intersects:sr(),simplifyRange:cr(),subset:lr(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}})),dr=c(ur(),1);function fr(e,t){if(e=dr.default.parse(e),t=dr.default.parse(t),!(dr.default.compareBuild(e,t)>=0))return dr.default.diff(e,t)||`build`}const pr=[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`];function mr(e){return pr.includes(e)}const hr=[`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`,...pr];function gr(e){return hr.includes(e)}const _r=[`null`,`undefined`,`string`,`number`,`bigint`,`boolean`,`symbol`];function vr(e){return _r.includes(e)}function yr(e){return t=>typeof t===e}const{toString:br}=Object.prototype,xr=e=>{let t=br.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&G.domElement(e))return`HTMLElement`;if(gr(t))return t},W=e=>t=>xr(t)===e;function G(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(G.observable(e))return`Observable`;if(G.array(e))return`Array`;if(G.buffer(e))return`Buffer`;let t=xr(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw TypeError(`Please don't use object wrappers for primitive types`);return`Object`}G.undefined=yr(`undefined`),G.string=yr(`string`);const Sr=yr(`number`);G.number=e=>Sr(e)&&!G.nan(e),G.positiveNumber=e=>G.number(e)&&e>0,G.negativeNumber=e=>G.number(e)&&e<0,G.bigint=yr(`bigint`),G.function_=yr(`function`),G.null_=e=>e===null,G.class_=e=>G.function_(e)&&e.toString().startsWith(`class `),G.boolean=e=>e===!0||e===!1,G.symbol=yr(`symbol`),G.numericString=e=>G.string(e)&&!G.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),G.array=(e,t)=>Array.isArray(e)?G.function_(t)?e.every(e=>t(e)):!0:!1,G.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,G.blob=e=>W(`Blob`)(e),G.nullOrUndefined=e=>G.null_(e)||G.undefined(e),G.object=e=>!G.null_(e)&&(typeof e==`object`||G.function_(e)),G.iterable=e=>G.function_(e?.[Symbol.iterator]),G.asyncIterable=e=>G.function_(e?.[Symbol.asyncIterator]),G.generator=e=>G.iterable(e)&&G.function_(e?.next)&&G.function_(e?.throw),G.asyncGenerator=e=>G.asyncIterable(e)&&G.function_(e.next)&&G.function_(e.throw),G.nativePromise=e=>W(`Promise`)(e);const Cr=e=>G.function_(e?.then)&&G.function_(e?.catch);G.promise=e=>G.nativePromise(e)||Cr(e),G.generatorFunction=W(`GeneratorFunction`),G.asyncGeneratorFunction=e=>xr(e)===`AsyncGeneratorFunction`,G.asyncFunction=e=>xr(e)===`AsyncFunction`,G.boundFunction=e=>G.function_(e)&&!e.hasOwnProperty(`prototype`),G.regExp=W(`RegExp`),G.date=W(`Date`),G.error=W(`Error`),G.map=e=>W(`Map`)(e),G.set=e=>W(`Set`)(e),G.weakMap=e=>W(`WeakMap`)(e),G.weakSet=e=>W(`WeakSet`)(e),G.weakRef=e=>W(`WeakRef`)(e),G.int8Array=W(`Int8Array`),G.uint8Array=W(`Uint8Array`),G.uint8ClampedArray=W(`Uint8ClampedArray`),G.int16Array=W(`Int16Array`),G.uint16Array=W(`Uint16Array`),G.int32Array=W(`Int32Array`),G.uint32Array=W(`Uint32Array`),G.float32Array=W(`Float32Array`),G.float64Array=W(`Float64Array`),G.bigInt64Array=W(`BigInt64Array`),G.bigUint64Array=W(`BigUint64Array`),G.arrayBuffer=W(`ArrayBuffer`),G.sharedArrayBuffer=W(`SharedArrayBuffer`),G.dataView=W(`DataView`),G.enumCase=(e,t)=>Object.values(t).includes(e),G.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,G.urlInstance=e=>W(`URL`)(e),G.urlString=e=>{if(!G.string(e))return!1;try{return new URL(e),!0}catch{return!1}},G.truthy=e=>!!e,G.falsy=e=>!e,G.nan=e=>Number.isNaN(e),G.primitive=e=>G.null_(e)||vr(typeof e),G.integer=e=>Number.isInteger(e),G.safeInteger=e=>Number.isSafeInteger(e),G.plainObject=e=>{if(typeof e!=`object`||!e)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)},G.typedArray=e=>mr(xr(e));const wr=e=>G.safeInteger(e)&&e>=0;G.arrayLike=e=>!G.nullOrUndefined(e)&&!G.function_(e)&&wr(e.length),G.tupleLike=(e,t)=>G.array(t)&&G.array(e)&&t.length===e.length?t.every((t,n)=>t(e[n])):!1,G.inRange=(e,t)=>{if(G.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(G.array(t)&&t.length===2)return e>=Math.min(...t)&&e<=Math.max(...t);throw TypeError(`Invalid range: ${JSON.stringify(t)}`)};const Tr=1,Er=[`innerHTML`,`ownerDocument`,`style`,`attributes`,`nodeValue`];G.domElement=e=>G.object(e)&&e.nodeType===1&&G.string(e.nodeName)&&!G.plainObject(e)&&Er.every(t=>t in e),G.observable=e=>e?e===e[Symbol.observable]?.()||e===e[`@@observable`]?.():!1,G.nodeStream=e=>G.object(e)&&G.function_(e.pipe)&&!G.observable(e),G.infinite=e=>e===1/0||e===-1/0;const Dr=e=>t=>G.integer(t)&&Math.abs(t%2)===e;G.evenInteger=Dr(0),G.oddInteger=Dr(1),G.emptyArray=e=>G.array(e)&&e.length===0,G.nonEmptyArray=e=>G.array(e)&&e.length>0,G.emptyString=e=>G.string(e)&&e.length===0;const Or=e=>G.string(e)&&!/\S/.test(e);G.emptyStringOrWhitespace=e=>G.emptyString(e)||Or(e),G.nonEmptyString=e=>G.string(e)&&e.length>0,G.nonEmptyStringAndNotWhitespace=e=>G.string(e)&&!G.emptyStringOrWhitespace(e),G.emptyObject=e=>G.object(e)&&!G.map(e)&&!G.set(e)&&Object.keys(e).length===0,G.nonEmptyObject=e=>G.object(e)&&!G.map(e)&&!G.set(e)&&Object.keys(e).length>0,G.emptySet=e=>G.set(e)&&e.size===0,G.nonEmptySet=e=>G.set(e)&&e.size>0,G.emptyMap=e=>G.map(e)&&e.size===0,G.nonEmptyMap=e=>G.map(e)&&e.size>0,G.propertyKey=e=>G.any([G.string,G.number,G.symbol],e),G.formData=e=>W(`FormData`)(e),G.urlSearchParams=e=>W(`URLSearchParams`)(e);const kr=(e,t,n)=>{if(!G.function_(t))throw TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(n.length===0)throw TypeError(`Invalid number of values`);return e.call(n,t)};G.any=(e,...t)=>(G.array(e)?e:[e]).some(e=>kr(Array.prototype.some,e,t)),G.all=(e,...t)=>kr(Array.prototype.every,e,t);const K=(e,t,n,r={})=>{if(!e){let{multipleValues:e}=r,i=e?`received values of types ${[...new Set(n.map(e=>`\`${G(e)}\``))].join(`, `)}`:`received value of type \`${G(n)}\``;throw TypeError(`Expected value which is \`${t}\`, ${i}.`)}},q={undefined:e=>K(G.undefined(e),`undefined`,e),string:e=>K(G.string(e),`string`,e),number:e=>K(G.number(e),`number`,e),positiveNumber:e=>K(G.positiveNumber(e),`positive number`,e),negativeNumber:e=>K(G.negativeNumber(e),`negative number`,e),bigint:e=>K(G.bigint(e),`bigint`,e),function_:e=>K(G.function_(e),`Function`,e),null_:e=>K(G.null_(e),`null`,e),class_:e=>K(G.class_(e),`Class`,e),boolean:e=>K(G.boolean(e),`boolean`,e),symbol:e=>K(G.symbol(e),`symbol`,e),numericString:e=>K(G.numericString(e),`string with a number`,e),array:(e,t)=>{K(G.array(e),`Array`,e),t&&e.forEach(t)},buffer:e=>K(G.buffer(e),`Buffer`,e),blob:e=>K(G.blob(e),`Blob`,e),nullOrUndefined:e=>K(G.nullOrUndefined(e),`null or undefined`,e),object:e=>K(G.object(e),`Object`,e),iterable:e=>K(G.iterable(e),`Iterable`,e),asyncIterable:e=>K(G.asyncIterable(e),`AsyncIterable`,e),generator:e=>K(G.generator(e),`Generator`,e),asyncGenerator:e=>K(G.asyncGenerator(e),`AsyncGenerator`,e),nativePromise:e=>K(G.nativePromise(e),`native Promise`,e),promise:e=>K(G.promise(e),`Promise`,e),generatorFunction:e=>K(G.generatorFunction(e),`GeneratorFunction`,e),asyncGeneratorFunction:e=>K(G.asyncGeneratorFunction(e),`AsyncGeneratorFunction`,e),asyncFunction:e=>K(G.asyncFunction(e),`AsyncFunction`,e),boundFunction:e=>K(G.boundFunction(e),`Function`,e),regExp:e=>K(G.regExp(e),`RegExp`,e),date:e=>K(G.date(e),`Date`,e),error:e=>K(G.error(e),`Error`,e),map:e=>K(G.map(e),`Map`,e),set:e=>K(G.set(e),`Set`,e),weakMap:e=>K(G.weakMap(e),`WeakMap`,e),weakSet:e=>K(G.weakSet(e),`WeakSet`,e),weakRef:e=>K(G.weakRef(e),`WeakRef`,e),int8Array:e=>K(G.int8Array(e),`Int8Array`,e),uint8Array:e=>K(G.uint8Array(e),`Uint8Array`,e),uint8ClampedArray:e=>K(G.uint8ClampedArray(e),`Uint8ClampedArray`,e),int16Array:e=>K(G.int16Array(e),`Int16Array`,e),uint16Array:e=>K(G.uint16Array(e),`Uint16Array`,e),int32Array:e=>K(G.int32Array(e),`Int32Array`,e),uint32Array:e=>K(G.uint32Array(e),`Uint32Array`,e),float32Array:e=>K(G.float32Array(e),`Float32Array`,e),float64Array:e=>K(G.float64Array(e),`Float64Array`,e),bigInt64Array:e=>K(G.bigInt64Array(e),`BigInt64Array`,e),bigUint64Array:e=>K(G.bigUint64Array(e),`BigUint64Array`,e),arrayBuffer:e=>K(G.arrayBuffer(e),`ArrayBuffer`,e),sharedArrayBuffer:e=>K(G.sharedArrayBuffer(e),`SharedArrayBuffer`,e),dataView:e=>K(G.dataView(e),`DataView`,e),enumCase:(e,t)=>K(G.enumCase(e,t),`EnumCase`,e),urlInstance:e=>K(G.urlInstance(e),`URL`,e),urlString:e=>K(G.urlString(e),`string with a URL`,e),truthy:e=>K(G.truthy(e),`truthy`,e),falsy:e=>K(G.falsy(e),`falsy`,e),nan:e=>K(G.nan(e),`NaN`,e),primitive:e=>K(G.primitive(e),`primitive`,e),integer:e=>K(G.integer(e),`integer`,e),safeInteger:e=>K(G.safeInteger(e),`integer`,e),plainObject:e=>K(G.plainObject(e),`plain object`,e),typedArray:e=>K(G.typedArray(e),`TypedArray`,e),arrayLike:e=>K(G.arrayLike(e),`array-like`,e),tupleLike:(e,t)=>K(G.tupleLike(e,t),`tuple-like`,e),domElement:e=>K(G.domElement(e),`HTMLElement`,e),observable:e=>K(G.observable(e),`Observable`,e),nodeStream:e=>K(G.nodeStream(e),`Node.js Stream`,e),infinite:e=>K(G.infinite(e),`infinite number`,e),emptyArray:e=>K(G.emptyArray(e),`empty array`,e),nonEmptyArray:e=>K(G.nonEmptyArray(e),`non-empty array`,e),emptyString:e=>K(G.emptyString(e),`empty string`,e),emptyStringOrWhitespace:e=>K(G.emptyStringOrWhitespace(e),`empty string or whitespace`,e),nonEmptyString:e=>K(G.nonEmptyString(e),`non-empty string`,e),nonEmptyStringAndNotWhitespace:e=>K(G.nonEmptyStringAndNotWhitespace(e),`non-empty string and not whitespace`,e),emptyObject:e=>K(G.emptyObject(e),`empty object`,e),nonEmptyObject:e=>K(G.nonEmptyObject(e),`non-empty object`,e),emptySet:e=>K(G.emptySet(e),`empty set`,e),nonEmptySet:e=>K(G.nonEmptySet(e),`non-empty set`,e),emptyMap:e=>K(G.emptyMap(e),`empty map`,e),nonEmptyMap:e=>K(G.nonEmptyMap(e),`non-empty map`,e),propertyKey:e=>K(G.propertyKey(e),`PropertyKey`,e),formData:e=>K(G.formData(e),`FormData`,e),urlSearchParams:e=>K(G.urlSearchParams(e),`URLSearchParams`,e),evenInteger:e=>K(G.evenInteger(e),`even integer`,e),oddInteger:e=>K(G.oddInteger(e),`odd integer`,e),directInstanceOf:(e,t)=>K(G.directInstanceOf(e,t),`T`,e),inRange:(e,t)=>K(G.inRange(e,t),`in range`,e),any:(e,...t)=>K(G.any(e,...t),`predicate returns truthy for any value`,t,{multipleValues:!0}),all:(e,...t)=>K(G.all(e,...t),`predicate returns truthy for all values`,t,{multipleValues:!0})};Object.defineProperties(G,{class:{value:G.class_},function:{value:G.function_},null:{value:G.null_}}),Object.defineProperties(q,{class:{value:q.class_},function:{value:q.function_},null:{value:q.null_}});var J=G,Ar=class extends Error{constructor(e){super(e||`Promise was canceled`),this.name=`CancelError`}get isCanceled(){return!0}},jr=class e{static fn(t){return(...n)=>new e((e,r,i)=>{n.push(i),t(...n).then(e,r)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,n)=>{this._reject=n;let r=e=>{(!this._isCanceled||!a.shouldReject)&&(this._isPending=!1,t(e))},i=e=>{this._isPending=!1,n(e)},a=e=>{if(!this._isPending)throw Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};Object.defineProperties(a,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e(r,i,a)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let e of this._cancelHandlers)e()}catch(e){this._reject(e);return}this._rejectOnCancel&&this._reject(new Ar(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(jr.prototype,Promise.prototype);function Mr(e){return J.object(e)&&`_onResponse`in e}var Y=class extends Error{constructor(e,t,n){if(super(e),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=t.code??`ERR_GOT_REQUEST_ERROR`,this.input=t.input,Mr(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,J.string(t.stack)&&J.string(this.stack)){let e=this.stack.indexOf(this.message)+this.message.length,n=this.stack.slice(e).split(`
24
+ `).reverse(),r=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split(`
25
+ `).reverse();for(;r.length>0&&r[0]===n[0];)n.shift();this.stack=`${this.stack.slice(0,e)}${n.reverse().join(`
26
+ `)}${r.reverse().join(`
27
+ `)}`}}},Nr=class extends Y{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name=`MaxRedirectsError`,this.code=`ERR_TOO_MANY_REDIRECTS`}},Pr=class extends Y{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name=`HTTPError`,this.code=`ERR_NON_2XX_3XX_RESPONSE`}},Fr=class extends Y{constructor(e,t){super(e.message,e,t),this.name=`CacheError`,this.code=this.code===`ERR_GOT_REQUEST_ERROR`?`ERR_CACHE_ACCESS`:this.code}},Ir=class extends Y{constructor(e,t){super(e.message,e,t),this.name=`UploadError`,this.code=this.code===`ERR_GOT_REQUEST_ERROR`?`ERR_UPLOAD`:this.code}},Lr=class extends Y{constructor(e,t,n){super(e.message,e,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=e.event,this.timings=t}},Rr=class extends Y{constructor(e,t){super(e.message,e,t),this.name=`ReadError`,this.code=this.code===`ERR_GOT_REQUEST_ERROR`?`ERR_READING_RESPONSE_STREAM`:this.code}},zr=class extends Y{constructor(e){super(`Retrying`,{},e),this.name=`RetryError`,this.code=`ERR_RETRYING`}},Br=class extends Y{constructor(e){super(`This operation was aborted.`,{},e),this.code=`ERR_ABORTED`,this.name=`AbortError`}},Vr=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});function n(e){return e.encrypted}let r=(e,t)=>{let r;r=typeof t==`function`?{connect:t}:t;let i=typeof r.connect==`function`,a=typeof r.secureConnect==`function`,o=typeof r.close==`function`,s=()=>{i&&r.connect(),n(e)&&a&&(e.authorized?r.secureConnect():e.authorizationError||e.once(`secureConnect`,r.secureConnect)),o&&e.once(`close`,r.close)};e.writable&&!e.connecting?s():e.connecting?e.once(`connect`,s):e.destroyed&&o&&r.close(e._hadError)};e.default=r,t.exports=r,t.exports.default=r})),Hr=c(Vr(),1);const Ur=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 n=e=>{e.once(x.errorMonitor,()=>{t.error=Date.now(),t.phases.total=t.error-t.start})};n(e);let r=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener(`abort`,r);let i=e=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,b.types.isProxy(e))return;let n=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener(`lookup`,n),(0,Hr.default)(e,{connect:()=>{t.connect=Date.now(),t.lookup===void 0&&(e.removeListener(`lookup`,n),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?i(e.socket):e.prependOnceListener(`socket`,i);let a=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};return e.writableFinished?a():e.prependOnceListener(`finish`,a),e.prependOnceListener(`response`,i=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,i.timings=t,n(i),i.prependOnceListener(`end`,()=>{e.off(`abort`,r),i.off(`aborted`,r),!t.phases.total&&(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)}),i.prependOnceListener(`aborted`,r)}),t};var Wr=Ur;const Gr=`text/plain`,Kr=`us-ascii`,qr=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),Jr=new Set([`https:`,`http:`,`file:`]),Yr=e=>{try{let{protocol:t}=new URL(e);return t.endsWith(`:`)&&!t.includes(`.`)&&!Jr.has(t)}catch{return!1}},Xr=(e,{stripHash:t})=>{let n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups,o=r.split(`;`);a=t?``:a;let s=!1;o[o.length-1]===`base64`&&(o.pop(),s=!0);let c=o.shift()?.toLowerCase()??``,l=[...o.map(e=>{let[t,n=``]=e.split(`=`).map(e=>e.trim());return t===`charset`&&(n=n.toLowerCase(),n===`us-ascii`)?``:`${t}${n?`=${n}`:``}`}).filter(Boolean)];return s&&l.push(`base64`),(l.length>0||c&&c!==`text/plain`)&&l.unshift(c),`data:${l.join(`;`)},${s?i.trim():i}${a?`#${a}`:``}`};function Zr(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,removePath:!1,transformPath:!1,...t},typeof t.defaultProtocol==`string`&&!t.defaultProtocol.endsWith(`:`)&&(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return Xr(e,t);if(Yr(e))return e;let n=e.startsWith(`//`);!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));let r=new URL(e);if(t.forceHttp&&t.forceHttps)throw Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&r.protocol===`https:`&&(r.protocol=`http:`),t.forceHttps&&r.protocol===`http:`&&(r.protocol=`https:`),t.stripAuthentication&&(r.username=``,r.password=``),t.stripHash?r.hash=``:t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,``)),r.pathname){let e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,t=0,n=``;for(;;){let i=e.exec(r.pathname);if(!i)break;let a=i[0],o=i.index,s=r.pathname.slice(t,o);n+=s.replace(/\/{2,}/g,`/`),n+=a,t=o+a.length}let i=r.pathname.slice(t,r.pathname.length);n+=i.replace(/\/{2,}/g,`/`),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname).replace(/\\/g,`%5C`)}catch{}if(t.removeDirectoryIndex===!0&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split(`/`),n=e[e.length-1];qr(n,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join(`/`)+`/`)}if(t.removePath&&(r.pathname=`/`),t.transformPath&&typeof t.transformPath==`function`){let e=r.pathname.split(`/`).filter(Boolean),n=t.transformPath(e);r.pathname=n?.length>0?`/${n.join(`/`)}`:`/`}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,``),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,``))),Array.isArray(t.removeQueryParameters))for(let e of[...r.searchParams.keys()])qr(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(!Array.isArray(t.keepQueryParameters)&&t.removeQueryParameters===!0&&(r.search=``),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(let e of[...r.searchParams.keys()])qr(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){let e=r.search;r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}let t=e.slice(1).split(`&`).filter(e=>e&&!e.includes(`=`));for(let e of t){let t=decodeURIComponent(e);r.search=r.search.replace(`?${t}=`,`?${t}`).replace(`&${t}=`,`&${t}`)}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,``)),t.removeExplicitPort&&r.port&&(r.port=``);let i=e;return e=r.toString(),!t.removeSingleSlash&&r.pathname===`/`&&!i.endsWith(`/`)&&r.hash===``&&(e=e.replace(/\/$/,``)),(t.removeTrailingSlash||r.pathname===`/`)&&r.hash===``&&t.removeSingleSlash&&(e=e.replace(/\/$/,``)),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,`//`)),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,``)),e}var Qr=o(((e,t)=>{let{PassThrough:n}=require(`stream`);t.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,i=r===`buffer`,a=!1;t?a=!(r||i):r||=`utf8`,i&&(r=null);let o=new n({objectMode:a});r&&o.setEncoding(r);let s=0,c=[];return o.on(`data`,e=>{c.push(e),a?s=c.length:s+=e.length}),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,s):c.join(``),o.getBufferedLength=()=>s,o}})),$r=o(((e,t)=>{let{constants:n}=require(`buffer`),r=require(`stream`),{promisify:i}=require(`util`),a=Qr(),o=i(r.pipeline);var s=class extends Error{constructor(){super(`maxBuffer exceeded`),this.name=`MaxBufferError`}};async function c(e,t){if(!e)throw Error(`Expected a stream`);t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,i=a(t);return await new Promise((t,a)=>{let c=e=>{e&&i.getBufferedLength()<=n.MAX_LENGTH&&(e.bufferedData=i.getBufferedValue()),a(e)};(async()=>{try{await o(e,i),t()}catch(e){c(e)}})(),i.on(`data`,()=>{i.getBufferedLength()>r&&c(new s)})}),i.getBufferedValue()}t.exports=c,t.exports.buffer=(e,t)=>c(e,{...t,encoding:`buffer`}),t.exports.array=(e,t)=>c(e,{...t,array:!0}),t.exports.MaxBufferError=s})),ei=o(((e,t)=>{let n=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),i=new Set([500,502,503,504]),a={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},o={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function s(e){let t=parseInt(e,10);return isFinite(t)?t:0}function c(e){return e?i.has(e.status):!0}function l(e){let t={};if(!e)return t;let n=e.trim().split(/,/);for(let e of n){let[n,r]=e.split(/=/,2);t[n.trim()]=r===void 0?!0:r.trim().replace(/^"|"$/g,``)}return t}function u(e){let t=[];for(let n in e){let r=e[n];t.push(r===!0?n:n+`=`+r)}if(t.length)return t.join(`, `)}t.exports=class{constructor(e,t,{shared:n,cacheHeuristic:r,immutableMinTimeToLive:i,ignoreCargoCult:a,_fromObject:o}={}){if(o){this._fromObject(o);return}if(!t||!t.headers)throw Error(`Response headers missing`);this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._ignoreCargoCult=!!a,this._cacheHeuristic=r===void 0?.1:r,this._immutableMinTtl=i===void 0?24*3600*1e3:i,this._status=`status`in t?t.status:200,this._resHeaders=t.headers,this._rescc=l(t.headers[`cache-control`]),this._method=`method`in e?e.method:`GET`,this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=l(e.headers[`cache-control`]),this._ignoreCargoCult&&`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":u(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),t.headers[`cache-control`]==null&&/no-cache/.test(t.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())&&r.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||n.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc[`s-maxage`]||this._rescc[`max-age`]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error(`Request headers missing`)}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,t){return{synchronous:t,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc[`must-revalidate`]||!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let t=l(e.headers[`cache-control`]);return t[`no-cache`]||/no-cache/.test(e.headers.pragma)||t[`max-age`]&&this.age()>s(t[`max-age`])||t[`min-fresh`]&&this.maxAge()-this.age()<s(t[`min-fresh`])?this._evaluateRequestMissResult(e):this.stale()?`max-stale`in t&&(!0===t[`max-stale`]||t[`max-stale`]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e):this._evaluateRequestHitResult(void 0)}_requestMatches(e,t){return!!((!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&e.method===`HEAD`)&&this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc[`must-revalidate`]||this._rescc.public||this._rescc[`s-maxage`])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary===`*`)return!1;let t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let n in e)a[n]||(t[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let e of n)delete t[e]}if(t.warning){let e=t.warning.split(/,/).filter(e=>!/^\s*1[0-9][0-9]/.test(e));e.length?t.warning=e.join(`,`).trim():delete t.warning}return t}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:``)+`113 - "rfc7234 5.5.4"`),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return s(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 s(this._rescc[`s-maxage`])}if(this._rescc[`max-age`])return s(this._rescc[`max-age`]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<t?0:Math.max(e,(n-t)/1e3)}if(this._resHeaders[`last-modified`]){let n=Date.parse(this._resHeaders[`last-modified`]);if(isFinite(n)&&t>n)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+s(this._rescc[`stale-if-error`]),n=e+s(this._rescc[`stale-while-revalidate`]);return Math.round(Math.max(0,e,t,n)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+s(this._rescc[`stale-if-error`])>this.age()}useStaleWhileRevalidate(){let e=s(this._rescc[`stale-while-revalidate`]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error(`Reinitialized`);if(!e||e.v!==1)throw Error(`Invalid serialization`);this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm===void 0?24*3600*1e3:e.imm,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,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(e){this._assertRequestHasHeaders(e);let t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t[`if-range`],!this._requestMatches(e,!0)||!this.storable())return delete t[`if-none-match`],delete t[`if-modified-since`],t;if(this._resHeaders.etag&&(t[`if-none-match`]=t[`if-none-match`]?`${t[`if-none-match`]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t[`accept-ranges`]||t[`if-match`]||t[`if-unmodified-since`]||this._method&&this._method!=`GET`){if(delete t[`if-modified-since`],t[`if-none-match`]){let e=t[`if-none-match`].split(/,/).filter(e=>!/^\s*W\//.test(e));e.length?t[`if-none-match`]=e.join(`,`).trim():delete t[`if-none-match`]}}else this._resHeaders[`last-modified`]&&!t[`if-modified-since`]&&(t[`if-modified-since`]=this._resHeaders[`last-modified`]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&c(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error(`Response headers missing`);let n=!1;t.status!==void 0&&t.status!=304?n=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,``)===t.headers.etag:this._resHeaders.etag&&t.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,``)===t.headers.etag.replace(/^\s*W\//,``):this._resHeaders[`last-modified`]?n=this._resHeaders[`last-modified`]===t.headers[`last-modified`]:!this._resHeaders.etag&&!this._resHeaders[`last-modified`]&&!t.headers.etag&&!t.headers[`last-modified`]&&(n=!0);let r={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!n)return{policy:new this.constructor(e,t,r),modified:t.status!=304,matches:!1};let i={};for(let e in this._resHeaders)i[e]=e in t.headers&&!o[e]?t.headers[e]:this._resHeaders[e];let a=Object.assign({},t,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,a,r),modified:!1,matches:!0}}}})),ti=c(ei(),1),ni=c($r(),1);function ri(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLowerCase(),t]))}var ii=class extends D.Readable{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:n,url:r}){if(typeof e!=`number`)throw TypeError("Argument `statusCode` should be a number");if(typeof t!=`object`)throw TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw TypeError("Argument `body` should be a buffer");if(typeof r!=`string`)throw TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=ri(t),this.body=n,this.url=r}},ai=o((e=>{e.stringify=function e(t){if(t===void 0)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 n=``,r=Array.isArray(t);n=r?`[`:`{`;var i=!0;for(var a in t){var o=typeof t[a]==`function`||!r&&t[a]===void 0;Object.hasOwnProperty.call(t,a)&&!o&&(i||(n+=`,`),i=!1,r?t[a]==null?n+=`null`:n+=e(t[a]):t[a]!==void 0&&(n+=e(a)+`:`+e(t[a])))}return n+=r?`]`:`}`,n}else if(typeof t==`string`)return JSON.stringify(/^:/.test(t)?`:`+t:t);else if(t===void 0)return`null`;else return JSON.stringify(t)},e.parse=function(e){return JSON.parse(e,function(e,t){return typeof t==`string`?/^:base64:/.test(t)?Buffer.from(t.substring(8),`base64`):/^:/.test(t)?t.substring(1):t:t})}})),oi=o(((e,t)=>{let n=require(`events`),r=ai(),i=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 n=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[n]))(e)}return new Map},a=[`sqlite`,`postgres`,`mysql`,`mongo`,`redis`,`tiered`];t.exports=class extends n{constructor(e,{emitErrors:t=!0,...n}={}){if(super(),this.opts={namespace:`keyv`,serialize:r.stringify,deserialize:r.parse,...typeof e==`string`?{uri:e}:e,...n},!this.opts.store){let e={...this.opts};this.opts.store=i(e)}if(this.opts.compression){let e=this.opts.compression;this.opts.serialize=e.serialize.bind(e),this.opts.deserialize=e.deserialize.bind(e)}typeof this.opts.store.on==`function`&&t&&this.opts.store.on(`error`,e=>this.emit(`error`,e)),this.opts.store.namespace=this.opts.namespace;let a=e=>async function*(){for await(let[t,n]of typeof e==`function`?e(this.opts.store.namespace):e){let e=await this.opts.deserialize(n);if(!(this.opts.store.namespace&&!t.includes(this.opts.store.namespace))){if(typeof e.expires==`number`&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}}};typeof this.opts.store[Symbol.iterator]==`function`&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator==`function`&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return a.includes(this.opts.store.opts.dialect)||a.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(e=>`${this.opts.namespace}:${e}`)}_getKeyUnprefix(e){return e.split(`:`).splice(1).join(`:`)}get(e,t){let{store:n}=this.opts,r=Array.isArray(e),i=r?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(r&&n.getMany===void 0){let e=[];for(let r of i)e.push(Promise.resolve().then(()=>n.get(r)).then(e=>typeof e==`string`||this.opts.compression?this.opts.deserialize(e):e).then(e=>{if(e!=null)return typeof e.expires==`number`&&Date.now()>e.expires?this.delete(r).then(()=>void 0):t&&t.raw?e:e.value}));return Promise.allSettled(e).then(e=>{let t=[];for(let n of e)t.push(n.value);return t})}return Promise.resolve().then(()=>r?n.getMany(i):n.get(i)).then(e=>typeof e==`string`||this.opts.compression?this.opts.deserialize(e):e).then(n=>{if(n!=null)return r?n.map((n,r)=>{if(typeof n==`string`&&(n=this.opts.deserialize(n)),n!=null){if(typeof n.expires==`number`&&Date.now()>n.expires){this.delete(e[r]).then(()=>void 0);return}return t&&t.raw?n:n.value}}):typeof n.expires==`number`&&Date.now()>n.expires?this.delete(e).then(()=>void 0):t&&t.raw?n:n.value})}set(e,t,n){let r=this._getKeyPrefix(e);n===void 0&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:i}=this.opts;return Promise.resolve().then(()=>{let e=typeof n==`number`?Date.now()+n:null;return typeof t==`symbol`&&this.emit(`error`,`symbol cannot be serialized`),t={value:t,expires:e},this.opts.serialize(t)}).then(e=>i.set(r,e,n)).then(()=>!0)}delete(e){let{store:t}=this.opts;if(Array.isArray(e)){let n=this._getKeyPrefixArray(e);if(t.deleteMany===void 0){let e=[];for(let r of n)e.push(t.delete(r));return Promise.allSettled(e).then(e=>e.every(e=>e.value===!0))}return Promise.resolve().then(()=>t.deleteMany(n))}let n=this._getKeyPrefix(e);return Promise.resolve().then(()=>t.delete(n))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has==`function`?n.has(t):await n.get(t)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect==`function`)return e.disconnect()}}})),si=c(oi(),1);const ci=[`aborted`,`complete`,`headers`,`httpVersion`,`httpVersionMinor`,`httpVersionMajor`,`method`,`rawHeaders`,`rawTrailers`,`setTimeout`,`socket`,`statusCode`,`statusMessage`,`trailers`,`url`];function li(e,t){if(t._readableState.autoDestroy)throw Error("The second stream must have the `autoDestroy` option set to `false`");let n=new Set([...Object.keys(e),...ci]),r={};for(let i of n)i in t||(r[i]={get(){let t=e[i];return typeof t==`function`?t.bind(e):t},set(t){e[i]=t},enumerable:!0,configurable:!1});return Object.defineProperties(t,r),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 ui=class extends Error{constructor(e){super(e.message),Object.assign(this,e)}},di=class extends Error{constructor(e){super(e.message),Object.assign(this,e)}},fi=class{constructor(e,t){this.hooks=new Map,this.request=()=>(e,t)=>{let n;if(typeof e==`string`)n=gi(h.default.parse(e)),e={};else if(e instanceof h.default.URL)n=gi(h.default.parse(e.toString())),e={};else{let[t,...r]=(e.path??``).split(`?`),i=r.length>0?`?${r.join(`?`)}`:``;n=gi({...e,pathname:t,search:i})}e={headers:{},method:`GET`,cache:!0,strictTtl:!1,automaticFailover:!1,...e,...hi(n)},e.headers=Object.fromEntries(pi(e.headers).map(([e,t])=>[e.toLowerCase(),t]));let r=new T.default,i=Zr(h.default.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${e.method}:${i}`;e.body&&e.method!==void 0&&[`POST`,`PATCH`,`PUT`].includes(e.method)&&(e.body instanceof D.default.Readable?e.cache=!1:a+=`:${O.default.createHash(`md5`).update(e.body).digest(`hex`)}`);let o=!1,s=!1,c=e=>{s=!0;let n=!1,i=()=>{},c=new Promise(e=>{i=()=>{n||(n=!0,e())}}),l=async n=>{if(o){n.status=n.statusCode;let t=ti.default.fromObject(o.cachePolicy).revalidatedPolicy(e,n);if(!t.modified){n.resume(),await new Promise(e=>{n.once(`end`,e)});let e=_i(t.policy.responseHeaders());n=new ii({statusCode:o.statusCode,headers:e,body:o.body,url:o.url}),n.cachePolicy=t.policy,n.fromCache=!0}}n.fromCache||=(n.cachePolicy=new ti.default(e,n,e),!1);let i;e.cache&&n.cachePolicy.storable()?(i=mi(n),(async()=>{try{let t=ni.default.buffer(n);await Promise.race([c,new Promise(e=>n.once(`end`,e)),new Promise(e=>n.once(`close`,e))]);let r=await t,i={url:n.url,statusCode:n.fromCache?o.statusCode:n.statusCode,body:r,cachePolicy:n.cachePolicy.toObject()},s=e.strictTtl?n.cachePolicy.timeToLive():void 0;if(e.maxTtl&&(s=s?Math.min(s,e.maxTtl):e.maxTtl),this.hooks.size>0)for(let e of this.hooks.keys())i=await this.runHook(e,i,n);await this.cache.set(a,i,s)}catch(e){r.emit(`error`,new di(e))}})()):e.cache&&o&&(async()=>{try{await this.cache.delete(a)}catch(e){r.emit(`error`,new di(e))}})(),r.emit(`response`,i??n),typeof t==`function`&&t(i??n)};try{let t=this.cacheRequest(e,l);t.once(`error`,i),t.once(`abort`,i),t.once(`destroy`,i),r.emit(`request`,t)}catch(e){r.emit(`error`,new ui(e))}};return(async()=>{let n=async e=>{await Promise.resolve();let n=e.cache?await this.cache.get(a):void 0;if(n===void 0&&!e.forceRefresh){c(e);return}let i=ti.default.fromObject(n.cachePolicy);if(i.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){let e=_i(i.responseHeaders()),a=new ii({statusCode:n.statusCode,headers:e,body:n.body,url:n.url});a.cachePolicy=i,a.fromCache=!0,r.emit(`response`,a),typeof t==`function`&&t(a)}else i.satisfiesWithoutRevalidation(e)&&Date.now()>=i.timeToLive()&&e.forceRefresh?(await this.cache.delete(a),e.headers=i.revalidationHeaders(e),c(e)):(o=n,e.headers=i.revalidationHeaders(e),c(e))},i=e=>r.emit(`error`,new di(e));if(this.cache instanceof si.default){let e=this.cache;e.once(`error`,i),r.on(`error`,()=>e.removeListener(`error`,i)),r.on(`response`,()=>e.removeListener(`error`,i))}try{await n(e)}catch(t){e.automaticFailover&&!s&&c(e),r.emit(`error`,new di(t))}})(),r},this.addHook=(e,t)=>{this.hooks.has(e)||this.hooks.set(e,t)},this.removeHook=e=>this.hooks.delete(e),this.getHook=e=>this.hooks.get(e),this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t),t instanceof si.default?this.cache=t:typeof t==`string`?this.cache=new si.default({uri:t,namespace:`cacheable-request`}):this.cache=new si.default({store:t,namespace:`cacheable-request`}),this.request=this.request.bind(this),this.cacheRequest=e}};const pi=Object.entries,mi=e=>{let t=new D.PassThrough({autoDestroy:!1});return li(e,t),e.pipe(t)},hi=e=>{let t={...e};return t.path=`${e.pathname||`/`}${e.search||``}`,delete t.pathname,delete t.search,t},gi=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||`localhost`,port:e.port,pathname:e.pathname,search:e.search}),_i=e=>{let t=[];for(let n of Object.keys(e))t[n.toLowerCase()]=e[n];return t};var vi=fi,yi=o(((e,t)=>{let n=[`aborted`,`complete`,`headers`,`httpVersion`,`httpVersionMinor`,`httpVersionMajor`,`method`,`rawHeaders`,`rawTrailers`,`setTimeout`,`socket`,`statusCode`,`statusMessage`,`trailers`,`url`];t.exports=(e,t)=>{if(t._readableState.autoDestroy)throw Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(e).concat(n)),i={};for(let n of r)n in t||(i[n]={get(){let t=e[n];return typeof t==`function`?t.bind(e):t},set(t){e[n]=t},enumerable:!0,configurable:!1});return Object.defineProperties(t,i),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}})),bi=o(((e,t)=>{let{Transform:n,PassThrough:r}=require(`stream`),i=require(`zlib`),a=yi();t.exports=e=>{let t=(e.headers[`content-encoding`]||``).toLowerCase();if(![`gzip`,`deflate`,`br`].includes(t))return e;let o=t===`br`;if(o&&typeof i.createBrotliDecompress!=`function`)return e.destroy(Error(`Brotli is not supported on Node.js < 12`)),e;let s=!0,c=new n({transform(e,t,n){s=!1,n(null,e)},flush(e){e()}}),l=new r({autoDestroy:!1,destroy(t,n){e.destroy(),n(t)}}),u=o?i.createBrotliDecompress():i.createUnzip();return u.once(`error`,t=>{if(s&&!e.readable){l.end();return}l.destroy(t)}),a(e,l),e.pipe(c).pipe(u).pipe(l),l}}));const X=e=>typeof e==`function`,xi=e=>X(e[Symbol.asyncIterator]);async function*Si(e){let t=e.getReader();for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}const Ci=e=>{if(xi(e))return e;if(X(e.getReader))return Si(e);throw TypeError(`Unsupported data source: Expected either ReadableStream or async iterable.`)},wi=`abcdefghijklmnopqrstuvwxyz0123456789`;function Ti(){let e=16,t=``;for(;e--;)t+=`abcdefghijklmnopqrstuvwxyz0123456789`[Math.random()*36<<0];return t}const Ei=e=>String(e).replace(/\r|\n/g,(e,t,n)=>e===`\r`&&n[t+1]!==`
28
+ `||e===`
29
+ `&&n[t-1]!==`\r`?`\r
30
+ `:e),Di=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase();function Oi(e){if(Di(e)!==`object`)return!1;let t=Object.getPrototypeOf(e);return t==null?!0:(t.constructor&&t.constructor.toString())===Object.toString()}function ki(e,t){if(typeof t==`string`){for(let[n,r]of Object.entries(e))if(t.toLowerCase()===n.toLowerCase())return r}}const Ai=e=>new Proxy(e,{get:(e,t)=>ki(e,t),has:(e,t)=>ki(e,t)!==void 0}),ji=e=>!!(e&&X(e.constructor)&&e[Symbol.toStringTag]===`FormData`&&X(e.append)&&X(e.getAll)&&X(e.entries)&&X(e[Symbol.iterator])),Mi=e=>String(e).replace(/\r/g,`%0D`).replace(/\n/g,`%0A`).replace(/"/g,`%22`),Ni=e=>!!(e&&typeof e==`object`&&X(e.constructor)&&e[Symbol.toStringTag]===`File`&&X(e.stream)&&e.name!=null);var Pi=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Z=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi;const Ki={enableAdditionalHeaders:!1},qi={writable:!1,configurable:!1};var Ji=class{constructor(e,t,n){if(Fi.add(this),Ii.set(this,`\r
31
+ `),Li.set(this,void 0),Ri.set(this,void 0),zi.set(this,`-`.repeat(2)),Bi.set(this,new TextEncoder),Vi.set(this,void 0),Hi.set(this,void 0),Ui.set(this,void 0),!ji(e))throw TypeError(`Expected first argument to be a FormData instance.`);let r;if(Oi(t)?n=t:r=t,r||=Ti(),typeof r!=`string`)throw TypeError(`Expected boundary argument to be a string.`);if(n&&!Oi(n))throw TypeError(`Expected options argument to be an object.`);Pi(this,Hi,Array.from(e.entries()),`f`),Pi(this,Ui,{...Ki,...n},`f`),Pi(this,Li,Z(this,Bi,`f`).encode(Z(this,Ii,`f`)),`f`),Pi(this,Ri,Z(this,Li,`f`).byteLength,`f`),this.boundary=`form-data-boundary-${r}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,Pi(this,Vi,Z(this,Bi,`f`).encode(`${Z(this,zi,`f`)}${this.boundary}${Z(this,zi,`f`)}${Z(this,Ii,`f`).repeat(2)}`),`f`);let i={"Content-Type":this.contentType},a=Z(this,Fi,`m`,Gi).call(this);a&&(this.contentLength=a,i[`Content-Length`]=a),this.headers=Ai(Object.freeze(i)),Object.defineProperties(this,{boundary:qi,contentType:qi,contentLength:qi,headers:qi})}getContentLength(){return this.contentLength==null?void 0:Number(this.contentLength)}*values(){for(let[e,t]of Z(this,Hi,`f`)){let n=Ni(t)?t:Z(this,Bi,`f`).encode(Ei(t));yield Z(this,Fi,`m`,Wi).call(this,e,n),yield n,yield Z(this,Li,`f`)}yield Z(this,Vi,`f`)}async*encode(){for(let e of this.values())Ni(e)?yield*Ci(e.stream()):yield e}[(Ii=new WeakMap,Li=new WeakMap,Ri=new WeakMap,zi=new WeakMap,Bi=new WeakMap,Vi=new WeakMap,Hi=new WeakMap,Ui=new WeakMap,Fi=new WeakSet,Wi=function(e,t){let n=``;n+=`${Z(this,zi,`f`)}${this.boundary}${Z(this,Ii,`f`)}`,n+=`Content-Disposition: form-data; name="${Mi(e)}"`,Ni(t)&&(n+=`; filename="${Mi(t.name)}"${Z(this,Ii,`f`)}`,n+=`Content-Type: ${t.type||`application/octet-stream`}`);let r=Ni(t)?t.size:t.byteLength;return Z(this,Ui,`f`).enableAdditionalHeaders===!0&&r!=null&&!isNaN(r)&&(n+=`${Z(this,Ii,`f`)}Content-Length: ${Ni(t)?t.size:t.byteLength}`),Z(this,Bi,`f`).encode(`${n}${Z(this,Ii,`f`).repeat(2)}`)},Gi=function(){let e=0;for(let[t,n]of Z(this,Hi,`f`)){let r=Ni(n)?n:Z(this,Bi,`f`).encode(Ei(n)),i=Ni(r)?r.size:r.byteLength;if(i==null||isNaN(i))return;e+=Z(this,Fi,`m`,Wi).call(this,t,r).byteLength,e+=i,e+=Z(this,Ri,`f`)}return String(e+Z(this,Vi,`f`).byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}},Yi=c(bi(),1);function Xi(e){return J.nodeStream(e)&&J.function_(e.getBoundary)}async function Zi(e,t){if(t&&`content-length`in t)return Number(t[`content-length`]);if(!e)return 0;if(J.string(e))return E.Buffer.byteLength(e);if(J.buffer(e))return e.length;if(Xi(e))return(0,_.promisify)(e.getLength.bind(e))()}function Qi(e,t,n){let r={};for(let i of n){let n=(...e)=>{t.emit(i,...e)};r[i]=n,e.on(i,n)}return()=>{for(let[t,n]of Object.entries(r))e.off(t,n)}}function $i(){let e=[];return{once(t,n,r){t.once(n,r),e.push({origin:t,event:n,fn:r})},unhandleAll(){for(let t of e){let{origin:e,event:n,fn:r}=t;e.removeListener(n,r)}e.length=0}}}const ea=Symbol(`reentry`),ta=()=>{};var na=class extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),Object.defineProperty(this,`event`,{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,`code`,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=`TimeoutError`,this.code=`ETIMEDOUT`}};function ra(e,t,n){if(ea in e)return ta;e[ea]=!0;let r=[],{once:i,unhandleAll:a}=$i(),o=(e,t,n)=>{let i=setTimeout(t,e,e,n);i.unref?.();let a=()=>{clearTimeout(i)};return r.push(a),a},{host:s,hostname:c}=n,l=(t,n)=>{e.destroy(new na(t,n))},u=()=>{for(let e of r)e();a()};if(e.once(`error`,t=>{if(u(),e.listenerCount(`error`)===0)throw t}),t.request!==void 0){let n=o(t.request,l,`request`);i(e,`response`,e=>{i(e,`end`,n)})}if(t.socket!==void 0){let{socket:n}=t,i=()=>{l(n,`socket`)};e.setTimeout(n,i),r.push(()=>{e.removeListener(`timeout`,i)})}let d=t.lookup!==void 0,f=t.connect!==void 0,p=t.secureConnect!==void 0,m=t.send!==void 0;return(d||f||p||m)&&i(e,`socket`,r=>{let{socketPath:a}=e;if(r.connecting){let e=!!(a??ee.default.isIP(c??s??``)!==0);if(d&&!e&&r.address().address===void 0&&i(r,`lookup`,o(t.lookup,l,`lookup`)),f){let n=()=>o(t.connect,l,`connect`);e?i(r,`connect`,n()):i(r,`lookup`,e=>{e===null&&i(r,`connect`,n())})}p&&n.protocol===`https:`&&i(r,`connect`,()=>{i(r,`secureConnect`,o(t.secureConnect,l,`secureConnect`))})}if(m){let n=()=>o(t.send,l,`send`);r.connecting?i(r,`connect`,()=>{i(e,`upload-complete`,n())}):i(e,`upload-complete`,n())}}),t.response!==void 0&&i(e,`upload-complete`,()=>{i(e,`response`,o(t.response,l,`response`))}),t.read!==void 0&&i(e,`response`,e=>{i(e,`end`,o(t.read,l,`read`))}),u}function ia(e){e=e;let t={protocol:e.protocol,hostname:J.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 J.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||``}:${e.password||``}`),t}var aa=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(e,t){typeof e==`object`?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return typeof e==`object`?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e==`object`?this.weakMap.has(e):this.map.has(e)}};const oa=({attemptCount:e,retryOptions:t,error:n,retryAfter:r,computedValue:i})=>{if(n.name===`RetryError`)return 1;if(e>t.limit)return 0;let a=t.methods.includes(n.options.method),o=t.errorCodes.includes(n.code),s=n.response&&t.statusCodes.includes(n.response.statusCode);if(!a||!o&&!s)return 0;if(n.response){if(r)return r>i?0:r;if(n.response.statusCode===413)return 0}let c=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+c};var sa=oa;const{Resolver:ca}=ne.promises,la=Symbol(`cacheableLookupCreateConnection`),ua=Symbol(`cacheableLookupInstance`),da=Symbol(`expires`),fa=typeof ne.ALL==`number`,pa=e=>{if(!(e&&typeof e.createConnection==`function`))throw Error(`Expected an Agent instance as the first argument`)},ma=e=>{for(let t of e)t.family!==6&&(t.address=`::ffff:${t.address}`,t.family=6)},ha=()=>{let e=!1,t=!1;for(let n of Object.values(f.default.networkInterfaces()))for(let r of n)if(!r.internal&&(r.family===`IPv6`?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},ga=e=>Symbol.iterator in e,_a=e=>e.catch(e=>{if(e.code===`ENODATA`||e.code===`ENOTFOUND`||e.code===`ENOENT`)return[];throw e}),va={ttl:!0},ya={all:!0},ba={all:!0,family:4},xa={all:!0,family:6};var Sa=class{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:r=.15,resolver:i=new ca,lookup:a=ne.lookup}={}){if(this.maxTtl=t,this.errorTtl=r,this._cache=e,this._resolver=i,this._dnsLookup=a&&(0,_.promisify)(a),this.stats={cache:0,query:0},this._resolver instanceof ca?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=(0,_.promisify)(this._resolver.resolve4.bind(this._resolver)),this._resolve6=(0,_.promisify)(this._resolver.resolve6.bind(this._resolver))),this._iface=ha(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){let e=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);e.unref&&e.unref(),this._fallbackInterval=e}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if(typeof t==`function`?(n=t,t={}):typeof t==`number`&&(t={family:t}),!n)throw Error(`Callback must be a function.`);this.lookupAsync(e,t).then(e=>{t.all?n(null,e):n(null,e.address,e.family,e.expires,e.ttl,e.source)},n)}async lookupAsync(e,t={}){typeof t==`number`&&(t={family:t});let n=await this.query(e);if(t.family===6){let e=n.filter(e=>e.family===6);t.hints&ne.V4MAPPED&&(fa&&t.hints&ne.ALL||e.length===0)?ma(n):n=e}else t.family===4&&(n=n.filter(e=>e.family===4));if(t.hints&ne.ADDRCONFIG){let{_iface:e}=this;n=n.filter(t=>t.family===6?e.has6:e.has4)}if(n.length===0){let t=Error(`cacheableLookup ENOTFOUND ${e}`);throw t.code=`ENOTFOUND`,t.hostname=e,t}return t.all?n:n[0]}async query(e){let t=`cache`,n=await this._cache.get(e);if(n&&this.stats.cache++,!n){let r=this._pending[e];if(r)this.stats.cache++,n=await r;else{t=`query`;let r=this.queryAndCache(e);this._pending[e]=r,this.stats.query++;try{n=await r}finally{delete this._pending[e]}}}return n=n.map(e=>({...e,source:t})),n}async _resolve(e){let[t,n]=await Promise.all([_a(this._resolve4(e,va)),_a(this._resolve6(e,va))]),r=0,i=0,a=0,o=Date.now();for(let e of t)e.family=4,e.expires=o+e.ttl*1e3,r=Math.max(r,e.ttl);for(let e of n)e.family=6,e.expires=o+e.ttl*1e3,i=Math.max(i,e.ttl);return a=t.length>0?n.length>0?Math.min(r,i):r:i,{entries:[...t,...n],cacheTtl:a}}async _lookup(e){try{let[t,n]=await Promise.all([_a(this._dnsLookup(e,ba)),_a(this._dnsLookup(e,xa))]);return{entries:[...t,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,t[da]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(e){this.lookupAsync=async()=>{let t=Error(`Cache Error. Please recreate the CacheableLookup instance.`);throw t.cause=e,t}}ga(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,ya);let t=await this._resolve(e);t.entries.length===0&&this._dnsLookup&&(t=await this._lookup(e),t.entries.length!==0&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));let n=t.entries.length===0?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){let t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let e=1/0,t=Date.now();for(let[n,r]of this._cache){let i=r[da];t>=i?this._cache.delete(n):i<e&&(e=i)}e!==1/0&&this._tick(e-t)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(pa(e),la in e)throw Error(`CacheableLookup has been already installed`);e[la]=e.createConnection,e[ua]=this,e.createConnection=(t,n)=>(`lookup`in t||(t.lookup=this.lookup),e[la](t,n))}uninstall(e){if(pa(e),e[la]){if(e[ua]!==this)throw Error(`The agent is not owned by this CacheableLookup instance`);e.createConnection=e[la],delete e[la],delete e[ua]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=ha(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}},Ca=o(((e,t)=>{t.exports=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction==`function`)for(let[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}})),wa=o(((e,t)=>{t.exports=e=>{if(e.listenerCount(`error`)!==0)return e;e.__destroy=e._destroy,e._destroy=(...t)=>{let n=t.pop();e.__destroy(...t,async e=>{await Promise.resolve(),n(e)})};let t=t=>{Promise.resolve().then(()=>{e.emit(`error`,t)})};return e.once(`error`,t),Promise.resolve().then(()=>{e.off(`error`,t)}),e}})),Ta=o(((e,t)=>{let{URL:n}=require(`url`),r=require(`events`),i=require(`tls`),a=require(`http2`),o=Ca(),s=wa(),c=Symbol(`currentStreamCount`),l=Symbol(`request`),u=Symbol(`cachedOriginSet`),d=Symbol(`gracefullyClosing`),f=Symbol(`length`),p=`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`.split(`.`),m=(e,t,n)=>{let r=0,i=e.length;for(;r<i;){let a=r+i>>>1;n(e[a],t)?r=a+1:i=a}return r},h=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,g=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];r[u].length>0&&r[u].length<t[u].length&&r[u].every(e=>t[u].includes(e))&&r[c]+t[c]<=t.remoteSettings.maxConcurrentStreams&&v(r)}},_=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];if(t[u].length>0&&t[u].length<r[u].length&&t[u].every(e=>r[u].includes(e))&&t[c]+r[c]<=r.remoteSettings.maxConcurrentStreams)return v(t),!0}return!1},v=e=>{e[d]=!0,e[c]===0&&e.close()};var y=class e extends r{constructor({timeout:e=0,maxSessions:t=1/0,maxEmptySessions:n=10,maxCachedTlsSessions:r=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new o({maxSize:r})}get protocol(){return`https:`}normalizeOptions(e){let t=``;for(let n=0;n<p.length;n++){let r=p[n];t+=`:`,e&&e[r]!==void 0&&(t+=e[r])}return t}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let t in this.queue[e]){let n=this.queue[e][t];n.completed||(n.completed=!0,n())}}_isBetterSession(e,t){return e>t}_accept(e,t,n,r){let i=0;for(;i<t.length&&e[c]<e.remoteSettings.maxConcurrentStreams;)t[i].resolve(e),i++;t.splice(0,i),t.length>0&&(this.getSession(n,r,t),t.length=0)}getSession(e,t,r){return new Promise((i,o)=>{Array.isArray(r)&&r.length>0?(r=[...r],i()):r=[{resolve:i,reject:o}];try{if(typeof e==`string`)e=new n(e);else if(!(e instanceof n))throw TypeError("The `origin` argument needs to be a string or an URL object");if(t){let{servername:n}=t,{hostname:r}=e;if(n&&r!==n)throw Error(`Origin ${r} differs from servername ${n}`)}}catch(e){for(let t=0;t<r.length;t++)r[t].reject(e);return}let s=this.normalizeOptions(t),p=e.origin;if(s in this.sessions){let e=this.sessions[s],n=-1,i=-1,a;for(let t=0;t<e.length;t++){let r=e[t],o=r.remoteSettings.maxConcurrentStreams;if(o<n)break;if(!r[u].includes(p))continue;let s=r[c];s>=o||r[d]||r.destroyed||(a||(n=o),this._isBetterSession(s,i)&&(a=r,i=s))}if(a){this._accept(a,r,p,t);return}}if(s in this.queue){if(p in this.queue[s]){this.queue[s][p].listeners.push(...r);return}}else this.queue[s]={[f]:0};let v=()=>{s in this.queue&&this.queue[s][p]===y&&(delete this.queue[s][p],--this.queue[s][f]===0&&delete this.queue[s])},y=async()=>{this._sessionCount++;let n=`${p}:${s}`,i=!1,o;try{let b={...t};b.settings===void 0&&(b.settings=this.settings),b.session===void 0&&(b.session=this.tlsSessionCache.get(n)),o=await(b.createConnection||this.createConnection).call(this,e,b),b.createConnection=()=>o;let x=a.connect(e,b);x[c]=0,x[d]=!1;let S=()=>{let{socket:e}=x,t;return e.servername===!1?(e.servername=e.remoteAddress,t=x.originSet,e.servername=!1):t=x.originSet,t},C=()=>x[c]<x.remoteSettings.maxConcurrentStreams;x.socket.once(`session`,e=>{this.tlsSessionCache.set(n,e)}),x.once(`error`,e=>{for(let t=0;t<r.length;t++)r[t].reject(e);this.tlsSessionCache.delete(n)}),x.setTimeout(this.timeout,()=>{x.destroy()}),x.once(`close`,()=>{if(this._sessionCount--,i){this._emptySessionCount--;let e=this.sessions[s];e.length===1?delete this.sessions[s]:e.splice(e.indexOf(x),1)}else{v();let e=Error(`Session closed without receiving a SETTINGS frame`);e.code=`HTTP2WRAPPER_NOSETTINGS`;for(let t=0;t<r.length;t++)r[t].reject(e)}this._processQueue()});let w=()=>{let e=this.queue[s];if(!e)return;let t=x[u];for(let n=0;n<t.length;n++){let r=t[n];if(r in e){let{listeners:t,completed:n}=e[r],i=0;for(;i<t.length&&C();)t[i].resolve(x),i++;if(e[r].listeners.splice(0,i),e[r].listeners.length===0&&!n&&(delete e[r],--e[f]===0)){delete this.queue[s];break}if(!C())break}}};x.on(`origin`,()=>{x[u]=S()||[],x[d]=!1,_(this.sessions[s],x),!(x[d]||!C())&&(w(),C()&&g(this.sessions[s],x))}),x.once(`remoteSettings`,()=>{if(y.destroyed){let e=Error(`Agent has been destroyed`);for(let t=0;t<r.length;t++)r[t].reject(e);x.destroy();return}if(x.setLocalWindowSize&&x.setLocalWindowSize(1024*1024*4),x[u]=S()||[],x.socket.encrypted){let e=x[u][0];if(e!==p){let t=Error(`Requested origin ${p} does not match server ${e}`);for(let e=0;e<r.length;e++)r[e].reject(t);x.destroy();return}}v();{let e=this.sessions;if(s in e){let t=e[s];t.splice(m(t,x,h),0,x)}else e[s]=[x]}i=!0,this._emptySessionCount++,this.emit(`session`,x),this._accept(x,r,p,t),x[c]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),x.on(`remoteSettings`,()=>{C()&&(w(),C()&&g(this.sessions[s],x))})}),x[l]=x.request,x.request=(e,t)=>{if(x[d])throw Error(`The session is gracefully closing. No new streams are allowed.`);let n=x[l](e,t);return x.ref(),x[c]++===0&&this._emptySessionCount--,n.once(`close`,()=>{if(--x[c]===0&&(this._emptySessionCount++,x.unref(),this._emptySessionCount>this.maxEmptySessions||x[d])){x.close();return}x.destroyed||x.closed||C()&&!_(this.sessions[s],x)&&(g(this.sessions[s],x),w(),x[c]===0&&this._processQueue())}),n}}catch(e){v(),this._sessionCount--;for(let t=0;t<r.length;t++)r[t].reject(e)}};y.listeners=r,y.completed=!1,y.destroyed=!1,this.queue[s][p]=y,this.queue[s][f]++,this._processQueue()})}request(e,t,n,r){return new Promise((i,a)=>{this.getSession(e,t,[{reject:a,resolve:e=>{try{let t=e.request(n,r);s(t),i(t)}catch(e){a(e)}}}])})}async createConnection(t,n){return e.connect(t,n)}static connect(e,t){t.ALPNProtocols=[`h2`];let n=e.port||443,r=e.hostname;t.servername===void 0&&(t.servername=r);let a=i.connect(n,r,t);return t.socket&&(a._peername={family:void 0,address:void 0,port:n}),a}closeEmptySessions(e=1/0){let t=0,{sessions:n}=this;for(let r in n){let i=n[r];for(let n=0;n<i.length;n++){let r=i[n];if(r[c]===0&&(t++,r.close(),t>=e))return t}}return t}destroy(e){let{sessions:t,queue:n}=this;for(let n in t){let r=t[n];for(let t=0;t<r.length;t++)r[t].destroy(e)}for(let e in n){let t=n[e];for(let e in t)t[e].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};y.kCurrentStreamCount=c,y.kGracefullyClosing=d,t.exports={Agent:y,globalAgent:new y}})),Ea=o(((e,t)=>{let{Readable:n}=require(`stream`);t.exports=class extends n{constructor(e,t){super({emitClose:!1,autoDestroy:!0,highWaterMark:t}),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=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){this.readableEnded||(this.aborted=!0),t(),this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners(`data`),this.resume())}_read(){this.req&&this.req._request.resume()}}})),Da=o(((e,t)=>{t.exports=(e,t,n)=>{for(let r of n)e.on(r,(...e)=>t.emit(r,...e))}})),Oa=o(((e,t)=>{let n=(e,n,r)=>{t.exports[n]=class extends e{constructor(...e){super(typeof r==`string`?r:r(e)),this.name=`${super.name} [${n}]`,this.code=n}}};n(TypeError,`ERR_INVALID_ARG_TYPE`,e=>{let t=e[0].includes(`.`)?`property`:`argument`,n=e[1],r=Array.isArray(n);return r&&(n=`${n.slice(0,-1).join(`, `)} or ${n.slice(-1)}`),`The "${e[0]}" ${t} must be ${r?`one of`:`of`} type ${n}. Received ${typeof e[2]}`}),n(TypeError,`ERR_INVALID_PROTOCOL`,e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`),n(Error,`ERR_HTTP_HEADERS_SENT`,e=>`Cannot ${e[0]} headers after they are sent to the client`),n(TypeError,`ERR_INVALID_HTTP_TOKEN`,e=>`${e[0]} must be a valid HTTP token [${e[1]}]`),n(TypeError,`ERR_HTTP_INVALID_HEADER_VALUE`,e=>`Invalid value "${e[0]} for header "${e[1]}"`),n(TypeError,`ERR_INVALID_CHAR`,e=>`Invalid character in ${e[0]} [${e[1]}]`),n(Error,`ERR_HTTP2_NO_SOCKET_MANIPULATION`,`HTTP/2 sockets should not be directly manipulated (e.g. read and written)`)})),ka=o(((e,t)=>{t.exports=e=>{switch(e){case`:method`:case`:scheme`:case`:authority`:case`:path`:return!0;default:return!1}}})),Aa=o(((e,t)=>{let{ERR_INVALID_HTTP_TOKEN:n}=Oa(),r=ka(),i=/^[\^`\-\w!#$%&*+.|~]+$/;t.exports=e=>{if(typeof e!=`string`||!i.test(e)&&!r(e))throw new n(`Header name`,e)}})),ja=o(((e,t)=>{let{ERR_HTTP_INVALID_HEADER_VALUE:n,ERR_INVALID_CHAR:r}=Oa(),i=/[^\t\u0020-\u007E\u0080-\u00FF]/;t.exports=(e,t)=>{if(t===void 0)throw new n(t,e);if(i.test(t))throw new r(`header content`,e)}})),Ma=o(((e,t)=>{let{ERR_HTTP2_NO_SOCKET_MANIPULATION:n}=Oa();t.exports={has(e,t){let n=e.session===void 0?e:e.session.socket;return t in e||t in n},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:t}=e;return t===void 0?e.setTimeout.bind(e):t.setTimeout.bind(t)}case`write`:case`read`:case`pause`:case`resume`:throw new n;default:{let n=e.session===void 0?e:e.session.socket,r=n[t];return typeof r==`function`?r.bind(n):r}}},getPrototypeOf(e){return e.session===void 0?Reflect.getPrototypeOf(e):Reflect.getPrototypeOf(e.session.socket)},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:t}=e;return t===void 0?e.setTimeout=r:t.setTimeout=r,!0}case`write`:case`read`:case`pause`:case`resume`:throw new n;default:{let n=e.session===void 0?e:e.session.socket;return n[t]=r,!0}}}}})),Na=o(((e,t)=>{let{URL:n,urlToHttpOptions:r}=require(`url`),i=require(`http2`),{Writable:a}=require(`stream`),{Agent:o,globalAgent:s}=Ta(),c=Ea(),l=Da(),{ERR_INVALID_ARG_TYPE:u,ERR_INVALID_PROTOCOL:d,ERR_HTTP_HEADERS_SENT:f}=Oa(),p=Aa(),m=ja(),h=Ma(),{HTTP2_HEADER_STATUS:g,HTTP2_HEADER_METHOD:_,HTTP2_HEADER_PATH:v,HTTP2_HEADER_AUTHORITY:y,HTTP2_METHOD_CONNECT:b}=i.constants,x=Symbol(`headers`),S=Symbol(`origin`),C=Symbol(`session`),w=Symbol(`options`),T=Symbol(`flushedHeaders`),E=Symbol(`jobs`),D=Symbol(`pendingAgentPromise`);t.exports=class extends a{constructor(e,t,i){if(super({autoDestroy:!1,emitClose:!1}),e=typeof e==`string`?r(new n(e)):e instanceof n?r(e):{...e},typeof t==`function`||t===void 0?(i=t,t=e):t=Object.assign(e,t),t.h2session){if(this[C]=t.h2session,this[C].destroyed)throw Error(`The session has been closed already`);this.protocol=this[C].socket.encrypted?`https:`:`http:`}else if(t.agent===!1)this.agent=new o({maxEmptySessions:0});else if(t.agent===void 0||t.agent===null)this.agent=s;else if(typeof t.agent.request==`function`)this.agent=t.agent;else throw new u(`options.agent`,[`http2wrapper.Agent-like Object`,`undefined`,`false`],t.agent);if(this.agent&&(this.protocol=this.agent.protocol),t.protocol&&t.protocol!==this.protocol)throw new d(t.protocol,this.protocol);t.port||=t.defaultPort||this.agent&&this.agent.defaultPort||443,t.host=t.hostname||t.host||`localhost`,delete t.hostname;let{timeout:a}=t;t.timeout=void 0,this[x]=Object.create(null),this[E]=[],this[D]=void 0,this.socket=null,this.connection=null,this.method=t.method||`GET`,this.method===`CONNECT`&&(t.path===`/`||t.path===void 0)||(this.path=t.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:c}=t;if(c)for(let e in c)this.setHeader(e,c[e]);t.auth&&!(`authorization`in this[x])&&(this[x].authorization=`Basic `+Buffer.from(t.auth).toString(`base64`)),t.session=t.tlsSession,t.path=t.socketPath,this[w]=t,this[S]=new n(`${this.protocol}//${t.servername||t.host}:${t.port}`);let l=t._reuseSocket;l&&(t.createConnection=(...e)=>l.destroyed?this.agent.createConnection(...e):l,this.agent.getSession(this[S],this[w]).catch(()=>{})),a&&this.setTimeout(a),i&&this.once(`response`,i),this[T]=!1}get method(){return this[x][_]}set method(e){e&&(this[x][_]=e.toUpperCase())}get path(){let e=this.method===`CONNECT`?y:v;return this[x][e]}set path(e){if(e){let t=this.method===`CONNECT`?y:v;this[x][t]=e}}get host(){return this[S].hostname}set host(e){}get _mustNotHaveABody(){return this.method===`GET`||this.method===`HEAD`||this.method===`DELETE`}_write(e,t,n){if(this._mustNotHaveABody){n(Error(`The GET, HEAD and DELETE methods must NOT have a body`));return}this.flushHeaders();let r=()=>this._request.write(e,t,n);this._request?r():this[E].push(r)}_final(e){this.flushHeaders();let t=()=>{if(this._mustNotHaveABody||this.method===`CONNECT`){e();return}this._request.end(e)};this._request?t():this[E].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit(`abort`)),this.aborted=!0,this.destroy())}async _destroy(e,t){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit(`close`)});try{await this[D]}catch(t){this.aborted&&(e=t)}t(e)}async flushHeaders(){if(this[T]||this.destroyed)return;this[T]=!0;let e=this.method===b,t=t=>{if(this._request=t,this.destroyed){t.destroy();return}e||l(t,this,[`timeout`,`continue`]),t.once(`error`,e=>{this.destroy(e)}),t.once(`aborted`,()=>{let{res:e}=this;e?(e.aborted=!0,e.emit(`aborted`),e.destroy()):this.destroy(Error(`The server aborted the HTTP/2 stream`))});let n=(n,r,i)=>{let a=new c(this.socket,t.readableHighWaterMark);this.res=a,a.url=`${this[S].origin}${this.path}`,a.req=this,a.statusCode=n[g],a.headers=n,a.rawHeaders=i,a.once(`end`,()=>{a.complete=!0,a.socket=null,a.connection=null}),e?(a.upgrade=!0,this.emit(`connect`,a,t,Buffer.alloc(0))?this.emit(`close`):t.destroy()):(t.on(`data`,e=>{!a._dumped&&!a.push(e)&&t.pause()}),t.once(`end`,()=>{this.aborted||a.push(null)}),this.emit(`response`,a)||a._dump())};t.once(`response`,n),t.once(`headers`,e=>this.emit(`information`,{statusCode:e[g]})),t.once(`trailers`,(e,t,r)=>{let{res:i}=this;if(i===null){n(e,t,r);return}i.trailers=e,i.rawTrailers=r}),t.once(`close`,()=>{let{aborted:e,res:t}=this;if(t){e&&(t.aborted=!0,t.emit(`aborted`),t.destroy());let n=()=>{t.emit(`close`),this.destroy(),this.emit(`close`)};t.readable?t.once(`end`,n):n();return}if(!this.destroyed){this.destroy(Error(`The HTTP/2 stream has been early terminated`)),this.emit(`close`);return}this.destroy(),this.emit(`close`)}),this.socket=new Proxy(t,h);for(let e of this[E])e();this[E].length=0,this.emit(`socket`,this.socket)};if(!(y in this[x])&&!e&&(this[x][y]=this[S].host),this[C])try{t(this[C].request(this[x]))}catch(e){this.destroy(e)}else{this.reusedSocket=!0;try{let e=this.agent.request(this[S],this[w],this[x]);this[D]=e,t(await e),this[D]=!1}catch(e){this[D]=!1,this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[x])}hasHeader(e){if(typeof e!=`string`)throw new u(`name`,`string`,e);return!!this[x][e.toLowerCase()]}getHeader(e){if(typeof e!=`string`)throw new u(`name`,`string`,e);return this[x][e.toLowerCase()]}get headersSent(){return this[T]}removeHeader(e){if(typeof e!=`string`)throw new u(`name`,`string`,e);if(this.headersSent)throw new f(`remove`);delete this[x][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new f(`set`);p(e),m(e,t);let n=e.toLowerCase();if(n===`connection`){if(t.toLowerCase()===`keep-alive`)return;throw Error(`Invalid 'connection' header: ${t}`)}n===`host`&&this.method===`CONNECT`?this[x][y]=t:this[x][n]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){let n=()=>this._request.setTimeout(e,t);return this._request?n():this[E].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}}})),Pa=o(((e,t)=>{let n=require(`tls`);t.exports=(e={},t=n.connect)=>new Promise((n,r)=>{let i=!1,a,o=async()=>{await c,a.off(`timeout`,s),a.off(`error`,r),e.resolveSocket?(n({alpnProtocol:a.alpnProtocol,socket:a,timeout:i}),i&&(await Promise.resolve(),a.emit(`timeout`))):(a.destroy(),n({alpnProtocol:a.alpnProtocol,timeout:i}))},s=async()=>{i=!0,o()},c=(async()=>{try{a=await t(e,o),a.on(`error`,r),a.once(`timeout`,s)}catch(e){r(e)}})()})})),Fa=o(((e,t)=>{let{isIP:n}=require(`net`),r=require(`assert`),i=e=>{if(e[0]===`[`){let t=e.indexOf(`]`);return r(t!==-1),e.slice(1,t)}let t=e.indexOf(`:`);return t===-1?e:e.slice(0,t)};t.exports=e=>{let t=i(e);return n(t)?``:t}})),Ia=o(((e,t)=>{let{URL:n,urlToHttpOptions:r}=require(`url`),i=require(`http`),a=require(`https`),o=Pa(),s=Ca(),{Agent:c,globalAgent:l}=Ta(),u=Na(),d=Fa(),f=wa(),p=new s({maxSize:100}),m=new Map,h=(e,t,n)=>{t._httpMessage={shouldKeepAlive:!0};let r=()=>{e.emit(`free`,t,n)};t.on(`free`,r);let i=()=>{e.removeSocket(t,n)};t.on(`close`,i);let a=()=>{let{freeSockets:n}=e;for(let e of Object.values(n))if(e.includes(t)){t.destroy();return}};t.on(`timeout`,a);let o=()=>{e.removeSocket(t,n),t.off(`close`,i),t.off(`free`,r),t.off(`timeout`,a),t.off(`agentRemove`,o)};t.on(`agentRemove`,o),e.emit(`free`,t,n)},g=(e,t=new Map,n=void 0)=>async r=>{let i=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!e.has(i)){if(t.has(i))return{alpnProtocol:(await t.get(i)).alpnProtocol};let{path:a}=r;r.path=r.socketPath;let s=o(r,n);t.set(i,s);try{let n=await s;return e.set(i,n.alpnProtocol),t.delete(i),r.path=a,n}catch(e){throw t.delete(i),r.path=a,e}}return{alpnProtocol:e.get(i)}},_=g(p,m);t.exports=async(e,t,o)=>{if(e=typeof e==`string`?r(new n(e)):e instanceof n?r(e):{...e},typeof t==`function`||t===void 0?(o=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 Error("The `ALPNProtocols` option must be an Array with at least one entry");t.protocol=t.protocol||`https:`;let s=t.protocol===`https:`;t.host=t.hostname||t.host||`localhost`,t.session=t.tlsSession,t.servername=t.servername||d(t.headers&&t.headers.host||t.host),t.port=t.port||(s?443:80),t._defaultAgent=s?a.globalAgent:i.globalAgent;let p=t.resolveProtocol||_,{agent:m}=t;if(m!==void 0&&m!==!1&&m.constructor.name!==`Object`)throw Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(s){t.resolveSocket=!0;let{socket:e,alpnProtocol:n,timeout:r}=await p(t);if(r){e&&e.destroy();let n=Error(`Timed out resolving ALPN: ${t.timeout} ms`);throw n.code=`ETIMEDOUT`,n.ms=t.timeout,n}e&&t.createConnection&&(e.destroy(),e=void 0),delete t.resolveSocket;let i=n===`h2`;if(m&&(m=i?m.http2:m.https,t.agent=m),m===void 0&&(m=i?l:a.globalAgent),e)if(m===!1)e.destroy();else{let n=(i?c:a.Agent).prototype.createConnection;m.createConnection===n?i?t._reuseSocket=e:h(m,e,t):e.destroy()}if(i)return f(new u(t,o))}else m&&(t.agent=m.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`]),f(i.request(t,o))},t.exports.protocolCache=p,t.exports.resolveProtocol=_,t.exports.createResolveProtocol=g})),La=o(((e,t)=>{let n=require(`stream`);t.exports=new(require(`tls`)).TLSSocket(new n.PassThrough)._handle._parentWrap.constructor})),Ra=o(((e,t)=>{t.exports=class extends Error{constructor(e,t=``){super(`The proxy server rejected the request with status code ${e} (${t||`empty status message`})`),this.statusCode=e,this.statusMessage=t}}})),za=o(((e,t)=>{t.exports=(e,t,n)=>{if(!n.some(e=>typeof e==`string`?typeof t===e:t instanceof e)){let r=n.map(e=>typeof e==`string`?e:e.name);throw TypeError(`Expected '${e}' to be a type of ${r.join(` or `)}, got ${typeof t}`)}}})),Ba=o(((e,t)=>{let{URL:n}=require(`url`),r=za();t.exports=(e,t)=>{r(`proxyOptions`,t,[`object`]),r(`proxyOptions.headers`,t.headers,[`object`,`undefined`]),r(`proxyOptions.raw`,t.raw,[`boolean`,`undefined`]),r(`proxyOptions.url`,t.url,[n,`string`]);let i=new n(t.url);e.proxyOptions={raw:!0,...t,headers:{...t.headers},url:i}}})),Va=o(((e,t)=>{t.exports=e=>{let{username:t,password:n}=e.proxyOptions.url;if(t||n){let e=`${t}:${n}`,r=`Basic ${Buffer.from(e).toString(`base64`)}`;return{"proxy-authorization":r,authorization:r}}return{}}})),Ha=o(((e,t)=>{let n=require(`tls`),r=require(`http`),i=require(`https`),a=La(),{globalAgent:o}=Ta(),s=Ra(),c=Ba(),l=Va(),u=(e,t,r)=>{(async()=>{try{let{proxyOptions:c}=e,{url:u,headers:d,raw:f}=c,p=await o.request(u,c,{...l(e),...d,":method":`CONNECT`,":authority":`${t.host}:${t.port}`});p.once(`error`,r),p.once(`response`,o=>{let c=o[`:status`];if(c!==200){r(new s(c,``));return}let l=e instanceof i.Agent;if(f&&l){t.socket=p;let e=n.connect(t);e.once(`close`,()=>{p.destroy()}),r(null,e);return}let u=new a(p);u.encrypted=!1,u._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},r(null,u)})}catch(e){r(e)}})()};t.exports={HttpOverHttp2:class extends r.Agent{constructor(e){super(e),c(this,e.proxyOptions)}createConnection(e,t){u(this,e,t)}},HttpsOverHttp2:class extends i.Agent{constructor(e){super(e),c(this,e.proxyOptions)}createConnection(e,t){u(this,e,t)}}}})),Ua=o(((e,t)=>{let{Agent:n}=Ta(),r=La(),i=Ra(),a=Ba();t.exports=class extends n{constructor(e){super(e),a(this,e.proxyOptions)}async createConnection(e,t){let n=`${e.hostname}:${e.port||443}`,[a,o,s]=await this._getProxyStream(n);if(o!==200)throw new i(o,s);if(this.proxyOptions.raw)t.socket=a;else{let e=new r(a);return e.encrypted=!1,e._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},e}return super.createConnection(e,t)}}})),Wa=o(((e,t)=>{let{globalAgent:n}=Ta(),r=Ua(),i=Va(),a=e=>new Promise((t,n)=>{e.once(`error`,n),e.once(`response`,r=>{e.off(`error`,n),t(r[`:status`])})});t.exports=class extends r{async _getProxyStream(e){let{proxyOptions:t}=this,r={...i(this),...t.headers,":method":`CONNECT`,":authority":e},o=await n.request(t.url,t,r);return[o,await a(o),``]}}})),Ga=o(((e,t)=>{let n=require(`http`),r=require(`https`),i=Ua(),a=Va(),o=e=>new Promise((t,n)=>{e.once(`error`,n),e.once(`connect`,(r,i,a)=>{i.unshift(a),e.off(`error`,n),t([i,r.statusCode,r.statusMessage])})});var s=class extends i{async _getProxyStream(e){let{proxyOptions:t}=this,{url:i,headers:s}=this.proxyOptions;return o((i.protocol===`https:`?r:n).request({...t,hostname:i.hostname,port:i.port,path:e,headers:{...a(this),...s,host:e},method:`CONNECT`}).end())}};t.exports={Http2OverHttp:s,Http2OverHttps:s}})),Ka=o(((e,t)=>{let n=require(`http2`),{Agent:r,globalAgent:i}=Ta(),a=Na(),o=Ea(),s=Ia(),{HttpOverHttp2:c,HttpsOverHttp2:l}=Ha(),u=Wa(),{Http2OverHttp:d,Http2OverHttps:f}=Ga(),p=Aa(),m=ja(),h=(e,t,n)=>new a(e,t,n),g=(e,t,n)=>{let r=new a(e,t,n);return r.end(),r};t.exports={...n,ClientRequest:a,IncomingMessage:o,Agent:r,globalAgent:i,request:h,get:g,auto:s,proxies:{HttpOverHttp2:c,HttpsOverHttp2:l,Http2OverHttp2:u,Http2OverHttp:d,Http2OverHttps:f},validateHeaderName:p,validateHeaderValue:m}})),qa=c(Ka(),1);function Ja(e){let t=[],n=e.split(`,`);for(let r of n){let[n,...i]=r.split(`;`),a=n.trim();if(a[0]!==`<`||a[a.length-1]!==`>`)throw Error(`Invalid format of the Link header reference: ${a}`);let o=a.slice(1,-1),s={};if(i.length===0)throw Error(`Unexpected end of Link header parameters: ${i.join(`;`)}`);for(let t of i){let n=t.trim(),r=n.indexOf(`=`);if(r===-1)throw Error(`Failed to parse Link header: ${e}`);let i=n.slice(0,r).trim();s[i]=n.slice(r+1).trim()}t.push({reference:o,parameters:s})}return t}const[Ya,Xa]=d.default.versions.node.split(`.`).map(Number);function Za(e){for(let t in e){let n=e[t];q.any([J.string,J.number,J.boolean,J.null_,J.undefined],n)}}const Qa=new Map;let $a;const eo=()=>$a||($a=new Sa,$a),to={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:1/0,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=Ja(t).find(e=>e.parameters.rel===`next`||e.parameters.rel===`"next"`);return n?{url:new h.URL(n.reference,e.url)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!0},no=e=>{let{hooks:t,retry:n}=e,r={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...n,errorCodes:[...n.errorCodes],methods:[...n.methods],statusCodes:[...n.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 h.URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return r.url!==void 0&&(r.prefixUrl=``),r},ro=e=>{let{hooks:t,retry:n}=e,r={...e};return J.object(e.context)&&(r.context={...e.context}),J.object(e.cacheOptions)&&(r.cacheOptions={...e.cacheOptions}),J.object(e.https)&&(r.https={...e.https}),J.object(e.cacheOptions)&&(r.cacheOptions={...r.cacheOptions}),J.object(e.agent)&&(r.agent={...e.agent}),J.object(e.headers)&&(r.headers={...e.headers}),J.object(n)&&(r.retry={...n},J.array(n.errorCodes)&&(r.retry.errorCodes=[...n.errorCodes]),J.array(n.methods)&&(r.retry.methods=[...n.methods]),J.array(n.statusCodes)&&(r.retry.statusCodes=[...n.statusCodes])),J.object(e.timeout)&&(r.timeout={...e.timeout}),J.object(t)&&(r.hooks={...t},J.array(t.init)&&(r.hooks.init=[...t.init]),J.array(t.beforeRequest)&&(r.hooks.beforeRequest=[...t.beforeRequest]),J.array(t.beforeError)&&(r.hooks.beforeError=[...t.beforeError]),J.array(t.beforeRedirect)&&(r.hooks.beforeRedirect=[...t.beforeRedirect]),J.array(t.beforeRetry)&&(r.hooks.beforeRetry=[...t.beforeRetry]),J.array(t.afterResponse)&&(r.hooks.afterResponse=[...t.afterResponse])),J.object(e.pagination)&&(r.pagination={...e.pagination}),r},io=e=>{let t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter(e=>typeof e==`number`);if(t.length>0)return Math.min(...t)},ao=(e,t,n)=>{let r=e.hooks?.init;if(r)for(let e of r)e(t,n)};var oo=class e{constructor(t,n,r){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}),q.any([J.string,J.urlInstance,J.object,J.undefined],t),q.any([J.object,J.undefined],n),q.any([J.object,J.undefined],r),t instanceof e||n instanceof e)throw TypeError(`The defaults must be passed as the third argument`);this._internals=no(r?._internals??r??to),this._init=[...r?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(J.plainObject(t))try{this.merge(t),this.merge(n)}finally{this.url=t.url}else try{this.merge(n)}finally{if(n?.url!==void 0)if(t===void 0)this.url=n.url;else throw TypeError("The `url` option is mutually exclusive with the `input` argument");else t!==void 0&&(this.url=t)}}catch(e){throw e.options=this,e}}merge(t){if(t){if(t instanceof e){for(let e of t._init)this.merge(e);return}t=ro(t),ao(this,t,this),ao(t,t,this),this._merging=!0,`isStream`in t&&(this.isStream=t.isStream);try{let e=!1;for(let n in t)if(!(n===`mutableDefaults`||n===`handlers`)&&n!==`url`){if(!(n in this))throw Error(`Unexpected option: ${n}`);this[n]=t[n],e=!0}e&&this._init.push(t)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){q.any([J.function_,J.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){for(let t in q.plainObject(e),e){if(!(t in this._internals.agent))throw TypeError(`Unexpected agent option: ${t}`);q.any([J.object,J.undefined],e[t])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){q.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){for(let t in q.plainObject(e),e){if(!(t in this._internals.timeout))throw Error(`Unexpected timeout option: ${t}`);q.any([J.number,J.undefined],e[t])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(q.any([J.string,J.urlInstance],e),e===``){this._internals.prefixUrl=``;return}if(e=e.toString(),e.endsWith(`/`)||(e+=`/`),this._internals.prefixUrl&&this._internals.url){let{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}get body(){return this._internals.body}set body(e){q.any([J.string,J.buffer,J.nodeStream,J.generator,J.asyncGenerator,ji,J.undefined],e),J.nodeStream(e)&&q.truthy(e.readable),e!==void 0&&(q.undefined(this._internals.form),q.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){q.any([J.plainObject,J.undefined],e),e!==void 0&&(q.undefined(this._internals.body),q.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){e!==void 0&&(q.undefined(this._internals.body),q.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(q.any([J.string,J.urlInstance,J.undefined],e),e===void 0){this._internals.url=void 0;return}if(J.string(e)&&e.startsWith(`/`))throw Error("`url` must not start with a slash");let t=new h.URL(`${this.prefixUrl}${e.toString()}`);if(this._internals.url=t,t.protocol===`unix:`&&(t.href=`http://unix${t.pathname}${t.search}`),t.protocol!==`http:`&&t.protocol!==`https:`){let e=Error(`Unsupported protocol: ${t.protocol}`);throw e.code=`ERR_UNSUPPORTED_PROTOCOL`,e}if(this._internals.username&&(t.username=this._internals.username,this._internals.username=``),this._internals.password&&(t.password=this._internals.password,this._internals.password=``),this._internals.searchParams&&(t.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),t.hostname===`unix`){if(!this._internals.enableUnixSockets)throw Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");let e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${t.pathname}${t.search}`);if(e?.groups){let{socketPath:t,path:n}=e.groups;this._unixOptions={socketPath:t,path:n,host:``}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(q.any([J.object,J.undefined],e),e===void 0){this._internals.cookieJar=void 0;return}let{setCookie:t,getCookieString:n}=e;q.function_(t),q.function_(n),t.length===4&&n.length===0?(t=(0,_.promisify)(t.bind(e)),n=(0,_.promisify)(n.bind(e)),this._internals.cookieJar={setCookie:t,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){q.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){q.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(this._internals.searchParams===void 0&&(this._internals.searchParams=new h.URLSearchParams),this._internals.searchParams)}set searchParams(e){q.any([J.string,J.object,J.undefined],e);let t=this._internals.url;if(e===void 0){this._internals.searchParams=void 0,t&&(t.search=``);return}let n=this.searchParams,r;if(J.string(e))r=new h.URLSearchParams(e);else if(e instanceof h.URLSearchParams)r=e;else for(let t in Za(e),r=new h.URLSearchParams,e){let i=e[t];i===null?r.append(t,``):i===void 0?n.delete(t):r.append(t,i)}if(this._merging){for(let e of r.keys())n.delete(e);for(let[e,t]of r)n.append(e,t)}else t?t.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){q.any([J.function_,J.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){q.any([J.object,J.boolean,J.undefined],e),e===!0?this._internals.dnsCache=eo():e===!1?this._internals.dnsCache=void 0:this._internals.dnsCache=e}get context(){return this._internals.context}set context(e){q.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){for(let t in q.object(e),e){if(!(t in this._internals.hooks))throw Error(`Unexpected hook event: ${t}`);let n=t,r=e[n];if(q.any([J.array,J.undefined],r),r)for(let e of r)q.function_(e);if(this._merging)r&&this._internals.hooks[n].push(...r);else{if(!r)throw Error(`Missing hook event: ${t}`);this._internals.hooks[t]=[...r]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){q.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){q.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){q.any([J.object,J.string,J.boolean,J.undefined],e),e===!0?this._internals.cache=Qa:e===!1?this._internals.cache=void 0:this._internals.cache=e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){q.boolean(e),this._internals.throwHttpErrors=e}get username(){let e=this._internals.url,t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){q.string(e);let t=this._internals.url,n=encodeURIComponent(e);t?t.username=n:this._internals.username=n}get password(){let e=this._internals.url,t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){q.string(e);let t=this._internals.url,n=encodeURIComponent(e);t?t.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){q.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){q.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){q.plainObject(e),this._merging?Object.assign(this._internals.headers,ri(e)):this._internals.headers=ri(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){q.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(e!==void 0&&e!==4&&e!==6)throw TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){q.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){q.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(q.plainObject(e),q.any([J.function_,J.undefined],e.calculateDelay),q.any([J.number,J.undefined],e.maxRetryAfter),q.any([J.number,J.undefined],e.limit),q.any([J.array,J.undefined],e.methods),q.any([J.array,J.undefined],e.statusCodes),q.any([J.array,J.undefined],e.errorCodes),q.any([J.number,J.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(let t in e)if(!(t in this._internals.retry))throw Error(`Unexpected retry option: ${t}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};let{retry:t}=this._internals;t.methods=[...new Set(t.methods.map(e=>e.toUpperCase()))],t.statusCodes=[...new Set(t.statusCodes)],t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){q.any([J.string,J.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){q.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){q.any([J.function_,J.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){for(let t in q.plainObject(e),q.any([J.boolean,J.undefined],e.shared),q.any([J.number,J.undefined],e.cacheHeuristic),q.any([J.number,J.undefined],e.immutableMinTimeToLive),q.any([J.boolean,J.undefined],e.ignoreCargoCult),e)if(!(t in this._internals.cacheOptions))throw Error(`Cache option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){for(let t in q.plainObject(e),q.any([J.boolean,J.undefined],e.rejectUnauthorized),q.any([J.function_,J.undefined],e.checkServerIdentity),q.any([J.string,J.object,J.array,J.undefined],e.certificateAuthority),q.any([J.string,J.object,J.array,J.undefined],e.key),q.any([J.string,J.object,J.array,J.undefined],e.certificate),q.any([J.string,J.undefined],e.passphrase),q.any([J.string,J.buffer,J.array,J.undefined],e.pfx),q.any([J.array,J.undefined],e.alpnProtocols),q.any([J.string,J.undefined],e.ciphers),q.any([J.string,J.buffer,J.undefined],e.dhparam),q.any([J.string,J.undefined],e.signatureAlgorithms),q.any([J.string,J.undefined],e.minVersion),q.any([J.string,J.undefined],e.maxVersion),q.any([J.boolean,J.undefined],e.honorCipherOrder),q.any([J.number,J.undefined],e.tlsSessionLifetime),q.any([J.string,J.undefined],e.ecdhCurve),q.any([J.string,J.buffer,J.array,J.undefined],e.certificateRevocationLists),e)if(!(t in this._internals.https))throw Error(`HTTPS option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(e===null)throw TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");q.any([J.string,J.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){q.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){q.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(e===void 0){this._internals.responseType=`text`;return}if(e!==`text`&&e!==`buffer`&&e!==`json`)throw Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}get pagination(){return this._internals.pagination}set pagination(e){q.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){q.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){q.any([J.number,J.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){q.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return(0,_.inspect)(this._internals,t)}createNativeRequestOptions(){let e=this._internals,t=e.url,n;n=t.protocol===`https:`?e.http2?e.agent:e.agent.https:e.agent.http;let{https:r}=e,{pfx:i}=r;return J.array(i)&&J.plainObject(i[0])&&(i=i.map(e=>({buf:e.buffer,passphrase:e.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:r.alpnProtocols,ca:r.certificateAuthority,cert:r.certificate,key:r.key,passphrase:r.passphrase,pfx:r.pfx,rejectUnauthorized:r.rejectUnauthorized,checkServerIdentity:r.checkServerIdentity??te.checkServerIdentity,ciphers:r.ciphers,honorCipherOrder:r.honorCipherOrder,minVersion:r.minVersion,maxVersion:r.maxVersion,sigalgs:r.signatureAlgorithms,sessionTimeout:r.tlsSessionLifetime,dhparam:r.dhparam,ecdhCurve:r.ecdhCurve,crl:r.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:n,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?io(e):void 0,h2session:e.h2session}}getRequestFunction(){let e=this._internals.url,{request:t}=this._internals;return!t&&e?this.getFallbackRequestFunction():t}getFallbackRequestFunction(){let e=this._internals.url;if(e){if(e.protocol===`https:`){if(this._internals.http2){if(Ya<15||Ya===15&&Xa<10){let e=Error("To use the `http2` option, install Node.js 15.10.0 or above");throw e.code=`EUNSUPPORTED`,e}return qa.default.auto}return w.default.request}return C.default.request}}freeze(){let e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}};const so=e=>{let{statusCode:t}=e,n=e.request.options.followRedirect?299:399;return t>=200&&t<=n||t===304};var co=class extends Y{constructor(e,t){let{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name=`ParseError`,this.code=`ERR_BODY_PARSE_FAILURE`}};const lo=(e,t,n,r)=>{let{rawBody:i}=e;try{if(t===`text`)return i.toString(r);if(t===`json`)return i.length===0?``:n(i.toString(r));if(t===`buffer`)return i}catch(t){throw new co(t,e)}throw new co({message:`Unknown body type '${t}'`,name:`Error`},e)};function uo(e){return e.writable&&!e.writableEnded}var fo=uo;function po(e){return e.protocol===`unix:`||e.hostname===`unix`}var mo=c($r(),1);const{buffer:ho}=mo.default,go=J.string(d.default.versions.brotli),_o=new Set([`GET`,`HEAD`]),vo=new aa,yo=new Set([300,301,302,303,304,307,308]),bo=[`socket`,`connect`,`continue`,`information`,`upgrade`],xo=()=>{};var So=class e extends D.Duplex{constructor(e,t,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=xo,this._triggerRead=!1,this._cancelTimeouts=xo,this._removeListeners=xo,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=xo,this.on(`pipe`,e=>{e?.headers&&Object.assign(this.options.headers,e.headers)}),this.on(`newListener`,e=>{if(e===`retry`&&this.listenerCount(`retry`)>0)throw Error(`A retry listener has been attached already.`)});try{if(this.options=new oo(e,t,n),!this.options.url){if(this.options.prefixUrl===``)throw TypeError("Missing `url` property");this.options.url=``}this.requestUrl=this.options.url}catch(e){let{options:t}=e;t&&(this.options=t),this.flush=async()=>{this.flush=async()=>{},this.destroy(e)};return}let{body:r}=this.options;if(J.nodeStream(r)&&r.once(`error`,e=>{this._flushed?this._beforeError(new Ir(e,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new Ir(e,this))}}),this.options.signal){let e=()=>{this.destroy(new Br(this))};this.options.signal.aborted?e():(this.options.signal.addEventListener(`abort`,e),this._removeListeners=()=>{this.options.signal.removeEventListener(`abort`,e)})}}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 e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(t){if(this._stopReading)return;let{response:n,options:r}=this,i=this.retryCount+(t.name===`RetryError`?0:1);this._stopReading=!0,t instanceof Y||(t=new Y(t.message,t,this));let a=t;(async()=>{if(n?.readable&&!n.rawBody&&!this._request?.socket?.destroyed&&(n.setEncoding(this.readableEncoding),await this._setRawBody(n)&&(n.body=n.rawBody.toString())),this.listenerCount(`retry`)!==0){let o;try{let e;n&&`retry-after`in n.headers&&(e=Number(n.headers[`retry-after`]),Number.isNaN(e)?(e=Date.parse(n.headers[`retry-after`])-Date.now(),e<=0&&(e=1)):e*=1e3);let t=r.retry;o=await t.calculateDelay({attemptCount:i,retryOptions:t,error:a,retryAfter:e,computedValue:sa({attemptCount:i,retryOptions:t,error:a,retryAfter:e,computedValue:t.maxRetryAfter??r.timeout.request??1/0})})}catch(e){this._error(new Y(e.message,e,this));return}if(o){if(await new Promise(e=>{let t=setTimeout(e,o);this._stopRetry=()=>{clearTimeout(t),e()}}),this.destroyed)return;try{for(let e of this.options.hooks.beforeRetry)await e(a,this.retryCount+1)}catch(e){this._error(new Y(e.message,t,this));return}if(this.destroyed)return;this.destroy(),this.emit(`retry`,this.retryCount+1,t,t=>{let n=new e(r.url,t,r);return n.retryCount=this.retryCount+1,d.default.nextTick(()=>{n.flush()}),n});return}}this._error(a)})()}_read(){this._triggerRead=!0;let{response:e}=this;if(e&&!this._stopReading){e.readableLength&&(this._triggerRead=!1);let t;for(;(t=e.read())!==null;){this._downloadedSize+=t.length;let e=this.downloadProgress;e.percent<1&&this.emit(`downloadProgress`,e),this.push(t)}}}_write(e,t,n){let r=()=>{this._writeRequest(e,t,n)};this._requestInitialized?r():this._jobs.push(r)}_final(e){let t=()=>{if(!this._request||this._request.destroyed){e();return}this._request.end(t=>{this._request._writableState?.errored||(t||(this._bodySize=this._uploadedSize,this.emit(`uploadProgress`,this.uploadProgress),this._request.emit(`upload-complete`)),e(t))})};this._requestInitialized?t():this._jobs.push(t)}_destroy(e,t){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){let{body:e}=this.options;J.nodeStream(e)&&e.destroy()}this._request&&this._request.destroy(),e!==null&&!J.undefined(e)&&!(e instanceof Y)&&(e=new Y(e.message,e,this)),t(e)}pipe(e,t){return e instanceof C.ServerResponse&&this._pipedServerResponses.add(e),super.pipe(e,t)}unpipe(e){return e instanceof C.ServerResponse&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){let{options:e}=this,{headers:t}=e,n=!J.undefined(e.form),r=!J.undefined(e.json),i=!J.undefined(e.body),a=_o.has(e.method)&&!(e.method===`GET`&&e.allowGetBody);if(this._cannotHaveBody=a,n||r||i){if(a)throw TypeError(`The \`${e.method}\` method cannot be used with a body`);let r=!J.string(t[`content-type`]);if(i){if(ji(e.body)){let n=new Ji(e.body);r&&(t[`content-type`]=n.headers[`Content-Type`]),`Content-Length`in n.headers&&(t[`content-length`]=n.headers[`Content-Length`]),e.body=n.encode()}Xi(e.body)&&r&&(t[`content-type`]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){r&&(t[`content-type`]=`application/x-www-form-urlencoded`);let{form:n}=e;e.form=void 0,e.body=new h.URLSearchParams(n).toString()}else{r&&(t[`content-type`]=`application/json`);let{json:n}=e;e.json=void 0,e.body=e.stringifyJson(n)}let o=await Zi(e.body,e.headers);J.undefined(t[`content-length`])&&J.undefined(t[`transfer-encoding`])&&!a&&!J.undefined(o)&&(t[`content-length`]=String(o))}e.responseType===`json`&&!(`accept`in e.headers)&&(e.headers.accept=`application/json`),this._bodySize=Number(t[`content-length`])||void 0}async _onResponseBase(e){if(this.isAborted)return;let{options:t}=this,{url:n}=t;this._nativeResponse=e,t.decompress&&(e=(0,Yi.default)(e));let r=e.statusCode,i=e;i.statusMessage=i.statusMessage??C.default.STATUS_CODES[r],i.url=t.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=so(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers[`content-length`])||void 0,this.response=i,e.once(`end`,()=>{this._responseSize=this._downloadedSize,this.emit(`downloadProgress`,this.downloadProgress)}),e.once(`error`,t=>{this._aborted=!0,e.destroy(),this._beforeError(new Rr(t,this))}),e.once(`aborted`,()=>{this._aborted=!0,this._beforeError(new Rr({name:`Error`,message:`The server aborted pending request`,code:`ECONNRESET`},this))}),this.emit(`downloadProgress`,this.downloadProgress);let a=e.headers[`set-cookie`];if(J.object(t.cookieJar)&&a){let e=a.map(async e=>t.cookieJar.setCookie(e,n.toString()));t.ignoreInvalidCookies&&(e=e.map(async e=>{try{await e}catch{}}));try{await Promise.all(e)}catch(e){this._beforeError(e);return}}if(!this.isAborted){if(t.followRedirect&&e.headers.location&&yo.has(r)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=t.maxRedirects){this._beforeError(new Nr(this));return}this._request=void 0;let a=new oo(void 0,void 0,this.options),o=r===303&&a.method!==`GET`&&a.method!==`HEAD`,s=r!==307&&r!==308,c=a.methodRewriting&&s;(o||c)&&(a.method=`GET`,a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers[`content-length`]);try{let t=new h.URL(E.Buffer.from(e.headers.location,`binary`).toString(),n);if(!po(n)&&po(t)){this._beforeError(new Y(`Cannot redirect to UNIX socket`,{},this));return}t.hostname!==n.hostname||t.port!==n.port?(`host`in a.headers&&delete a.headers.host,`cookie`in a.headers&&delete a.headers.cookie,`authorization`in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username=``,a.password=``)):(t.username=a.username,t.password=a.password),this.redirectUrls.push(t),a.prefixUrl=``,a.url=t;for(let e of a.hooks.beforeRedirect)await e(a,i);this.emit(`redirect`,a,i),this.options=a,await this._makeRequest()}catch(e){this._beforeError(e);return}return}if(t.isStream&&t.throwHttpErrors&&!so(i)){this._beforeError(new Pr(i));return}if(e.on(`readable`,()=>{this._triggerRead&&this._read()}),this.on(`resume`,()=>{e.resume()}),this.on(`pause`,()=>{e.pause()}),e.once(`end`,()=>{this.push(null)}),this._noPipe){await this._setRawBody()&&this.emit(`response`,e);return}this.emit(`response`,e);for(let n of this._pipedServerResponses)if(!n.headersSent){for(let r in e.headers){let i=t.decompress?r!==`content-encoding`:!0,a=e.headers[r];i&&n.setHeader(r,a)}n.statusCode=r}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{let t=await ho(e);if(!this.isAborted)return this.response.rawBody=t,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){let{options:t}=this,{timeout:n,url:r}=t;Wr(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=ra(e,n,r);let i=t.cache?`cacheableResponse`:`response`;e.once(i,e=>{this._onResponse(e)}),e.once(`error`,t=>{this._aborted=!0,e.destroy(),t=t instanceof na?new Lr(t,this.timings,this):new Y(t.message,t,this),this._beforeError(t)}),this._unproxyEvents=Qi(e,this,bo),this._request=e,this.emit(`uploadProgress`,this.uploadProgress),this._sendBody(),this.emit(`request`,e)}async _asyncWrite(e){return new Promise((t,n)=>{super.write(e,e=>{if(e){n(e);return}t()})})}_sendBody(){let{body:e}=this.options,t=this.redirectUrls.length===0?this:this._request??this;J.nodeStream(e)?e.pipe(t):J.generator(e)||J.asyncGenerator(e)?(async()=>{try{for await(let t of e)await this._asyncWrite(t);super.end()}catch(e){this._beforeError(e)}})():J.undefined(e)?(this._cannotHaveBody||this._noPipe)&&t.end():(this._writeRequest(e,void 0,()=>{}),t.end())}_prepareCache(e){if(!vo.has(e)){let t=new vi(((e,t)=>{let n=e._request(e,t);return J.promise(n)&&(n.once=(e,t)=>{if(e===`error`)(async()=>{try{await n}catch(e){t(e)}})();else if(e===`abort`)(async()=>{try{(await n).once(`abort`,t)}catch{}})();else throw Error(`Unknown HTTP2 promise event: ${e}`);return n}),n}),e);vo.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise((n,r)=>{Object.assign(t,ia(e));let i,a=vo.get(t.cache)(t,async e=>{if(e._readableState.autoDestroy=!1,i){let t=()=>{e.req&&(e.complete=e.req.res.complete)};e.prependOnceListener(`end`,t),t(),(await i).emit(`cacheableResponse`,e)}n(e)});a.once(`error`,r),a.once(`request`,async e=>{i=e,n(i)})})}async _makeRequest(){let{options:e}=this,{headers:t,username:n,password:r}=e,i=e.cookieJar;for(let e in t)if(J.undefined(t[e]))delete t[e];else if(J.null_(t[e]))throw TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(e.decompress&&J.undefined(t[`accept-encoding`])&&(t[`accept-encoding`]=go?`gzip, deflate, br`:`gzip, deflate`),(n||r)&&(t.authorization=`Basic ${E.Buffer.from(`${n}:${r}`).toString(`base64`)}`),i){let n=await i.getCookieString(e.url.toString());J.nonEmptyString(n)&&(t.cookie=n)}e.prefixUrl=``;let a;for(let t of e.hooks.beforeRequest){let n=await t(e);if(!J.undefined(n)){a=()=>n;break}}a||=e.getRequestFunction();let o=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=a,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));let s=e.cache?this._createCacheableRequest:a;try{let t=s(o,this._requestOptions);J.promise(t)&&(t=await t),J.undefined(t)&&(t=e.getFallbackRequestFunction()(o,this._requestOptions),J.promise(t)&&(t=await t)),fo(t)?this._onRequest(t):this.writable?(this.once(`finish`,()=>{this._onResponse(t)}),this._sendBody()):this._onResponse(t)}catch(e){throw e instanceof di?new Fr(e,this):e}}async _error(e){try{if(!(e instanceof Pr&&!this.options.throwHttpErrors))for(let t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Y(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,n){!this._request||this._request.destroyed||this._request.write(e,t,r=>{if(!r&&!this._request.destroyed){this._uploadedSize+=E.Buffer.byteLength(e,t);let n=this.uploadProgress;n.percent<1&&this.emit(`uploadProgress`,n)}n(r)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return e=this._responseSize?this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?1:0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return e=this._bodySize?this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?1:0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}},Co=class extends Y{constructor(e){super(`Promise was canceled`,{},e),this.name=`CancelError`,this.code=`ERR_CANCELED`}get isCanceled(){return!0}};const wo=[`request`,`response`,`redirect`,`uploadProgress`,`downloadProgress`];function To(e){let t,n,r,i=new T.EventEmitter,a=new jr((o,s,c)=>{c(()=>{t.destroy()}),c.shouldReject=!1,c(()=>{s(new Co(t))});let l=u=>{c(()=>{});let d=e??new So(void 0,void 0,r);d.retryCount=u,d._noPipe=!0,t=d,d.once(`response`,async e=>{let t=(e.headers[`content-encoding`]??``).toLowerCase(),r=t===`gzip`||t===`deflate`||t===`br`,{options:i}=d;if(r&&!i.decompress)e.body=e.rawBody;else try{e.body=lo(e,i.responseType,i.parseJson,i.encoding)}catch(t){if(e.body=e.rawBody.toString(),so(e)){d._beforeError(t);return}}try{let t=i.hooks.afterResponse;for(let[n,r]of t.entries())if(e=await r(e,async e=>{throw i.merge(e),i.prefixUrl=``,e.url&&(i.url=e.url),i.hooks.afterResponse=i.hooks.afterResponse.slice(0,n),new zr(d)}),!(J.object(e)&&J.number(e.statusCode)&&!J.nullOrUndefined(e.body)))throw TypeError("The `afterResponse` hook returned an invalid value")}catch(e){d._beforeError(e);return}if(n=e,!so(e)){d._beforeError(new Pr(e));return}d.destroy(),o(d.options.resolveBodyOnly?e.body:e)});let f=e=>{if(a.isCanceled)return;let{options:t}=d;if(e instanceof Pr&&!t.throwHttpErrors){let{response:t}=e;d.destroy(),o(d.options.resolveBodyOnly?t.body:t);return}s(e)};d.once(`error`,f);let p=d.options?.body;d.once(`retry`,(t,n)=>{e=void 0;let i=d.options.body;if(p===i&&J.nodeStream(i)){n.message=`Cannot retry with consumed body stream`,f(n);return}r=d.options,l(t)}),Qi(d,i,wo),J.undefined(e)&&d.flush()};l(0)});a.on=(e,t)=>(i.on(e,t),a),a.off=(e,t)=>(i.off(e,t),a);let o=e=>{let t=(async()=>{await a;let{options:t}=n.request;return lo(n,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)),t};return a.json=()=>{if(t.options){let{headers:e}=t.options;!t.writableFinished&&!(`accept`in e)&&(e.accept=`application/json`)}return o(`json`)},a.buffer=()=>o(`buffer`),a.text=()=>o(`text`),a}const Eo=async e=>new Promise(t=>{setTimeout(t,e)}),Do=e=>J.function_(e),Oo=[`get`,`post`,`put`,`patch`,`head`,`delete`],ko=e=>{e={options:new oo(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,`mutableDefaults`,{enumerable:!0,configurable:!1,writable:!1});let t=((t,n,r=e.options)=>{let i=new So(t,n,r),a,o=e=>(i.options=e,i._noPipe=!e.isStream,i.flush(),e.isStream?i:(a||=To(i),a)),s=0,c=t=>{let n=(e.handlers[s++]??o)(t,c);if(J.promise(n)&&!i.options.isStream&&(a||=To(i),n!==a)){let e=Object.getOwnPropertyDescriptors(a);for(let t in e)t in n&&delete e[t];Object.defineProperties(n,e),n.cancel=a.cancel}return n};return c(i.options)});t.extend=(...t)=>{let n=new oo(void 0,void 0,e.options),r=[...e.handlers],i;for(let e of t)Do(e)?(n.merge(e.defaults.options),r.push(...e.defaults.handlers),i=e.defaults.mutableDefaults):(n.merge(e),e.handlers&&r.push(...e.handlers),i=e.mutableDefaults);return ko({options:n,handlers:r,mutableDefaults:!!i})};let n=(async function*(n,r){let i=new oo(n,r,e.options);i.resolveBodyOnly=!1;let{pagination:a}=i;q.function_(a.transform),q.function_(a.shouldContinue),q.function_(a.filter),q.function_(a.paginate),q.number(a.countLimit),q.number(a.requestLimit),q.number(a.backoff);let o=[],{countLimit:s}=a,c=0;for(;c<a.requestLimit;){c!==0&&await Eo(a.backoff);let e=await t(void 0,void 0,i),n=await a.transform(e),r=[];q.array(n);for(let e of n)if(a.filter({item:e,currentItems:r,allItems:o})&&(!a.shouldContinue({item:e,currentItems:r,allItems:o})||(yield e,a.stackAllItems&&o.push(e),r.push(e),--s<=0)))return;let l=a.paginate({response:e,currentItems:r,allItems:o});if(l===!1)return;l===e.request.options?i=e.request.options:(i.merge(l),q.any([J.urlInstance,J.undefined],l.url),l.url!==void 0&&(i.prefixUrl=``,i.url=l.url)),c++}});t.paginate=n,t.paginate.all=(async(e,t)=>{let r=[];for await(let i of n(e,t))r.push(i);return r}),t.paginate.each=n,t.stream=((e,n)=>t(e,{...n,isStream:!0}));for(let e of Oo)t[e]=((n,r)=>t(n,{...r,method:e})),t.stream[e]=((n,r)=>t(n,{...r,method:e,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};var Ao=ko;const jo=Ao({options:new oo,handlers:[],mutableDefaults:!1});var Mo=jo,No=o((e=>{e.parse=e.decode=i,e.stringify=e.encode=n,e.safe=o,e.unsafe=s;var t=typeof process<`u`&&process.platform===`win32`?`\r
32
+ `:`
33
+ `;function n(e,i){var a=[],s=``;typeof i==`string`?i={section:i,whitespace:!1}:(i||={},i.whitespace=i.whitespace===!0);var c=i.whitespace?` = `:`=`;return Object.keys(e).forEach(function(n,r,i){var l=e[n];l&&Array.isArray(l)?l.forEach(function(e){s+=o(n+`[]`)+c+o(e)+`
34
+ `}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(e){return e.replace(/\1/g,`LITERAL\\1LITERAL`).replace(/\\\./g,``).split(/\./).map(function(e){return e.replace(/\1/g,`\\.`).replace(/\2LITERAL\\1LITERAL\2/g,``)})}function i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}})),Po=o(((e,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
35
+ `){p++,l=!1,d+=f(e,u,p),u=p;continue}else if(l===n&&o===`
36
+ `)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),Fo=o((e=>{var t=require(`fs`),n=No(),r=require(`path`),i=Po(),a=e.parse=function(e){return/^\s*{/.test(e)?JSON.parse(i(e)):n.parse(e)},o=e.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var n in e)if(typeof e[n]!=`string`)return;var i=r.join.apply(null,e);try{return t.readFileSync(i,`utf-8`)}catch{return}};e.json=function(){var e=o.apply(null,arguments);return e?a(e):null},e.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},e.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function n(e,i){var a=r.join(e,i);try{return t.statSync(a),a}catch{if(r.dirname(e)!==e)return n(r.dirname(e),i)}}return n(process.cwd(),e)}})),Io=o(((e,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),Lo=o(((e,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),Ro=o(((e,t)=>{var n=Fo(),r=require(`path`).join,i=Io(),a=`/etc`,o=process.platform===`win32`,s=o?process.env.USERPROFILE:process.env.HOME;t.exports=function(e,t,c,l){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);c||=Lo()(process.argv.slice(2)),t=(typeof t==`string`?n.json(t):t)||{},l||=n.parse;var u=n.env(e+`_`),d=[t],f=[];function p(e){if(!(f.indexOf(e)>=0)){var t=n.file(e);t&&(d.push(l(t)),f.push(e))}}return o||[r(a,e,`config`),r(a,e+`rc`)].forEach(p),s&&[r(s,`.config`,e,`config`),r(s,`.config`,e),r(s,`.`+e,`config`),r(s,`.`+e+`rc`)].forEach(p),p(n.find(`.`+e+`rc`)),u.config&&p(u.config),c.config&&p(c.config),i.apply(null,d.concat([u,c,f.length?{configs:f,config:f[f.length-1]}:void 0]))}})),zo=c(Ro(),1);function Bo(e){let t=(0,zo.default)(`npm`,{registry:`https://registry.npmjs.org/`}),n=t[`${e}:registry`]||t.config_registry||t.registry;return n.slice(-1)===`/`?n:`${n}/`}var Vo=o(((e,t)=>{var n=require(`constants`),r=process.cwd,i=null,a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return i||=r.call(process),i};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var o=process.chdir;process.chdir=function(e){i=null,o.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,o)}t.exports=s;function s(e){n.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),a===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){i&&i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r),a=!0,o;try{o=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function r(e){n.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,r,i,a){e.open(t,n.O_SYMLINK,function(t,n){if(t){a&&a(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,r,i){var a=e.openSync(t,n.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,r,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function o(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),Ho=o(((e,t)=>{var n=require(`stream`).Stream;t.exports=r;function r(e){return{ReadStream:t,WriteStream:r};function t(r,i){if(!(this instanceof t))return new t(r,i);n.call(this);var a=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=64*1024,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function r(t,i){if(!(this instanceof r))return new r(t,i);n.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw 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())}}})),Uo=o(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),Wo=o(((e,t)=>{var n=require(`fs`),r=Vo(),i=Ho(),a=Uo(),o=require(`util`),s,c;typeof Symbol==`function`&&typeof Symbol.for==`function`?(s=Symbol.for(`graceful-fs.queue`),c=Symbol.for(`graceful-fs.previous`)):(s=`___graceful-fs.queue`,c=`___graceful-fs.previous`);function l(){}function u(e,t){Object.defineProperty(e,s,{get:function(){return t}})}var d=l;o.debuglog?d=o.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(d=function(){var e=o.format.apply(o,arguments);e=`GFS4: `+e.split(/\n/).join(`
37
+ GFS4: `),console.error(e)}),n[s]||(u(n,global[s]||[]),n.close=(function(e){function t(t,r){return e.call(n,t,function(e){e||h(),typeof r==`function`&&r.apply(this,arguments)})}return Object.defineProperty(t,c,{value:e}),t})(n.close),n.closeSync=(function(e){function t(t){e.apply(n,arguments),h()}return Object.defineProperty(t,c,{value:e}),t})(n.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){d(n[s]),require(`assert`).equal(n[s].length,0)})),global[s]||u(global,n[s]),t.exports=f(a(n)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched&&(t.exports=f(n),n.__patched=!0);function f(e){r(e),e.gracefulify=f,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?p([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var a=e.writeFile;e.writeFile=o;function o(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,o){return a(e,t,n,function(a){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([i,[e,t,n,r],a,o||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var m=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=m.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?p([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=i(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,`ReadStream`,{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,`WriteStream`,{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,`FileReadStream`,{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,`FileWriteStream`,{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?p([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function p(e){d(`ENQUEUE`,e[0].name,e[1]),n[s].push(e),g()}var m;function h(){for(var e=Date.now(),t=0;t<n[s].length;++t)n[s][t].length>2&&(n[s][t][3]=e,n[s][t][4]=e);g()}function g(){if(clearTimeout(m),m=void 0,n[s].length!==0){var e=n[s].shift(),t=e[0],r=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)d(`RETRY`,t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){d(`TIMEOUT`,t.name,r);var c=r.pop();typeof c==`function`&&c.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(d(`RETRY`,t.name,r),t.apply(null,r.concat([a]))):n[s].push(e)}m===void 0&&(m=setTimeout(g,0))}}})),Go=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.readCAFileSync=void 0;let n=t(Wo());function r(e){try{let t=n.default.readFileSync(e,`utf8`),r=`-----END CERTIFICATE-----`;return t.split(r).filter(e=>!!e.trim()).map(e=>`${e.trimLeft()}${r}`)}catch(e){if(e.code===`ENOENT`)return;throw e}}e.readCAFileSync=r})),Ko=o((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(Go(),e)})),qo=o(((e,t)=>{t.exports=r;function n(e,t){if(typeof Object.setPrototypeOf==`function`)return Object.setPrototypeOf(e,t);e.__proto__=t}function r(){this.list=[];var e=null;Object.defineProperty(this,`root`,{get:function(){return e},set:function(t){e=t,this.list.length&&n(this.list[this.list.length-1],t)},enumerable:!0,configurable:!0})}r.prototype={get length(){return this.list.length},get keys(){var e=[];for(var t in this.list[0])e.push(t);return e},get snapshot(){var e={};return this.keys.forEach(function(t){e[t]=this.get(t)},this),e},get store(){return this.list[0]},push:function(e){return typeof e!=`object`&&(e={valueOf:e}),this.list.length>=1&&n(this.list[this.list.length-1],e),n(e,this.root),this.list.push(e)},pop:function(){return this.list.length>=2&&n(this.list[this.list.length-2],this.root),this.list.pop()},unshift:function(e){return n(e,this.list[0]||this.root),this.list.unshift(e)},shift:function(){return this.list.length===1&&n(this.list[0],this.root),this.list.shift()},get:function(e){return this.list[0][e]},set:function(e,t,n){return this.length||this.push({}),n&&this.list[0].hasOwnProperty(e)&&this.push({}),this.list[0][e]=t},forEach:function(e,t){for(var n in this.list[0])e.call(t,n,this.list[0][n])},slice:function(){return this.list.slice.apply(this.list,arguments)},splice:function(){for(var e=this.list.splice.apply(this.list,arguments),t=0,r=this.list.length;t<r;t++)n(this.list[t],this.list[t+1]||this.root);return e}}})),Jo=o(((e,t)=>{var n=qo(),r=require(`path`),i=require(`fs`),a=No(),o=require(`events`).EventEmitter,s=require(`url`),c=require(`http`),l=t.exports=function(){for(var e=[].slice.call(arguments),t=new f;e.length;){var n=e.shift();n&&t.push(typeof n==`string`?d(n):n)}return t};l.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function t(e,n){var a=r.join(e,n);try{return i.statSync(a),a}catch{if(r.dirname(e)!==e)return t(r.dirname(e),n)}}return t(__dirname,e)};var u=l.parse=function(e,t,n){if(e=``+e,n)if(n===`json`)if(this.emit)try{return JSON.parse(e)}catch(e){this.emit(`error`,e)}else return JSON.parse(e);else return a.parse(e);else try{return JSON.parse(e)}catch{return a.parse(e)}},d=l.json=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null}),t=r.join.apply(null,e),n;try{n=i.readFileSync(t,`utf-8`)}catch{return}return u(n,t,`json`)};l.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)i.indexOf(e)===0&&(n[i.substring(r)]=t[i]);return n},l.ConfigChain=f;function f(){o.apply(this),n.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var p={constructor:{value:f}};Object.keys(o.prototype).forEach(function(e){p[e]=Object.getOwnPropertyDescriptor(o.prototype,e)}),f.prototype=Object.create(n.prototype,p),f.prototype.del=function(e,t){if(t){var n=this.sources[t];if(n&&=n.data,!n)return this.emit(`error`,Error(`not found `+t));delete n[e]}else for(var r=0,i=this.list.length;r<i;r++)delete this.list[r][e];return this},f.prototype.set=function(e,t,n){var r;if(n){if(r=this.sources[n],r&&=r.data,!r)return this.emit(`error`,Error(`not found `+n))}else if(r=this.list[0],!r)return this.emit(`error`,Error(`cannot set, no confs!`));return r[e]=t,this},f.prototype.get=function(e,t){return t?(t=this.sources[t],t&&=t.data,t&&Object.hasOwnProperty.call(t,e)?t[e]:void 0):this.list[0][e]},f.prototype.save=function(e,t,n){typeof t==`function`&&(n=t,t=null);var r=this.sources[e];if(!r||!(r.path||r.source)||!r.data)return this.emit(`error`,Error(`bad save target: `+e));if(r.source){var o=r.prefix||``;return Object.keys(r.data).forEach(function(e){r.source[o+e]=r.data[e]}),this}var t=t||r.type,s=r.data;return s=r.type===`json`?JSON.stringify(s):a.stringify(s),this._saving++,i.writeFile(r.path,s,`utf8`,function(e){if(this._saving--,e)return n?n(e):this.emit(`error`,e);this._saving===0&&(n&&n(),this.emit(`save`))}.bind(this)),this},f.prototype.addFile=function(e,t,n){n||=e;var r={__source__:n};return this.sources[n]={path:e,type:t},this.push(r),this._await(),i.readFile(e,`utf8`,function(n,i){n&&this.emit(`error`,n),this.addString(i,e,t,r)}.bind(this)),this},f.prototype.addEnv=function(e,t,n){n||=`env`;var r=l.env(e,t);return this.sources[n]={data:r,source:t,prefix:e},this.add(r,n)},f.prototype.addUrl=function(e,t,n){this._await();var r=s.format(e);n||=r;var i={__source__:n};return this.sources[n]={href:r,type:t},this.push(i),c.request(e,function(e){var n=[],a=e.headers[`content-type`];t||(t=a.indexOf(`json`)===-1?a.indexOf(`ini`)===-1?r.match(/\.json$/)?`json`:r.match(/\.ini$/)?`ini`:null:`ini`:`json`,i.type=t),e.on(`data`,n.push.bind(n)).on(`end`,function(){this.addString(Buffer.concat(n),r,t,i)}.bind(this)).on(`error`,this.emit.bind(this,`error`))}.bind(this)).on(`error`,this.emit.bind(this,`error`)).end(),this},f.prototype.addString=function(e,t,n,r){return e=this.parse(e,t,n),this.add(e,r),this},f.prototype.add=function(e,t){if(t&&typeof t==`object`){var n=this.list.indexOf(t);if(n===-1)return this.emit(`error`,Error(`bad marker`));this.splice(n,1,e),t=t.__source__,this.sources[t]=this.sources[t]||{},this.sources[t].data=e,this._resolve()}else typeof t==`string`&&(this.sources[t]=this.sources[t]||{},this.sources[t].data=e),this._await(),this.push(e),process.nextTick(this._resolve.bind(this));return this},f.prototype.parse=l.parse,f.prototype._await=function(){this._awaiting++},f.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit(`load`,this)}})),Yo=o(((e,t)=>{t.exports=function(e){let t=e.indexOf(`:`);if(t===-1)return n(e);let r=e.substr(0,t),i=e.substr(t+1);return`${n(r)}:${n(i)}`};function n(e){if(e=e.toLowerCase(),e===`_authtoken`)return`_authToken`;let t=e[0];for(let n=1;n<e.length;n++)t+=e[n]===`_`?`-`:e[n];return t}})),Xo=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;let t=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function n(e,n){return e.replace(t,r.bind(null,n))}e.envReplace=n;function r(e,t,n,r){if(n.length%2)return t.slice((n.length+1)/2);let i=a(e,r);if(i===void 0)throw Error(`Failed to replace env in config: ${t}`);return`${n.slice(n.length/2)}${i}`}let i=/([^:-]+)(:?)-(.+)/;function a(e,t){let n=t.match(i);if(!n)return e[t];let[,r,a,o]=n;return Object.prototype.hasOwnProperty.call(e,r)?!e[r]&&a?o:e[r]:o}})),Zo=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.envReplace=void 0;var t=Xo();Object.defineProperty(e,`envReplace`,{enumerable:!0,get:function(){return t.envReplace}})})),Qo=o((e=>{let t=require(`fs`),n=require(`path`),{envReplace:r}=Zo();e.envReplace=r,e.findPrefix=e=>{e=n.resolve(e);let r=!1;for(;n.basename(e)===`node_modules`;)e=n.dirname(e),r=!0;if(r)return e;let i=(e,r)=>{if(e===`/`||process.platform===`win32`&&/^[a-zA-Z]:(\\|\/)?$/.test(e))return r;try{let a=t.readdirSync(e);if(a.includes(`node_modules`)||a.includes(`package.json`)||a.includes(`package.json5`)||a.includes(`package.yaml`)||a.includes(`pnpm-workspace.yaml`))return e;let o=n.dirname(e);return o===e?r:i(o,r)}catch(t){if(e===r){if(t.code===`ENOENT`)return r;throw t}return r}};return i(e,e)},e.parseField=(e,t,i)=>{if(typeof t!=`string`)return t;let a=[].concat(e[i]),o=a.indexOf(n)!==-1,s=a.indexOf(Boolean)!==-1,c=a.indexOf(String)!==-1,l=a.indexOf(Number)!==-1;if(t=`${t}`.trim(),/^".*"$/.test(t))try{t=JSON.parse(t)}catch{throw Error(`Failed parsing JSON config key ${i}: ${t}`)}if(s&&!c&&t===``)return!0;switch(t){case`true`:return!0;case`false`:return!1;case`null`:return null;case`undefined`:return}return t=r(t,process.env),o&&((process.platform===`win32`?/^~(\/|\\)/:/^~\//).test(t)&&process.env.HOME&&(t=n.resolve(process.env.HOME,t.substr(2))),t=n.resolve(t)),l&&!isNaN(t)&&(t=Number(t)),t},e.parseKey=e=>typeof e==`string`?r(e,process.env):e})),$o=o((e=>{let t=require(`path`),n=require(`stream`).Stream,r=require(`url`),i=()=>{},a=()=>[],o=()=>{};e.types={access:[null,`restricted`,`public`],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,`dev`,`development`],audit:Boolean,"auth-type":[`legacy`,`sso`,`saml`,`oauth`],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:t,cache:t,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:[`always`,Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:t,"global-style":Boolean,group:[Number,String],"https-proxy":[null,r],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":t,"init-author-name":String,"init-author-email":String,"init-author-url":[``,r],"init-license":String,"init-version":o,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":a(),loglevel:[`silent`,`error`,`warn`,`notice`,`http`,`timing`,`info`,`verbose`,`silly`],logstream:n,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,o],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,`dev`,`development`,`prod`,`production`],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:t,production:Boolean,progress:Boolean,proxy:[null,!1,r],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,r],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,`auto`,`warn-only`],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,`oauth`,`saml`],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:t,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:t,umask:i,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}})),es=o(((e,t)=>{let{readCAFileSync:n}=Ko(),r=require(`fs`),i=require(`path`),{ConfigChain:a}=Jo(),o=Yo(),s=Qo();var c=class extends a{constructor(e,t){super(e),this.root=e,this._parseField=s.parseField.bind(null,t||$o())}add(e,t){try{for(let[t,n]of Object.entries(e)){let r=s.parseKey(t);r!==t&&delete e[t],e[r]=this._parseField(n,r)}}catch(e){throw e}return super.add(e,t)}addFile(e,t){t||=e;let n={__source__:t};this.sources[t]={path:e,type:`ini`},this.push(n),this._await();try{let t=r.readFileSync(e,`utf8`);this.addString(t,e,`ini`,n)}catch(t){if(t.code===`ENOENT`)this.add({},n);else if(t.code!==`EISDIR`)return`Issue while reading "${e}". ${t.message}`}}addEnv(e){e||=process.env;let t={};return Object.keys(e).filter(e=>/^npm_config_/i.test(e)).forEach(n=>{if(!e[n])return;let r=o(n.substr(11)),i=e[n];t[r]=l(r,i)}),super.addEnv(``,t,`env`)}loadPrefix(){let e=this.list[0];Object.defineProperty(this,`prefix`,{enumerable:!0,set:e=>{let t=this.get(`global`);this[t?`globalPrefix`:`localPrefix`]=e},get:()=>this.get(`global`)?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,`globalPrefix`,{enumerable:!0,set:e=>{this.set(`prefix`,e)},get:()=>i.resolve(this.get(`prefix`))});let t;if(Object.defineProperty(this,`localPrefix`,{enumerable:!0,set:e=>{t=e},get:()=>t}),Object.prototype.hasOwnProperty.call(e,`prefix`))t=i.resolve(e.prefix);else try{t=s.findPrefix(process.cwd())}catch(e){throw e}return t}loadCAFile(e){if(!e)return;let t=n(e);t&&this.set(`ca`,t)}loadUser(){let e=this.root;if(this.get(`global`))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let t=i.resolve(this.get(`prefix`));try{e.user=r.statSync(t).uid}catch(e){if(e.code===`ENOENT`)return;throw e}}};function l(e,t){function n(e){return e.indexOf(`
38
+
39
+ `)?e.split(`
40
+
41
+ `):e.split(`,`)}switch(e){case`hoist-pattern`:case`public-hoist-pattern`:return n(t)}return t}t.exports=c})),ts=o((e=>{let t=require(`os`),n=require(`path`),r=t.tmpdir(),i=process.getuid?process.getuid():process.pid,a=()=>!0,o=process.platform===`win32`,s={editor:()=>process.env.EDITOR||process.env.VISUAL||(o?`notepad.exe`:`vi`),shell:()=>o?process.env.COMSPEC||`cmd.exe`:process.env.SHELL||`/bin/bash`},c={fromString:()=>process.umask()},l=t.homedir();l?process.env.HOME=l:l=n.resolve(r,`npm-`+i);let u=process.platform===`win32`?`npm-cache`:`.npm`,d=process.platform===`win32`&&process.env.APPDATA||l,f=n.resolve(d,u),p,m;Object.defineProperty(e,`defaults`,{get:function(){return p||(process.env.PREFIX?m=process.env.PREFIX:process.platform===`win32`?m=n.dirname(process.execPath):(m=n.dirname(n.dirname(process.execPath)),process.env.DESTDIR&&(m=n.join(process.env.DESTDIR,m))),p={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":`legacy`,"bin-links":!0,browser:null,ca:null,cafile:null,cache:f,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:s.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:`git`,"git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:n.resolve(m,`etc`,`npmrc`),"global-style":!1,group:process.platform===`win32`?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:`npm`,"if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":n.resolve(l,`.npm-init.js`),"init-author-name":``,"init-author-email":``,"init-author-url":``,"init-version":`1.0.0`,"init-license":`ISC`,json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:`notice`,logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:`%s`,"metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:m,production:process.env.NODE_ENV===`production`,progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":`npm/{npm-version} node/{node-version} {platform} {arch}`,"read-only":!1,"rebuild-bundle":!0,registry:`https://registry.npmjs.org/`,rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":`^`,"save-prod":!1,scope:``,"script-shell":null,"scripts-prepend-node-path":`warn-only`,searchopts:``,searchexclude:null,searchlimit:20,searchstaleness:900,"send-metrics":!1,shell:s.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":`oauth`,"strict-ssl":!0,tag:`latest`,"tag-version-prefix":`v`,timing:!1,tmp:r,unicode:a(),"unsafe-perm":process.platform===`win32`||process.platform===`cygwin`||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform===`win32`?0:`nobody`,userconfig:n.resolve(l,`.npmrc`),umask:process.umask?process.umask():c.fromString(`022`),version:!1,versions:!1,viewer:process.platform===`win32`?`browser`:`man`,_exit:!0},p)}})})),ns=o(((e,t)=>{let n=require(`path`),r=es(),i=ts();t.exports=(e,t,a)=>{let o=new r(Object.assign({},i.defaults,a),t);o.add(Object.assign({},e),`cli`);let s=[],c=!1;if(require.resolve.paths){let e=require.resolve.paths(`npm`),t;try{t=require.resolve(`npm`,{paths:e.slice(-1)})}catch{c=!0}t&&s.push(o.addFile(n.resolve(n.dirname(t),`..`,`npmrc`),`builtin`))}o.addEnv(),o.loadPrefix();let l=n.resolve(o.localPrefix,`.npmrc`),u=o.get(`userconfig`);if(!o.get(`global`)&&l!==u?s.push(o.addFile(l,`project`)):o.add({},`project`),o.get(`workspace-prefix`)&&o.get(`workspace-prefix`)!==l){let e=n.resolve(o.get(`workspace-prefix`),`.npmrc`);s.push(o.addFile(e,`workspace`))}if(s.push(o.addFile(o.get(`userconfig`),`user`)),o.get(`prefix`)){let e=n.resolve(o.get(`prefix`),`etc`);o.root.globalconfig=n.resolve(e,`npmrc`),o.root.globalignorefile=n.resolve(e,`npmignore`)}s.push(o.addFile(o.get(`globalconfig`),`global`)),o.loadUser();let d=o.get(`cafile`);return d&&o.loadCAFile(d),{config:o,warnings:s.filter(Boolean),failedToLoadBuiltInConfig:c}},Object.defineProperty(t.exports,`defaults`,{get(){return i.defaults},enumerable:!0})})),rs=o(((e,t)=>{let n=ns();t.exports=function(){let e,t;arguments.length>=2?(e=arguments[0],t=Object.assign({},arguments[1])):typeof arguments[0]==`string`?e=arguments[0]:t=Object.assign({},arguments[0]),t||={};let r=t.npmrc;return t.npmrc=(t.npmrc?{config:{get:e=>r[e]}}:n()).config,e=e||t.npmrc.get(`registry`)||n.defaults.registry,i(e,t)||a(t.npmrc)};function r(e,t){let n=new URL(t,new URL(e.startsWith(`//`)?`./${e}`:e,`resolve://`));if(n.protocol===`resolve:`){let{pathname:e,search:t,hash:r}=n;return e+t+r}return n.toString()}function i(e,t){let n=e instanceof URL?e:new URL(e.startsWith(`//`)?`http:${e}`:e),a;for(;a!==`/`&&n.pathname!==a;){a=n.pathname||`/`;let c=s(`//`+n.host+a.replace(/\/$/,``),t.npmrc);if(c)return c;if(!t.recursive)return/\/$/.test(e)?void 0:i(new URL(`./`,n),t);n.pathname=r(o(a),`..`)||`/`}}function a(e){if(e.get(`_auth`))return{token:c(e.get(`_auth`)),type:`Basic`}}function o(e){return e[e.length-1]===`/`?e:e+`/`}function s(e,t){let n=l(t.get(e+`:_authToken`)||t.get(e+`/:_authToken`));if(n)return n;let r=u(t.get(e+`:username`)||t.get(e+`/:username`),t.get(e+`:_password`)||t.get(e+`/:_password`));if(r)return r;let i=d(t.get(e+`:_auth`)||t.get(e+`/:_auth`));if(i)return i}function c(e){return e.replace(/^\$\{?([^}]*)\}?$/,function(e,t){return process.env[t]})}function l(e){if(e)return{token:c(e),type:`Bearer`}}function u(e,t){if(!e||!t)return;let n=Buffer.from(c(t),`base64`).toString(`utf8`);return{token:Buffer.from(e+`:`+n,`utf8`).toString(`base64`),type:`Basic`,password:n,username:e}}function d(e){if(e)return{token:c(e),type:`Basic`}}})),is=c(rs(),1),as=c(ur(),1);const os={keepAlive:!0,maxSockets:50},ss=new C.Agent(os),cs=new w.Agent(os);var ls=class extends Error{constructor(e){super(`Package \`${e}\` could not be found`),this.name=`PackageNotFoundError`}},us=class extends Error{constructor(e,t){super(`Version \`${t}\` for package \`${e}\` could not be found`),this.name=`VersionNotFoundError`}};async function ds(e,t){t={version:`latest`,...t};let n=e.split(`/`)[0],r=t.registryUrl||Bo(n),i=new URL(encodeURIComponent(e).replace(/^%40/,`@`),r),a=(0,is.default)(r.toString(),{recursive:!0}),o={accept:`application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`};t.fullMetadata&&delete o.accept,a&&(o.authorization=`${a.type} ${a.token}`);let s={headers:o,agent:{http:ss,https:cs}};t.agent&&(s.agent=t.agent);let c;try{c=await Mo(i,s).json()}catch(t){throw t?.response?.statusCode===404?new ls(e):t}if(t.allVersions)return c;let{version:l}=t,u=new us(e,l);if(c[`dist-tags`][l]){let e=c.time;c=c.versions[c[`dist-tags`][l]],c.time=e}else if(l){if(!c.versions[l]){let e=Object.keys(c.versions);if(l=as.default.maxSatisfying(e,l),!l)throw u}let e=c.time;if(c=c.versions[l],c.time=e,!c)throw u}return c}async function fs(e,t){let{version:n}=await ds(e.toLowerCase(),t);return n}const ps=d.default.env.npm_package_json,ms=d.default.env.npm_config_user_agent,hs=!!ms?.startsWith(`npm`)||!!ps?.endsWith(`package.json`),gs=!!ms?.startsWith(`yarn`),_s=!!ms?.startsWith(`pnpm`),vs=!!ms?.startsWith(`bun`),ys=hs||gs;var bs=o(((e,t)=>{let{hasOwnProperty:n}=Object.prototype,r=typeof process<`u`&&process.platform===`win32`?`\r
42
+ `:`
43
+ `,i=(e,t)=>{let n=[],o=``;typeof t==`string`?t={section:t,whitespace:!1}:(t||=Object.create(null),t.whitespace=t.whitespace===!0);let s=t.whitespace?` = `:`=`;for(let t of Object.keys(e)){let i=e[t];if(i&&Array.isArray(i))for(let e of i)o+=c(t+`[]`)+s+c(e)+`
44
+ `;else i&&typeof i==`object`?n.push(t):o+=c(t)+s+c(i)+r}t.section&&o.length&&(o=`[`+c(t.section)+`]`+r+o);for(let s of n){let n=a(s).join(`\\.`),c=(t.section?t.section+`.`:``)+n,{whitespace:l}=t,u=i(e[s],{section:c,whitespace:l});o.length&&u.length&&(o+=r),o+=u}return o},a=e=>e.replace(/\1/g,`LITERAL\\1LITERAL`).replace(/\\\./g,``).split(/\./).map(e=>e.replace(/\1/g,`\\.`).replace(/\2LITERAL\\1LITERAL\2/g,``)),o=e=>{let t=Object.create(null),r=t,i=null,o=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g);for(let e of s){if(!e||e.match(/^\s*[;#]/))continue;let a=e.match(o);if(!a)continue;if(a[1]!==void 0){if(i=l(a[1]),i===`__proto__`){r=Object.create(null);continue}r=t[i]=t[i]||Object.create(null);continue}let s=l(a[2]),c=s.length>2&&s.slice(-2)===`[]`,u=c?s.slice(0,-2):s;if(u===`__proto__`)continue;let d=a[3]?l(a[4]):!0,f=d===`true`||d===`false`||d===`null`?JSON.parse(d):d;c&&(n.call(r,u)?Array.isArray(r[u])||(r[u]=[r[u]]):r[u]=[]),Array.isArray(r[u])?r[u].push(f):r[u]=f}let c=[];for(let e of Object.keys(t)){if(!n.call(t,e)||typeof t[e]!=`object`||Array.isArray(t[e]))continue;let r=a(e),i=t,o=r.pop(),s=o.replace(/\\\./g,`.`);for(let e of r)e!==`__proto__`&&((!n.call(i,e)||typeof i[e]!=`object`)&&(i[e]=Object.create(null)),i=i[e]);i===t&&s===o||(i[s]=t[e],c.push(e))}for(let e of c)delete t[e];return t},s=e=>e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`,c=e=>typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&s(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`),l=(e,t)=>{if(e=(e||``).trim(),s(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{let t=!1,n=``;for(let r=0,i=e.length;r<i;r++){let i=e.charAt(r);if(t)`\\;#`.indexOf(i)===-1?n+=`\\`+i:n+=i,t=!1;else if(`;#`.indexOf(i)!==-1)break;else i===`\\`?t=!0:n+=i}return t&&(n+=`\\`),n.trim()}return e};t.exports={parse:o,decode:o,stringify:i,encode:i,safe:c,unsafe:l}})),xs=o((e=>{let t=require(`path`),n=require(`os`),r=require(`fs`),i=bs(),a=process.platform===`win32`,o=e=>{try{return i.parse(r.readFileSync(e,`utf8`)).prefix}catch{}},s=()=>Object.keys(process.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?process.env[t]:e,void 0),c=()=>{if(a&&process.env.APPDATA)return t.join(process.env.APPDATA,`/npm/etc/npmrc`);if(process.execPath.includes(`/Cellar/node`)){let e=process.execPath.slice(0,process.execPath.indexOf(`/Cellar/node`));return t.join(e,`/lib/node_modules/npm/npmrc`)}if(process.execPath.endsWith(`/bin/node`)){let e=t.dirname(t.dirname(process.execPath));return t.join(e,`/etc/npmrc`)}},l=()=>{if(a){let{APPDATA:e}=process.env;return e?t.join(e,`npm`):t.dirname(process.execPath)}return t.dirname(t.dirname(process.execPath))},u=t.resolve((()=>s()||o(t.join(n.homedir(),`.npmrc`))||(process.env.PREFIX?process.env.PREFIX:o(c())||l()))()),d=()=>{if(a&&process.env.LOCALAPPDATA){let e=t.join(process.env.LOCALAPPDATA,`Yarn`);if(r.existsSync(e))return e}return!1},f=()=>{if(process.env.PREFIX)return process.env.PREFIX;let e=d();if(e)return e;let i=t.join(n.homedir(),`.config/yarn`);if(r.existsSync(i))return i;let a=t.join(n.homedir(),`.yarn-config`);return r.existsSync(a)?a:u};e.npm={},e.npm.prefix=u,e.npm.packages=t.join(u,a?`node_modules`:`lib/node_modules`),e.npm.binaries=a?u:t.join(u,`bin`);let p=t.resolve(f());e.yarn={},e.yarn.prefix=p,e.yarn.packages=t.join(p,d()?`Data/global/node_modules`:`global/node_modules`),e.yarn.binaries=t.join(e.yarn.packages,`.bin`)})),Ss=o(((e,t)=>{let n=require(`path`);t.exports=(e,t)=>{let r=n.relative(t,e);return!!(r&&r!==`..`&&!r.startsWith(`..${n.sep}`)&&r!==n.resolve(e))}})),Cs=o(((e,t)=>{let n=require(`fs`),r=xs(),i=Ss();t.exports=(()=>{try{return i(__dirname,r.yarn.packages)||i(__dirname,n.realpathSync(r.npm.packages))}catch{return!1}})()})),ws=c(Cs(),1);const Ts=()=>{let e=g.default.dirname((0,h.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),t=process.platform===`win32`?g.default.join(`Yarn`,`config`,`global`):g.default.join(`.config`,`yarn`,`global`);return e.includes(t)};var Es=Ts;function Ds(e=d.default.cwd()){return re.default.existsSync(g.default.resolve(e,`yarn.lock`))}function Os({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const ks=Os();function As(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ks,``)}var js=o(((e,t)=>{var n={};t===void 0?window.eastasianwidth=n:t.exports=n,n.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},n.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function r(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}n.length=function(e){for(var t=r(e),n=0,i=0;i<t.length;i++)n+=this.characterLength(t[i]);return n},n.slice=function(e,t,i){textLen=n.length(e),t||=0,i||=1,t<0&&(t=textLen+t),i<0&&(i=textLen+i);for(var a=``,o=0,s=r(e),c=0;c<s.length;c++){var l=s[c],u=n.length(l);if(o>=t-(u==2?1:0))if(o+u<=i)a+=l;else break;o+=u}return a}})),Ms=o(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\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|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\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]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\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-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),Ns=c(js(),1),Ps=c(Ms(),1);function Q(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=As(e),e.length===0))return 0;e=e.replace((0,Ps.default)(),` `);let n=t.ambiguousIsNarrow?1:2,r=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(Ns.default.eastAsianWidth(t)){case`F`:case`W`:r+=2;break;case`A`:r+=n;break;default:r+=1}}return r}function Fs(e){let t=0;for(let n of e.split(`
45
+ `))t=Math.max(t,Q(n));return t}var Is=o(((e,t)=>{t.exports={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}})),Ls=o(((e,t)=>{let n=Is();t.exports=n,t.exports.default=n})),Rs=c(Ls(),1);const zs=/[\p{Lu}]/u,Bs=/[\p{Ll}]/u,Vs=/^[\p{Lu}](?![\p{Lu}])/gu,Hs=/([\p{Alpha}\p{N}_]|$)/u,Us=/[_.\- ]+/,Ws=RegExp(`^`+Us.source),Gs=new RegExp(Us.source+Hs.source,`gu`),Ks=RegExp(`\\d+`+Hs.source,`gu`),qs=(e,t,n,r)=>{let i=!1,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c++){let l=e[c];s=c>2?e[c-3]===`-`:!0,i&&zs.test(l)?(e=e.slice(0,c)+`-`+e.slice(c),i=!1,o=a,a=!0,c++):a&&o&&Bs.test(l)&&(!s||r)?(e=e.slice(0,c-1)+`-`+e.slice(c-1),o=a,a=!1,i=!0):(i=t(l)===l&&n(l)!==l,o=a,a=n(l)===l&&t(l)!==l)}return e},Js=(e,t)=>(Vs.lastIndex=0,e.replace(Vs,e=>t(e))),Ys=(e,t)=>(Gs.lastIndex=0,Ks.lastIndex=0,e.replace(Gs,(e,n)=>t(n)).replace(Ks,e=>t(e)));function Xs(e,t){if(!(typeof e==`string`||Array.isArray(e)))throw TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join(`-`):e.trim(),e.length===0)return``;let n=t.locale===!1?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),r=t.locale===!1?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);return e.length===1?Us.test(e)?``:t.pascalCase?r(e):n(e):(e!==n(e)&&(e=qs(e,n,r,t.preserveConsecutiveUppercase)),e=e.replace(Ws,``),e=t.preserveConsecutiveUppercase?Js(e,n):n(e),t.pascalCase&&(e=r(e.charAt(0))+e.slice(1)),Ys(e,r))}var Zs=o(((e,t)=>{t.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`)}})),Qs=o(((e,t)=>{let n=Zs();t.exports=e=>typeof e==`string`?e.replace(n(),``):e})),$s=o(((e,t)=>{let n=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);t.exports=n,t.exports.default=n})),ec=o(((e,t)=>{t.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}})),tc=o(((e,t)=>{let n=Qs(),r=$s(),i=ec(),a=e=>{if(typeof e!=`string`||e.length===0||(e=n(e),e.length===0))return 0;e=e.replace(i(),` `);let t=0;for(let n=0;n<e.length;n++){let i=e.codePointAt(n);i<=31||i>=127&&i<=159||i>=768&&i<=879||(i>65535&&n++,t+=r(i)?2:1)}return t};t.exports=a,t.exports.default=a})),nc=o(((e,t)=>{let n=tc();function r(e,t){if(!e)return e;t||={};let r=t.align||`center`;if(r===`left`)return e;let o=t.split||`
46
+ `,s=t.pad||` `,c=r===`right`?a:i,l=!1;Array.isArray(e)||(l=!0,e=String(e).split(o));let u,d=0;return e=e.map(function(e){return e=String(e),u=n(e),d=Math.max(u,d),{str:e,width:u}}).map(function(e){return Array(c(d,e.width)+1).join(s)+e.str}),l?e.join(o):e}r.left=function(e){return r(e,{align:`left`})},r.center=function(e){return r(e,{align:`center`})},r.right=function(e){return r(e,{align:`right`})},t.exports=r;function i(e,t){return Math.floor((e-t)/2)}function a(e,t){return e-t}})),rc=c(nc(),1);const ic=10,ac=(e=0)=>t=>`\u001B[${t+e}m`,oc=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,sc=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,$={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]}},cc=Object.keys($.modifier),lc=Object.keys($.color),uc=Object.keys($.bgColor),dc=[...lc,...uc];function fc(){let e=new Map;for(let[t,n]of Object.entries($)){for(let[t,r]of Object.entries(n))$[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=$[t],e.set(r[0],r[1]);Object.defineProperty($,t,{value:n,enumerable:!1})}return Object.defineProperty($,`codes`,{value:e,enumerable:!1}),$.color.close=`\x1B[39m`,$.bgColor.close=`\x1B[49m`,$.color.ansi=ac(),$.color.ansi256=oc(),$.color.ansi16m=sc(),$.bgColor.ansi=ac(10),$.bgColor.ansi256=oc(10),$.bgColor.ansi16m=sc(10),Object.defineProperties($,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>$.rgbToAnsi256(...$.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>$.ansi256ToAnsi($.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>$.ansi256ToAnsi($.hexToAnsi256(e)),enumerable:!1}}),$}const pc=fc();var mc=pc;const hc=new Set([`\x1B`,`›`]),gc=39,_c=`\x07`,vc=`[`,yc=`]`,bc=`m`,xc=`]8;;`,Sc=e=>`${hc.values().next().value}[${e}m`,Cc=e=>`${hc.values().next().value}${xc}${e}`,wc=e=>e.split(` `).map(e=>Q(e)),Tc=(e,t,n)=>{let r=[...t],i=!1,a=!1,o=Q(As(e[e.length-1]));for(let[t,s]of r.entries()){let c=Q(s);if(o+c<=n?e[e.length-1]+=s:(e.push(s),o=0),hc.has(s)&&(i=!0,a=r.slice(t+1).join(``).startsWith(xc)),i){a?s===`\x07`&&(i=!1,a=!1):s===`m`&&(i=!1);continue}o+=c,o===n&&t<r.length-1&&(e.push(``),o=0)}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ec=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(Q(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Dc=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=wc(e),s=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(s[s.length-1]=s[s.length-1].trimStart());let e=Q(s[s.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),e=0),(e>0||n.trim===!1)&&(s[s.length-1]+=` `,e++)),n.hard&&o[r]>t){let n=t-e,a=1+Math.floor((o[r]-n-1)/t);Math.floor((o[r]-1)/t)<a&&s.push(``),Tc(s,i,t);continue}if(e+o[r]>t&&e>0&&o[r]>0){if(n.wordWrap===!1&&e<t){Tc(s,i,t);continue}s.push(``)}if(e+o[r]>t&&n.wordWrap===!1){Tc(s,i,t);continue}s[s.length-1]+=i}n.trim!==!1&&(s=s.map(e=>Ec(e)));let c=[...s.join(`
47
+ `)];for(let[e,t]of c.entries()){if(r+=t,hc.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${xc}(?<uri>.*))`).exec(c.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}let n=mc.codes.get(Number(i));c[e+1]===`
48
+ `?(a&&(r+=Cc(``)),i&&n&&(r+=Sc(n))):t===`
49
+ `&&(i&&n&&(r+=Sc(i)),a&&(r+=Cc(a)))}return r};function Oc(e,t,n){return String(e).normalize().replace(/\r\n/g,`
50
+ `).split(`
51
+ `).map(e=>Dc(e,t,n)).join(`
52
+ `)}var kc=c(Ls(),1);const Ac=`
53
+ `,jc=` `,Mc=`none`,Nc=()=>{let{env:e,stdout:t,stderr:n}=d.default;return t?.columns?t.columns:n?.columns?n.columns:e.COLUMNS?Number.parseInt(e.COLUMNS,10):80},Pc=e=>typeof e==`number`?{top:e,right:e*3,bottom:e,left:e*3}:{top:0,right:0,bottom:0,left:0,...e},Fc=e=>e===Mc?0:2,Ic=e=>{let t=[`topLeft`,`topRight`,`bottomRight`,`bottomLeft`,`left`,`right`,`top`,`bottom`],n;if(e===Mc){e={};for(let n of t)e[n]=``}if(typeof e==`string`){if(n=Rs.default[e],!n)throw 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 TypeError(`Invalid border style: ${n}`);n=e}return n},Lc=(e,t,n)=>{let r=``,i=Q(e);switch(n){case`left`:r=e+t.slice(i);break;case`right`:r=t.slice(i)+e;break;default:t=t.slice(i),t.length%2==1?(t=t.slice(Math.floor(t.length/2)),r=t.slice(1)+e+t):(t=t.slice(t.length/2),r=t+e+t);break}return r},Rc=(e,{padding:t,width:n,textAlignment:r,height:i})=>{e=(0,rc.default)(e,{align:r});let a=e.split(`
54
+ `),o=Fs(e),s=n-t.left-t.right;if(o>s){let e=[];for(let t of a){let n=(0,rc.default)(Oc(t,s,{hard:!0}),{align:r}).split(`
55
+ `),i=Math.max(...n.map(e=>Q(e)));for(let t of n){let n;switch(r){case`center`:n=` `.repeat((s-i)/2)+t;break;case`right`:n=` `.repeat(s-i)+t;break;default:n=t;break}e.push(n)}}a=e}r===`center`&&o<s?a=a.map(e=>` `.repeat((s-o)/2)+e):r===`right`&&o<s&&(a=a.map(e=>` `.repeat(s-o)+e));let c=` `.repeat(t.left),l=` `.repeat(t.right);return a=a.map(e=>c+e+l),a=a.map(e=>{if(n-Q(e)>0)switch(r){case`center`:return e+` `.repeat(n-Q(e));case`right`:return e+` `.repeat(n-Q(e));default:return e+` `.repeat(n-Q(e))}return e}),t.top>0&&(a=[...Array.from({length:t.top}).fill(` `.repeat(n)),...a]),t.bottom>0&&(a=[...a,...Array.from({length:t.bottom}).fill(` `.repeat(n))]),i&&a.length>i?a=a.slice(0,i):i&&a.length<i&&(a=[...a,...Array.from({length:i-a.length}).fill(` `.repeat(n))]),a.join(`
56
+ `)},zc=(e,t,n)=>{let r=e=>{let t=n.borderColor?Gc(n.borderColor)(e):e;return n.dimBorder?B.dim(t):t},i=e=>n.backgroundColor?Kc(n.backgroundColor)(e):e,a=Ic(n.borderStyle),o=Nc(),s=` `.repeat(n.margin.left);if(n.float===`center`){let e=Math.max((o-t-Fc(n.borderStyle))/2,0);s=` `.repeat(e)}else if(n.float===`right`){let e=Math.max(o-t-n.margin.right-Fc(n.borderStyle),0);s=` `.repeat(e)}let c=``;n.margin.top&&(c+=`
57
+ `.repeat(n.margin.top)),(n.borderStyle!==Mc||n.title)&&(c+=r(s+a.topLeft+(n.title?Lc(n.title,a.top.repeat(t),n.titleAlignment):a.top.repeat(t))+a.topRight)+`
58
+ `);let l=e.split(`
59
+ `);return c+=l.map(e=>s+r(a.left)+i(e)+r(a.right)).join(`
60
+ `),n.borderStyle!==Mc&&(c+=`
61
+ `+r(s+a.bottomLeft+a.bottom.repeat(t)+a.bottomRight)),n.margin.bottom&&(c+=`
62
+ `.repeat(n.margin.bottom)),c},Bc=e=>{if(e.fullscreen&&d.default?.stdout){let t=[d.default.stdout.columns,d.default.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-Fc(e.borderStyle)),e.height&&=Math.max(1,e.height-Fc(e.borderStyle)),e},Vc=(e,t)=>t===Mc?e:` ${e} `,Hc=(e,t)=>{t=Bc(t);let n=t.width!==void 0,r=Nc(),i=Fc(t.borderStyle),a=r-t.margin.left-t.margin.right-i,o=Fs(Oc(e,r-i,{hard:!0,trim:!1}))+t.padding.left+t.padding.right;if(t.title&&n?(t.title=t.title.slice(0,Math.max(0,t.width-2)),t.title&&=Vc(t.title,t.borderStyle)):t.title&&(t.title=t.title.slice(0,Math.max(0,a-2)),t.title&&(t.title=Vc(t.title,t.borderStyle),Q(t.title)>o&&(t.width=Q(t.title)))),t.width=t.width?t.width:o,!n){if(t.margin.left&&t.margin.right&&t.width>a){let e=(r-t.width-i)/(t.margin.left+t.margin.right);t.margin.left=Math.max(0,Math.floor(t.margin.left*e)),t.margin.right=Math.max(0,Math.floor(t.margin.right*e))}t.width=Math.min(t.width,r-i-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},Uc=e=>e.match(/^#(?:[0-f]{3}){1,2}$/i),Wc=e=>typeof e==`string`&&(B[e]??Uc(e)),Gc=e=>Uc(e)?B.hex(e):B[e],Kc=e=>Uc(e)?B.bgHex(e):B[Xs([`bg`,e])];function qc(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&&!Wc(t.borderColor))throw Error(`${t.borderColor} is not a valid borderColor`);if(t.backgroundColor&&!Wc(t.backgroundColor))throw Error(`${t.backgroundColor} is not a valid backgroundColor`);return t.padding=Pc(t.padding),t.margin=Pc(t.margin),t=Hc(e,t),e=Rc(e,t),zc(e,t.width,t)}var Jc=o(((e,t)=>{t.exports=[{name:`Appcircle`,constant:`APPCIRCLE`,env:`AC_APPCIRCLE`},{name:`AppVeyor`,constant:`APPVEYOR`,env:`APPVEYOR`,pr:`APPVEYOR_PULL_REQUEST_NUMBER`},{name:`AWS CodeBuild`,constant:`CODEBUILD`,env:`CODEBUILD_BUILD_ARN`},{name:`Azure Pipelines`,constant:`AZURE_PIPELINES`,env:`TF_BUILD`,pr:{BUILD_REASON:`PullRequest`}},{name:`Bamboo`,constant:`BAMBOO`,env:`bamboo_planKey`},{name:`Bitbucket Pipelines`,constant:`BITBUCKET`,env:`BITBUCKET_COMMIT`,pr:`BITBUCKET_PR_ID`},{name:`Bitrise`,constant:`BITRISE`,env:`BITRISE_IO`,pr:`BITRISE_PULL_REQUEST`},{name:`Buddy`,constant:`BUDDY`,env:`BUDDY_WORKSPACE_ID`,pr:`BUDDY_EXECUTION_PULL_REQUEST_ID`},{name:`Buildkite`,constant:`BUILDKITE`,env:`BUILDKITE`,pr:{env:`BUILDKITE_PULL_REQUEST`,ne:`false`}},{name:`CircleCI`,constant:`CIRCLE`,env:`CIRCLECI`,pr:`CIRCLE_PULL_REQUEST`},{name:`Cirrus CI`,constant:`CIRRUS`,env:`CIRRUS_CI`,pr:`CIRRUS_PR`},{name:`Codefresh`,constant:`CODEFRESH`,env:`CF_BUILD_ID`,pr:{any:[`CF_PULL_REQUEST_NUMBER`,`CF_PULL_REQUEST_ID`]}},{name:`Codemagic`,constant:`CODEMAGIC`,env:`CM_BUILD_ID`,pr:`CM_PULL_REQUEST`},{name:`Codeship`,constant:`CODESHIP`,env:{CI_NAME:`codeship`}},{name:`Drone`,constant:`DRONE`,env:`DRONE`,pr:{DRONE_BUILD_EVENT:`pull_request`}},{name:`dsari`,constant:`DSARI`,env:`DSARI`},{name:`Expo Application Services`,constant:`EAS`,env:`EAS_BUILD`},{name:`Gerrit`,constant:`GERRIT`,env:`GERRIT_PROJECT`},{name:`GitHub Actions`,constant:`GITHUB_ACTIONS`,env:`GITHUB_ACTIONS`,pr:{GITHUB_EVENT_NAME:`pull_request`}},{name:`GitLab CI`,constant:`GITLAB`,env:`GITLAB_CI`,pr:`CI_MERGE_REQUEST_ID`},{name:`GoCD`,constant:`GOCD`,env:`GO_PIPELINE_LABEL`},{name:`Google Cloud Build`,constant:`GOOGLE_CLOUD_BUILD`,env:`BUILDER_OUTPUT`},{name:`Harness CI`,constant:`HARNESS`,env:`HARNESS_BUILD_ID`},{name:`Heroku`,constant:`HEROKU`,env:{env:`NODE`,includes:`/app/.heroku/node/bin/node`}},{name:`Hudson`,constant:`HUDSON`,env:`HUDSON_URL`},{name:`Jenkins`,constant:`JENKINS`,env:[`JENKINS_URL`,`BUILD_ID`],pr:{any:[`ghprbPullId`,`CHANGE_ID`]}},{name:`LayerCI`,constant:`LAYERCI`,env:`LAYERCI`,pr:`LAYERCI_PULL_REQUEST`},{name:`Magnum CI`,constant:`MAGNUM`,env:`MAGNUM`},{name:`Netlify CI`,constant:`NETLIFY`,env:`NETLIFY`,pr:{env:`PULL_REQUEST`,ne:`false`}},{name:`Nevercode`,constant:`NEVERCODE`,env:`NEVERCODE`,pr:{env:`NEVERCODE_PULL_REQUEST`,ne:`false`}},{name:`ReleaseHub`,constant:`RELEASEHUB`,env:`RELEASE_BUILD_ID`},{name:`Render`,constant:`RENDER`,env:`RENDER`,pr:{IS_PULL_REQUEST:`true`}},{name:`Sail CI`,constant:`SAIL`,env:`SAILCI`,pr:`SAIL_PULL_REQUEST_NUMBER`},{name:`Screwdriver`,constant:`SCREWDRIVER`,env:`SCREWDRIVER`,pr:{env:`SD_PULL_REQUEST`,ne:`false`}},{name:`Semaphore`,constant:`SEMAPHORE`,env:`SEMAPHORE`,pr:`PULL_REQUEST_NUMBER`},{name:`Shippable`,constant:`SHIPPABLE`,env:`SHIPPABLE`,pr:{IS_PULL_REQUEST:`true`}},{name:`Solano CI`,constant:`SOLANO`,env:`TDDIUM`,pr:`TDDIUM_PR_ID`},{name:`Sourcehut`,constant:`SOURCEHUT`,env:{CI_NAME:`sourcehut`}},{name:`Strider CD`,constant:`STRIDER`,env:`STRIDER`},{name:`TaskCluster`,constant:`TASKCLUSTER`,env:[`TASK_ID`,`RUN_ID`]},{name:`TeamCity`,constant:`TEAMCITY`,env:`TEAMCITY_VERSION`},{name:`Travis CI`,constant:`TRAVIS`,env:`TRAVIS`,pr:{env:`TRAVIS_PULL_REQUEST`,ne:`false`}},{name:`Vercel`,constant:`VERCEL`,env:{any:[`NOW_BUILDER`,`VERCEL`]},pr:`VERCEL_GIT_PULL_REQUEST_ID`},{name:`Visual Studio App Center`,constant:`APPCENTER`,env:`APPCENTER_BUILD_ID`},{name:`Woodpecker`,constant:`WOODPECKER`,env:{CI:`woodpecker`},pr:{CI_BUILD_EVENT:`pull_request`}},{name:`Xcode Cloud`,constant:`XCODE_CLOUD`,env:`CI_XCODE_PROJECT`,pr:`CI_PULL_REQUEST_NUMBER`},{name:`Xcode Server`,constant:`XCODE_SERVER`,env:`XCS`}]})),Yc=o((e=>{let t=Jc(),n=process.env;Object.defineProperty(e,`_vendors`,{value:t.map(function(e){return e.constant})}),e.name=null,e.isPR=null,t.forEach(function(t){let i=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){return r(e)});if(e[t.constant]=i,i)switch(e.name=t.name,typeof t.pr){case`string`:e.isPR=!!n[t.pr];break;case`object`:`env`in t.pr?e.isPR=t.pr.env in n&&n[t.pr.env]!==t.pr.ne:`any`in t.pr?e.isPR=t.pr.any.some(function(e){return!!n[e]}):e.isPR=r(t.pr);break;default:e.isPR=null}}),e.isCI=!!(n.CI!==`false`&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name));function r(e){return typeof e==`string`?!!n[e]:`env`in e?n[e.env]&&n[e.env].includes(e.includes):`any`in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}})),Xc=o(((e,t)=>{t.exports=Yc().isCI})),Zc=c(Xc(),1);const Qc=e=>e.replace(/&/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);function $c(e,...t){if(typeof e==`string`)return Qc(e);let n=e[0];for(let[r,i]of t.entries())n=n+Qc(String(i))+e[r+1];return n}var el=class extends Error{constructor(e){super(`Missing a value for ${e?`the placeholder: ${e}`:`a placeholder`}`,e),this.name=`MissingValueError`,this.key=e}},tl=class extends Error{constructor(e){super(`Missing filter: ${e}`),this.name=`MissingFilterError`,this.filterName=e}};function nl(e,t,{ignoreMissing:n=!1,transform:r=({value:e})=>e,filters:i={}}={}){if(typeof e!=`string`)throw TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);if(typeof t!=`object`)throw TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof t}\``);let a=``,o=``;e=e.replace(/\\{/g,a),e=e.replace(/\\}/g,o);let s=e=>{let t=[],n=``;for(let r=0;r<e.length;r++)e[r]===`\\`&&e[r+1]===`.`?(n+=`.`,r++):e[r]===`.`?(t.push(n),n=``):n+=e[r];return t.push(n),t},c=(e,a)=>{let o=a.split(`|`).map(e=>e.trim()),c=o[0],l=o.slice(1),u=s(c),d=t;for(let e of u)d&&=d[e];for(let t of l){let r=i[t];if(!r){if(n)return e;throw new tl(t)}d!==void 0&&(d=r(d))}let f=r({value:d,key:c});if(f===void 0){if(n)return e;throw new el(c)}return String(f)},l=`((\\d+|[a-z$_][\\w\\-.$\\\\]*)\\s*(?:\\|\\s*[a-z$_][\\w$]*\\s*)*)`,u=RegExp(`{{${l}}}`,`gi`),d=RegExp(`{${l}}`,`gi`);return e=e.replace(u,(...e)=>$c(c(...e))),e=e.replace(d,c),e=e.replace(new RegExp(a,`g`),`{`),e=e.replace(new RegExp(o,`g`),`}`),e}var rl=c(ur(),1);const il=g.default.dirname((0,h.fileURLToPath)(require(`url`).pathToFileURL(__filename).href)),al=1e3*60*60*24;var ol=class{config;update;_packageName;_shouldNotifyInNpmScript;#e;#t;#n;#r;constructor(e={}){if(this.#e=e,e.pkg=e.pkg||{},e.distTag=e.distTag||`latest`,e.pkg={name:e.pkg.name||e.packageName,version:e.pkg.version||e.packageVersion},!e.pkg.name||!e.pkg.version)throw Error(`pkg.name and pkg.version required`);if(this._packageName=e.pkg.name,this.#t=e.pkg.version,this.#n=typeof e.updateCheckInterval==`number`?e.updateCheckInterval:864e5,this.#r=`NO_UPDATE_NOTIFIER`in d.default.env||d.default.env.NODE_ENV===`test`||d.default.argv.includes(`--no-update-notifier`)||Zc.default,this._shouldNotifyInNpmScript=e.shouldNotifyInNpmScript,!this.#r)try{this.config=new zt(`update-notifier-${this._packageName}`,{optOut:!1,lastUpdateCheck:Date.now()})}catch{let t=B.yellow((0,_.format)(` %s update check failed `,e.pkg.name))+(0,_.format)(`
63
+ Try running with %s or get access `,B.cyan(`sudo`))+`
64
+ to the local update config store via
65
+ `+B.cyan((0,_.format)(` sudo chown -R $USER:$(id -gn $USER) %s `,it));d.default.on(`exit`,()=>{console.error(qc(t,{textAlignment:`center`}))})}}check(){!this.config||this.config.get(`optOut`)||this.#r||(this.update=this.config.get(`update`),this.update&&(this.update.current=this.#t,this.config.delete(`update`)),!(Date.now()-this.config.get(`lastUpdateCheck`)<this.#n)&&(0,m.spawn)(d.default.execPath,[g.default.join(il,`check.js`),JSON.stringify(this.#e)],{detached:!0,stdio:`ignore`}).unref())}async fetchInfo(){let{distTag:e}=this.#e,t=await fs(this._packageName,{version:e});return{latest:t,current:this.#t,type:fr(this.#t,t)||e,name:this._packageName}}notify(e){let t=!this._shouldNotifyInNpmScript&&ys;if(!d.default.stdout.isTTY||t||!this.update||!rl.default.gt(this.update.latest,this.update.current))return this;e={isGlobal:ws.default,isYarnGlobal:Es(),...e};let n;n=e.isYarnGlobal?`yarn global add ${this._packageName}`:e.isGlobal?`npm i -g ${this._packageName}`:Ds()?`yarn add ${this._packageName}`:`npm i ${this._packageName}`;let r=`Update available `+B.dim(`{currentVersion}`)+B.reset(` → `)+B.green(`{latestVersion}`)+`
66
+ Run `+B.cyan(`{updateCommand}`)+` to update`,i=e.message||r;e.boxenOptions=e.boxenOptions||{padding:1,margin:1,textAlignment:`center`,borderColor:`yellow`,borderStyle:`round`};let a=qc(nl(i,{packageName:this._packageName,currentVersion:this.update.current,latestVersion:this.update.latest,updateCommand:n}),e.boxenOptions);return e.defer===!1?console.error(a):(d.default.on(`exit`,()=>{console.error(a)}),d.default.on(`SIGINT`,()=>{console.error(``),d.default.exit()})),this}};function sl(e){let t=new ol(e);return t.check(),t}var cl=`0.0.13`,ll={name:`@terai/dev`,version:cl,description:`The user-facing package for Terai`,main:`./dist/index.cjs`,module:`./dist/index.mjs`,types:`./dist/index.d.ts`,private:!1,author:`Hugo Corta <corta.hugo@gmail.com>`,bin:{terai:`bin.js`},scripts:{dev:`tsdown --format=esm --no-dts --watch`,build:`tsdown`},files:[`bin.js`,`dist`],sideEffects:!1,publishConfig:{access:`public`},exports:{".":{import:{types:`./dist/index.d.mts`,default:`./dist/index.mjs`},require:{types:`./dist/index.d.cts`,default:`./dist/index.cjs`}}},dependencies:{"@inquirer/prompts":`^3`,"@terai/extractor":`workspace:*`,"@terai/runtime":`workspace:*`,"@terai/translator":`workspace:*`,"@terai/utils":`workspace:*`,"@terai/types":`workspace:*`,cac:`^6`,dotenv:`^1`,inquirer:`^9`,kleur:`^4`,"perfect-debounce":`^1`,"preferred-pm":`^3`},devDependencies:{"@terai/generator":`workspace:*`,"@terai/logger":`workspace:*`,"@types/update-notifier":`^6`,"update-notifier":`^6`}},ul=o(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.outdent=void 0;function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function r(){return typeof WeakMap<`u`?new WeakMap:i()}function i(){return{add:n,delete:n,get:n,set:n,has:function(e){return!1}}}var a=Object.prototype.hasOwnProperty,o=function(e,t){return a.call(e,t)};function s(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return e}var c=/^[ \t]*(?:\r\n|\r|\n)/,l=/(?:\r\n|\r|\n)[ \t]*$/,u=/^(?:[\r\n]|$)/,d=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,f=/^[ \t]*[\r\n][ \t\r\n]*$/;function p(e,t,n){var r=0,i=e[0].match(d);i&&(r=i[1].length);var a=`(\\r\\n|\\r|\\n).{0,`+r+`}`,o=new RegExp(a,`g`);t&&(e=e.slice(1));var s=n.newline,u=n.trimLeadingNewline,f=n.trimTrailingNewline,p=typeof s==`string`,m=e.length;return e.map(function(e,t){return e=e.replace(o,`$1`),t===0&&u&&(e=e.replace(c,``)),t===m-1&&f&&(e=e.replace(l,``)),p&&(e=e.replace(/\r\n|\n|\r/g,function(e){return s})),e})}function m(e,t){for(var n=``,r=0,i=e.length;r<i;r++)n+=e[r],r<i-1&&(n+=t[r]);return n}function h(e){return o(e,`raw`)&&o(e,`length`)}function g(e){var t=r(),n=r();function i(r){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(h(r)){var c=r,l=(a[0]===i||a[0]===_)&&f.test(c[0])&&u.test(c[1]),d=l?n:t,v=d.get(c);return v||(v=p(c,l,e),d.set(c,v)),a.length===0?v[0]:m(v,l?a.slice(1):a)}else return g(s(s({},e),r||{}))}return s(i,{string:function(t){return p([t],!1,e)[0]}})}var _=g({trimLeadingNewline:!0,trimTrailingNewline:!0});if(e.outdent=_,e.default=_,t!==void 0)try{t.exports=_,Object.defineProperty(_,`__esModule`,{value:!0}),_.default=_,_.outdent=_}catch{}})),dl=ul();function fl(e,t){return e.command(`init`,`Initialize config file`).option(`-f, --force`,`Force overwrite existing config files`).option(`--cwd <cwd>`,`Current working directory`,{default:t}).action(pl)}async function pl({cwd:e,force:t}){P.heading(`init`,`Initialize config file`);let n=(0,u.findConfig)({cwd:e}),r=(await(0,ae.default)(e))?.name??`npm`,i=r===`npm`?`npm run`:r;if(n&&!t)return P.log(dl.outdent`
67
+ It looks like you already have terai created.
68
+ You can now run ${P.colors.cyan(`'${i} terai extract --watch'`)}
69
+ `);let a=await(0,ie.input)({message:`What locale do you use for development?`,default:`en`}),o=await(0,ie.input)({message:`Where do you want to place your generated files?`,default:`./locale-system`}),s=await(0,ie.select)({message:`Would you like to use any of these templates? (recommended)`,choices:[{name:`No`,value:null},{name:`Next`,value:`next`},{name:`Vite`,value:`vite`}]}),c=P.time.success();await(0,u.setupConfig)({cwd:e,projectLocale:a,outDir:o}),s&&await(0,u.setupTemplate)({cwd:e,outDir:o,framework:s}),c(`Config file created`),P.log(`🚀 You are set up to start using Terai! Thanks for choosing it.`)}async function ml({dictionaries:e,locale:t,cwd:n,outDir:r}){let i=u.runtime.path.resolve(n,r,t),a=[];for(let t in e){let n=u.runtime.path.resolve(i,`${t}.json`),r=e[t],o=(0,ce.stringify)(r);u.runtime.fs.write(n,o),a.push(o)}return a}function hl(e,t){return e.command(`extract`,`Statically extract messages from your project`).option(`-w, --watch`,`Watch files and rebuild`).option(`--cwd <cwd>`,`Current working directory`,{default:t}).action(gl)}async function gl(e){P.heading(`extract`,`Statically extract messages from your project`);let t=P.time.success(),n=await(0,u.loadConfig)(e),r=u.runtime.fs.glob({...n,cwd:e.cwd}),i=u.runtime.path.resolve(e.cwd,n.outDir),a=u.runtime.path.resolve(i,n.projectLocale),o=u.runtime.path.resolve(i,`.terai`,`locale-manifest.json`);P.info(`Scan:`,`Processing files...`);async function s(t=r){let i=await(0,se.extract)({...n,filesPaths:t,cwd:e.cwd}),s=(0,ce.convertExtractedMessagesToDictionary)(i),c={messages:i},l=(0,ce.groupDictionaryByChunks)(s,c,n.projectLocale);return u.runtime.fs.remove(u.runtime.path.resolve(a)),await ml({...n,dictionaries:l,locale:n.projectLocale,cwd:e.cwd}),u.runtime.fs.write(o,(0,ce.stringify)(c)),Object.keys(s).length}P.info(`Extraction:`,`Extracting messages...`),t(`Extracted ${await s()} messages`),e.watch&&(P.log(``),P.info(`Watch:`,`Watching files for changes...
70
+ `),u.runtime.fs.watch({...n,...e}).on(`change`,(0,oe.debounce)(async()=>{let e=P.time.success();P.info(`Extraction:`,`Files changed, processing messages...`),e(`Extracted ${await s()} messages`),P.log(``)})))}function _l(e,t){return e.command(`translate`,`Translate messages from your project`).option(`--cwd <cwd>`,`Current working directory`,{default:t}).action(vl)}async function vl({cwd:e}){P.heading(`translate`,`Translate messages from your project`);let t=P.time.success(),n=await(0,u.loadConfig)({cwd:e}),r=u.runtime.path.resolve(e,n.outDir),i=u.runtime.path.resolve(e,n.outDir,`.terai`),a=u.runtime.path.resolve(i,`locale-manifest.json`);if(!u.runtime.fs.exists(a))return P.error(`translate`,`No locale-manifest.json found in ${i}. Please run "extract" first.`);let o=JSON.parse(u.runtime.fs.readFile(a)),s=0,c=0;if(await Promise.all(n.outLocales.map(async t=>{try{let a={},l={},d=u.runtime.path.resolve(r,t),f=u.runtime.path.resolve(i,`cache`,`${t}.cache.json`),p=u.runtime.fs.exists(f)?JSON.parse(u.runtime.fs.readFile(f)):{},m=0,h=0;for(let e in o.messages){let{value:n,chunksIds:r}=o.messages[e],i=r.length?r:[t];for(let t of i){let r=u.runtime.path.resolve(d,`${t}.json`),i=(u.runtime.fs.exists(r)?JSON.parse(u.runtime.fs.readFile(r)):{})[e]??p[e];i?(a[e]=i,p[e]=i,m++):(l[e]=n,h++)}}h>0&&(a=(0,ce.merge)(await(0,le.translate)({...n,dictionary:l,locale:t}),a)),p={...p,...a},u.runtime.fs.remove(d);let g=(0,ce.groupDictionaryByChunks)(a,o,t);await ml({...n,dictionaries:g,locale:t,cwd:e}),u.runtime.fs.write(f,(0,ce.stringify)(p)),s+=h,c+=m,P.info(`Locale ${t.toUpperCase()}:`,`${h} new messages translated, ${m} recovered from cache`)}catch(e){e instanceof Error&&P.error(`${t} translation:`,`Error translating to ${t}: ${e.message}\n`)}})),!s)return t(`Everything up-to-date`);t(`Translated ${s} messages, ${c} read from cache`)}async function yl(){sl({pkg:ll,distTag:`latest`}).notify(),P.log(`${P.colors.bold(`terai`)} ${P.colors.cyan(`v${cl}`)}`);let e=u.runtime.cwd(),t=(0,l.cac)(`terai`);fl(t,e),hl(t,e),_l(t,e),t.help(),t.version(cl),t.parse(process.argv,{run:!1});try{await t.runMatchedCommand()}catch(e){e instanceof Error&&P.error(e.message),process.exit(1)}}yl().catch(e=>{e.loc&&console.error(B.bold(B.red(`Error parsing: ${e.loc.file}:${e.loc.line}:${e.loc.column}`))),e.frame?(console.error(B.red(e.message)),console.error(B.dim(e.frame))):console.error(B.red(e.message)),process.exitCode=1,!ue.isMainThread&&ue.parentPort&&ue.parentPort.postMessage(`error`)}),exports.t=c;
71
+ //# sourceMappingURL=cli.default.cjs.map