@socketsecurity/lib 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +31 -35
- package/dist/abort.js +1 -1
- package/dist/agent.js +11 -11
- package/dist/ansi.js +1 -1
- package/dist/argv/flags.js +1 -1
- package/dist/argv/parse.js +1 -1
- package/dist/arrays.js +1 -1
- package/dist/bin.js +5 -5
- package/dist/cacache.js +1 -1
- package/dist/cache-with-ttl.js +1 -1
- package/dist/constants/agents.js +1 -1
- package/dist/constants/core.js +1 -1
- package/dist/constants/encoding.js +1 -1
- package/dist/constants/github.js +1 -1
- package/dist/constants/licenses.js +1 -1
- package/dist/constants/node.js +2 -13
- package/dist/constants/packages.js +10 -25
- package/dist/constants/paths.js +1 -1
- package/dist/constants/platform.js +1 -1
- package/dist/constants/process.js +3 -7
- package/dist/constants/socket.js +1 -1
- package/dist/constants/testing.js +1 -1
- package/dist/constants/time.js +1 -1
- package/dist/constants/typescript.js +1 -1
- package/dist/cover/code.js +1 -1
- package/dist/cover/formatters.js +1 -1
- package/dist/cover/type.js +1 -1
- package/dist/cover/types.js +1 -1
- package/dist/debug.js +4 -4
- package/dist/dlx-binary.js +5 -5
- package/dist/dlx-manifest.js +1 -1
- package/dist/dlx-package.js +1 -1
- package/dist/dlx.js +1 -1
- package/dist/effects/pulse-frames.js +4 -4
- package/dist/effects/text-shimmer.js +2 -2
- package/dist/effects/types.js +1 -1
- package/dist/effects/ultra.js +1 -1
- package/dist/env/ci.js +3 -3
- package/dist/env/debug.js +2 -2
- package/dist/env/github.js +2 -2
- package/dist/env/helpers.js +1 -1
- package/dist/env/home.js +2 -2
- package/dist/env/locale.js +2 -2
- package/dist/env/node-auth-token.js +2 -2
- package/dist/env/node-env.js +2 -2
- package/dist/env/npm.js +2 -2
- package/dist/env/package-manager.js +2 -2
- package/dist/env/path.js +2 -2
- package/dist/env/pre-commit.js +3 -3
- package/dist/env/rewire.js +1 -1
- package/dist/env/shell.js +2 -2
- package/dist/env/socket-cli-shadow.js +3 -3
- package/dist/env/socket-cli.js +3 -3
- package/dist/env/socket.js +3 -3
- package/dist/env/temp-dir.js +2 -2
- package/dist/env/term.js +2 -2
- package/dist/env/test.js +4 -4
- package/dist/env/windows.js +2 -2
- package/dist/env/xdg.js +2 -2
- package/dist/env.js +1 -1
- package/dist/external/@inquirer/confirm.js +16 -15
- package/dist/external/@inquirer/input.js +16 -15
- package/dist/external/@inquirer/password.js +17 -16
- package/dist/external/@inquirer/search.js +18 -17
- package/dist/external/@inquirer/select.js +19 -18
- package/dist/external/@npmcli/package-json/lib/read-package.js +7 -1
- package/dist/external/@npmcli/package-json/lib/sort.js +6 -1
- package/dist/external/@npmcli/package-json.js +18 -0
- package/dist/external/@npmcli/promise-spawn.js +2 -1
- package/dist/external/@socketregistry/is-unicode-supported.js +2 -1
- package/dist/external/@socketregistry/packageurl-js.js +3 -2
- package/dist/external/@socketregistry/yocto-spinner.js +5 -4
- package/dist/external/@yarnpkg/extensions.js +2 -1
- package/dist/external/cacache.js +10 -9
- package/dist/external/debug.js +2 -5
- package/dist/external/del.js +3 -2
- package/dist/external/fast-glob.js +3 -2
- package/dist/external/fast-sort.js +2 -1
- package/dist/external/get-east-asian-width.js +2 -1
- package/dist/external/libnpmexec.js +6 -0
- package/dist/external/libnpmpack.js +64 -63
- package/dist/external/make-fetch-happen.js +16 -15
- package/dist/external/normalize-package-data.js +3 -2
- package/dist/external/npm-package-arg.js +3 -2
- package/dist/external/pacote.js +36 -35
- package/dist/external/picomatch.js +2 -1
- package/dist/external/semver.js +2 -1
- package/dist/external/spdx-correct.js +2 -1
- package/dist/external/spdx-expression-parse.js +2 -1
- package/dist/external/streaming-iterables.js +2 -1
- package/dist/external/validate-npm-package-name.js +2 -1
- package/dist/external/which.js +2 -1
- package/dist/external/yargs-parser.js +2 -1
- package/dist/external/yoctocolors-cjs.js +2 -1
- package/dist/external/zod.js +10 -9
- package/dist/fs.js +3 -3
- package/dist/functions.js +1 -1
- package/dist/git.js +2 -2
- package/dist/github.js +3 -3
- package/dist/globs.js +3 -3
- package/dist/http-request.js +1 -1
- package/dist/ipc.js +1 -1
- package/dist/json.js +1 -1
- package/dist/lifecycle-script-names.d.ts +2 -0
- package/dist/lifecycle-script-names.js +40 -0
- package/dist/links/index.js +1 -1
- package/dist/logger.d.ts +29 -4
- package/dist/logger.js +34 -5
- package/dist/maintained-node-versions.js +1 -1
- package/dist/memoization.js +1 -1
- package/dist/objects.js +2 -2
- package/dist/package-default-node-range.d.ts +2 -0
- package/dist/package-default-node-range.js +27 -0
- package/dist/package-default-socket-categories.d.ts +2 -0
- package/dist/package-default-socket-categories.js +25 -0
- package/dist/package-extensions.d.ts +2 -0
- package/dist/package-extensions.js +66 -0
- package/dist/packages/editable.js +1 -1
- package/dist/packages/exports.js +2 -2
- package/dist/packages/isolation.js +3 -3
- package/dist/packages/licenses.js +3 -3
- package/dist/packages/manifest.js +4 -4
- package/dist/packages/normalize.js +2 -2
- package/dist/packages/operations.js +6 -6
- package/dist/packages/paths.js +1 -1
- package/dist/packages/provenance.js +2 -2
- package/dist/packages/specs.js +1 -1
- package/dist/packages/validation.js +1 -1
- package/dist/packages.js +1 -1
- package/dist/path.js +2 -2
- package/dist/paths/rewire.js +1 -1
- package/dist/paths.js +15 -15
- package/dist/performance.js +1 -1
- package/dist/process-lock.js +1 -1
- package/dist/promise-queue.js +1 -1
- package/dist/promises.js +3 -3
- package/dist/regexps.js +1 -1
- package/dist/sea.js +1 -1
- package/dist/shadow.js +1 -1
- package/dist/signal-exit.js +1 -1
- package/dist/sorts.js +1 -1
- package/dist/spawn.js +2 -2
- package/dist/spinner.js +3 -3
- package/dist/ssri.js +1 -1
- package/dist/stdio/clear.js +1 -1
- package/dist/stdio/divider.js +1 -1
- package/dist/stdio/footer.js +1 -1
- package/dist/stdio/header.js +1 -1
- package/dist/stdio/mask.js +1 -1
- package/dist/stdio/progress.js +1 -1
- package/dist/stdio/prompts.js +2 -2
- package/dist/stdio/stderr.js +1 -1
- package/dist/stdio/stdout.js +1 -1
- package/dist/streams.js +1 -1
- package/dist/strings.js +1 -1
- package/dist/suppress-warnings.js +1 -1
- package/dist/tables.js +1 -1
- package/dist/temporary-executor.js +2 -2
- package/dist/themes/context.js +1 -1
- package/dist/themes/index.js +1 -1
- package/dist/themes/themes.js +1 -1
- package/dist/themes/types.js +1 -1
- package/dist/themes/utils.js +1 -1
- package/dist/types.js +1 -1
- package/dist/url.js +1 -1
- package/dist/utils/get-ipc.js +1 -1
- package/dist/validation/json-parser.js +1 -1
- package/dist/validation/types.js +1 -1
- package/dist/versions.js +1 -1
- package/dist/words.js +1 -1
- package/dist/zod.js +1 -1
- package/package.json +18 -2
- package/dist/abort.js.map +0 -7
- package/dist/agent.js.map +0 -7
- package/dist/ansi.js.map +0 -7
- package/dist/argv/flags.js.map +0 -7
- package/dist/argv/parse.js.map +0 -7
- package/dist/arrays.js.map +0 -7
- package/dist/bin.js.map +0 -7
- package/dist/cacache.js.map +0 -7
- package/dist/cache-with-ttl.js.map +0 -7
- package/dist/constants/agents.js.map +0 -7
- package/dist/constants/core.js.map +0 -7
- package/dist/constants/encoding.js.map +0 -7
- package/dist/constants/github.js.map +0 -7
- package/dist/constants/licenses.js.map +0 -7
- package/dist/constants/node.js.map +0 -7
- package/dist/constants/packages.js.map +0 -7
- package/dist/constants/paths.js.map +0 -7
- package/dist/constants/platform.js.map +0 -7
- package/dist/constants/process.js.map +0 -7
- package/dist/constants/socket.js.map +0 -7
- package/dist/constants/testing.js.map +0 -7
- package/dist/constants/time.js.map +0 -7
- package/dist/constants/typescript.js.map +0 -7
- package/dist/cover/code.js.map +0 -7
- package/dist/cover/formatters.js.map +0 -7
- package/dist/cover/type.js.map +0 -7
- package/dist/cover/types.js.map +0 -7
- package/dist/debug.js.map +0 -7
- package/dist/dlx-binary.js.map +0 -7
- package/dist/dlx-manifest.js.map +0 -7
- package/dist/dlx-package.js.map +0 -7
- package/dist/dlx.js.map +0 -7
- package/dist/effects/pulse-frames.js.map +0 -7
- package/dist/effects/text-shimmer.js.map +0 -7
- package/dist/effects/types.js.map +0 -7
- package/dist/effects/ultra.js.map +0 -7
- package/dist/env/ci.js.map +0 -7
- package/dist/env/debug.js.map +0 -7
- package/dist/env/github.js.map +0 -7
- package/dist/env/helpers.js.map +0 -7
- package/dist/env/home.js.map +0 -7
- package/dist/env/locale.js.map +0 -7
- package/dist/env/node-auth-token.js.map +0 -7
- package/dist/env/node-env.js.map +0 -7
- package/dist/env/npm.js.map +0 -7
- package/dist/env/package-manager.js.map +0 -7
- package/dist/env/path.js.map +0 -7
- package/dist/env/pre-commit.js.map +0 -7
- package/dist/env/rewire.js.map +0 -7
- package/dist/env/shell.js.map +0 -7
- package/dist/env/socket-cli-shadow.js.map +0 -7
- package/dist/env/socket-cli.js.map +0 -7
- package/dist/env/socket.js.map +0 -7
- package/dist/env/temp-dir.js.map +0 -7
- package/dist/env/term.js.map +0 -7
- package/dist/env/test.js.map +0 -7
- package/dist/env/windows.js.map +0 -7
- package/dist/env/xdg.js.map +0 -7
- package/dist/env.js.map +0 -7
- package/dist/external/@npmcli/package-json/index.js +0 -1
- package/dist/external/@socketregistry/is-unicode-supported.d.ts +0 -2
- package/dist/external/@socketregistry/yocto-spinner.d.ts +0 -12
- package/dist/external/@yarnpkg/extensions.d.ts +0 -4
- package/dist/external/cacache.d.ts +0 -86
- package/dist/external/debug.d.ts +0 -22
- package/dist/external/del.d.ts +0 -1
- package/dist/external/fast-sort.d.ts +0 -3
- package/dist/external/get-east-asian-width.d.ts +0 -5
- package/dist/external/libnpmexec.d.ts +0 -33
- package/dist/external/libnpmpack.d.ts +0 -2
- package/dist/external/make-fetch-happen.d.ts +0 -15
- package/dist/external/pacote.d.ts +0 -14
- package/dist/external/semver.d.ts +0 -2
- package/dist/external/yargs-parser.d.ts +0 -2
- package/dist/external/yoctocolors-cjs.d.ts +0 -52
- package/dist/external/zod.d.ts +0 -1
- package/dist/fs.js.map +0 -7
- package/dist/functions.js.map +0 -7
- package/dist/git.js.map +0 -7
- package/dist/github.js.map +0 -7
- package/dist/globs.js.map +0 -7
- package/dist/http-request.js.map +0 -7
- package/dist/ipc.js.map +0 -7
- package/dist/json.js.map +0 -7
- package/dist/links/index.js.map +0 -7
- package/dist/logger.js.map +0 -7
- package/dist/maintained-node-versions.js.map +0 -7
- package/dist/memoization.js.map +0 -7
- package/dist/objects.js.map +0 -7
- package/dist/packages/editable.js.map +0 -7
- package/dist/packages/exports.js.map +0 -7
- package/dist/packages/isolation.js.map +0 -7
- package/dist/packages/licenses.js.map +0 -7
- package/dist/packages/manifest.js.map +0 -7
- package/dist/packages/normalize.js.map +0 -7
- package/dist/packages/operations.js.map +0 -7
- package/dist/packages/paths.js.map +0 -7
- package/dist/packages/provenance.js.map +0 -7
- package/dist/packages/specs.js.map +0 -7
- package/dist/packages/validation.js.map +0 -7
- package/dist/packages.js.map +0 -7
- package/dist/path.js.map +0 -7
- package/dist/paths/rewire.js.map +0 -7
- package/dist/paths.js.map +0 -7
- package/dist/performance.js.map +0 -7
- package/dist/process-lock.js.map +0 -7
- package/dist/promise-queue.js.map +0 -7
- package/dist/promises.js.map +0 -7
- package/dist/regexps.js.map +0 -7
- package/dist/sea.js.map +0 -7
- package/dist/shadow.js.map +0 -7
- package/dist/signal-exit.js.map +0 -7
- package/dist/sorts.js.map +0 -7
- package/dist/spawn.js.map +0 -7
- package/dist/spinner.js.map +0 -7
- package/dist/ssri.js.map +0 -7
- package/dist/stdio/clear.js.map +0 -7
- package/dist/stdio/divider.js.map +0 -7
- package/dist/stdio/footer.js.map +0 -7
- package/dist/stdio/header.js.map +0 -7
- package/dist/stdio/mask.js.map +0 -7
- package/dist/stdio/progress.js.map +0 -7
- package/dist/stdio/prompts.js.map +0 -7
- package/dist/stdio/stderr.js.map +0 -7
- package/dist/stdio/stdout.js.map +0 -7
- package/dist/streams.js.map +0 -7
- package/dist/strings.js.map +0 -7
- package/dist/suppress-warnings.js.map +0 -7
- package/dist/tables.js.map +0 -7
- package/dist/temporary-executor.js.map +0 -7
- package/dist/themes/context.js.map +0 -7
- package/dist/themes/index.js.map +0 -7
- package/dist/themes/themes.js.map +0 -7
- package/dist/themes/types.js.map +0 -7
- package/dist/themes/utils.js.map +0 -7
- package/dist/types.js.map +0 -7
- package/dist/url.js.map +0 -7
- package/dist/utils/get-ipc.js.map +0 -7
- package/dist/validation/json-parser.js.map +0 -7
- package/dist/validation/types.js.map +0 -7
- package/dist/versions.js.map +0 -7
- package/dist/words.js.map +0 -7
- package/dist/zod.js.map +0 -7
|
@@ -1,29 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Bundled from make-fetch-happen
|
|
3
4
|
* This is a zero-dependency bundle created by esbuild.
|
|
4
5
|
*/
|
|
5
|
-
var fh=Object.defineProperty;var o=(s,e)=>fh(s,"name",{value:e,configurable:!0});var Xg=(s,e)=>()=>(s&&(e=s(s=0)),e);var m=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Jg=(s,e)=>{for(var t in e)fh(s,t,{get:e[t],enumerable:!0})};var J=m(ie=>{"use strict";var Qg=ie&&ie.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ie,"__esModule",{value:!0});ie.Minipass=ie.isWritable=ie.isReadable=ie.isStream=void 0;var dh=typeof process=="object"&&process?process:{stdout:null,stderr:null},Zn=require("node:events"),yh=Qg(require("node:stream")),ey=require("node:string_decoder"),ty=o(s=>!!s&&typeof s=="object"&&(s instanceof Gr||s instanceof yh.default||(0,ie.isReadable)(s)||(0,ie.isWritable)(s)),"isStream");ie.isStream=ty;var sy=o(s=>!!s&&typeof s=="object"&&s instanceof Zn.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==yh.default.Writable.prototype.pipe,"isReadable");ie.isReadable=sy;var ry=o(s=>!!s&&typeof s=="object"&&s instanceof Zn.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function","isWritable");ie.isWritable=ry;var Je=Symbol("EOF"),Qe=Symbol("maybeEmitEnd"),yt=Symbol("emittedEnd"),Fr=Symbol("emittingEnd"),Ps=Symbol("emittedError"),qr=Symbol("closed"),ph=Symbol("read"),Ur=Symbol("flush"),mh=Symbol("flushChunk"),Be=Symbol("encoding"),es=Symbol("decoder"),z=Symbol("flowing"),Ls=Symbol("paused"),ts=Symbol("resume"),G=Symbol("buffer"),re=Symbol("pipes"),V=Symbol("bufferLength"),jn=Symbol("bufferPush"),jr=Symbol("bufferShift"),X=Symbol("objectMode"),j=Symbol("destroyed"),Hn=Symbol("error"),zn=Symbol("emitData"),gh=Symbol("emitEnd"),Gn=Symbol("emitEnd2"),De=Symbol("async"),Vn=Symbol("abort"),Hr=Symbol("aborted"),ks=Symbol("signal"),xt=Symbol("dataListeners"),pe=Symbol("discarded"),Ds=o(s=>Promise.resolve().then(s),"defer"),iy=o(s=>s(),"nodefer"),ny=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),oy=o(s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBufferLike"),ay=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),zr=class{static{o(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[ts](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Wn=class extends zr{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},cy=o(s=>!!s.objectMode,"isObjectModeOptions"),hy=o(s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer","isEncodingOptions"),Gr=class extends Zn.EventEmitter{static{o(this,"Minipass")}[z]=!1;[Ls]=!1;[re]=[];[G]=[];[X];[Be];[De];[es];[Je]=!1;[yt]=!1;[Fr]=!1;[qr]=!1;[Ps]=null;[V]=0;[j]=!1;[ks];[Hr]=!1;[xt]=0;[pe]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");cy(t)?(this[X]=!0,this[Be]=null):hy(t)?(this[Be]=t.encoding,this[X]=!1):(this[X]=!1,this[Be]=null),this[De]=!!t.async,this[es]=this[Be]?new ey.StringDecoder(this[Be]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:o(()=>this[G],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:o(()=>this[re],"get")});let{signal:r}=t;r&&(this[ks]=r,r.aborted?this[Vn]():r.addEventListener("abort",()=>this[Vn]()))}get bufferLength(){return this[V]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[X]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[De]}set async(e){this[De]=this[De]||!!e}[Vn](){this[Hr]=!0,this.emit("abort",this[ks]?.reason),this.destroy(this[ks]?.reason)}get aborted(){return this[Hr]}set aborted(e){}write(e,t,r){if(this[Hr])return!1;if(this[Je])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=this[De]?Ds:iy;if(!this[X]&&!Buffer.isBuffer(e)){if(ay(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(oy(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[X]?(this[z]&&this[V]!==0&&this[Ur](!0),this[z]?this.emit("data",e):this[jn](e),this[V]!==0&&this.emit("readable"),r&&i(r),this[z]):e.length?(typeof e=="string"&&!(t===this[Be]&&!this[es]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Be]&&(e=this[es].write(e)),this[z]&&this[V]!==0&&this[Ur](!0),this[z]?this.emit("data",e):this[jn](e),this[V]!==0&&this.emit("readable"),r&&i(r),this[z]):(this[V]!==0&&this.emit("readable"),r&&i(r),this[z])}read(e){if(this[j])return null;if(this[pe]=!1,this[V]===0||e===0||e&&e>this[V])return this[Qe](),null;this[X]&&(e=null),this[G].length>1&&!this[X]&&(this[G]=[this[Be]?this[G].join(""):Buffer.concat(this[G],this[V])]);let t=this[ph](e||null,this[G][0]);return this[Qe](),t}[ph](e,t){if(this[X])this[jr]();else{let r=t;e===r.length||e===null?this[jr]():typeof r=="string"?(this[G][0]=r.slice(e),t=r.slice(0,e),this[V]-=e):(this[G][0]=r.subarray(e),t=r.subarray(0,e),this[V]-=e)}return this.emit("data",t),!this[G].length&&!this[Je]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t="utf8"),e!==void 0&&this.write(e,t),r&&this.once("end",r),this[Je]=!0,this.writable=!1,(this[z]||!this[Ls])&&this[Qe](),this}[ts](){this[j]||(!this[xt]&&!this[re].length&&(this[pe]=!0),this[Ls]=!1,this[z]=!0,this.emit("resume"),this[G].length?this[Ur]():this[Je]?this[Qe]():this.emit("drain"))}resume(){return this[ts]()}pause(){this[z]=!1,this[Ls]=!0,this[pe]=!1}get destroyed(){return this[j]}get flowing(){return this[z]}get paused(){return this[Ls]}[jn](e){this[X]?this[V]+=1:this[V]+=e.length,this[G].push(e)}[jr](){return this[X]?this[V]-=1:this[V]-=this[G][0].length,this[G].shift()}[Ur](e=!1){do;while(this[mh](this[jr]())&&this[G].length);!e&&!this[G].length&&!this[Je]&&this.emit("drain")}[mh](e){return this.emit("data",e),this[z]}pipe(e,t){if(this[j])return e;this[pe]=!1;let r=this[yt];return t=t||{},e===dh.stdout||e===dh.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[re].push(t.proxyErrors?new Wn(this,e,t):new zr(this,e,t)),this[De]?Ds(()=>this[ts]()):this[ts]()),e}unpipe(e){let t=this[re].find(r=>r.dest===e);t&&(this[re].length===1?(this[z]&&this[xt]===0&&(this[z]=!1),this[re]=[]):this[re].splice(this[re].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);if(e==="data")this[pe]=!1,this[xt]++,!this[re].length&&!this[z]&&this[ts]();else if(e==="readable"&&this[V]!==0)super.emit("readable");else if(ny(e)&&this[yt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ps]){let i=t;this[De]?Ds(()=>i.call(this,this[Ps])):i.call(this,this[Ps])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){let r=super.off(e,t);return e==="data"&&(this[xt]=this.listeners("data").length,this[xt]===0&&!this[pe]&&!this[re].length&&(this[z]=!1)),r}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[xt]=0,!this[pe]&&!this[re].length&&(this[z]=!1)),t}get emittedEnd(){return this[yt]}[Qe](){!this[Fr]&&!this[yt]&&!this[j]&&this[G].length===0&&this[Je]&&(this[Fr]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[qr]&&this.emit("close"),this[Fr]=!1)}emit(e,...t){let r=t[0];if(e!=="error"&&e!=="close"&&e!==j&&this[j])return!1;if(e==="data")return!this[X]&&!r?!1:this[De]?(Ds(()=>this[zn](r)),!0):this[zn](r);if(e==="end")return this[gh]();if(e==="close"){if(this[qr]=!0,!this[yt]&&!this[j])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ps]=r,super.emit(Hn,r);let n=!this[ks]||this.listeners("error").length?super.emit("error",r):!1;return this[Qe](),n}else if(e==="resume"){let n=super.emit("resume");return this[Qe](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let i=super.emit(e,...t);return this[Qe](),i}[zn](e){for(let r of this[re])r.dest.write(e)===!1&&this.pause();let t=this[pe]?!1:super.emit("data",e);return this[Qe](),t}[gh](){return this[yt]?!1:(this[yt]=!0,this.readable=!1,this[De]?(Ds(()=>this[Gn]()),!0):this[Gn]())}[Gn](){if(this[es]){let t=this[es].end();if(t){for(let r of this[re])r.dest.write(t);this[pe]||super.emit("data",t)}}for(let t of this[re])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[X]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[X]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[X])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(j,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[pe]=!1;let e=!1,t=o(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:o(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Je])return t();let n,a,c=o(f=>{this.off("data",h),this.off("end",u),this.off(j,l),t(),a(f)},"onerr"),h=o(f=>{this.off("error",c),this.off("end",u),this.off(j,l),this.pause(),n({value:f,done:!!this[Je]})},"ondata"),u=o(()=>{this.off("error",c),this.off("data",h),this.off(j,l),t(),n({done:!0,value:void 0})},"onend"),l=o(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((f,d)=>{a=d,n=f,this.once(j,l),this.once("error",c),this.once("end",u),this.once("data",h)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[pe]=!1;let e=!1,t=o(()=>(this.pause(),this.off(Hn,t),this.off(j,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),r=o(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(Hn,t),this.once(j,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[j])return e?this.emit("error",e):this.emit(j),this;this[j]=!0,this[pe]=!0,this[G].length=0,this[V]=0;let t=this;return typeof t.close=="function"&&!this[qr]&&t.close(),e?this.emit("error",e):this.emit(j),this}static get isStream(){return ie.isStream}};ie.Minipass=Gr});var Kn=m(ss=>{"use strict";var uy=ss&&ss.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ss,"__esModule",{value:!0});ss.constants=void 0;var ly=uy(require("zlib")),fy=ly.default.constants||{ZLIB_VERNUM:4736};ss.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},fy))});var Sh=m(B=>{"use strict";var dy=B&&B.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),py=B&&B.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),my=B&&B.__importStar||(function(){var s=o(function(e){return s=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},s(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=s(e),i=0;i<r.length;i++)r[i]!=="default"&&dy(t,e,r[i]);return py(t,e),t}})(),gy=B&&B.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(B,"__esModule",{value:!0});B.ZstdDecompress=B.ZstdCompress=B.BrotliDecompress=B.BrotliCompress=B.Unzip=B.InflateRaw=B.DeflateRaw=B.Gunzip=B.Gzip=B.Inflate=B.Deflate=B.Zlib=B.ZlibError=B.constants=void 0;var Jn=gy(require("assert")),Ct=require("buffer"),yy=J(),Eh=my(require("zlib")),Me=Kn(),Ey=Kn();Object.defineProperty(B,"constants",{enumerable:!0,get:o(function(){return Ey.constants},"get")});var wy=Ct.Buffer.concat,wh=Object.getOwnPropertyDescriptor(Ct.Buffer,"concat"),Sy=o(s=>s,"noop"),Yn=wh?.writable===!0||wh?.set!==void 0?s=>{Ct.Buffer.concat=s?Sy:wy}:s=>{},Bt=Symbol("_superWrite"),Nt=class extends Error{static{o(this,"ZlibError")}code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};B.ZlibError=Nt;var Xn=Symbol("flushFlag"),Ms=class extends yy.Minipass{static{o(this,"ZlibBase")}#e=!1;#t=!1;#s;#r;#i;#a;#l;get sawError(){return this.#e}get handle(){return this.#a}get flushFlag(){return this.#s}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#s=e.flush??0,this.#r=e.finishFlush??0,this.#i=e.fullFlushFlag??0,typeof Eh[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#a=new Eh[t](e)}catch(r){throw new Nt(r,this.constructor)}this.#l=r=>{this.#e||(this.#e=!0,this.close(),this.emit("error",r))},this.#a?.on("error",r=>this.#l(new Nt(r))),this.once("end",()=>this.close)}close(){this.#a&&(this.#a.close(),this.#a=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,Jn.default)(this.#a,"zlib binding closed"),this.#a.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#i),this.write(Object.assign(Ct.Buffer.alloc(0),{[Xn]:e})))}end(e,t,r){return typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(r)}get ended(){return this.#t}[Bt](e){return super.write(e)}write(e,t,r){if(typeof t=="function"&&(r=t,t="utf8"),typeof e=="string"&&(e=Ct.Buffer.from(e,t)),this.#e)return;(0,Jn.default)(this.#a,"zlib binding closed");let i=this.#a._handle,n=i.close;i.close=()=>{};let a=this.#a.close;this.#a.close=()=>{},Yn(!0);let c;try{let u=typeof e[Xn]=="number"?e[Xn]:this.#s;c=this.#a._processChunk(e,u),Yn(!1)}catch(u){Yn(!1),this.#l(new Nt(u,this.write))}finally{this.#a&&(this.#a._handle=i,i.close=n,this.#a.close=a,this.#a.removeAllListeners("error"))}this.#a&&this.#a.on("error",u=>this.#l(new Nt(u,this.write)));let h;if(c)if(Array.isArray(c)&&c.length>0){let u=c[0];h=this[Bt](Ct.Buffer.from(u));for(let l=1;l<c.length;l++)h=this[Bt](c[l])}else h=this[Bt](Ct.Buffer.from(c));return r&&r(),h}},$e=class extends Ms{static{o(this,"Zlib")}#e;#t;constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.Z_NO_FLUSH,e.finishFlush=e.finishFlush||Me.constants.Z_FINISH,e.fullFlushFlag=Me.constants.Z_FULL_FLUSH,super(e,t),this.#e=e.level,this.#t=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==e||this.#t!==t){this.flush(Me.constants.Z_SYNC_FLUSH),(0,Jn.default)(this.handle,"zlib binding closed");let r=this.handle.flush;this.handle.flush=(i,n)=>{typeof i=="function"&&(n=i,i=this.flushFlag),this.flush(i),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=r}this.handle&&(this.#e=e,this.#t=t)}}}};B.Zlib=$e;var Qn=class extends $e{static{o(this,"Deflate")}constructor(e){super(e,"Deflate")}};B.Deflate=Qn;var eo=class extends $e{static{o(this,"Inflate")}constructor(e){super(e,"Inflate")}};B.Inflate=eo;var to=class extends $e{static{o(this,"Gzip")}#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Bt](e){return this.#e?(this.#e=!1,e[9]=255,super[Bt](e)):super[Bt](e)}};B.Gzip=to;var so=class extends $e{static{o(this,"Gunzip")}constructor(e){super(e,"Gunzip")}};B.Gunzip=so;var ro=class extends $e{static{o(this,"DeflateRaw")}constructor(e){super(e,"DeflateRaw")}};B.DeflateRaw=ro;var io=class extends $e{static{o(this,"InflateRaw")}constructor(e){super(e,"InflateRaw")}};B.InflateRaw=io;var no=class extends $e{static{o(this,"Unzip")}constructor(e){super(e,"Unzip")}};B.Unzip=no;var Vr=class extends Ms{static{o(this,"Brotli")}constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Me.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=Me.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},oo=class extends Vr{static{o(this,"BrotliCompress")}constructor(e){super(e,"BrotliCompress")}};B.BrotliCompress=oo;var ao=class extends Vr{static{o(this,"BrotliDecompress")}constructor(e){super(e,"BrotliDecompress")}};B.BrotliDecompress=ao;var Wr=class extends Ms{static{o(this,"Zstd")}constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||Me.constants.ZSTD_e_end,e.fullFlushFlag=Me.constants.ZSTD_e_flush,super(e,t)}},co=class extends Wr{static{o(this,"ZstdCompress")}constructor(e){super(e,"ZstdCompress")}};B.ZstdCompress=co;var ho=class extends Wr{static{o(this,"ZstdDecompress")}constructor(e){super(e,"ZstdDecompress")}};B.ZstdDecompress=ho});var Qr=m((VA,xh)=>{"use strict";var _h=typeof process=="object"&&process?process:{stdout:null,stderr:null},_y=require("events"),bh=require("stream"),Rh=require("string_decoder").StringDecoder,et=Symbol("EOF"),tt=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Zr=Symbol("emittingEnd"),$s=Symbol("emittedError"),Kr=Symbol("closed"),Oh=Symbol("read"),Yr=Symbol("flush"),Ih=Symbol("flushChunk"),ce=Symbol("encoding"),st=Symbol("decoder"),Xr=Symbol("flowing"),Fs=Symbol("paused"),rs=Symbol("resume"),W=Symbol("bufferLength"),uo=Symbol("bufferPush"),lo=Symbol("bufferShift"),Q=Symbol("objectMode"),ee=Symbol("destroyed"),fo=Symbol("emitData"),vh=Symbol("emitEnd"),po=Symbol("emitEnd2"),rt=Symbol("async"),qs=o(s=>Promise.resolve().then(s),"defer"),Th=global._MP_NO_ITERATOR_SYMBOLS_!=="1",by=Th&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Ry=Th&&Symbol.iterator||Symbol("iterator not implemented"),Oy=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),Iy=o(s=>s instanceof ArrayBuffer||typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBuffer"),vy=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),Jr=class{static{o(this,"Pipe")}constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[rs](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},mo=class extends Jr{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}};xh.exports=class Ah extends bh{static{o(this,"Minipass")}constructor(e){super(),this[Xr]=!1,this[Fs]=!1,this.pipes=[],this.buffer=[],this[Q]=e&&e.objectMode||!1,this[Q]?this[ce]=null:this[ce]=e&&e.encoding||null,this[ce]==="buffer"&&(this[ce]=null),this[rt]=e&&!!e.async||!1,this[st]=this[ce]?new Rh(this[ce]):null,this[et]=!1,this[Et]=!1,this[Zr]=!1,this[Kr]=!1,this[$s]=null,this.writable=!0,this.readable=!0,this[W]=0,this[ee]=!1}get bufferLength(){return this[W]}get encoding(){return this[ce]}set encoding(e){if(this[Q])throw new Error("cannot set encoding in objectMode");if(this[ce]&&e!==this[ce]&&(this[st]&&this[st].lastNeed||this[W]))throw new Error("cannot change encoding");this[ce]!==e&&(this[st]=e?new Rh(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[st].write(t)))),this[ce]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Q]}set objectMode(e){this[Q]=this[Q]||!!e}get async(){return this[rt]}set async(e){this[rt]=this[rt]||!!e}write(e,t,r){if(this[et])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=this[rt]?qs:n=>n();return!this[Q]&&!Buffer.isBuffer(e)&&(vy(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Iy(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Q]?(this.flowing&&this[W]!==0&&this[Yr](!0),this.flowing?this.emit("data",e):this[uo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing):e.length?(typeof e=="string"&&!(t===this[ce]&&!this[st].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ce]&&(e=this[st].write(e)),this.flowing&&this[W]!==0&&this[Yr](!0),this.flowing?this.emit("data",e):this[uo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing):(this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing)}read(e){if(this[ee])return null;if(this[W]===0||e===0||e>this[W])return this[tt](),null;this[Q]&&(e=null),this.buffer.length>1&&!this[Q]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[W])]);let t=this[Oh](e||null,this.buffer[0]);return this[tt](),t}[Oh](e,t){return e===t.length||e===null?this[lo]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[W]-=e),this.emit("data",t),!this.buffer.length&&!this[et]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t),r&&this.once("end",r),this[et]=!0,this.writable=!1,(this.flowing||!this[Fs])&&this[tt](),this}[rs](){this[ee]||(this[Fs]=!1,this[Xr]=!0,this.emit("resume"),this.buffer.length?this[Yr]():this[et]?this[tt]():this.emit("drain"))}resume(){return this[rs]()}pause(){this[Xr]=!1,this[Fs]=!0}get destroyed(){return this[ee]}get flowing(){return this[Xr]}get paused(){return this[Fs]}[uo](e){this[Q]?this[W]+=1:this[W]+=e.length,this.buffer.push(e)}[lo](){return this.buffer.length&&(this[Q]?this[W]-=1:this[W]-=this.buffer[0].length),this.buffer.shift()}[Yr](e){do;while(this[Ih](this[lo]()));!e&&!this.buffer.length&&!this[et]&&this.emit("drain")}[Ih](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[ee])return;let r=this[Et];return t=t||{},e===_h.stdout||e===_h.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this.pipes.push(t.proxyErrors?new mo(this,e,t):new Jr(this,e,t)),this[rt]?qs(()=>this[rs]()):this[rs]()),e}unpipe(e){let t=this.pipes.find(r=>r.dest===e);t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);return e==="data"&&!this.pipes.length&&!this.flowing?this[rs]():e==="readable"&&this[W]!==0?super.emit("readable"):Oy(e)&&this[Et]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[$s]&&(this[rt]?qs(()=>t.call(this,this[$s])):t.call(this,this[$s])),r}get emittedEnd(){return this[Et]}[tt](){!this[Zr]&&!this[Et]&&!this[ee]&&this.buffer.length===0&&this[et]&&(this[Zr]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Kr]&&this.emit("close"),this[Zr]=!1)}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return;if(e==="data")return t?this[rt]?qs(()=>this[fo](t)):this[fo](t):!1;if(e==="end")return this[vh]();if(e==="close"){if(this[Kr]=!0,!this[Et]&&!this[ee])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[$s]=t;let n=super.emit("error",t);return this[tt](),n}else if(e==="resume"){let n=super.emit("resume");return this[tt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let i=super.emit(e,t,...r);return this[tt](),i}[fo](e){for(let r of this.pipes)r.dest.write(e)===!1&&this.pause();let t=super.emit("data",e);return this[tt](),t}[vh](){this[Et]||(this[Et]=!0,this.readable=!1,this[rt]?qs(()=>this[po]()):this[po]())}[po](){if(this[st]){let t=this[st].end();if(t){for(let r of this.pipes)r.dest.write(t);super.emit("data",t)}}for(let t of this.pipes)t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Q]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[Q]||(e.dataLength+=r.length)}),t.then(()=>e)}concat(){return this[Q]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Q]?Promise.reject(new Error("cannot concat in objectMode")):this[ce]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(ee,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[by](){return{next:o(()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[et])return Promise.resolve({done:!0});let r=null,i=null,n=o(u=>{this.removeListener("data",a),this.removeListener("end",c),i(u)},"onerr"),a=o(u=>{this.removeListener("error",n),this.removeListener("end",c),this.pause(),r({value:u,done:!!this[et]})},"ondata"),c=o(()=>{this.removeListener("error",n),this.removeListener("data",a),r({done:!0})},"onend"),h=o(()=>n(new Error("stream destroyed")),"ondestroy");return new Promise((u,l)=>{i=l,r=u,this.once(ee,h),this.once("error",n),this.once("end",c),this.once("data",a)})},"next")}}[Ry](){return{next:o(()=>{let t=this.read();return{value:t,done:t===null}},"next")}}destroy(e){return this[ee]?(e?this.emit("error",e):this.emit(ee),this):(this[ee]=!0,this.buffer.length=0,this[W]=0,typeof this.close=="function"&&!this[Kr]&&this.close(),e?this.emit("error",e):this.emit(ee),this)}static isStream(e){return!!e&&(e instanceof Ah||e instanceof bh||e instanceof _y&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Bh=m((ZA,Ch)=>{var Ty=Qr(),Us=class extends Error{static{o(this,"SizeError")}constructor(e,t){super(`Bad data size: expected ${t} bytes, but got ${e}`),this.expect=t,this.found=e,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},ei=class extends Ty{static{o(this,"MinipassSized")}constructor(e={}){if(super(e),e.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=e.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(e,t,r){let i=Buffer.isBuffer(e)?e:typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):e;return Buffer.isBuffer(i)?(this.found+=i.length,this.found>this.expect&&this.emit("error",new Us(this.found,this.expect)),super.write(e,t,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(e,...t){return e==="end"&&this.found!==this.expect&&this.emit("error",new Us(this.found,this.expect)),super.emit(e,...t)}};ei.SizeError=Us;Ch.exports=ei});var Ph=m((YA,Nh)=>{"use strict";var{Minipass:Ay}=J(),go=Symbol("type"),it=Symbol("buffer"),ti=class s{static{o(this,"Blob")}constructor(e,t){this[go]="";let r=[],i=0;if(e){let a=e,c=Number(a.length);for(let h=0;h<c;h++){let u=a[h],l=u instanceof Buffer?u:ArrayBuffer.isView(u)?Buffer.from(u.buffer,u.byteOffset,u.byteLength):u instanceof ArrayBuffer?Buffer.from(u):u instanceof s?u[it]:typeof u=="string"?Buffer.from(u):Buffer.from(String(u));i+=l.length,r.push(l)}}this[it]=Buffer.concat(r,i);let n=t&&t.type!==void 0&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[go]=n)}get size(){return this[it].length}get type(){return this[go]}text(){return Promise.resolve(this[it].toString())}arrayBuffer(){let e=this[it],t=e.byteOffset,r=e.byteLength,i=e.buffer.slice(t,t+r);return Promise.resolve(i)}stream(){return new Ay().end(this[it])}slice(e,t,r){let i=this.size,n=e===void 0?0:e<0?Math.max(i+e,0):Math.min(e,i),a=t===void 0?i:t<0?Math.max(i+t,0):Math.min(t,i),c=Math.max(a-n,0),u=this[it].slice(n,n+c),l=new s([],{type:r});return l[it]=u,l}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return it}};Object.defineProperties(ti.prototype,{size:{enumerable:!0},type:{enumerable:!0}});Nh.exports=ti});var Eo=m((JA,Lh)=>{"use strict";var yo=class extends Error{static{o(this,"FetchError")}constructor(e,t,r){super(e),this.code="FETCH_ERROR",r&&Object.assign(this,r),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":t,this.message=e,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(e){}get[Symbol.toStringTag](){return"FetchError"}};Lh.exports=yo});var Dh=m((ex,kh)=>{"use strict";kh.exports={}});var ri=m((tx,Fh)=>{"use strict";var{Minipass:Fe}=J(),wo=Bh(),$h=Ph(),{BUFFER:xy}=$h,js=Eo(),So;try{So=Dh().convert}catch{}var nt=Symbol("Body internals"),Pt=Symbol("consumeBody"),si=class{static{o(this,"Body")}constructor(e,t={}){let{size:r=0,timeout:i=0}=t,n=e==null?null:Mh(e)?Buffer.from(e.toString()):Hs(e)||Buffer.isBuffer(e)?e:Object.prototype.toString.call(e)==="[object ArrayBuffer]"?Buffer.from(e):ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):Fe.isStream(e)?e:Buffer.from(String(e));this[nt]={body:n,disturbed:!1,error:null},this.size=r,this.timeout=i,Fe.isStream(n)&&n.on("error",a=>{let c=a.name==="AbortError"?a:new js(`Invalid response while trying to fetch ${this.url}: ${a.message}`,"system",a);this[nt].error=c})}get body(){return this[nt].body}get bodyUsed(){return this[nt].disturbed}arrayBuffer(){return this[Pt]().then(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}blob(){let e=this.headers&&this.headers.get("content-type")||"";return this[Pt]().then(t=>Object.assign(new $h([],{type:e.toLowerCase()}),{[xy]:t}))}async json(){let e=await this[Pt]();try{return JSON.parse(e.toString())}catch(t){throw new js(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}text(){return this[Pt]().then(e=>e.toString())}buffer(){return this[Pt]()}textConverted(){return this[Pt]().then(e=>Cy(e,this.headers))}[Pt](){if(this[nt].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[nt].disturbed=!0,this[nt].error)return Promise.reject(this[nt].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let e=Hs(this.body)?this.body.stream():this.body;if(!Fe.isStream(e))return Promise.resolve(Buffer.alloc(0));let t=this.size&&e instanceof wo||!this.size&&e instanceof Fe&&!(e instanceof wo)?e:this.size?new wo({size:this.size}):new Fe,r=this.timeout&&t.writable?setTimeout(()=>{t.emit("error",new js(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return r&&r.unref&&r.unref(),new Promise(i=>{t!==e&&(e.on("error",n=>t.emit("error",n)),e.pipe(t)),i()}).then(()=>t.concat()).then(i=>(clearTimeout(r),i)).catch(i=>{throw clearTimeout(r),i.name==="AbortError"||i.name==="FetchError"?i:i.name==="RangeError"?new js(`Could not create Buffer from response body for ${this.url}: ${i.message}`,"system",i):new js(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i)})}static clone(e){if(e.bodyUsed)throw new Error("cannot clone body after it is used");let t=e.body;if(Fe.isStream(t)&&typeof t.getBoundary!="function"){let r=new Fe,i=new Fe,n=new Fe;return r.on("error",a=>{i.emit("error",a),n.emit("error",a)}),t.on("error",a=>r.emit("error",a)),r.pipe(i),r.pipe(n),t.pipe(r),e[nt].body=i,n}else return e.body}static extractContentType(e){return e==null?null:typeof e=="string"?"text/plain;charset=UTF-8":Mh(e)?"application/x-www-form-urlencoded;charset=UTF-8":Hs(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:Fe.isStream(e)?null:"text/plain;charset=UTF-8"}static getTotalBytes(e){let{body:t}=e;return t==null?0:Hs(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length===0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}static writeToStream(e,t){let{body:r}=t;return r==null?e.end():Buffer.isBuffer(r)||typeof r=="string"?e.end(r):(Hs(r)?r.stream():r).on("error",n=>e.emit("error",n)).pipe(e),e}};Object.defineProperties(si.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var Mh=o(s=>typeof s!="object"||typeof s.append!="function"||typeof s.delete!="function"||typeof s.get!="function"||typeof s.getAll!="function"||typeof s.has!="function"||typeof s.set!="function"?!1:s.constructor.name==="URLSearchParams"||Object.prototype.toString.call(s)==="[object URLSearchParams]"||typeof s.sort=="function","isURLSearchParams"),Hs=o(s=>typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&/^(Blob|File)$/.test(s.constructor.name)&&/^(Blob|File)$/.test(s[Symbol.toStringTag]),"isBlob"),Cy=o((s,e)=>{if(typeof So!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let t=e&&e.get("content-type"),r="utf-8",i;t&&(i=/charset=([^;]*)/i.exec(t));let n=s.slice(0,1024).toString();return!i&&n&&(i=/<meta.+?charset=(['"])(.+?)\1/i.exec(n)),!i&&n&&(i=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n),i||(i=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n),i&&i.pop()),i&&(i=/charset=(.*)/i.exec(i.pop()))),!i&&n&&(i=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n)),i&&(r=i.pop(),(r==="gb2312"||r==="gbk")&&(r="gb18030")),So(s,"UTF-8",r).toString()},"convertBody");Fh.exports=si});var ni=m((rx,jh)=>{"use strict";var Uh=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,bo=/[^\t\x20-\x7e\x80-\xff]/,zs=o(s=>{if(s=`${s}`,Uh.test(s)||s==="")throw new TypeError(`${s} is not a legal HTTP header name`)},"validateName"),qh=o(s=>{if(s=`${s}`,bo.test(s))throw new TypeError(`${s} is not a legal HTTP header value`)},"validateValue"),is=o((s,e)=>{e=e.toLowerCase();for(let t in s)if(t.toLowerCase()===e)return t},"find"),H=Symbol("map"),ii=class s{static{o(this,"Headers")}constructor(e=void 0){if(this[H]=Object.create(null),e instanceof s){let t=e.raw(),r=Object.keys(t);for(let i of r)for(let n of t[i])this.append(i,n);return}if(e!=null)if(typeof e=="object"){let t=e[Symbol.iterator];if(t!=null){if(typeof t!="function")throw new TypeError("Header pairs must be iterable");let r=[];for(let i of e){if(typeof i!="object"||typeof i[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let n=Array.from(i);if(n.length!==2)throw new TypeError("Each header pair must be a name/value tuple");r.push(n)}for(let i of r)this.append(i[0],i[1])}else for(let r of Object.keys(e))this.append(r,e[r])}else throw new TypeError("Provided initializer must be an object")}get(e){e=`${e}`,zs(e);let t=is(this[H],e);return t===void 0?null:this[H][t].join(", ")}forEach(e,t=void 0){let r=Ro(this);for(let i=0;i<r.length;i++){let[n,a]=r[i];e.call(t,a,n,this),r=Ro(this)}}set(e,t){e=`${e}`,t=`${t}`,zs(e),qh(t);let r=is(this[H],e);this[H][r!==void 0?r:e]=[t]}append(e,t){e=`${e}`,t=`${t}`,zs(e),qh(t);let r=is(this[H],e);r!==void 0?this[H][r].push(t):this[H][e]=[t]}has(e){return e=`${e}`,zs(e),is(this[H],e)!==void 0}delete(e){e=`${e}`,zs(e);let t=is(this[H],e);t!==void 0&&delete this[H][t]}raw(){return this[H]}keys(){return new Lt(this,"key")}values(){return new Lt(this,"value")}[Symbol.iterator](){return new Lt(this,"key+value")}entries(){return new Lt(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(e){let t=Object.assign(Object.create(null),e[H]),r=is(e[H],"Host");return r!==void 0&&(t[r]=t[r][0]),t}static createHeadersLenient(e){let t=new s;for(let r of Object.keys(e))if(!Uh.test(r))if(Array.isArray(e[r]))for(let i of e[r])bo.test(i)||(t[H][r]===void 0?t[H][r]=[i]:t[H][r].push(i));else bo.test(e[r])||(t[H][r]=[e[r]]);return t}};Object.defineProperties(ii.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var Ro=o((s,e="key+value")=>Object.keys(s[H]).sort().map(e==="key"?t=>t.toLowerCase():e==="value"?t=>s[H][t].join(", "):t=>[t.toLowerCase(),s[H][t].join(", ")]),"getHeaders"),_o=Symbol("internal"),Lt=class s{static{o(this,"HeadersIterator")}constructor(e,t){this[_o]={target:e,kind:t,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==s.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:e,kind:t,index:r}=this[_o],i=Ro(e,t),n=i.length;return r>=n?{value:void 0,done:!0}:(this[_o].index++,{value:i[r],done:!1})}};Object.setPrototypeOf(Lt.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));jh.exports=ii});var Vh=m((nx,Gh)=>{"use strict";var By=require("http"),{STATUS_CODES:Ny}=By,Hh=ni(),zh=ri(),{clone:Py,extractContentType:Ly}=zh,ot=Symbol("Response internals"),oi=class s extends zh{static{o(this,"Response")}constructor(e=null,t={}){super(e,t);let r=t.status||200,i=new Hh(t.headers);if(e!=null&&!i.has("Content-Type")){let n=Ly(e);n&&i.append("Content-Type",n)}this[ot]={url:t.url,status:r,statusText:t.statusText||Ny[r],headers:i,counter:t.counter,trailer:Promise.resolve(t.trailer||new Hh)}}get trailer(){return this[ot].trailer}get url(){return this[ot].url||""}get status(){return this[ot].status}get ok(){return this[ot].status>=200&&this[ot].status<300}get redirected(){return this[ot].counter>0}get statusText(){return this[ot].statusText}get headers(){return this[ot].headers}clone(){return new s(Py(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};Gh.exports=oi;Object.defineProperties(oi.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var Wh=m((ax,ky)=>{ky.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}});var Yh=m((cx,Kh)=>{"use strict";var{URL:Oo}=require("url"),{Minipass:Dy}=J(),Io=ni(),{exportNodeCompatibleHeaders:My}=Io,Zh=ri(),{clone:$y,extractContentType:Fy,getTotalBytes:qy}=Zh,Uy=Wh().version,jy=`minipass-fetch/${Uy} (+https://github.com/isaacs/minipass-fetch)`,Ne=Symbol("Request internals"),ai=o(s=>typeof s=="object"&&typeof s[Ne]=="object","isRequest"),Hy=o(s=>{let e=s&&typeof s=="object"&&Object.getPrototypeOf(s);return!!(e&&e.constructor.name==="AbortSignal")},"isAbortSignal"),ci=class s extends Zh{static{o(this,"Request")}constructor(e,t={}){let r=ai(e)?new Oo(e.url):e&&e.href?new Oo(e.href):new Oo(`${e}`);ai(e)?t={...e[Ne],...t}:(!e||typeof e=="string")&&(e={});let i=(t.method||e.method||"GET").toUpperCase(),n=i==="GET"||i==="HEAD";if((t.body!==null&&t.body!==void 0||ai(e)&&e.body!==null)&&n)throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body!==null&&t.body!==void 0?t.body:ai(e)&&e.body!==null?$y(e):null;super(a,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});let c=new Io(t.headers||e.headers||{});if(a!=null&&!c.has("Content-Type")){let Xe=Fy(a);Xe&&c.append("Content-Type",Xe)}let h="signal"in t?t.signal:null;if(h!=null&&!Hy(h))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:g,ecdhCurve:y,family:S,honorCipherOrder:w,key:T,passphrase:v,pfx:R,rejectUnauthorized:I=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:C,secureProtocol:P,servername:Y,sessionIdContext:Se}=t;this[Ne]={method:i,redirect:t.redirect||e.redirect||"follow",headers:c,parsedURL:r,signal:h,ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:g,ecdhCurve:y,family:S,honorCipherOrder:w,key:T,passphrase:v,pfx:R,rejectUnauthorized:I,secureOptions:C,secureProtocol:P,servername:Y,sessionIdContext:Se},this.follow=t.follow!==void 0?t.follow:e.follow!==void 0?e.follow:20,this.compress=t.compress!==void 0?t.compress:e.compress!==void 0?e.compress:!0,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent}get method(){return this[Ne].method}get url(){return this[Ne].parsedURL.toString()}get headers(){return this[Ne].headers}get redirect(){return this[Ne].redirect}get signal(){return this[Ne].signal}clone(){return new s(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(e){let t=e[Ne].parsedURL,r=new Io(e[Ne].headers);if(r.has("Accept")||r.set("Accept","*/*"),!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&Dy.isStream(e.body)&&typeof e.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let i=(e.body===null||e.body===void 0)&&/^(POST|PUT)$/i.test(e.method)?"0":e.body!==null&&e.body!==void 0?qy(e):null;i&&r.set("Content-Length",i+""),r.has("User-Agent")||r.set("User-Agent",jy),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let n=typeof e.agent=="function"?e.agent(t):e.agent;!r.has("Connection")&&!n&&r.set("Connection","close");let{ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:g,key:y,passphrase:S,pfx:w,rejectUnauthorized:T,secureOptions:v,secureProtocol:R,servername:I,sessionIdContext:C}=e[Ne];return{...{auth:t.username||t.password?`${t.username}:${t.password}`:"",host:t.host,hostname:t.hostname,path:`${t.pathname}${t.search}`,port:t.port,protocol:t.protocol},method:e.method,headers:My(r),agent:n,ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:g,key:y,passphrase:S,pfx:w,rejectUnauthorized:T,secureOptions:v,secureProtocol:R,servername:I,sessionIdContext:C,timeout:e.timeout}}};Kh.exports=ci;Object.defineProperties(ci.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})});var Jh=m((ux,Xh)=>{"use strict";var vo=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(e){}};Xh.exports=vo});var Ws=m((fx,tu)=>{"use strict";var{URL:Gs}=require("url"),zy=require("http"),Gy=require("https"),ns=Sh(),{Minipass:Qh}=J(),Vy=ri(),{writeToStream:Wy,getTotalBytes:Zy}=Vy,kt=Vh(),Ao=ni(),{createHeadersLenient:eu}=Ao,Vs=Yh(),{getNodeRequestOptions:Ky}=Vs,wt=Eo(),To=Jh(),at=o(async(s,e)=>{if(/^data:/.test(s)){let t=new Vs(s,e);return Promise.resolve().then(()=>new Promise((r,i)=>{let n,a;try{let{pathname:u,search:l}=new Gs(s),f=u.split(",");if(f.length<2)throw new Error("invalid data: URI");let d=f.shift(),p=/;base64$/.test(d);n=p?d.slice(0,-7):d;let g=decodeURIComponent(f.join(",")+l);a=p?Buffer.from(g,"base64"):Buffer.from(g)}catch(u){return i(new wt(`[${t.method}] ${t.url} invalid URL, ${u.message}`,"system",u))}let{signal:c}=t;if(c&&c.aborted)return i(new To("The user aborted a request."));let h={"Content-Length":a.length};return n&&(h["Content-Type"]=n),r(new kt(a,{headers:h}))}))}return new Promise((t,r)=>{let i=new Vs(s,e),n;try{n=Ky(i)}catch(g){return r(g)}let a=(n.protocol==="https:"?Gy:zy).request,{signal:c}=i,h=null,u=o(()=>{let g=new To("The user aborted a request.");r(g),Qh.isStream(i.body)&&typeof i.body.destroy=="function"&&i.body.destroy(g),h&&h.body&&h.body.emit("error",g)},"abort");if(c&&c.aborted)return u();let l=o(()=>{u(),f()},"abortAndFinalize"),f=o(()=>{d.abort(),c&&c.removeEventListener("abort",l),clearTimeout(p)},"finalize"),d=a(n);c&&c.addEventListener("abort",l);let p=null;i.timeout&&d.once("socket",()=>{p=setTimeout(()=>{r(new wt(`network timeout at: ${i.url}`,"request-timeout")),f()},i.timeout)}),d.on("error",g=>{d.res&&d.res.emit("error",g),r(new wt(`request to ${i.url} failed, reason: ${g.message}`,"system",g)),f()}),d.on("response",g=>{clearTimeout(p);let y=eu(g.headers);if(at.isRedirect(g.statusCode)){let I=y.get("Location"),C=null;try{C=I===null?null:new Gs(I,i.url).toString()}catch{if(i.redirect!=="manual"){r(new wt(`uri requested responds with an invalid redirect URL: ${I}`,"invalid-redirect")),f();return}}if(i.redirect==="error"){r(new wt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),f();return}else if(i.redirect==="manual"){if(C!==null)try{y.set("Location",C)}catch(P){r(P)}}else if(i.redirect==="follow"&&C!==null){if(i.counter>=i.follow){r(new wt(`maximum redirect reached at: ${i.url}`,"max-redirect")),f();return}if(g.statusCode!==303&&i.body&&Zy(i)===null){r(new wt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}i.headers.set("host",new Gs(C).host);let P={headers:new Ao(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout},Y=new Gs(i.url),Se=new Gs(C);Y.hostname!==Se.hostname&&(P.headers.delete("authorization"),P.headers.delete("cookie")),(g.statusCode===303||(g.statusCode===301||g.statusCode===302)&&i.method==="POST")&&(P.method="GET",P.body=void 0,P.headers.delete("content-length")),t(at(new Vs(C,P))),f();return}}g.once("end",()=>c&&c.removeEventListener("abort",l));let S=new Qh;S.on("error",f),g.on("error",I=>S.emit("error",I)),g.on("data",I=>S.write(I)),g.on("end",()=>S.end());let w={url:i.url,status:g.statusCode,statusText:g.statusMessage,headers:y,size:i.size,timeout:i.timeout,counter:i.counter,trailer:new Promise(I=>g.on("end",()=>I(eu(g.trailers))))},T=y.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||T===null||g.statusCode===204||g.statusCode===304){h=new kt(S,w),t(h);return}let v={flush:ns.constants.Z_SYNC_FLUSH,finishFlush:ns.constants.Z_SYNC_FLUSH};if(T==="gzip"||T==="x-gzip"){let I=new ns.Gunzip(v);h=new kt(S.on("error",C=>I.emit("error",C)).pipe(I),w),t(h);return}if(T==="deflate"||T==="x-deflate"){g.once("data",I=>{let C=(I[0]&15)===8?new ns.Inflate:new ns.InflateRaw;S.on("error",P=>C.emit("error",P)).pipe(C),h=new kt(C,w),t(h)});return}if(T==="br"){try{var R=new ns.BrotliDecompress}catch(I){r(I),f();return}S.on("error",I=>R.emit("error",I)).pipe(R),h=new kt(R,w),t(h);return}h=new kt(S,w),t(h)}),Wy(d,i)})},"fetch");tu.exports=at;at.isRedirect=s=>s===301||s===302||s===303||s===307||s===308;at.Headers=Ao;at.Request=Vs;at.Response=kt;at.FetchError=wt;at.AbortError=To});var ru=m((px,su)=>{var Yy=require("dns"),Xy=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],Jy=o(s=>{let{strictSSL:e,...t}={...s};if(t.method=t.method?t.method.toUpperCase():"GET",e==null?t.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":t.rejectUnauthorized=e!==!1,!t.retry)t.retry={retries:0};else if(typeof t.retry=="string"){let r=parseInt(t.retry,10);isFinite(r)?t.retry={retries:r}:t.retry={retries:0}}else typeof t.retry=="number"?t.retry={retries:t.retry}:t.retry={retries:0,...t.retry};return t.dns={ttl:300*1e3,lookup:Yy.lookup,...t.dns},t.cache=t.cache||"default",t.cache==="default"&&Object.keys(t.headers||{}).some(i=>Xy.includes(i.toLowerCase()))&&(t.cache="no-store"),t.cacheAdditionalHeaders=t.cacheAdditionalHeaders||[],t.cacheManager&&!t.cachePath&&(t.cachePath=t.cacheManager),t},"configureOptions");su.exports=Jy});var nu=m((yx,iu)=>{"use strict";var Qy=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),eE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),tE=new Set([500,502,503,504]),sE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},rE={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function ct(s){let e=parseInt(s,10);return isFinite(e)?e:0}o(ct,"toNumberOrZero");function iE(s){return s?tE.has(s.status):!0}o(iE,"isErrorResponse");function xo(s){let e={};if(!s)return e;let t=s.trim().split(/,/);for(let r of t){let[i,n]=r.split(/=/,2);e[i.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}o(xo,"parseCacheControl");function nE(s){let e=[];for(let t in s){let r=s[t];e.push(r===!0?t:t+"="+r)}if(e.length)return e.join(", ")}o(nE,"formatCacheControl");iu.exports=class{static{o(this,"CachePolicy")}constructor(e,t,{shared:r,cacheHeuristic:i,immutableMinTimeToLive:n,ignoreCargoCult:a,_fromObject:c}={}){if(c){this._fromObject(c);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=r!==!1,this._ignoreCargoCult=!!a,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=xo(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=xo(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":nE(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())&&eE.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||Qy.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"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let t=xo(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)?this._evaluateRequestMissResult(e):t["max-age"]&&this.age()>ct(t["max-age"])?this._evaluateRequestMissResult(e):t["min-fresh"]&&this.maxAge()-this.age()<ct(t["min-fresh"])?this._evaluateRequestMissResult(e):this.stale()?"max-stale"in t&&(t["max-stale"]===!0||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 r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let r in e)sE[r]||(t[r]=e[r]);if(e.connection){let r=e.connection.trim().split(/\s*,\s*/);for(let i of r)delete t[i]}if(t.warning){let r=t.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));r.length?t.warning=r.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(){let e=this._ageValue(),t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return ct(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 ct(this._rescc["s-maxage"])}if(this._rescc["max-age"])return ct(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){let r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+ct(this._rescc["stale-if-error"]),r=e+ct(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,e,t,r)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+ct(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let e=ct(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?e.imm:24*3600*1e3,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 i=t["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));i.length?t["if-none-match"]=i.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()&&iE(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;t.status!==void 0&&t.status!=304?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(r=!0);let i={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,i),modified:t.status!=304,matches:!1};let n={};for(let c in this._resHeaders)n[c]=c in t.headers&&!rE[c]?t.headers[c]:this._resHeaders[c];let a=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,a,i),modified:!1,matches:!0}}}});var hu=m((wx,Co)=>{"use strict";Co.exports=cu;Co.exports.preferredCharsets=cu;var oE=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function aE(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=cE(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(aE,"parseAcceptCharset");function cE(s,e){var t=oE.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{charset:r,q:i,i:e}}o(cE,"parseCharset");function hE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=uE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(hE,"getCharsetPriority");function uE(s,e,t){var r=0;if(e.charset.toLowerCase()===s.toLowerCase())r|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:r}}o(uE,"specify");function cu(s,e){var t=aE(s===void 0?"*":s||"");if(!e)return t.filter(au).sort(ou).map(lE);var r=e.map(o(function(n,a){return hE(n,t,a)},"getPriority"));return r.filter(au).sort(ou).map(o(function(n){return e[r.indexOf(n)]},"getCharset"))}o(cu,"preferredCharsets");function ou(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(ou,"compareSpecs");function lE(s){return s.charset}o(lE,"getFullCharset");function au(s){return s.q>0}o(au,"isQuality")});var du=m((_x,Bo)=>{"use strict";Bo.exports=fu;Bo.exports.preferredEncodings=fu;var fE=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function dE(s){for(var e=s.split(","),t=!1,r=1,i=0,n=0;i<e.length;i++){var a=pE(e[i].trim(),i);a&&(e[n++]=a,t=t||lu("identity",a),r=Math.min(r,a.q||1))}return t||(e[n++]={encoding:"identity",q:r,i}),e.length=n,e}o(dE,"parseAcceptEncoding");function pE(s,e){var t=fE.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{encoding:r,q:i,i:e}}o(pE,"parseEncoding");function mE(s,e,t){for(var r={encoding:s,o:-1,q:0,s:0},i=0;i<e.length;i++){var n=lu(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(mE,"getEncodingPriority");function lu(s,e,t){var r=0;if(e.encoding.toLowerCase()===s.toLowerCase())r|=1;else if(e.encoding!=="*")return null;return{encoding:s,i:t,o:e.i,q:e.q,s:r}}o(lu,"specify");function fu(s,e,t){var r=dE(s||""),i=t?o(function(c,h){if(c.q!==h.q)return h.q-c.q;var u=t.indexOf(c.encoding),l=t.indexOf(h.encoding);return u===-1&&l===-1?h.s-c.s||c.o-h.o||c.i-h.i:u!==-1&&l!==-1?u-l:u===-1?1:-1},"comparator"):gE;if(!e)return r.filter(uu).sort(i).map(yE);var n=e.map(o(function(c,h){return mE(c,r,h)},"getPriority"));return n.filter(uu).sort(i).map(o(function(c){return e[n.indexOf(c)]},"getEncoding"))}o(fu,"preferredEncodings");function gE(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i}o(gE,"compareSpecs");function yE(s){return s.encoding}o(yE,"getFullEncoding");function uu(s){return s.q>0}o(uu,"isQuality")});var Eu=m((Rx,No)=>{"use strict";No.exports=yu;No.exports.preferredLanguages=yu;var EE=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function wE(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=gu(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(wE,"parseAcceptLanguage");function gu(s,e){var t=EE.exec(s);if(!t)return null;var r=t[1],i=t[2],n=r;i&&(n+="-"+i);var a=1;if(t[3])for(var c=t[3].split(";"),h=0;h<c.length;h++){var u=c[h].split("=");u[0]==="q"&&(a=parseFloat(u[1]))}return{prefix:r,suffix:i,q:a,i:e,full:n}}o(gu,"parseLanguage");function SE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=_E(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(SE,"getLanguagePriority");function _E(s,e,t){var r=gu(s);if(!r)return null;var i=0;if(e.full.toLowerCase()===r.full.toLowerCase())i|=4;else if(e.prefix.toLowerCase()===r.full.toLowerCase())i|=2;else if(e.full.toLowerCase()===r.prefix.toLowerCase())i|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}o(_E,"specify");function yu(s,e){var t=wE(s===void 0?"*":s||"");if(!e)return t.filter(mu).sort(pu).map(bE);var r=e.map(o(function(n,a){return SE(n,t,a)},"getPriority"));return r.filter(mu).sort(pu).map(o(function(n){return e[r.indexOf(n)]},"getLanguage"))}o(yu,"preferredLanguages");function pu(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(pu,"compareSpecs");function bE(s){return s.full}o(bE,"getFullLanguage");function mu(s){return s.q>0}o(mu,"isQuality")});var Ou=m((Ix,Po)=>{"use strict";Po.exports=bu;Po.exports.preferredMediaTypes=bu;var RE=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function OE(s){for(var e=xE(s),t=0,r=0;t<e.length;t++){var i=_u(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(OE,"parseAccept");function _u(s,e){var t=RE.exec(s);if(!t)return null;var r=Object.create(null),i=1,n=t[2],a=t[1];if(t[3])for(var c=CE(t[3]).map(AE),h=0;h<c.length;h++){var u=c[h],l=u[0].toLowerCase(),f=u[1],d=f&&f[0]==='"'&&f[f.length-1]==='"'?f.slice(1,-1):f;if(l==="q"){i=parseFloat(d);break}r[l]=d}return{type:a,subtype:n,params:r,q:i,i:e}}o(_u,"parseMediaType");function IE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=vE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(IE,"getMediaTypePriority");function vE(s,e,t){var r=_u(s),i=0;if(!r)return null;if(e.type.toLowerCase()==r.type.toLowerCase())i|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==r.subtype.toLowerCase())i|=2;else if(e.subtype!="*")return null;var n=Object.keys(e.params);if(n.length>0)if(n.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(r.params[a]||"").toLowerCase()}))i|=1;else return null;return{i:t,o:e.i,q:e.q,s:i}}o(vE,"specify");function bu(s,e){var t=OE(s===void 0?"*/*":s||"");if(!e)return t.filter(Su).sort(wu).map(TE);var r=e.map(o(function(n,a){return IE(n,t,a)},"getPriority"));return r.filter(Su).sort(wu).map(o(function(n){return e[r.indexOf(n)]},"getType"))}o(bu,"preferredMediaTypes");function wu(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(wu,"compareSpecs");function TE(s){return s.type+"/"+s.subtype}o(TE,"getFullType");function Su(s){return s.q>0}o(Su,"isQuality");function Ru(s){for(var e=0,t=0;(t=s.indexOf('"',t))!==-1;)e++,t++;return e}o(Ru,"quoteCount");function AE(s){var e=s.indexOf("="),t,r;return e===-1?t=s:(t=s.slice(0,e),r=s.slice(e+1)),[t,r]}o(AE,"splitKeyValuePair");function xE(s){for(var e=s.split(","),t=1,r=0;t<e.length;t++)Ru(e[r])%2==0?e[++r]=e[t]:e[r]+=","+e[t];return e.length=r+1,e}o(xE,"splitMediaTypes");function CE(s){for(var e=s.split(";"),t=1,r=0;t<e.length;t++)Ru(e[r])%2==0?e[++r]=e[t]:e[r]+=";"+e[t];e.length=r+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}o(CE,"splitParameters")});var Iu=m((Tx,Lo)=>{"use strict";var BE=hu(),NE=du(),PE=Eu(),LE=Ou();Lo.exports=k;Lo.exports.Negotiator=k;function k(s){if(!(this instanceof k))return new k(s);this.request=s}o(k,"Negotiator");k.prototype.charset=o(function(e){var t=this.charsets(e);return t&&t[0]},"charset");k.prototype.charsets=o(function(e){return BE(this.request.headers["accept-charset"],e)},"charsets");k.prototype.encoding=o(function(e,t){var r=this.encodings(e,t);return r&&r[0]},"encoding");k.prototype.encodings=o(function(e,t){var r=t||{};return NE(this.request.headers["accept-encoding"],e,r.preferred)},"encodings");k.prototype.language=o(function(e){var t=this.languages(e);return t&&t[0]},"language");k.prototype.languages=o(function(e){return PE(this.request.headers["accept-language"],e)},"languages");k.prototype.mediaType=o(function(e){var t=this.mediaTypes(e);return t&&t[0]},"mediaType");k.prototype.mediaTypes=o(function(e){return LE(this.request.headers.accept,e)},"mediaTypes");k.prototype.preferredCharset=k.prototype.charset;k.prototype.preferredCharsets=k.prototype.charsets;k.prototype.preferredEncoding=k.prototype.encoding;k.prototype.preferredEncodings=k.prototype.encodings;k.prototype.preferredLanguage=k.prototype.language;k.prototype.preferredLanguages=k.prototype.languages;k.prototype.preferredMediaType=k.prototype.mediaType;k.prototype.preferredMediaTypes=k.prototype.mediaTypes});var St=m((xx,qe)=>{"use strict";var Ks=require("crypto"),{Minipass:kE}=J(),Do=["sha512","sha384","sha256"],$o=["sha512"],DE=/^[a-z0-9+/]+(?:=?=?)$/i,ME=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,$E=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,FE=/^[\x21-\x7E]+$/,Ys=o(s=>s?.length?`?${s.join("?")}`:"","getOptString"),Mo=class extends kE{static{o(this,"IntegrityStream")}#e;#t;#s;constructor(e){super(),this.size=0,this.opts=e,this.#r(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...$o],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(Ks.createHash)}#r(){this.sri=this.opts?.integrity?me(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=Ys(this.opts?.options)}on(e,t){return e==="size"&&this.#t?t(this.#t):e==="integrity"&&this.#e?t(this.#e):e==="verified"&&this.#s?t(this.#s):super.on(e,t)}emit(e,t){return e==="end"&&this.#i(),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}#i(){this.goodSri||this.#r();let e=me(this.hashes.map((r,i)=>`${this.algorithms[i]}-${r.digest("base64")}${this.optString}`).join(" "),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let r=new Error(`stream size mismatch when checking ${this.sri}.
|
|
6
|
+
"use strict";var dh=Object.defineProperty;var o=(s,e)=>dh(s,"name",{value:e,configurable:!0});var Qg=(s,e)=>()=>(s&&(e=s(s=0)),e);var m=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),ey=(s,e)=>{for(var t in e)dh(s,t,{get:e[t],enumerable:!0})};var J=m(ie=>{"use strict";var ty=ie&&ie.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ie,"__esModule",{value:!0});ie.Minipass=ie.isWritable=ie.isReadable=ie.isStream=void 0;var ph=typeof process=="object"&&process?process:{stdout:null,stderr:null},Kn=require("node:events"),Eh=ty(require("node:stream")),sy=require("node:string_decoder"),ry=o(s=>!!s&&typeof s=="object"&&(s instanceof Vr||s instanceof Eh.default||(0,ie.isReadable)(s)||(0,ie.isWritable)(s)),"isStream");ie.isStream=ry;var iy=o(s=>!!s&&typeof s=="object"&&s instanceof Kn.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==Eh.default.Writable.prototype.pipe,"isReadable");ie.isReadable=iy;var ny=o(s=>!!s&&typeof s=="object"&&s instanceof Kn.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function","isWritable");ie.isWritable=ny;var Je=Symbol("EOF"),Qe=Symbol("maybeEmitEnd"),yt=Symbol("emittedEnd"),qr=Symbol("emittingEnd"),Ls=Symbol("emittedError"),Ur=Symbol("closed"),mh=Symbol("read"),jr=Symbol("flush"),gh=Symbol("flushChunk"),Be=Symbol("encoding"),es=Symbol("decoder"),z=Symbol("flowing"),ks=Symbol("paused"),ts=Symbol("resume"),G=Symbol("buffer"),re=Symbol("pipes"),V=Symbol("bufferLength"),Hn=Symbol("bufferPush"),Hr=Symbol("bufferShift"),X=Symbol("objectMode"),j=Symbol("destroyed"),zn=Symbol("error"),Gn=Symbol("emitData"),yh=Symbol("emitEnd"),Vn=Symbol("emitEnd2"),De=Symbol("async"),Wn=Symbol("abort"),zr=Symbol("aborted"),Ds=Symbol("signal"),xt=Symbol("dataListeners"),pe=Symbol("discarded"),Ms=o(s=>Promise.resolve().then(s),"defer"),oy=o(s=>s(),"nodefer"),ay=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),cy=o(s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBufferLike"),hy=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),Gr=class{static{o(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[ts](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Zn=class extends Gr{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},uy=o(s=>!!s.objectMode,"isObjectModeOptions"),ly=o(s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer","isEncodingOptions"),Vr=class extends Kn.EventEmitter{static{o(this,"Minipass")}[z]=!1;[ks]=!1;[re]=[];[G]=[];[X];[Be];[De];[es];[Je]=!1;[yt]=!1;[qr]=!1;[Ur]=!1;[Ls]=null;[V]=0;[j]=!1;[Ds];[zr]=!1;[xt]=0;[pe]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");uy(t)?(this[X]=!0,this[Be]=null):ly(t)?(this[Be]=t.encoding,this[X]=!1):(this[X]=!1,this[Be]=null),this[De]=!!t.async,this[es]=this[Be]?new sy.StringDecoder(this[Be]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:o(()=>this[G],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:o(()=>this[re],"get")});let{signal:r}=t;r&&(this[Ds]=r,r.aborted?this[Wn]():r.addEventListener("abort",()=>this[Wn]()))}get bufferLength(){return this[V]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[X]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[De]}set async(e){this[De]=this[De]||!!e}[Wn](){this[zr]=!0,this.emit("abort",this[Ds]?.reason),this.destroy(this[Ds]?.reason)}get aborted(){return this[zr]}set aborted(e){}write(e,t,r){if(this[zr])return!1;if(this[Je])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=this[De]?Ms:oy;if(!this[X]&&!Buffer.isBuffer(e)){if(hy(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(cy(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[X]?(this[z]&&this[V]!==0&&this[jr](!0),this[z]?this.emit("data",e):this[Hn](e),this[V]!==0&&this.emit("readable"),r&&i(r),this[z]):e.length?(typeof e=="string"&&!(t===this[Be]&&!this[es]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Be]&&(e=this[es].write(e)),this[z]&&this[V]!==0&&this[jr](!0),this[z]?this.emit("data",e):this[Hn](e),this[V]!==0&&this.emit("readable"),r&&i(r),this[z]):(this[V]!==0&&this.emit("readable"),r&&i(r),this[z])}read(e){if(this[j])return null;if(this[pe]=!1,this[V]===0||e===0||e&&e>this[V])return this[Qe](),null;this[X]&&(e=null),this[G].length>1&&!this[X]&&(this[G]=[this[Be]?this[G].join(""):Buffer.concat(this[G],this[V])]);let t=this[mh](e||null,this[G][0]);return this[Qe](),t}[mh](e,t){if(this[X])this[Hr]();else{let r=t;e===r.length||e===null?this[Hr]():typeof r=="string"?(this[G][0]=r.slice(e),t=r.slice(0,e),this[V]-=e):(this[G][0]=r.subarray(e),t=r.subarray(0,e),this[V]-=e)}return this.emit("data",t),!this[G].length&&!this[Je]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t="utf8"),e!==void 0&&this.write(e,t),r&&this.once("end",r),this[Je]=!0,this.writable=!1,(this[z]||!this[ks])&&this[Qe](),this}[ts](){this[j]||(!this[xt]&&!this[re].length&&(this[pe]=!0),this[ks]=!1,this[z]=!0,this.emit("resume"),this[G].length?this[jr]():this[Je]?this[Qe]():this.emit("drain"))}resume(){return this[ts]()}pause(){this[z]=!1,this[ks]=!0,this[pe]=!1}get destroyed(){return this[j]}get flowing(){return this[z]}get paused(){return this[ks]}[Hn](e){this[X]?this[V]+=1:this[V]+=e.length,this[G].push(e)}[Hr](){return this[X]?this[V]-=1:this[V]-=this[G][0].length,this[G].shift()}[jr](e=!1){do;while(this[gh](this[Hr]())&&this[G].length);!e&&!this[G].length&&!this[Je]&&this.emit("drain")}[gh](e){return this.emit("data",e),this[z]}pipe(e,t){if(this[j])return e;this[pe]=!1;let r=this[yt];return t=t||{},e===ph.stdout||e===ph.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[re].push(t.proxyErrors?new Zn(this,e,t):new Gr(this,e,t)),this[De]?Ms(()=>this[ts]()):this[ts]()),e}unpipe(e){let t=this[re].find(r=>r.dest===e);t&&(this[re].length===1?(this[z]&&this[xt]===0&&(this[z]=!1),this[re]=[]):this[re].splice(this[re].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);if(e==="data")this[pe]=!1,this[xt]++,!this[re].length&&!this[z]&&this[ts]();else if(e==="readable"&&this[V]!==0)super.emit("readable");else if(ay(e)&&this[yt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ls]){let i=t;this[De]?Ms(()=>i.call(this,this[Ls])):i.call(this,this[Ls])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){let r=super.off(e,t);return e==="data"&&(this[xt]=this.listeners("data").length,this[xt]===0&&!this[pe]&&!this[re].length&&(this[z]=!1)),r}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[xt]=0,!this[pe]&&!this[re].length&&(this[z]=!1)),t}get emittedEnd(){return this[yt]}[Qe](){!this[qr]&&!this[yt]&&!this[j]&&this[G].length===0&&this[Je]&&(this[qr]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ur]&&this.emit("close"),this[qr]=!1)}emit(e,...t){let r=t[0];if(e!=="error"&&e!=="close"&&e!==j&&this[j])return!1;if(e==="data")return!this[X]&&!r?!1:this[De]?(Ms(()=>this[Gn](r)),!0):this[Gn](r);if(e==="end")return this[yh]();if(e==="close"){if(this[Ur]=!0,!this[yt]&&!this[j])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Ls]=r,super.emit(zn,r);let n=!this[Ds]||this.listeners("error").length?super.emit("error",r):!1;return this[Qe](),n}else if(e==="resume"){let n=super.emit("resume");return this[Qe](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let i=super.emit(e,...t);return this[Qe](),i}[Gn](e){for(let r of this[re])r.dest.write(e)===!1&&this.pause();let t=this[pe]?!1:super.emit("data",e);return this[Qe](),t}[yh](){return this[yt]?!1:(this[yt]=!0,this.readable=!1,this[De]?(Ms(()=>this[Vn]()),!0):this[Vn]())}[Vn](){if(this[es]){let t=this[es].end();if(t){for(let r of this[re])r.dest.write(t);this[pe]||super.emit("data",t)}}for(let t of this[re])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[X]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[X]||(e.dataLength+=r.length)}),await t,e}async concat(){if(this[X])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(j,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[pe]=!1;let e=!1,t=o(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:o(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Je])return t();let n,a,c=o(f=>{this.off("data",h),this.off("end",u),this.off(j,l),t(),a(f)},"onerr"),h=o(f=>{this.off("error",c),this.off("end",u),this.off(j,l),this.pause(),n({value:f,done:!!this[Je]})},"ondata"),u=o(()=>{this.off("error",c),this.off("data",h),this.off(j,l),t(),n({done:!0,value:void 0})},"onend"),l=o(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((f,d)=>{a=d,n=f,this.once(j,l),this.once("error",c),this.once("end",u),this.once("data",h)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[pe]=!1;let e=!1,t=o(()=>(this.pause(),this.off(zn,t),this.off(j,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),r=o(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(zn,t),this.once(j,t),{next:r,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[j])return e?this.emit("error",e):this.emit(j),this;this[j]=!0,this[pe]=!0,this[G].length=0,this[V]=0;let t=this;return typeof t.close=="function"&&!this[Ur]&&t.close(),e?this.emit("error",e):this.emit(j),this}static get isStream(){return ie.isStream}};ie.Minipass=Vr});var Yn=m(ss=>{"use strict";var fy=ss&&ss.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ss,"__esModule",{value:!0});ss.constants=void 0;var dy=fy(require("zlib")),py=dy.default.constants||{ZLIB_VERNUM:4736};ss.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},py))});var _h=m(B=>{"use strict";var my=B&&B.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),gy=B&&B.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),yy=B&&B.__importStar||(function(){var s=o(function(e){return s=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},s(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=s(e),i=0;i<r.length;i++)r[i]!=="default"&&my(t,e,r[i]);return gy(t,e),t}})(),Ey=B&&B.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(B,"__esModule",{value:!0});B.ZstdDecompress=B.ZstdCompress=B.BrotliDecompress=B.BrotliCompress=B.Unzip=B.InflateRaw=B.DeflateRaw=B.Gunzip=B.Gzip=B.Inflate=B.Deflate=B.Zlib=B.ZlibError=B.constants=void 0;var Qn=Ey(require("assert")),Ct=require("buffer"),wy=J(),wh=yy(require("zlib")),Me=Yn(),Sy=Yn();Object.defineProperty(B,"constants",{enumerable:!0,get:o(function(){return Sy.constants},"get")});var _y=Ct.Buffer.concat,Sh=Object.getOwnPropertyDescriptor(Ct.Buffer,"concat"),by=o(s=>s,"noop"),Xn=Sh?.writable===!0||Sh?.set!==void 0?s=>{Ct.Buffer.concat=s?by:_y}:s=>{},Bt=Symbol("_superWrite"),Nt=class extends Error{static{o(this,"ZlibError")}code;errno;constructor(e,t){super("zlib: "+e.message,{cause:e}),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,t??this.constructor)}get name(){return"ZlibError"}};B.ZlibError=Nt;var Jn=Symbol("flushFlag"),$s=class extends wy.Minipass{static{o(this,"ZlibBase")}#e=!1;#t=!1;#s;#r;#i;#a;#l;get sawError(){return this.#e}get handle(){return this.#a}get flushFlag(){return this.#s}constructor(e,t){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(e),this.#s=e.flush??0,this.#r=e.finishFlush??0,this.#i=e.fullFlushFlag??0,typeof wh[t]!="function")throw new TypeError("Compression method not supported: "+t);try{this.#a=new wh[t](e)}catch(r){throw new Nt(r,this.constructor)}this.#l=r=>{this.#e||(this.#e=!0,this.close(),this.emit("error",r))},this.#a?.on("error",r=>this.#l(new Nt(r))),this.once("end",()=>this.close)}close(){this.#a&&(this.#a.close(),this.#a=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,Qn.default)(this.#a,"zlib binding closed"),this.#a.reset?.()}flush(e){this.ended||(typeof e!="number"&&(e=this.#i),this.write(Object.assign(Ct.Buffer.alloc(0),{[Jn]:e})))}end(e,t,r){return typeof e=="function"&&(r=e,t=void 0,e=void 0),typeof t=="function"&&(r=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(r)}get ended(){return this.#t}[Bt](e){return super.write(e)}write(e,t,r){if(typeof t=="function"&&(r=t,t="utf8"),typeof e=="string"&&(e=Ct.Buffer.from(e,t)),this.#e)return;(0,Qn.default)(this.#a,"zlib binding closed");let i=this.#a._handle,n=i.close;i.close=()=>{};let a=this.#a.close;this.#a.close=()=>{},Xn(!0);let c;try{let u=typeof e[Jn]=="number"?e[Jn]:this.#s;c=this.#a._processChunk(e,u),Xn(!1)}catch(u){Xn(!1),this.#l(new Nt(u,this.write))}finally{this.#a&&(this.#a._handle=i,i.close=n,this.#a.close=a,this.#a.removeAllListeners("error"))}this.#a&&this.#a.on("error",u=>this.#l(new Nt(u,this.write)));let h;if(c)if(Array.isArray(c)&&c.length>0){let u=c[0];h=this[Bt](Ct.Buffer.from(u));for(let l=1;l<c.length;l++)h=this[Bt](c[l])}else h=this[Bt](Ct.Buffer.from(c));return r&&r(),h}},$e=class extends $s{static{o(this,"Zlib")}#e;#t;constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.Z_NO_FLUSH,e.finishFlush=e.finishFlush||Me.constants.Z_FINISH,e.fullFlushFlag=Me.constants.Z_FULL_FLUSH,super(e,t),this.#e=e.level,this.#t=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==e||this.#t!==t){this.flush(Me.constants.Z_SYNC_FLUSH),(0,Qn.default)(this.handle,"zlib binding closed");let r=this.handle.flush;this.handle.flush=(i,n)=>{typeof i=="function"&&(n=i,i=this.flushFlag),this.flush(i),n?.()};try{this.handle.params(e,t)}finally{this.handle.flush=r}this.handle&&(this.#e=e,this.#t=t)}}}};B.Zlib=$e;var eo=class extends $e{static{o(this,"Deflate")}constructor(e){super(e,"Deflate")}};B.Deflate=eo;var to=class extends $e{static{o(this,"Inflate")}constructor(e){super(e,"Inflate")}};B.Inflate=to;var so=class extends $e{static{o(this,"Gzip")}#e;constructor(e){super(e,"Gzip"),this.#e=e&&!!e.portable}[Bt](e){return this.#e?(this.#e=!1,e[9]=255,super[Bt](e)):super[Bt](e)}};B.Gzip=so;var ro=class extends $e{static{o(this,"Gunzip")}constructor(e){super(e,"Gunzip")}};B.Gunzip=ro;var io=class extends $e{static{o(this,"DeflateRaw")}constructor(e){super(e,"DeflateRaw")}};B.DeflateRaw=io;var no=class extends $e{static{o(this,"InflateRaw")}constructor(e){super(e,"InflateRaw")}};B.InflateRaw=no;var oo=class extends $e{static{o(this,"Unzip")}constructor(e){super(e,"Unzip")}};B.Unzip=oo;var Wr=class extends $s{static{o(this,"Brotli")}constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Me.constants.BROTLI_OPERATION_FINISH,e.fullFlushFlag=Me.constants.BROTLI_OPERATION_FLUSH,super(e,t)}},ao=class extends Wr{static{o(this,"BrotliCompress")}constructor(e){super(e,"BrotliCompress")}};B.BrotliCompress=ao;var co=class extends Wr{static{o(this,"BrotliDecompress")}constructor(e){super(e,"BrotliDecompress")}};B.BrotliDecompress=co;var Zr=class extends $s{static{o(this,"Zstd")}constructor(e,t){e=e||{},e.flush=e.flush||Me.constants.ZSTD_e_continue,e.finishFlush=e.finishFlush||Me.constants.ZSTD_e_end,e.fullFlushFlag=Me.constants.ZSTD_e_flush,super(e,t)}},ho=class extends Zr{static{o(this,"ZstdCompress")}constructor(e){super(e,"ZstdCompress")}};B.ZstdCompress=ho;var uo=class extends Zr{static{o(this,"ZstdDecompress")}constructor(e){super(e,"ZstdDecompress")}};B.ZstdDecompress=uo});var ei=m((ZA,Ch)=>{"use strict";var bh=typeof process=="object"&&process?process:{stdout:null,stderr:null},Ry=require("events"),Rh=require("stream"),Oh=require("string_decoder").StringDecoder,et=Symbol("EOF"),tt=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Kr=Symbol("emittingEnd"),Fs=Symbol("emittedError"),Yr=Symbol("closed"),Ih=Symbol("read"),Xr=Symbol("flush"),vh=Symbol("flushChunk"),ce=Symbol("encoding"),st=Symbol("decoder"),Jr=Symbol("flowing"),qs=Symbol("paused"),rs=Symbol("resume"),W=Symbol("bufferLength"),lo=Symbol("bufferPush"),fo=Symbol("bufferShift"),Q=Symbol("objectMode"),ee=Symbol("destroyed"),po=Symbol("emitData"),Th=Symbol("emitEnd"),mo=Symbol("emitEnd2"),rt=Symbol("async"),Us=o(s=>Promise.resolve().then(s),"defer"),Ah=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Oy=Ah&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Iy=Ah&&Symbol.iterator||Symbol("iterator not implemented"),vy=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),Ty=o(s=>s instanceof ArrayBuffer||typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBuffer"),Ay=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),Qr=class{static{o(this,"Pipe")}constructor(e,t,r){this.src=e,this.dest=t,this.opts=r,this.ondrain=()=>e[rs](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},go=class extends Qr{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,r){super(e,t,r),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}};Ch.exports=class xh extends Rh{static{o(this,"Minipass")}constructor(e){super(),this[Jr]=!1,this[qs]=!1,this.pipes=[],this.buffer=[],this[Q]=e&&e.objectMode||!1,this[Q]?this[ce]=null:this[ce]=e&&e.encoding||null,this[ce]==="buffer"&&(this[ce]=null),this[rt]=e&&!!e.async||!1,this[st]=this[ce]?new Oh(this[ce]):null,this[et]=!1,this[Et]=!1,this[Kr]=!1,this[Yr]=!1,this[Fs]=null,this.writable=!0,this.readable=!0,this[W]=0,this[ee]=!1}get bufferLength(){return this[W]}get encoding(){return this[ce]}set encoding(e){if(this[Q])throw new Error("cannot set encoding in objectMode");if(this[ce]&&e!==this[ce]&&(this[st]&&this[st].lastNeed||this[W]))throw new Error("cannot change encoding");this[ce]!==e&&(this[st]=e?new Oh(e):null,this.buffer.length&&(this.buffer=this.buffer.map(t=>this[st].write(t)))),this[ce]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Q]}set objectMode(e){this[Q]=this[Q]||!!e}get async(){return this[rt]}set async(e){this[rt]=this[rt]||!!e}write(e,t,r){if(this[et])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=this[rt]?Us:n=>n();return!this[Q]&&!Buffer.isBuffer(e)&&(Ay(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Ty(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Q]?(this.flowing&&this[W]!==0&&this[Xr](!0),this.flowing?this.emit("data",e):this[lo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing):e.length?(typeof e=="string"&&!(t===this[ce]&&!this[st].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ce]&&(e=this[st].write(e)),this.flowing&&this[W]!==0&&this[Xr](!0),this.flowing?this.emit("data",e):this[lo](e),this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing):(this[W]!==0&&this.emit("readable"),r&&i(r),this.flowing)}read(e){if(this[ee])return null;if(this[W]===0||e===0||e>this[W])return this[tt](),null;this[Q]&&(e=null),this.buffer.length>1&&!this[Q]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[W])]);let t=this[Ih](e||null,this.buffer[0]);return this[tt](),t}[Ih](e,t){return e===t.length||e===null?this[fo]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[W]-=e),this.emit("data",t),!this.buffer.length&&!this[et]&&this.emit("drain"),t}end(e,t,r){return typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t),r&&this.once("end",r),this[et]=!0,this.writable=!1,(this.flowing||!this[qs])&&this[tt](),this}[rs](){this[ee]||(this[qs]=!1,this[Jr]=!0,this.emit("resume"),this.buffer.length?this[Xr]():this[et]?this[tt]():this.emit("drain"))}resume(){return this[rs]()}pause(){this[Jr]=!1,this[qs]=!0}get destroyed(){return this[ee]}get flowing(){return this[Jr]}get paused(){return this[qs]}[lo](e){this[Q]?this[W]+=1:this[W]+=e.length,this.buffer.push(e)}[fo](){return this.buffer.length&&(this[Q]?this[W]-=1:this[W]-=this.buffer[0].length),this.buffer.shift()}[Xr](e){do;while(this[vh](this[fo]()));!e&&!this.buffer.length&&!this[et]&&this.emit("drain")}[vh](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,t){if(this[ee])return;let r=this[Et];return t=t||{},e===bh.stdout||e===bh.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this.pipes.push(t.proxyErrors?new go(this,e,t):new Qr(this,e,t)),this[rt]?Us(()=>this[rs]()):this[rs]()),e}unpipe(e){let t=this.pipes.find(r=>r.dest===e);t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let r=super.on(e,t);return e==="data"&&!this.pipes.length&&!this.flowing?this[rs]():e==="readable"&&this[W]!==0?super.emit("readable"):vy(e)&&this[Et]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Fs]&&(this[rt]?Us(()=>t.call(this,this[Fs])):t.call(this,this[Fs])),r}get emittedEnd(){return this[Et]}[tt](){!this[Kr]&&!this[Et]&&!this[ee]&&this.buffer.length===0&&this[et]&&(this[Kr]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Yr]&&this.emit("close"),this[Kr]=!1)}emit(e,t,...r){if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return;if(e==="data")return t?this[rt]?Us(()=>this[po](t)):this[po](t):!1;if(e==="end")return this[Th]();if(e==="close"){if(this[Yr]=!0,!this[Et]&&!this[ee])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Fs]=t;let n=super.emit("error",t);return this[tt](),n}else if(e==="resume"){let n=super.emit("resume");return this[tt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let i=super.emit(e,t,...r);return this[tt](),i}[po](e){for(let r of this.pipes)r.dest.write(e)===!1&&this.pause();let t=super.emit("data",e);return this[tt](),t}[Th](){this[Et]||(this[Et]=!0,this.readable=!1,this[rt]?Us(()=>this[mo]()):this[mo]())}[mo](){if(this[st]){let t=this[st].end();if(t){for(let r of this.pipes)r.dest.write(t);super.emit("data",t)}}for(let t of this.pipes)t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Q]||(e.dataLength=0);let t=this.promise();return this.on("data",r=>{e.push(r),this[Q]||(e.dataLength+=r.length)}),t.then(()=>e)}concat(){return this[Q]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Q]?Promise.reject(new Error("cannot concat in objectMode")):this[ce]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(ee,()=>t(new Error("stream destroyed"))),this.on("error",r=>t(r)),this.on("end",()=>e())})}[Oy](){return{next:o(()=>{let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[et])return Promise.resolve({done:!0});let r=null,i=null,n=o(u=>{this.removeListener("data",a),this.removeListener("end",c),i(u)},"onerr"),a=o(u=>{this.removeListener("error",n),this.removeListener("end",c),this.pause(),r({value:u,done:!!this[et]})},"ondata"),c=o(()=>{this.removeListener("error",n),this.removeListener("data",a),r({done:!0})},"onend"),h=o(()=>n(new Error("stream destroyed")),"ondestroy");return new Promise((u,l)=>{i=l,r=u,this.once(ee,h),this.once("error",n),this.once("end",c),this.once("data",a)})},"next")}}[Iy](){return{next:o(()=>{let t=this.read();return{value:t,done:t===null}},"next")}}destroy(e){return this[ee]?(e?this.emit("error",e):this.emit(ee),this):(this[ee]=!0,this.buffer.length=0,this[W]=0,typeof this.close=="function"&&!this[Yr]&&this.close(),e?this.emit("error",e):this.emit(ee),this)}static isStream(e){return!!e&&(e instanceof xh||e instanceof Rh||e instanceof Ry&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Nh=m((YA,Bh)=>{var xy=ei(),js=class extends Error{static{o(this,"SizeError")}constructor(e,t){super(`Bad data size: expected ${t} bytes, but got ${e}`),this.expect=t,this.found=e,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},ti=class extends xy{static{o(this,"MinipassSized")}constructor(e={}){if(super(e),e.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=e.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(e,t,r){let i=Buffer.isBuffer(e)?e:typeof e=="string"?Buffer.from(e,typeof t=="string"?t:"utf8"):e;return Buffer.isBuffer(i)?(this.found+=i.length,this.found>this.expect&&this.emit("error",new js(this.found,this.expect)),super.write(e,t,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(e,...t){return e==="end"&&this.found!==this.expect&&this.emit("error",new js(this.found,this.expect)),super.emit(e,...t)}};ti.SizeError=js;Bh.exports=ti});var Lh=m((JA,Ph)=>{"use strict";var{Minipass:Cy}=J(),yo=Symbol("type"),it=Symbol("buffer"),si=class s{static{o(this,"Blob")}constructor(e,t){this[yo]="";let r=[],i=0;if(e){let a=e,c=Number(a.length);for(let h=0;h<c;h++){let u=a[h],l=u instanceof Buffer?u:ArrayBuffer.isView(u)?Buffer.from(u.buffer,u.byteOffset,u.byteLength):u instanceof ArrayBuffer?Buffer.from(u):u instanceof s?u[it]:typeof u=="string"?Buffer.from(u):Buffer.from(String(u));i+=l.length,r.push(l)}}this[it]=Buffer.concat(r,i);let n=t&&t.type!==void 0&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[yo]=n)}get size(){return this[it].length}get type(){return this[yo]}text(){return Promise.resolve(this[it].toString())}arrayBuffer(){let e=this[it],t=e.byteOffset,r=e.byteLength,i=e.buffer.slice(t,t+r);return Promise.resolve(i)}stream(){return new Cy().end(this[it])}slice(e,t,r){let i=this.size,n=e===void 0?0:e<0?Math.max(i+e,0):Math.min(e,i),a=t===void 0?i:t<0?Math.max(i+t,0):Math.min(t,i),c=Math.max(a-n,0),u=this[it].slice(n,n+c),l=new s([],{type:r});return l[it]=u,l}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return it}};Object.defineProperties(si.prototype,{size:{enumerable:!0},type:{enumerable:!0}});Ph.exports=si});var wo=m((ex,kh)=>{"use strict";var Eo=class extends Error{static{o(this,"FetchError")}constructor(e,t,r){super(e),this.code="FETCH_ERROR",r&&Object.assign(this,r),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":t,this.message=e,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(e){}get[Symbol.toStringTag](){return"FetchError"}};kh.exports=Eo});var Mh=m((sx,Dh)=>{"use strict";Dh.exports={}});var ii=m((rx,qh)=>{"use strict";var{Minipass:Fe}=J(),So=Nh(),Fh=Lh(),{BUFFER:By}=Fh,Hs=wo(),_o;try{_o=Mh().convert}catch{}var nt=Symbol("Body internals"),Pt=Symbol("consumeBody"),ri=class{static{o(this,"Body")}constructor(e,t={}){let{size:r=0,timeout:i=0}=t,n=e==null?null:$h(e)?Buffer.from(e.toString()):zs(e)||Buffer.isBuffer(e)?e:Object.prototype.toString.call(e)==="[object ArrayBuffer]"?Buffer.from(e):ArrayBuffer.isView(e)?Buffer.from(e.buffer,e.byteOffset,e.byteLength):Fe.isStream(e)?e:Buffer.from(String(e));this[nt]={body:n,disturbed:!1,error:null},this.size=r,this.timeout=i,Fe.isStream(n)&&n.on("error",a=>{let c=a.name==="AbortError"?a:new Hs(`Invalid response while trying to fetch ${this.url}: ${a.message}`,"system",a);this[nt].error=c})}get body(){return this[nt].body}get bodyUsed(){return this[nt].disturbed}arrayBuffer(){return this[Pt]().then(e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}blob(){let e=this.headers&&this.headers.get("content-type")||"";return this[Pt]().then(t=>Object.assign(new Fh([],{type:e.toLowerCase()}),{[By]:t}))}async json(){let e=await this[Pt]();try{return JSON.parse(e.toString())}catch(t){throw new Hs(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}text(){return this[Pt]().then(e=>e.toString())}buffer(){return this[Pt]()}textConverted(){return this[Pt]().then(e=>Ny(e,this.headers))}[Pt](){if(this[nt].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[nt].disturbed=!0,this[nt].error)return Promise.reject(this[nt].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let e=zs(this.body)?this.body.stream():this.body;if(!Fe.isStream(e))return Promise.resolve(Buffer.alloc(0));let t=this.size&&e instanceof So||!this.size&&e instanceof Fe&&!(e instanceof So)?e:this.size?new So({size:this.size}):new Fe,r=this.timeout&&t.writable?setTimeout(()=>{t.emit("error",new Hs(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return r&&r.unref&&r.unref(),new Promise(i=>{t!==e&&(e.on("error",n=>t.emit("error",n)),e.pipe(t)),i()}).then(()=>t.concat()).then(i=>(clearTimeout(r),i)).catch(i=>{throw clearTimeout(r),i.name==="AbortError"||i.name==="FetchError"?i:i.name==="RangeError"?new Hs(`Could not create Buffer from response body for ${this.url}: ${i.message}`,"system",i):new Hs(`Invalid response body while trying to fetch ${this.url}: ${i.message}`,"system",i)})}static clone(e){if(e.bodyUsed)throw new Error("cannot clone body after it is used");let t=e.body;if(Fe.isStream(t)&&typeof t.getBoundary!="function"){let r=new Fe,i=new Fe,n=new Fe;return r.on("error",a=>{i.emit("error",a),n.emit("error",a)}),t.on("error",a=>r.emit("error",a)),r.pipe(i),r.pipe(n),t.pipe(r),e[nt].body=i,n}else return e.body}static extractContentType(e){return e==null?null:typeof e=="string"?"text/plain;charset=UTF-8":$h(e)?"application/x-www-form-urlencoded;charset=UTF-8":zs(e)?e.type||null:Buffer.isBuffer(e)||Object.prototype.toString.call(e)==="[object ArrayBuffer]"||ArrayBuffer.isView(e)?null:typeof e.getBoundary=="function"?`multipart/form-data;boundary=${e.getBoundary()}`:Fe.isStream(e)?null:"text/plain;charset=UTF-8"}static getTotalBytes(e){let{body:t}=e;return t==null?0:zs(t)?t.size:Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync=="function"&&(t._lengthRetrievers&&t._lengthRetrievers.length===0||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}static writeToStream(e,t){let{body:r}=t;return r==null?e.end():Buffer.isBuffer(r)||typeof r=="string"?e.end(r):(zs(r)?r.stream():r).on("error",n=>e.emit("error",n)).pipe(e),e}};Object.defineProperties(ri.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var $h=o(s=>typeof s!="object"||typeof s.append!="function"||typeof s.delete!="function"||typeof s.get!="function"||typeof s.getAll!="function"||typeof s.has!="function"||typeof s.set!="function"?!1:s.constructor.name==="URLSearchParams"||Object.prototype.toString.call(s)==="[object URLSearchParams]"||typeof s.sort=="function","isURLSearchParams"),zs=o(s=>typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&/^(Blob|File)$/.test(s.constructor.name)&&/^(Blob|File)$/.test(s[Symbol.toStringTag]),"isBlob"),Ny=o((s,e)=>{if(typeof _o!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let t=e&&e.get("content-type"),r="utf-8",i;t&&(i=/charset=([^;]*)/i.exec(t));let n=s.slice(0,1024).toString();return!i&&n&&(i=/<meta.+?charset=(['"])(.+?)\1/i.exec(n)),!i&&n&&(i=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n),i||(i=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n),i&&i.pop()),i&&(i=/charset=(.*)/i.exec(i.pop()))),!i&&n&&(i=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n)),i&&(r=i.pop(),(r==="gb2312"||r==="gbk")&&(r="gb18030")),_o(s,"UTF-8",r).toString()},"convertBody");qh.exports=ri});var oi=m((nx,Hh)=>{"use strict";var jh=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Ro=/[^\t\x20-\x7e\x80-\xff]/,Gs=o(s=>{if(s=`${s}`,jh.test(s)||s==="")throw new TypeError(`${s} is not a legal HTTP header name`)},"validateName"),Uh=o(s=>{if(s=`${s}`,Ro.test(s))throw new TypeError(`${s} is not a legal HTTP header value`)},"validateValue"),is=o((s,e)=>{e=e.toLowerCase();for(let t in s)if(t.toLowerCase()===e)return t},"find"),H=Symbol("map"),ni=class s{static{o(this,"Headers")}constructor(e=void 0){if(this[H]=Object.create(null),e instanceof s){let t=e.raw(),r=Object.keys(t);for(let i of r)for(let n of t[i])this.append(i,n);return}if(e!=null)if(typeof e=="object"){let t=e[Symbol.iterator];if(t!=null){if(typeof t!="function")throw new TypeError("Header pairs must be iterable");let r=[];for(let i of e){if(typeof i!="object"||typeof i[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let n=Array.from(i);if(n.length!==2)throw new TypeError("Each header pair must be a name/value tuple");r.push(n)}for(let i of r)this.append(i[0],i[1])}else for(let r of Object.keys(e))this.append(r,e[r])}else throw new TypeError("Provided initializer must be an object")}get(e){e=`${e}`,Gs(e);let t=is(this[H],e);return t===void 0?null:this[H][t].join(", ")}forEach(e,t=void 0){let r=Oo(this);for(let i=0;i<r.length;i++){let[n,a]=r[i];e.call(t,a,n,this),r=Oo(this)}}set(e,t){e=`${e}`,t=`${t}`,Gs(e),Uh(t);let r=is(this[H],e);this[H][r!==void 0?r:e]=[t]}append(e,t){e=`${e}`,t=`${t}`,Gs(e),Uh(t);let r=is(this[H],e);r!==void 0?this[H][r].push(t):this[H][e]=[t]}has(e){return e=`${e}`,Gs(e),is(this[H],e)!==void 0}delete(e){e=`${e}`,Gs(e);let t=is(this[H],e);t!==void 0&&delete this[H][t]}raw(){return this[H]}keys(){return new Lt(this,"key")}values(){return new Lt(this,"value")}[Symbol.iterator](){return new Lt(this,"key+value")}entries(){return new Lt(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(e){let t=Object.assign(Object.create(null),e[H]),r=is(e[H],"Host");return r!==void 0&&(t[r]=t[r][0]),t}static createHeadersLenient(e){let t=new s;for(let r of Object.keys(e))if(!jh.test(r))if(Array.isArray(e[r]))for(let i of e[r])Ro.test(i)||(t[H][r]===void 0?t[H][r]=[i]:t[H][r].push(i));else Ro.test(e[r])||(t[H][r]=[e[r]]);return t}};Object.defineProperties(ni.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var Oo=o((s,e="key+value")=>Object.keys(s[H]).sort().map(e==="key"?t=>t.toLowerCase():e==="value"?t=>s[H][t].join(", "):t=>[t.toLowerCase(),s[H][t].join(", ")]),"getHeaders"),bo=Symbol("internal"),Lt=class s{static{o(this,"HeadersIterator")}constructor(e,t){this[bo]={target:e,kind:t,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==s.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:e,kind:t,index:r}=this[bo],i=Oo(e,t),n=i.length;return r>=n?{value:void 0,done:!0}:(this[bo].index++,{value:i[r],done:!1})}};Object.setPrototypeOf(Lt.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Hh.exports=ni});var Wh=m((ax,Vh)=>{"use strict";var Py=require("http"),{STATUS_CODES:Ly}=Py,zh=oi(),Gh=ii(),{clone:ky,extractContentType:Dy}=Gh,ot=Symbol("Response internals"),ai=class s extends Gh{static{o(this,"Response")}constructor(e=null,t={}){super(e,t);let r=t.status||200,i=new zh(t.headers);if(e!=null&&!i.has("Content-Type")){let n=Dy(e);n&&i.append("Content-Type",n)}this[ot]={url:t.url,status:r,statusText:t.statusText||Ly[r],headers:i,counter:t.counter,trailer:Promise.resolve(t.trailer||new zh)}}get trailer(){return this[ot].trailer}get url(){return this[ot].url||""}get status(){return this[ot].status}get ok(){return this[ot].status>=200&&this[ot].status<300}get redirected(){return this[ot].counter>0}get statusText(){return this[ot].statusText}get headers(){return this[ot].headers}clone(){return new s(ky(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};Vh.exports=ai;Object.defineProperties(ai.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})});var Zh=m((hx,My)=>{My.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}});var Xh=m((ux,Yh)=>{"use strict";var{URL:Io}=require("url"),{Minipass:$y}=J(),vo=oi(),{exportNodeCompatibleHeaders:Fy}=vo,Kh=ii(),{clone:qy,extractContentType:Uy,getTotalBytes:jy}=Kh,Hy=Zh().version,zy=`minipass-fetch/${Hy} (+https://github.com/isaacs/minipass-fetch)`,Ne=Symbol("Request internals"),ci=o(s=>typeof s=="object"&&typeof s[Ne]=="object","isRequest"),Gy=o(s=>{let e=s&&typeof s=="object"&&Object.getPrototypeOf(s);return!!(e&&e.constructor.name==="AbortSignal")},"isAbortSignal"),hi=class s extends Kh{static{o(this,"Request")}constructor(e,t={}){let r=ci(e)?new Io(e.url):e&&e.href?new Io(e.href):new Io(`${e}`);ci(e)?t={...e[Ne],...t}:(!e||typeof e=="string")&&(e={});let i=(t.method||e.method||"GET").toUpperCase(),n=i==="GET"||i==="HEAD";if((t.body!==null&&t.body!==void 0||ci(e)&&e.body!==null)&&n)throw new TypeError("Request with GET/HEAD method cannot have body");let a=t.body!==null&&t.body!==void 0?t.body:ci(e)&&e.body!==null?qy(e):null;super(a,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});let c=new vo(t.headers||e.headers||{});if(a!=null&&!c.has("Content-Type")){let Xe=Uy(a);Xe&&c.append("Content-Type",Xe)}let h="signal"in t?t.signal:null;if(h!=null&&!Gy(h))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:g,ecdhCurve:y,family:S,honorCipherOrder:w,key:T,passphrase:v,pfx:R,rejectUnauthorized:I=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:C,secureProtocol:P,servername:Y,sessionIdContext:Se}=t;this[Ne]={method:i,redirect:t.redirect||e.redirect||"follow",headers:c,parsedURL:r,signal:h,ca:u,cert:l,ciphers:f,clientCertEngine:d,crl:p,dhparam:g,ecdhCurve:y,family:S,honorCipherOrder:w,key:T,passphrase:v,pfx:R,rejectUnauthorized:I,secureOptions:C,secureProtocol:P,servername:Y,sessionIdContext:Se},this.follow=t.follow!==void 0?t.follow:e.follow!==void 0?e.follow:20,this.compress=t.compress!==void 0?t.compress:e.compress!==void 0?e.compress:!0,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent}get method(){return this[Ne].method}get url(){return this[Ne].parsedURL.toString()}get headers(){return this[Ne].headers}get redirect(){return this[Ne].redirect}get signal(){return this[Ne].signal}clone(){return new s(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(e){let t=e[Ne].parsedURL,r=new vo(e[Ne].headers);if(r.has("Accept")||r.set("Accept","*/*"),!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&$y.isStream(e.body)&&typeof e.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let i=(e.body===null||e.body===void 0)&&/^(POST|PUT)$/i.test(e.method)?"0":e.body!==null&&e.body!==void 0?jy(e):null;i&&r.set("Content-Length",i+""),r.has("User-Agent")||r.set("User-Agent",zy),e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");let n=typeof e.agent=="function"?e.agent(t):e.agent;!r.has("Connection")&&!n&&r.set("Connection","close");let{ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:g,key:y,passphrase:S,pfx:w,rejectUnauthorized:T,secureOptions:v,secureProtocol:R,servername:I,sessionIdContext:C}=e[Ne];return{...{auth:t.username||t.password?`${t.username}:${t.password}`:"",host:t.host,hostname:t.hostname,path:`${t.pathname}${t.search}`,port:t.port,protocol:t.protocol},method:e.method,headers:Fy(r),agent:n,ca:a,cert:c,ciphers:h,clientCertEngine:u,crl:l,dhparam:f,ecdhCurve:d,family:p,honorCipherOrder:g,key:y,passphrase:S,pfx:w,rejectUnauthorized:T,secureOptions:v,secureProtocol:R,servername:I,sessionIdContext:C,timeout:e.timeout}}};Yh.exports=hi;Object.defineProperties(hi.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})});var Qh=m((fx,Jh)=>{"use strict";var To=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(e){}};Jh.exports=To});var Zs=m((px,su)=>{"use strict";var{URL:Vs}=require("url"),Vy=require("http"),Wy=require("https"),ns=_h(),{Minipass:eu}=J(),Zy=ii(),{writeToStream:Ky,getTotalBytes:Yy}=Zy,kt=Wh(),xo=oi(),{createHeadersLenient:tu}=xo,Ws=Xh(),{getNodeRequestOptions:Xy}=Ws,wt=wo(),Ao=Qh(),at=o(async(s,e)=>{if(/^data:/.test(s)){let t=new Ws(s,e);return Promise.resolve().then(()=>new Promise((r,i)=>{let n,a;try{let{pathname:u,search:l}=new Vs(s),f=u.split(",");if(f.length<2)throw new Error("invalid data: URI");let d=f.shift(),p=/;base64$/.test(d);n=p?d.slice(0,-7):d;let g=decodeURIComponent(f.join(",")+l);a=p?Buffer.from(g,"base64"):Buffer.from(g)}catch(u){return i(new wt(`[${t.method}] ${t.url} invalid URL, ${u.message}`,"system",u))}let{signal:c}=t;if(c&&c.aborted)return i(new Ao("The user aborted a request."));let h={"Content-Length":a.length};return n&&(h["Content-Type"]=n),r(new kt(a,{headers:h}))}))}return new Promise((t,r)=>{let i=new Ws(s,e),n;try{n=Xy(i)}catch(g){return r(g)}let a=(n.protocol==="https:"?Wy:Vy).request,{signal:c}=i,h=null,u=o(()=>{let g=new Ao("The user aborted a request.");r(g),eu.isStream(i.body)&&typeof i.body.destroy=="function"&&i.body.destroy(g),h&&h.body&&h.body.emit("error",g)},"abort");if(c&&c.aborted)return u();let l=o(()=>{u(),f()},"abortAndFinalize"),f=o(()=>{d.abort(),c&&c.removeEventListener("abort",l),clearTimeout(p)},"finalize"),d=a(n);c&&c.addEventListener("abort",l);let p=null;i.timeout&&d.once("socket",()=>{p=setTimeout(()=>{r(new wt(`network timeout at: ${i.url}`,"request-timeout")),f()},i.timeout)}),d.on("error",g=>{d.res&&d.res.emit("error",g),r(new wt(`request to ${i.url} failed, reason: ${g.message}`,"system",g)),f()}),d.on("response",g=>{clearTimeout(p);let y=tu(g.headers);if(at.isRedirect(g.statusCode)){let I=y.get("Location"),C=null;try{C=I===null?null:new Vs(I,i.url).toString()}catch{if(i.redirect!=="manual"){r(new wt(`uri requested responds with an invalid redirect URL: ${I}`,"invalid-redirect")),f();return}}if(i.redirect==="error"){r(new wt(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),f();return}else if(i.redirect==="manual"){if(C!==null)try{y.set("Location",C)}catch(P){r(P)}}else if(i.redirect==="follow"&&C!==null){if(i.counter>=i.follow){r(new wt(`maximum redirect reached at: ${i.url}`,"max-redirect")),f();return}if(g.statusCode!==303&&i.body&&Yy(i)===null){r(new wt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),f();return}i.headers.set("host",new Vs(C).host);let P={headers:new xo(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout},Y=new Vs(i.url),Se=new Vs(C);Y.hostname!==Se.hostname&&(P.headers.delete("authorization"),P.headers.delete("cookie")),(g.statusCode===303||(g.statusCode===301||g.statusCode===302)&&i.method==="POST")&&(P.method="GET",P.body=void 0,P.headers.delete("content-length")),t(at(new Ws(C,P))),f();return}}g.once("end",()=>c&&c.removeEventListener("abort",l));let S=new eu;S.on("error",f),g.on("error",I=>S.emit("error",I)),g.on("data",I=>S.write(I)),g.on("end",()=>S.end());let w={url:i.url,status:g.statusCode,statusText:g.statusMessage,headers:y,size:i.size,timeout:i.timeout,counter:i.counter,trailer:new Promise(I=>g.on("end",()=>I(tu(g.trailers))))},T=y.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||T===null||g.statusCode===204||g.statusCode===304){h=new kt(S,w),t(h);return}let v={flush:ns.constants.Z_SYNC_FLUSH,finishFlush:ns.constants.Z_SYNC_FLUSH};if(T==="gzip"||T==="x-gzip"){let I=new ns.Gunzip(v);h=new kt(S.on("error",C=>I.emit("error",C)).pipe(I),w),t(h);return}if(T==="deflate"||T==="x-deflate"){g.once("data",I=>{let C=(I[0]&15)===8?new ns.Inflate:new ns.InflateRaw;S.on("error",P=>C.emit("error",P)).pipe(C),h=new kt(C,w),t(h)});return}if(T==="br"){try{var R=new ns.BrotliDecompress}catch(I){r(I),f();return}S.on("error",I=>R.emit("error",I)).pipe(R),h=new kt(R,w),t(h);return}h=new kt(S,w),t(h)}),Ky(d,i)})},"fetch");su.exports=at;at.isRedirect=s=>s===301||s===302||s===303||s===307||s===308;at.Headers=xo;at.Request=Ws;at.Response=kt;at.FetchError=wt;at.AbortError=Ao});var iu=m((gx,ru)=>{var Jy=require("dns"),Qy=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],eE=o(s=>{let{strictSSL:e,...t}={...s};if(t.method=t.method?t.method.toUpperCase():"GET",e==null?t.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":t.rejectUnauthorized=e!==!1,!t.retry)t.retry={retries:0};else if(typeof t.retry=="string"){let r=parseInt(t.retry,10);isFinite(r)?t.retry={retries:r}:t.retry={retries:0}}else typeof t.retry=="number"?t.retry={retries:t.retry}:t.retry={retries:0,...t.retry};return t.dns={ttl:300*1e3,lookup:Jy.lookup,...t.dns},t.cache=t.cache||"default",t.cache==="default"&&Object.keys(t.headers||{}).some(i=>Qy.includes(i.toLowerCase()))&&(t.cache="no-store"),t.cacheAdditionalHeaders=t.cacheAdditionalHeaders||[],t.cacheManager&&!t.cachePath&&(t.cachePath=t.cacheManager),t},"configureOptions");ru.exports=eE});var ou=m((wx,nu)=>{"use strict";var tE=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),sE=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),rE=new Set([500,502,503,504]),iE={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},nE={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function ct(s){let e=parseInt(s,10);return isFinite(e)?e:0}o(ct,"toNumberOrZero");function oE(s){return s?rE.has(s.status):!0}o(oE,"isErrorResponse");function Co(s){let e={};if(!s)return e;let t=s.trim().split(/,/);for(let r of t){let[i,n]=r.split(/=/,2);e[i.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}o(Co,"parseCacheControl");function aE(s){let e=[];for(let t in s){let r=s[t];e.push(r===!0?t:t+"="+r)}if(e.length)return e.join(", ")}o(aE,"formatCacheControl");nu.exports=class{static{o(this,"CachePolicy")}constructor(e,t,{shared:r,cacheHeuristic:i,immutableMinTimeToLive:n,ignoreCargoCult:a,_fromObject:c}={}){if(c){this._fromObject(c);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=r!==!1,this._ignoreCargoCult=!!a,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=Co(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=Co(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":aE(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())&&sE.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||tE.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"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);let t=Co(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)?this._evaluateRequestMissResult(e):t["max-age"]&&this.age()>ct(t["max-age"])?this._evaluateRequestMissResult(e):t["min-fresh"]&&this.maxAge()-this.age()<ct(t["min-fresh"])?this._evaluateRequestMissResult(e):this.stale()?"max-stale"in t&&(t["max-stale"]===!0||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 r of t)if(e.headers[r]!==this._reqHeaders[r])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let r in e)iE[r]||(t[r]=e[r]);if(e.connection){let r=e.connection.trim().split(/\s*,\s*/);for(let i of r)delete t[i]}if(t.warning){let r=t.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));r.length?t.warning=r.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(){let e=this._ageValue(),t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return ct(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 ct(this._rescc["s-maxage"])}if(this._rescc["max-age"])return ct(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let r=Date.parse(this._resHeaders.expires);return Number.isNaN(r)||r<t?0:Math.max(e,(r-t)/1e3)}if(this._resHeaders["last-modified"]){let r=Date.parse(this._resHeaders["last-modified"]);if(isFinite(r)&&t>r)return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+ct(this._rescc["stale-if-error"]),r=e+ct(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,e,t,r)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+ct(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let e=ct(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?e.imm:24*3600*1e3,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 i=t["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));i.length?t["if-none-match"]=i.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()&&oE(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;t.status!==void 0&&t.status!=304?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(r=!0);let i={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,i),modified:t.status!=304,matches:!1};let n={};for(let c in this._resHeaders)n[c]=c in t.headers&&!nE[c]?t.headers[c]:this._resHeaders[c];let a=Object.assign({},t,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,a,i),modified:!1,matches:!0}}}});var uu=m((_x,Bo)=>{"use strict";Bo.exports=hu;Bo.exports.preferredCharsets=hu;var cE=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function hE(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=uE(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(hE,"parseAcceptCharset");function uE(s,e){var t=cE.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{charset:r,q:i,i:e}}o(uE,"parseCharset");function lE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=fE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(lE,"getCharsetPriority");function fE(s,e,t){var r=0;if(e.charset.toLowerCase()===s.toLowerCase())r|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:r}}o(fE,"specify");function hu(s,e){var t=hE(s===void 0?"*":s||"");if(!e)return t.filter(cu).sort(au).map(dE);var r=e.map(o(function(n,a){return lE(n,t,a)},"getPriority"));return r.filter(cu).sort(au).map(o(function(n){return e[r.indexOf(n)]},"getCharset"))}o(hu,"preferredCharsets");function au(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(au,"compareSpecs");function dE(s){return s.charset}o(dE,"getFullCharset");function cu(s){return s.q>0}o(cu,"isQuality")});var pu=m((Rx,No)=>{"use strict";No.exports=du;No.exports.preferredEncodings=du;var pE=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function mE(s){for(var e=s.split(","),t=!1,r=1,i=0,n=0;i<e.length;i++){var a=gE(e[i].trim(),i);a&&(e[n++]=a,t=t||fu("identity",a),r=Math.min(r,a.q||1))}return t||(e[n++]={encoding:"identity",q:r,i}),e.length=n,e}o(mE,"parseAcceptEncoding");function gE(s,e){var t=pE.exec(s);if(!t)return null;var r=t[1],i=1;if(t[2])for(var n=t[2].split(";"),a=0;a<n.length;a++){var c=n[a].trim().split("=");if(c[0]==="q"){i=parseFloat(c[1]);break}}return{encoding:r,q:i,i:e}}o(gE,"parseEncoding");function yE(s,e,t){for(var r={encoding:s,o:-1,q:0,s:0},i=0;i<e.length;i++){var n=fu(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(yE,"getEncodingPriority");function fu(s,e,t){var r=0;if(e.encoding.toLowerCase()===s.toLowerCase())r|=1;else if(e.encoding!=="*")return null;return{encoding:s,i:t,o:e.i,q:e.q,s:r}}o(fu,"specify");function du(s,e,t){var r=mE(s||""),i=t?o(function(c,h){if(c.q!==h.q)return h.q-c.q;var u=t.indexOf(c.encoding),l=t.indexOf(h.encoding);return u===-1&&l===-1?h.s-c.s||c.o-h.o||c.i-h.i:u!==-1&&l!==-1?u-l:u===-1?1:-1},"comparator"):EE;if(!e)return r.filter(lu).sort(i).map(wE);var n=e.map(o(function(c,h){return yE(c,r,h)},"getPriority"));return n.filter(lu).sort(i).map(o(function(c){return e[n.indexOf(c)]},"getEncoding"))}o(du,"preferredEncodings");function EE(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i}o(EE,"compareSpecs");function wE(s){return s.encoding}o(wE,"getFullEncoding");function lu(s){return s.q>0}o(lu,"isQuality")});var wu=m((Ix,Po)=>{"use strict";Po.exports=Eu;Po.exports.preferredLanguages=Eu;var SE=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function _E(s){for(var e=s.split(","),t=0,r=0;t<e.length;t++){var i=yu(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(_E,"parseAcceptLanguage");function yu(s,e){var t=SE.exec(s);if(!t)return null;var r=t[1],i=t[2],n=r;i&&(n+="-"+i);var a=1;if(t[3])for(var c=t[3].split(";"),h=0;h<c.length;h++){var u=c[h].split("=");u[0]==="q"&&(a=parseFloat(u[1]))}return{prefix:r,suffix:i,q:a,i:e,full:n}}o(yu,"parseLanguage");function bE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=RE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(bE,"getLanguagePriority");function RE(s,e,t){var r=yu(s);if(!r)return null;var i=0;if(e.full.toLowerCase()===r.full.toLowerCase())i|=4;else if(e.prefix.toLowerCase()===r.full.toLowerCase())i|=2;else if(e.full.toLowerCase()===r.prefix.toLowerCase())i|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}o(RE,"specify");function Eu(s,e){var t=_E(s===void 0?"*":s||"");if(!e)return t.filter(gu).sort(mu).map(OE);var r=e.map(o(function(n,a){return bE(n,t,a)},"getPriority"));return r.filter(gu).sort(mu).map(o(function(n){return e[r.indexOf(n)]},"getLanguage"))}o(Eu,"preferredLanguages");function mu(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(mu,"compareSpecs");function OE(s){return s.full}o(OE,"getFullLanguage");function gu(s){return s.q>0}o(gu,"isQuality")});var Iu=m((Tx,Lo)=>{"use strict";Lo.exports=Ru;Lo.exports.preferredMediaTypes=Ru;var IE=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function vE(s){for(var e=BE(s),t=0,r=0;t<e.length;t++){var i=bu(e[t].trim(),t);i&&(e[r++]=i)}return e.length=r,e}o(vE,"parseAccept");function bu(s,e){var t=IE.exec(s);if(!t)return null;var r=Object.create(null),i=1,n=t[2],a=t[1];if(t[3])for(var c=NE(t[3]).map(CE),h=0;h<c.length;h++){var u=c[h],l=u[0].toLowerCase(),f=u[1],d=f&&f[0]==='"'&&f[f.length-1]==='"'?f.slice(1,-1):f;if(l==="q"){i=parseFloat(d);break}r[l]=d}return{type:a,subtype:n,params:r,q:i,i:e}}o(bu,"parseMediaType");function TE(s,e,t){for(var r={o:-1,q:0,s:0},i=0;i<e.length;i++){var n=AE(s,e[i],t);n&&(r.s-n.s||r.q-n.q||r.o-n.o)<0&&(r=n)}return r}o(TE,"getMediaTypePriority");function AE(s,e,t){var r=bu(s),i=0;if(!r)return null;if(e.type.toLowerCase()==r.type.toLowerCase())i|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==r.subtype.toLowerCase())i|=2;else if(e.subtype!="*")return null;var n=Object.keys(e.params);if(n.length>0)if(n.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(r.params[a]||"").toLowerCase()}))i|=1;else return null;return{i:t,o:e.i,q:e.q,s:i}}o(AE,"specify");function Ru(s,e){var t=vE(s===void 0?"*/*":s||"");if(!e)return t.filter(_u).sort(Su).map(xE);var r=e.map(o(function(n,a){return TE(n,t,a)},"getPriority"));return r.filter(_u).sort(Su).map(o(function(n){return e[r.indexOf(n)]},"getType"))}o(Ru,"preferredMediaTypes");function Su(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}o(Su,"compareSpecs");function xE(s){return s.type+"/"+s.subtype}o(xE,"getFullType");function _u(s){return s.q>0}o(_u,"isQuality");function Ou(s){for(var e=0,t=0;(t=s.indexOf('"',t))!==-1;)e++,t++;return e}o(Ou,"quoteCount");function CE(s){var e=s.indexOf("="),t,r;return e===-1?t=s:(t=s.slice(0,e),r=s.slice(e+1)),[t,r]}o(CE,"splitKeyValuePair");function BE(s){for(var e=s.split(","),t=1,r=0;t<e.length;t++)Ou(e[r])%2==0?e[++r]=e[t]:e[r]+=","+e[t];return e.length=r+1,e}o(BE,"splitMediaTypes");function NE(s){for(var e=s.split(";"),t=1,r=0;t<e.length;t++)Ou(e[r])%2==0?e[++r]=e[t]:e[r]+=";"+e[t];e.length=r+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}o(NE,"splitParameters")});var vu=m((xx,ko)=>{"use strict";var PE=uu(),LE=pu(),kE=wu(),DE=Iu();ko.exports=k;ko.exports.Negotiator=k;function k(s){if(!(this instanceof k))return new k(s);this.request=s}o(k,"Negotiator");k.prototype.charset=o(function(e){var t=this.charsets(e);return t&&t[0]},"charset");k.prototype.charsets=o(function(e){return PE(this.request.headers["accept-charset"],e)},"charsets");k.prototype.encoding=o(function(e,t){var r=this.encodings(e,t);return r&&r[0]},"encoding");k.prototype.encodings=o(function(e,t){var r=t||{};return LE(this.request.headers["accept-encoding"],e,r.preferred)},"encodings");k.prototype.language=o(function(e){var t=this.languages(e);return t&&t[0]},"language");k.prototype.languages=o(function(e){return kE(this.request.headers["accept-language"],e)},"languages");k.prototype.mediaType=o(function(e){var t=this.mediaTypes(e);return t&&t[0]},"mediaType");k.prototype.mediaTypes=o(function(e){return DE(this.request.headers.accept,e)},"mediaTypes");k.prototype.preferredCharset=k.prototype.charset;k.prototype.preferredCharsets=k.prototype.charsets;k.prototype.preferredEncoding=k.prototype.encoding;k.prototype.preferredEncodings=k.prototype.encodings;k.prototype.preferredLanguage=k.prototype.language;k.prototype.preferredLanguages=k.prototype.languages;k.prototype.preferredMediaType=k.prototype.mediaType;k.prototype.preferredMediaTypes=k.prototype.mediaTypes});var St=m((Bx,qe)=>{"use strict";var Ys=require("crypto"),{Minipass:ME}=J(),Mo=["sha512","sha384","sha256"],Fo=["sha512"],$E=/^[a-z0-9+/]+(?:=?=?)$/i,FE=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,qE=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,UE=/^[\x21-\x7E]+$/,Xs=o(s=>s?.length?`?${s.join("?")}`:"","getOptString"),$o=class extends ME{static{o(this,"IntegrityStream")}#e;#t;#s;constructor(e){super(),this.size=0,this.opts=e,this.#r(),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...Fo],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(Ys.createHash)}#r(){this.sri=this.opts?.integrity?me(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=Xs(this.opts?.options)}on(e,t){return e==="size"&&this.#t?t(this.#t):e==="integrity"&&this.#e?t(this.#e):e==="verified"&&this.#s?t(this.#s):super.on(e,t)}emit(e,t){return e==="end"&&this.#i(),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}#i(){this.goodSri||this.#r();let e=me(this.hashes.map((r,i)=>`${this.algorithms[i]}-${r.digest("base64")}${this.optString}`).join(" "),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let r=new Error(`stream size mismatch when checking ${this.sri}.
|
|
6
7
|
Wanted: ${this.expectedSize}
|
|
7
|
-
Found: ${this.size}`);r.code="EBADSIZE",r.found=this.size,r.expected=this.expectedSize,r.sri=this.sri,this.emit("error",r)}else if(this.sri&&!t){let r=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);r.code="EINTEGRITY",r.found=e,r.expected=this.digests,r.algorithm=this.algorithm,r.sri=this.sri,this.emit("error",r)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),t&&(this.#s=t,this.emit("verified",t))}},ht=class{static{o(this,"Hash")}get isHash(){return!0}constructor(e,t){let r=t?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let i=this.source.match(r
|
|
8
|
+
Found: ${this.size}`);r.code="EBADSIZE",r.found=this.size,r.expected=this.expectedSize,r.sri=this.sri,this.emit("error",r)}else if(this.sri&&!t){let r=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);r.code="EINTEGRITY",r.found=e,r.expected=this.digests,r.algorithm=this.algorithm,r.sri=this.sri,this.emit("error",r)}else this.#t=this.size,this.emit("size",this.size),this.#e=e,this.emit("integrity",e),t&&(this.#s=t,this.emit("verified",t))}},ht=class{static{o(this,"Hash")}get isHash(){return!0}constructor(e,t){let r=t?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let i=this.source.match(r?qE:FE);if(!i||r&&!Mo.includes(i[1]))return;this.algorithm=i[1],this.digest=i[2];let n=i[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,t){let r=me(e,t);if(!r)return!1;if(r.isIntegrity){let i=r.pickAlgorithm(t,[this.algorithm]);if(!i)return!1;let n=r[i].find(a=>a.digest===this.digest);return n||!1}return r.digest===this.digest?r:!1}toString(e){return e?.strict&&!(Mo.includes(this.algorithm)&&this.digest.match($E)&&this.options.every(t=>t.match(UE)))?"":`${this.algorithm}-${this.digest}${Xs(this.options)}`}};function Tu(s,e,t,r){let i=s!=="",n=!1,a="",c=r.length-1;for(let u=0;u<c;u++){let l=ht.prototype.toString.call(r[u],t);l&&(n=!0,a+=l,a+=e)}let h=ht.prototype.toString.call(r[c],t);return h&&(n=!0,a+=h),i&&n?s+e+a:s+a}o(Tu,"integrityHashToString");var Dt=class{static{o(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let t=e?.sep||" ",r="";if(e?.strict){t=t.replace(/\S+/g," ");for(let i of Mo)this[i]&&(r=Tu(r,t,e,this[i]))}else for(let i of Object.keys(this))r=Tu(r,t,e,this[i]);return r}concat(e,t){let r=typeof e=="string"?e:Ks(e,t);return me(`${this.toString(t)} ${r}`,t)}hexDigest(){return me(this,{single:!0}).hexDigest()}merge(e,t){let r=me(e,t);for(let i in r)if(this[i]){if(!this[i].find(n=>r[i].find(a=>n.digest===a.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[i]=r[i]}match(e,t){let r=me(e,t);if(!r)return!1;let i=r.pickAlgorithm(t,Object.keys(this));return!!i&&this[i]&&r[i]&&this[i].find(n=>r[i].find(a=>n.digest===a.digest))||!1}pickAlgorithm(e,t){let r=e?.pickAlgorithm||KE,i=Object.keys(this).filter(n=>t?.length?t.includes(n):!0);return i.length?i.reduce((n,a)=>r(n,a)||n):null}};qe.exports.parse=me;function me(s,e){if(!s)return null;if(typeof s=="string")return Do(s,e);if(s.algorithm&&s.digest){let t=new Dt;return t[s.algorithm]=[s],Do(Ks(t,e),e)}else return Do(Ks(s,e),e)}o(me,"parse");function Do(s,e){if(e?.single)return new ht(s,e);let t=s.trim().split(/\s+/).reduce((r,i)=>{let n=new ht(i,e);if(n.algorithm&&n.digest){let a=n.algorithm;r[a]||(r[a]=[]),r[a].push(n)}return r},new Dt);return t.isEmpty()?null:t}o(Do,"_parse");qe.exports.stringify=Ks;function Ks(s,e){return s.algorithm&&s.digest?ht.prototype.toString.call(s,e):typeof s=="string"?Ks(me(s,e),e):Dt.prototype.toString.call(s,e)}o(Ks,"stringify");qe.exports.fromHex=jE;function jE(s,e,t){let r=Xs(t?.options);return me(`${e}-${Buffer.from(s,"hex").toString("base64")}${r}`,t)}o(jE,"fromHex");qe.exports.fromData=HE;function HE(s,e){let t=e?.algorithms||[...Fo],r=Xs(e?.options);return t.reduce((i,n)=>{let a=Ys.createHash(n).update(s).digest("base64"),c=new ht(`${n}-${a}${r}`,e);if(c.algorithm&&c.digest){let h=c.algorithm;i[h]||(i[h]=[]),i[h].push(c)}return i},new Dt)}o(HE,"fromData");qe.exports.fromStream=zE;function zE(s,e){let t=qo(e);return new Promise((r,i)=>{s.pipe(t),s.on("error",i),t.on("error",i);let n;t.on("integrity",a=>{n=a}),t.on("end",()=>r(n)),t.resume()})}o(zE,"fromStream");qe.exports.checkData=GE;function GE(s,e,t){if(e=me(e,t),!e||!Object.keys(e).length){if(t?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let r=e.pickAlgorithm(t),i=Ys.createHash(r).update(s).digest("base64"),n=me({algorithm:r,digest:i}),a=n.match(e,t);if(t=t||{},a||!t.error)return a;if(typeof t.size=="number"&&s.length!==t.size){let c=new Error(`data size mismatch when checking ${e}.
|
|
8
9
|
Wanted: ${t.size}
|
|
9
|
-
Found: ${s.length}`);throw c.code="EBADSIZE",c.found=s.length,c.expected=t.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${r}: Wanted ${e}, but got ${n}. (${s.length} bytes)`);throw c.code="EINTEGRITY",c.found=n,c.expected=e,c.algorithm=r,c.sri=e,c}}o(HE,"checkData");qe.exports.checkStream=zE;function zE(s,e,t){if(t=t||Object.create(null),t.integrity=e,e=me(e,t),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let r=Fo(t);return new Promise((i,n)=>{s.pipe(r),s.on("error",n),r.on("error",n);let a;r.on("verified",c=>{a=c}),r.on("end",()=>i(a)),r.resume()})}o(zE,"checkStream");qe.exports.integrityStream=Fo;function Fo(s=Object.create(null)){return new Mo(s)}o(Fo,"integrityStream");qe.exports.create=GE;function GE(s){let e=s?.algorithms||[...$o],t=Ys(s?.options),r=e.map(Ks.createHash);return{update:o(function(i,n){return r.forEach(a=>a.update(i,n)),this},"update"),digest:o(function(){return e.reduce((n,a)=>{let c=r.shift().digest("base64"),h=new ht(`${a}-${c}${t}`,s);if(h.algorithm&&h.digest){let u=h.algorithm;n[u]||(n[u]=[]),n[u].push(h)}return n},new Dt)},"digest")}}o(GE,"createIntegrity");var VE=Ks.getHashes(),Tu=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(s=>VE.includes(s));function WE(s,e){return Tu.indexOf(s.toLowerCase())>=Tu.indexOf(e.toLowerCase())?s:e}o(WE,"getPrioritizedHash")});var Uo=m((Bx,Nu)=>{var Au=nu(),xu=Iu(),ZE=St(),Cu={shared:!1,ignoreCargoCult:!0},KE={status:200,headers:{}},os=o(s=>{let e={method:s.method,url:s.url,headers:{},compress:s.compress};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"requestObject"),Bu=o(s=>{let e={status:s.status,headers:{}};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"responseObject"),qo=class{static{o(this,"CachePolicy")}constructor({entry:e,request:t,response:r,options:i}){this.entry=e,this.request=os(t),this.response=Bu(r),this.options=i,this.policy=new Au(this.request,this.response,Cu),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,t){return!t.cachePath||t.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new Au(os(e),KE,Cu).storable()}satisfies(e){let t=os(e);if(this.request.headers.host!==t.headers.host||this.request.compress!==t.compress)return!1;let r=new xu(this.request),i=new xu(t);return JSON.stringify(r.mediaTypes())!==JSON.stringify(i.mediaTypes())||JSON.stringify(r.languages())!==JSON.stringify(i.languages())||JSON.stringify(r.encodings())!==JSON.stringify(i.encodings())?!1:this.options.integrity?ZE.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let t=os(e);return t.method="GET",!this.policy.satisfiesWithoutRevalidation(t)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let t=os(e);return this.policy.revalidationHeaders(t)}revalidated(e,t){let r=os(e),i=Bu(t);return!this.policy.revalidatedPolicy(r,i).modified}};Nu.exports=qo});var Lu=m((Px,Pu)=>{var jo=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};Pu.exports={NotCachedError:jo}});var hi=m((kx,$u)=>{var YE=Qr(),ku=Symbol("_flush"),Du=Symbol("_flushed"),Mu=Symbol("_flushing"),Ho=class extends YE{static{o(this,"Flush")}constructor(e={}){if(typeof e=="function"&&(e={flush:e}),super(e),typeof e.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[ku]=e.flush||this.flush}emit(e,...t){if(e!=="end"&&e!=="finish"||this[Du])return super.emit(e,...t);if(this[Mu])return;this[Mu]=!0;let r=o(n=>{this[Du]=!0,n?super.emit("error",n):super.emit("end")},"afterFlush"),i=this[ku](r);i&&i.then&&i.then(()=>r(),n=>r(n))}};$u.exports=Ho});var Wo=m((Mx,Vo)=>{var{Minipass:Fu}=J(),as=Symbol("_data"),cs=Symbol("_length"),zo=class extends Fu{static{o(this,"Collect")}constructor(e){super(e),this[as]=[],this[cs]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[as].push(i),this[cs]+=i.length,r&&r(),!0}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[as],this[cs]);return super.write(i),super.end(r)}};Vo.exports=zo;var Go=class extends Fu{static{o(this,"CollectPassThrough")}constructor(e){super(e),this[as]=[],this[cs]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[as].push(i),this[cs]+=i.length,super.write(e,t,r)}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[as],this[cs]);return this.emit("collect",i),super.end(r)}};Vo.exports.PassThrough=Go});var hs=m((Fx,Hu)=>{var XE=Qr(),JE=require("events"),QE=o(s=>s&&s instanceof JE&&(typeof s.pipe=="function"||typeof s.write=="function"&&typeof s.end=="function"),"isStream"),Mt=Symbol("_head"),ge=Symbol("_tail"),Zo=Symbol("_linkStreams"),Ko=Symbol("_setHead"),Yo=Symbol("_setTail"),qu=Symbol("_onError"),Uu=Symbol("_onData"),Xo=Symbol("_onEnd"),ju=Symbol("_onDrain"),ui=Symbol("_streams"),Jo=class extends XE{static{o(this,"Pipeline")}constructor(e,...t){QE(e)&&(t.unshift(e),e={}),super(e),this[ui]=[],t.length&&this.push(...t)}[Zo](e){return e.reduce((t,r)=>(t.on("error",i=>r.emit("error",i)),t.pipe(r),r))}push(...e){this[ui].push(...e),this[ge]&&e.unshift(this[ge]);let t=this[Zo](e);this[Yo](t),this[Mt]||this[Ko](e[0])}unshift(...e){this[ui].unshift(...e),this[Mt]&&e.push(this[Mt]);let t=this[Zo](e);this[Ko](e[0]),this[ge]||this[Yo](t)}destroy(e){return this[ui].forEach(t=>typeof t.destroy=="function"&&t.destroy()),super.destroy(e)}[Yo](e){this[ge]=e,e.on("error",t=>this[qu](e,t)),e.on("data",t=>this[Uu](e,t)),e.on("end",()=>this[Xo](e)),e.on("finish",()=>this[Xo](e))}[qu](e,t){e===this[ge]&&this.emit("error",t)}[Uu](e,t){e===this[ge]&&super.write(t)}[Xo](e){e===this[ge]&&super.end()}pause(){return super.pause(),this[ge]&&this[ge].pause&&this[ge].pause()}emit(e,...t){return e==="resume"&&this[ge]&&this[ge].resume&&this[ge].resume(),super.emit(e,...t)}[Ko](e){this[Mt]=e,e.on("drain",()=>this[ju](e))}[ju](e){e===this[Mt]&&this.emit("drain")}write(e,t,r){return this[Mt].write(e,t,r)&&(this.flowing||this.buffer.length===0)}end(e,t,r){return this[Mt].end(e,t,r),this}};Hu.exports=Jo});var zu=m((Ux,Qo)=>{(function(){var s;function e(t,r){var i=this instanceof e?this:s;if(i.reset(r),typeof t=="string"&&t.length>0&&i.hash(t),i!==this)return i}o(e,"MurmurHash3"),e.prototype.hash=function(t){var r,i,n,a,c;switch(c=t.length,this.len+=c,i=this.k1,n=0,this.rem){case 0:i^=c>n?t.charCodeAt(n++)&65535:0;case 1:i^=c>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:i^=c>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:i^=c>n?(t.charCodeAt(n)&255)<<24:0,i^=c>n?(t.charCodeAt(n++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(r=this.h1;i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,r^=i,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(n>=c);)i=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16,a=t.charCodeAt(n++),i^=(a&255)<<24^(a&65280)>>8;switch(i=0,this.rem){case 3:i^=(t.charCodeAt(n+2)&65535)<<16;case 2:i^=(t.charCodeAt(n+1)&65535)<<8;case 1:i^=t.charCodeAt(n)&65535}this.h1=r}return this.k1=i,this},e.prototype.result=function(){var t,r;return t=this.k1,r=this.h1,t>0&&(t=t*11601+(t&65535)*3432906752&4294967295,t=t<<15|t>>>17,t=t*13715+(t&65535)*461832192&4294967295,r^=t),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},e.prototype.reset=function(t){return this.h1=typeof t=="number"?t:0,this.rem=this.k1=this.len=0,this},s=new e,typeof Qo<"u"?Qo.exports=e:this.MurmurHash3=e})()});var Vu=m((Hx,Gu)=>{"use strict";var ew=zu();Gu.exports=function(s){if(s){var e=new ew(s);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var ea=m((zx,Wu)=>{var tw=require("path"),sw=Vu();Wu.exports=function(s,e,t){return tw.join(s,(e?e+"-":"")+sw(t))}});var ta=m((Gx,rw)=>{rw.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}});var sa=m((Vx,Zu)=>{"use strict";Zu.exports=iw;function iw(s){return[s.slice(0,2),s.slice(2,4),s.slice(4)]}o(iw,"hashToSegments")});var us=m((Zx,ra)=>{"use strict";var nw=ta()["cache-version"].content,ow=sa(),Ku=require("path"),aw=St();ra.exports=cw;function cw(s,e){let t=aw.parse(e,{single:!0});return Ku.join(Yu(s),t.algorithm,...ow(t.hexDigest()))}o(cw,"contentPath");ra.exports.contentDir=Yu;function Yu(s){return Ku.join(s,`content-v${nw}`)}o(Yu,"contentDir")});var ia=m((Yx,Xu)=>{var hw=o((s,{copy:e,wrap:t})=>{let r={};if(s&&typeof s=="object")for(let i of e)s[i]!==void 0&&(r[i]=s[i]);else r[t]=s;return r},"getOptions");Xu.exports=hw});var Xs=m((Jx,Ju)=>{"use strict";var uw="2.0.0",lw=Number.MAX_SAFE_INTEGER||9007199254740991,fw=16,dw=250,pw=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ju.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:fw,MAX_SAFE_BUILD_LENGTH:dw,MAX_SAFE_INTEGER:lw,RELEASE_TYPES:pw,SEMVER_SPEC_VERSION:uw,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Js=m((Qx,Qu)=>{"use strict";var mw=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...s)=>{}:()=>{};Qu.exports=mw});var ls=m((Ue,el)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:na,MAX_SAFE_BUILD_LENGTH:gw,MAX_LENGTH:yw}=Xs(),Ew=Js();Ue=el.exports={};var ww=Ue.re=[],Sw=Ue.safeRe=[],_=Ue.src=[],_w=Ue.safeSrc=[],b=Ue.t={},bw=0,oa="[a-zA-Z0-9-]",Rw=[["\\s",1],["\\d",yw],[oa,gw]],Ow=o(s=>{for(let[e,t]of Rw)s=s.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return s},"makeSafeRegex"),A=o((s,e,t)=>{let r=Ow(e),i=bw++;Ew(s,i,e),b[s]=i,_[i]=e,_w[i]=r,ww[i]=new RegExp(e,t?"g":void 0),Sw[i]=new RegExp(r,t?"g":void 0)},"createToken");A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${oa}*`);A("MAINVERSION",`(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${_[b.NONNUMERICIDENTIFIER]}|${_[b.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${_[b.NONNUMERICIDENTIFIER]}|${_[b.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${_[b.PRERELEASEIDENTIFIER]}(?:\\.${_[b.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${_[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[b.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${oa}+`);A("BUILD",`(?:\\+(${_[b.BUILDIDENTIFIER]}(?:\\.${_[b.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${_[b.MAINVERSION]}${_[b.PRERELEASE]}?${_[b.BUILD]}?`);A("FULL",`^${_[b.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${_[b.MAINVERSIONLOOSE]}${_[b.PRERELEASELOOSE]}?${_[b.BUILD]}?`);A("LOOSE",`^${_[b.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${_[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${_[b.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:${_[b.PRERELEASE]})?${_[b.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:${_[b.PRERELEASELOOSE]})?${_[b.BUILD]}?)?)?`);A("XRANGE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${na}})(?:\\.(\\d{1,${na}}))?(?:\\.(\\d{1,${na}}))?`);A("COERCE",`${_[b.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",_[b.COERCEPLAIN]+`(?:${_[b.PRERELEASE]})?(?:${_[b.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",_[b.COERCE],!0);A("COERCERTLFULL",_[b.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${_[b.LONETILDE]}\\s+`,!0);Ue.tildeTrimReplace="$1~";A("TILDE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${_[b.LONECARET]}\\s+`,!0);Ue.caretTrimReplace="$1^";A("CARET",`^${_[b.LONECARET]}${_[b.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${_[b.LONECARET]}${_[b.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${_[b.GTLT]}\\s*(${_[b.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]}|${_[b.XRANGEPLAIN]})`,!0);Ue.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${_[b.XRANGEPLAIN]})\\s+-\\s+(${_[b.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${_[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[b.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var li=m((tC,tl)=>{"use strict";var Iw=Object.freeze({loose:!0}),vw=Object.freeze({}),Tw=o(s=>s?typeof s!="object"?Iw:s:vw,"parseOptions");tl.exports=Tw});var aa=m((rC,il)=>{"use strict";var sl=/^[0-9]+$/,rl=o((s,e)=>{let t=sl.test(s),r=sl.test(e);return t&&r&&(s=+s,e=+e),s===e?0:t&&!r?-1:r&&!t?1:s<e?-1:1},"compareIdentifiers"),Aw=o((s,e)=>rl(e,s),"rcompareIdentifiers");il.exports={compareIdentifiers:rl,rcompareIdentifiers:Aw}});var te=m((nC,ol)=>{"use strict";var fi=Js(),{MAX_LENGTH:nl,MAX_SAFE_INTEGER:di}=Xs(),{safeRe:pi,t:mi}=ls(),xw=li(),{compareIdentifiers:fs}=aa(),ca=class s{static{o(this,"SemVer")}constructor(e,t){if(t=xw(t),e instanceof s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>nl)throw new TypeError(`version is longer than ${nl} characters`);fi("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?pi[mi.LOOSE]:pi[mi.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>di||this.major<0)throw new TypeError("Invalid major version");if(this.minor>di||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>di||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<di)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(fi("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if(typeof e=="string"&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),fs(this.major,e.major)||fs(this.minor,e.minor)||fs(this.patch,e.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(fi("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fs(r,i)}while(++t)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(fi("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fs(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?pi[mi.PRERELEASELOOSE]:pi[mi.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let n=[t,i];r===!1&&(n=[t]),fs(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ol.exports=ca});var $t=m((aC,cl)=>{"use strict";var al=te(),Cw=o((s,e,t=!1)=>{if(s instanceof al)return s;try{return new al(s,e)}catch(r){if(!t)return null;throw r}},"parse");cl.exports=Cw});var ul=m((hC,hl)=>{"use strict";var Bw=$t(),Nw=o((s,e)=>{let t=Bw(s,e);return t?t.version:null},"valid");hl.exports=Nw});var fl=m((lC,ll)=>{"use strict";var Pw=$t(),Lw=o((s,e)=>{let t=Pw(s.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");ll.exports=Lw});var ml=m((dC,pl)=>{"use strict";var dl=te(),kw=o((s,e,t,r,i)=>{typeof t=="string"&&(i=r,r=t,t=void 0);try{return new dl(s instanceof dl?s.version:s,t).inc(e,r,i).version}catch{return null}},"inc");pl.exports=kw});var El=m((mC,yl)=>{"use strict";var gl=$t(),Dw=o((s,e)=>{let t=gl(s,null,!0),r=gl(e,null,!0),i=t.compare(r);if(i===0)return null;let n=i>0,a=n?t:r,c=n?r:t,h=!!a.prerelease.length;if(!!c.prerelease.length&&!h){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let l=h?"pre":"";return t.major!==r.major?l+"major":t.minor!==r.minor?l+"minor":t.patch!==r.patch?l+"patch":"prerelease"},"diff");yl.exports=Dw});var Sl=m((yC,wl)=>{"use strict";var Mw=te(),$w=o((s,e)=>new Mw(s,e).major,"major");wl.exports=$w});var bl=m((wC,_l)=>{"use strict";var Fw=te(),qw=o((s,e)=>new Fw(s,e).minor,"minor");_l.exports=qw});var Ol=m((_C,Rl)=>{"use strict";var Uw=te(),jw=o((s,e)=>new Uw(s,e).patch,"patch");Rl.exports=jw});var vl=m((RC,Il)=>{"use strict";var Hw=$t(),zw=o((s,e)=>{let t=Hw(s,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");Il.exports=zw});var _e=m((IC,Al)=>{"use strict";var Tl=te(),Gw=o((s,e,t)=>new Tl(s,t).compare(new Tl(e,t)),"compare");Al.exports=Gw});var Cl=m((TC,xl)=>{"use strict";var Vw=_e(),Ww=o((s,e,t)=>Vw(e,s,t),"rcompare");xl.exports=Ww});var Nl=m((xC,Bl)=>{"use strict";var Zw=_e(),Kw=o((s,e)=>Zw(s,e,!0),"compareLoose");Bl.exports=Kw});var gi=m((BC,Ll)=>{"use strict";var Pl=te(),Yw=o((s,e,t)=>{let r=new Pl(s,t),i=new Pl(e,t);return r.compare(i)||r.compareBuild(i)},"compareBuild");Ll.exports=Yw});var Dl=m((PC,kl)=>{"use strict";var Xw=gi(),Jw=o((s,e)=>s.sort((t,r)=>Xw(t,r,e)),"sort");kl.exports=Jw});var $l=m((kC,Ml)=>{"use strict";var Qw=gi(),eS=o((s,e)=>s.sort((t,r)=>Qw(r,t,e)),"rsort");Ml.exports=eS});var Qs=m((MC,Fl)=>{"use strict";var tS=_e(),sS=o((s,e,t)=>tS(s,e,t)>0,"gt");Fl.exports=sS});var yi=m((FC,ql)=>{"use strict";var rS=_e(),iS=o((s,e,t)=>rS(s,e,t)<0,"lt");ql.exports=iS});var ha=m((UC,Ul)=>{"use strict";var nS=_e(),oS=o((s,e,t)=>nS(s,e,t)===0,"eq");Ul.exports=oS});var ua=m((HC,jl)=>{"use strict";var aS=_e(),cS=o((s,e,t)=>aS(s,e,t)!==0,"neq");jl.exports=cS});var Ei=m((GC,Hl)=>{"use strict";var hS=_e(),uS=o((s,e,t)=>hS(s,e,t)>=0,"gte");Hl.exports=uS});var wi=m((WC,zl)=>{"use strict";var lS=_e(),fS=o((s,e,t)=>lS(s,e,t)<=0,"lte");zl.exports=fS});var la=m((KC,Gl)=>{"use strict";var dS=ha(),pS=ua(),mS=Qs(),gS=Ei(),yS=yi(),ES=wi(),wS=o((s,e,t,r)=>{switch(e){case"===":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s===t;case"!==":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s!==t;case"":case"=":case"==":return dS(s,t,r);case"!=":return pS(s,t,r);case">":return mS(s,t,r);case">=":return gS(s,t,r);case"<":return yS(s,t,r);case"<=":return ES(s,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Gl.exports=wS});var Wl=m((XC,Vl)=>{"use strict";var SS=te(),_S=$t(),{safeRe:Si,t:_i}=ls(),bS=o((s,e)=>{if(s instanceof SS)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;e=e||{};let t=null;if(!e.rtl)t=s.match(e.includePrerelease?Si[_i.COERCEFULL]:Si[_i.COERCE]);else{let h=e.includePrerelease?Si[_i.COERCERTLFULL]:Si[_i.COERCERTL],u;for(;(u=h.exec(s))&&(!t||t.index+t[0].length!==s.length);)(!t||u.index+u[0].length!==t.index+t[0].length)&&(t=u),h.lastIndex=u.index+u[1].length+u[2].length;h.lastIndex=-1}if(t===null)return null;let r=t[2],i=t[3]||"0",n=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return _S(`${r}.${i}.${n}${a}${c}`,e)},"coerce");Vl.exports=bS});var Kl=m((QC,Zl)=>{"use strict";var fa=class{static{o(this,"LRUCache")}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 i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};Zl.exports=fa});var be=m((tB,Ql)=>{"use strict";var RS=/\s+/g,da=class s{static{o(this,"Range")}constructor(e,t){if(t=IS(t),e instanceof s)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new s(e.raw,t);if(e instanceof pa)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(RS," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!Xl(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&NS(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&CS)|(this.options.loose&&BS))+":"+e,i=Yl.get(r);if(i)return i;let n=this.options.loose,a=n?he[ne.HYPHENRANGELOOSE]:he[ne.HYPHENRANGE];e=e.replace(a,jS(this.options.includePrerelease)),q("hyphen replace",e),e=e.replace(he[ne.COMPARATORTRIM],TS),q("comparator trim",e),e=e.replace(he[ne.TILDETRIM],AS),q("tilde trim",e),e=e.replace(he[ne.CARETTRIM],xS),q("caret trim",e);let c=e.split(" ").map(f=>PS(f,this.options)).join(" ").split(/\s+/).map(f=>US(f,this.options));n&&(c=c.filter(f=>(q("loose invalid filter",f,this.options),!!f.match(he[ne.COMPARATORLOOSE])))),q("range list",c);let h=new Map,u=c.map(f=>new pa(f,this.options));for(let f of u){if(Xl(f))return[f];h.set(f.value,f)}h.size>1&&h.has("")&&h.delete("");let l=[...h.values()];return Yl.set(r,l),l}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Range is required");return this.set.some(r=>Jl(r,t)&&e.set.some(i=>Jl(i,t)&&r.every(n=>i.every(a=>n.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new vS(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(HS(this.set[t],e,this.options))return!0;return!1}};Ql.exports=da;var OS=Kl(),Yl=new OS,IS=li(),pa=er(),q=Js(),vS=te(),{safeRe:he,t:ne,comparatorTrimReplace:TS,tildeTrimReplace:AS,caretTrimReplace:xS}=ls(),{FLAG_INCLUDE_PRERELEASE:CS,FLAG_LOOSE:BS}=Xs(),Xl=o(s=>s.value==="<0.0.0-0","isNullSet"),NS=o(s=>s.value==="","isAny"),Jl=o((s,e)=>{let t=!0,r=s.slice(),i=r.pop();for(;t&&r.length;)t=r.every(n=>i.intersects(n,e)),i=r.pop();return t},"isSatisfiable"),PS=o((s,e)=>(q("comp",s,e),s=DS(s,e),q("caret",s),s=LS(s,e),q("tildes",s),s=$S(s,e),q("xrange",s),s=qS(s,e),q("stars",s),s),"parseComparator"),oe=o(s=>!s||s.toLowerCase()==="x"||s==="*","isX"),LS=o((s,e)=>s.trim().split(/\s+/).map(t=>kS(t,e)).join(" "),"replaceTildes"),kS=o((s,e)=>{let t=e.loose?he[ne.TILDELOOSE]:he[ne.TILDE];return s.replace(t,(r,i,n,a,c)=>{q("tilde",s,r,i,n,a,c);let h;return oe(i)?h="":oe(n)?h=`>=${i}.0.0 <${+i+1}.0.0-0`:oe(a)?h=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:c?(q("replaceTilde pr",c),h=`>=${i}.${n}.${a}-${c} <${i}.${+n+1}.0-0`):h=`>=${i}.${n}.${a} <${i}.${+n+1}.0-0`,q("tilde return",h),h})},"replaceTilde"),DS=o((s,e)=>s.trim().split(/\s+/).map(t=>MS(t,e)).join(" "),"replaceCarets"),MS=o((s,e)=>{q("caret",s,e);let t=e.loose?he[ne.CARETLOOSE]:he[ne.CARET],r=e.includePrerelease?"-0":"";return s.replace(t,(i,n,a,c,h)=>{q("caret",s,i,n,a,c,h);let u;return oe(n)?u="":oe(a)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:oe(c)?n==="0"?u=`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:h?(q("replaceCaret pr",h),n==="0"?a==="0"?u=`>=${n}.${a}.${c}-${h} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}-${h} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c}-${h} <${+n+1}.0.0-0`):(q("no pr"),n==="0"?a==="0"?u=`>=${n}.${a}.${c}${r} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c} <${+n+1}.0.0-0`),q("caret return",u),u})},"replaceCaret"),$S=o((s,e)=>(q("replaceXRanges",s,e),s.split(/\s+/).map(t=>FS(t,e)).join(" ")),"replaceXRanges"),FS=o((s,e)=>{s=s.trim();let t=e.loose?he[ne.XRANGELOOSE]:he[ne.XRANGE];return s.replace(t,(r,i,n,a,c,h)=>{q("xRange",s,r,i,n,a,c,h);let u=oe(n),l=u||oe(a),f=l||oe(c),d=f;return i==="="&&d&&(i=""),h=e.includePrerelease?"-0":"",u?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&d?(l&&(a=0),c=0,i===">"?(i=">=",l?(n=+n+1,a=0,c=0):(a=+a+1,c=0)):i==="<="&&(i="<",l?n=+n+1:a=+a+1),i==="<"&&(h="-0"),r=`${i+n}.${a}.${c}${h}`):l?r=`>=${n}.0.0${h} <${+n+1}.0.0-0`:f&&(r=`>=${n}.${a}.0${h} <${n}.${+a+1}.0-0`),q("xRange return",r),r})},"replaceXRange"),qS=o((s,e)=>(q("replaceStars",s,e),s.trim().replace(he[ne.STAR],"")),"replaceStars"),US=o((s,e)=>(q("replaceGTE0",s,e),s.trim().replace(he[e.includePrerelease?ne.GTE0PRE:ne.GTE0],"")),"replaceGTE0"),jS=o(s=>(e,t,r,i,n,a,c,h,u,l,f,d)=>(oe(r)?t="":oe(i)?t=`>=${r}.0.0${s?"-0":""}`:oe(n)?t=`>=${r}.${i}.0${s?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${s?"-0":""}`,oe(u)?h="":oe(l)?h=`<${+u+1}.0.0-0`:oe(f)?h=`<${u}.${+l+1}.0-0`:d?h=`<=${u}.${l}.${f}-${d}`:s?h=`<${u}.${l}.${+f+1}-0`:h=`<=${h}`,`${t} ${h}`.trim()),"hyphenReplace"),HS=o((s,e,t)=>{for(let r=0;r<s.length;r++)if(!s[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<s.length;r++)if(q(s[r].semver),s[r].semver!==pa.ANY&&s[r].semver.prerelease.length>0){let i=s[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},"testSet")});var er=m((rB,of)=>{"use strict";var tr=Symbol("SemVer ANY"),ya=class s{static{o(this,"Comparator")}static get ANY(){return tr}constructor(e,t){if(t=ef(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ga("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===tr?this.value="":this.value=this.operator+this.semver.version,ga("comp",this)}parse(e){let t=this.options.loose?tf[sf.COMPARATORLOOSE]:tf[sf.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new rf(r[2],this.options.loose):this.semver=tr}toString(){return this.value}test(e){if(ga("Comparator.test",e,this.options.loose),this.semver===tr||e===tr)return!0;if(typeof e=="string")try{e=new rf(e,this.options)}catch{return!1}return ma(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new nf(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new nf(this.value,t).test(e.semver):(t=ef(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ma(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ma(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};of.exports=ya;var ef=li(),{safeRe:tf,t:sf}=ls(),ma=la(),ga=Js(),rf=te(),nf=be()});var sr=m((nB,af)=>{"use strict";var zS=be(),GS=o((s,e,t)=>{try{e=new zS(e,t)}catch{return!1}return e.test(s)},"satisfies");af.exports=GS});var hf=m((aB,cf)=>{"use strict";var VS=be(),WS=o((s,e)=>new VS(s,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");cf.exports=WS});var lf=m((hB,uf)=>{"use strict";var ZS=te(),KS=be(),YS=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new KS(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===-1)&&(r=a,i=new ZS(r,t))}),r},"maxSatisfying");uf.exports=YS});var df=m((lB,ff)=>{"use strict";var XS=te(),JS=be(),QS=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new JS(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===1)&&(r=a,i=new XS(r,t))}),r},"minSatisfying");ff.exports=QS});var gf=m((dB,mf)=>{"use strict";var Ea=te(),e_=be(),pf=Qs(),t_=o((s,e)=>{s=new e_(s,e);let t=new Ea("0.0.0");if(s.test(t)||(t=new Ea("0.0.0-0"),s.test(t)))return t;t=null;for(let r=0;r<s.set.length;++r){let i=s.set[r],n=null;i.forEach(a=>{let c=new Ea(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!n||pf(c,n))&&(n=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),n&&(!t||pf(t,n))&&(t=n)}return t&&s.test(t)?t:null},"minVersion");mf.exports=t_});var Ef=m((mB,yf)=>{"use strict";var s_=be(),r_=o((s,e)=>{try{return new s_(s,e).range||"*"}catch{return null}},"validRange");yf.exports=r_});var bi=m((yB,bf)=>{"use strict";var i_=te(),_f=er(),{ANY:n_}=_f,o_=be(),a_=sr(),wf=Qs(),Sf=yi(),c_=wi(),h_=Ei(),u_=o((s,e,t,r)=>{s=new i_(s,r),e=new o_(e,r);let i,n,a,c,h;switch(t){case">":i=wf,n=c_,a=Sf,c=">",h=">=";break;case"<":i=Sf,n=h_,a=wf,c="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a_(s,e,r))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===n_&&(p=new _f(">=0.0.0")),f=f||p,d=d||p,i(p.semver,f.semver,r)?f=p:a(p.semver,d.semver,r)&&(d=p)}),f.operator===c||f.operator===h||(!d.operator||d.operator===c)&&n(s,d.semver))return!1;if(d.operator===h&&a(s,d.semver))return!1}return!0},"outside");bf.exports=u_});var Of=m((wB,Rf)=>{"use strict";var l_=bi(),f_=o((s,e,t)=>l_(s,e,">",t),"gtr");Rf.exports=f_});var vf=m((_B,If)=>{"use strict";var d_=bi(),p_=o((s,e,t)=>d_(s,e,"<",t),"ltr");If.exports=p_});var xf=m((RB,Af)=>{"use strict";var Tf=be(),m_=o((s,e,t)=>(s=new Tf(s,t),e=new Tf(e,t),s.intersects(e,t)),"intersects");Af.exports=m_});var Bf=m((IB,Cf)=>{"use strict";var g_=sr(),y_=_e();Cf.exports=(s,e,t)=>{let r=[],i=null,n=null,a=s.sort((l,f)=>y_(l,f,t));for(let l of a)g_(l,e,t)?(n=l,i||(i=l)):(n&&r.push([i,n]),n=null,i=null);i&&r.push([i,null]);let c=[];for(let[l,f]of r)l===f?c.push(l):!f&&l===a[0]?c.push("*"):f?l===a[0]?c.push(`<=${f}`):c.push(`${l} - ${f}`):c.push(`>=${l}`);let h=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return h.length<u.length?h:e}});var Mf=m((vB,Df)=>{"use strict";var Nf=be(),Sa=er(),{ANY:wa}=Sa,rr=sr(),_a=_e(),E_=o((s,e,t={})=>{if(s===e)return!0;s=new Nf(s,t),e=new Nf(e,t);let r=!1;e:for(let i of s.set){for(let n of e.set){let a=S_(i,n,t);if(r=r||a!==null,a)continue e}if(r)return!1}return!0},"subset"),w_=[new Sa(">=0.0.0-0")],Pf=[new Sa(">=0.0.0")],S_=o((s,e,t)=>{if(s===e)return!0;if(s.length===1&&s[0].semver===wa){if(e.length===1&&e[0].semver===wa)return!0;t.includePrerelease?s=w_:s=Pf}if(e.length===1&&e[0].semver===wa){if(t.includePrerelease)return!0;e=Pf}let r=new Set,i,n;for(let p of s)p.operator===">"||p.operator===">="?i=Lf(i,p,t):p.operator==="<"||p.operator==="<="?n=kf(n,p,t):r.add(p.semver);if(r.size>1)return null;let a;if(i&&n){if(a=_a(i.semver,n.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of r){if(i&&!rr(p,String(i),t)||n&&!rr(p,String(n),t))return null;for(let g of e)if(!rr(p,String(g),t))return!1;return!0}let c,h,u,l,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of e){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(c=Lf(i,p,t),c===p&&c!==i)return!1}else if(i.operator===">="&&!rr(i.semver,String(p),t))return!1}if(n){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(h=kf(n,p,t),h===p&&h!==n)return!1}else if(n.operator==="<="&&!rr(n.semver,String(p),t))return!1}if(!p.operator&&(n||i)&&a!==0)return!1}return!(i&&u&&!n&&a!==0||n&&l&&!i&&a!==0||d||f)},"simpleSubset"),Lf=o((s,e,t)=>{if(!s)return e;let r=_a(s.semver,e.semver,t);return r>0?s:r<0||e.operator===">"&&s.operator===">="?e:s},"higherGT"),kf=o((s,e,t)=>{if(!s)return e;let r=_a(s.semver,e.semver,t);return r<0?s:r>0||e.operator==="<"&&s.operator==="<="?e:s},"lowerLT");Df.exports=E_});var Uf=m((AB,qf)=>{"use strict";var ba=ls(),$f=Xs(),__=te(),Ff=aa(),b_=$t(),R_=ul(),O_=fl(),I_=ml(),v_=El(),T_=Sl(),A_=bl(),x_=Ol(),C_=vl(),B_=_e(),N_=Cl(),P_=Nl(),L_=gi(),k_=Dl(),D_=$l(),M_=Qs(),$_=yi(),F_=ha(),q_=ua(),U_=Ei(),j_=wi(),H_=la(),z_=Wl(),G_=er(),V_=be(),W_=sr(),Z_=hf(),K_=lf(),Y_=df(),X_=gf(),J_=Ef(),Q_=bi(),e0=Of(),t0=vf(),s0=xf(),r0=Bf(),i0=Mf();qf.exports={parse:b_,valid:R_,clean:O_,inc:I_,diff:v_,major:T_,minor:A_,patch:x_,prerelease:C_,compare:B_,rcompare:N_,compareLoose:P_,compareBuild:L_,sort:k_,rsort:D_,gt:M_,lt:$_,eq:F_,neq:q_,gte:U_,lte:j_,cmp:H_,coerce:z_,Comparator:G_,Range:V_,satisfies:W_,toComparators:Z_,maxSatisfying:K_,minSatisfying:Y_,minVersion:X_,validRange:J_,outside:Q_,gtr:e0,ltr:t0,intersects:s0,simplifyRange:r0,subset:i0,SemVer:__,re:ba.re,src:ba.src,tokens:ba.t,SEMVER_SPEC_VERSION:$f.SEMVER_SPEC_VERSION,RELEASE_TYPES:$f.RELEASE_TYPES,compareIdentifiers:Ff.compareIdentifiers,rcompareIdentifiers:Ff.rcompareIdentifiers}});var Hf=m((xB,jf)=>{var n0=Uf(),o0=o(s=>n0.satisfies(process.version,s,{includePrerelease:!0}),"satisfies");jf.exports={satisfies:o0}});var zf=m((PB,Oa)=>{"use strict";var{inspect:a0}=require("util"),Ra=class{static{o(this,"SystemError")}constructor(e,t,r){let i=`${t}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(i+=` ${r.path}`),r.dest!==void 0&&(i+=` => ${r.dest}`),this.code=e,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:i,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(n){r.errno=n},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(n){r.syscall=n},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(n){r.path=n},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(n){r.dest=n},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return a0(this,{...t,getters:!0,customInspect:!1})}};function ut(s,e){Oa.exports[s]=class extends Ra{static{o(this,"NodeError")}constructor(r){super(s,e,r)}}}o(ut,"E");ut("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory");ut("ERR_FS_CP_EEXIST","Target already exists");ut("ERR_FS_CP_EINVAL","Invalid src or dest");ut("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe");ut("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory");ut("ERR_FS_CP_SOCKET","Cannot copy a socket file");ut("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self");ut("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type");ut("ERR_FS_EISDIR","Path is a directory");Oa.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{o(this,"ERR_INVALID_ARG_TYPE")}constructor(e,t,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${e} argument must be ${t}. Received ${typeof r}`}}});var hd=m((kB,cd)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:c0,ERR_FS_CP_EEXIST:h0,ERR_FS_CP_EINVAL:Ri,ERR_FS_CP_FIFO_PIPE:u0,ERR_FS_CP_NON_DIR_TO_DIR:l0,ERR_FS_CP_SOCKET:f0,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:d0,ERR_FS_CP_UNKNOWN:p0,ERR_FS_EISDIR:m0,ERR_INVALID_ARG_TYPE:g0}=zf(),{constants:{errno:{EEXIST:y0,EISDIR:E0,EINVAL:lt,ENOTDIR:w0}}}=require("os"),{chmod:S0,copyFile:_0,lstat:Qf,mkdir:ed,readdir:b0,readlink:Gf,stat:ds,symlink:Ia,unlink:td,utimes:R0}=require("fs/promises"),{dirname:ir,isAbsolute:Vf,join:Wf,parse:O0,resolve:nr,sep:I0,toNamespacedPath:Zf}=require("path"),{fileURLToPath:v0}=require("url"),T0={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function A0(s,e,t){if(t!=null&&typeof t!="object")throw new g0("options",["Object"],t);return x0(Zf(Kf(s)),Zf(Kf(e)),{...T0,...t})}o(A0,"cp");function Kf(s){return s!=null&&s.href&&s.origin?v0(s):s}o(Kf,"getValidatedPath");async function x0(s,e,t){t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let r=await sd(s,e,t),{srcStat:i,destStat:n}=r;return await id(s,i,e),t.filter?nd(Yf,n,s,e,t):Yf(n,s,e,t)}o(x0,"cpFn");async function sd(s,e,t){let{0:r,1:i}=await C0(s,e,t);if(i){if(rd(r,i))throw new Ri({message:"src and dest cannot be the same",path:e,syscall:"cp",errno:lt});if(r.isDirectory()&&!i.isDirectory())throw new c0({message:`cannot overwrite directory ${s} with non-directory ${e}`,path:e,syscall:"cp",errno:E0});if(!r.isDirectory()&&i.isDirectory())throw new l0({message:`cannot overwrite non-directory ${s} with directory ${e}`,path:e,syscall:"cp",errno:w0})}if(r.isDirectory()&&va(s,e))throw new Ri({message:`cannot copy ${s} to a subdirectory of self ${e}`,path:e,syscall:"cp",errno:lt});return{srcStat:r,destStat:i}}o(sd,"checkPaths");function rd(s,e){return e.ino&&e.dev&&e.ino===s.ino&&e.dev===s.dev}o(rd,"areIdentical");function C0(s,e,t){let r=t.dereference?i=>ds(i,{bigint:!0}):i=>Qf(i,{bigint:!0});return Promise.all([r(s),r(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})])}o(C0,"getStats");async function Yf(s,e,t,r){let i=ir(t);return await B0(i)||await ed(i,{recursive:!0}),Oi(s,e,t,r)}o(Yf,"checkParentDir");function B0(s){return ds(s).then(()=>!0,e=>e.code==="ENOENT"?!1:Promise.reject(e))}o(B0,"pathExists");async function id(s,e,t){let r=nr(ir(s)),i=nr(ir(t));if(i===r||i===O0(i).root)return;let n;try{n=await ds(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(rd(e,n))throw new Ri({message:`cannot copy ${s} to a subdirectory of self ${t}`,path:t,syscall:"cp",errno:lt});return id(s,e,i)}o(id,"checkParentPaths");var Xf=o(s=>nr(s).split(I0).filter(Boolean),"normalizePathToArray");function va(s,e){let t=Xf(s),r=Xf(e);return t.every((i,n)=>r[n]===i)}o(va,"isSrcSubdir");async function nd(s,e,t,r,i,n){if(await i.filter(t,r))return s(e,t,r,i,n)}o(nd,"handleFilter");function N0(s,e,t,r){return r.filter?nd(Oi,s,e,t,r):Oi(s,e,t,r)}o(N0,"startCopy");async function Oi(s,e,t,r){let n=await(r.dereference?ds:Qf)(e);if(n.isDirectory()&&r.recursive)return F0(n,s,e,t,r);if(n.isDirectory())throw new m0({message:`${e} is a directory (not copied)`,path:e,syscall:"cp",errno:lt});if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return P0(n,s,e,t,r);if(n.isSymbolicLink())return U0(s,e,t);throw n.isSocket()?new f0({message:`cannot copy a socket file: ${t}`,path:t,syscall:"cp",errno:lt}):n.isFIFO()?new u0({message:`cannot copy a FIFO pipe: ${t}`,path:t,syscall:"cp",errno:lt}):new p0({message:`cannot copy an unknown file type: ${t}`,path:t,syscall:"cp",errno:lt})}o(Oi,"getStatsForCopy");function P0(s,e,t,r,i){return e?L0(s,t,r,i):od(s,t,r,i)}o(P0,"onFile");async function L0(s,e,t,r){if(r.force)return await td(t),od(s,e,t,r);if(r.errorOnExist)throw new h0({message:`${t} already exists`,path:t,syscall:"cp",errno:y0})}o(L0,"mayCopyFile");async function od(s,e,t,r){return await _0(e,t),r.preserveTimestamps?k0(s.mode,e,t):Ii(t,s.mode)}o(od,"_copyFile");async function k0(s,e,t){return D0(s)&&await M0(t,s),Jf(s,e,t)}o(k0,"handleTimestampsAndMode");function D0(s){return(s&128)===0}o(D0,"fileIsNotWritable");function M0(s,e){return Ii(s,e|128)}o(M0,"makeFileWritable");async function Jf(s,e,t){return await $0(e,t),Ii(t,s)}o(Jf,"setDestTimestampsAndMode");function Ii(s,e){return S0(s,e)}o(Ii,"setDestMode");async function $0(s,e){let t=await ds(s);return R0(e,t.atime,t.mtime)}o($0,"setDestTimestamps");function F0(s,e,t,r,i){return e?ad(t,r,i):q0(s.mode,t,r,i)}o(F0,"onDir");async function q0(s,e,t,r){return await ed(t),await ad(e,t,r),Ii(t,s)}o(q0,"mkDirAndCopy");async function ad(s,e,t){let r=await b0(s);for(let i=0;i<r.length;i++){let n=r[i],a=Wf(s,n),c=Wf(e,n),{destStat:h}=await sd(a,c,t);await N0(h,a,c,t)}}o(ad,"copyDir");async function U0(s,e,t){let r=await Gf(e);if(Vf(r)||(r=nr(ir(e),r)),!s)return Ia(r,t);let i;try{i=await Gf(t)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return Ia(r,t);throw a}if(Vf(i)||(i=nr(ir(t),i)),va(r,i))throw new Ri({message:`cannot copy ${r} to a subdirectory of self ${i}`,path:t,syscall:"cp",errno:lt});if((await ds(e)).isDirectory()&&va(i,r))throw new d0({message:`cannot overwrite ${i} with ${r}`,path:t,syscall:"cp",errno:lt});return j0(r,t)}o(U0,"onLink");async function j0(s,e){return await td(e),Ia(s,e)}o(j0,"copyLink");cd.exports=A0});var ld=m((MB,ud)=>{var H0=require("fs/promises"),z0=ia(),G0=Hf(),V0=hd(),W0=G0.satisfies(">=16.7.0"),Z0=o(async(s,e,t)=>{let r=z0(t,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return W0?H0.cp(s,e,r):V0(s,e,r)},"cp");ud.exports=Z0});var dd=m((FB,fd)=>{var{join:K0,sep:Y0}=require("path"),X0=ia(),{mkdir:J0,mkdtemp:Q0,rm:eb}=require("fs/promises"),tb=o(async(s,e,t)=>{let r=X0(t,{copy:["tmpPrefix"]});await J0(s,{recursive:!0});let i=await Q0(K0(`${s}${Y0}`,r.tmpPrefix||"")),n,a;try{a=await e(i)}catch(c){n=c}try{await eb(i,{force:!0,recursive:!0})}catch{}if(n)throw n;return a},"withTempDir");fd.exports=tb});var yd=m((UB,gd)=>{var{readdir:pd}=require("fs/promises"),{join:md}=require("path"),sb=o(async s=>{let e=[];for(let t of await pd(s))if(t.startsWith("@"))for(let r of await pd(md(s,t)))e.push(md(t,r));else e.push(t);return e},"readdirScoped");gd.exports=sb});var Rd=m((HB,bd)=>{var{dirname:Ed,join:wd,resolve:Sd,relative:rb,isAbsolute:ib}=require("path"),je=require("fs/promises"),nb=o(async s=>{try{return await je.access(s),!0}catch(e){return e.code!=="ENOENT"}},"pathExists"),_d=o(async(s,e,t={},r=!0,i=[])=>{if(!s||!e)throw new TypeError("`source` and `destination` file required");if(t={overwrite:!0,...t},!t.overwrite&&await nb(e))throw new Error(`The destination file exists: ${e}`);await je.mkdir(Ed(e),{recursive:!0});try{await je.rename(s,e)}catch(n){if(n.code==="EXDEV"||n.code==="EPERM"){let a=await je.lstat(s);if(a.isDirectory()){let c=await je.readdir(s);await Promise.all(c.map(h=>_d(wd(s,h),wd(e,h),t,!1,i)))}else a.isSymbolicLink()?i.push({source:s,destination:e}):await je.copyFile(s,e)}else throw n}r&&(await Promise.all(i.map(async({source:n,destination:a})=>{let c=await je.readlink(n);ib(c)&&(c=Sd(a,rb(n,c)));let h="file";try{h=await je.stat(Sd(Ed(n),c)),h.isDirectory()&&(h="junction")}catch{}await je.symlink(c,a,h)})),await je.rm(s,{recursive:!0,force:!0}))},"moveFile");bd.exports=_d});var vi=m((GB,Od)=>{"use strict";var ob=ld(),ab=dd(),cb=yd(),hb=Rd();Od.exports={cp:ob,withTempDir:ab,readdirScoped:cb,moveFile:hb}});var Ti={};Jg(Ti,{default:()=>Id,pMapIterable:()=>ub,pMapSkip:()=>or});async function Id(s,e,{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((n,a)=>{if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);let c=[],h=[],u=new Map,l=!1,f=!1,d=!1,p=0,g=0,y=s[Symbol.iterator]===void 0?s[Symbol.asyncIterator]():s[Symbol.iterator](),S=o(()=>{v(i.reason)},"signalListener"),w=o(()=>{i?.removeEventListener("abort",S)},"cleanup"),T=o(I=>{n(I),w()},"resolve"),v=o(I=>{l=!0,f=!0,a(I),w()},"reject");i&&(i.aborted&&v(i.reason),i.addEventListener("abort",S,{once:!0}));let R=o(async()=>{if(f)return;let I=await y.next(),C=g;if(g++,I.done){if(d=!0,p===0&&!f){if(!r&&h.length>0){v(new AggregateError(h));return}if(f=!0,u.size===0){T(c);return}let P=[];for(let[Y,Se]of c.entries())u.get(Y)!==or&&P.push(Se);T(P)}return}p++,(async()=>{try{let P=await I.value;if(f)return;let Y=await e(P,C);Y===or&&u.set(C,Y),c[C]=Y,p--,await R()}catch(P){if(r)v(P);else{h.push(P),p--;try{await R()}catch(Y){v(Y)}}}})()},"next");(async()=>{for(let I=0;I<t;I++){try{await R()}catch(C){v(C);break}if(d||l)break}})()})}function ub(s,e,{concurrency:t=Number.POSITIVE_INFINITY,backpressure:r=t}={}){if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);if(!(Number.isSafeInteger(r)&&r>=t||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${t}) and up or \`Infinity\`, got \`${r}\` (${typeof r})`);return{async*[Symbol.asyncIterator](){let i=s[Symbol.asyncIterator]===void 0?s[Symbol.iterator]():s[Symbol.asyncIterator](),n=[],a=0,c=!1,h=0;function u(){if(c||!(a<t&&n.length<r))return;let l=(async()=>{let{done:f,value:d}=await i.next();if(f)return{done:!0};a++,u();try{let p=await e(await d,h++);if(a--,p===or){let g=n.indexOf(l);g>0&&n.splice(g,1)}return u(),{done:!1,value:p}}catch(p){return c=!0,{error:p}}})();n.push(l)}for(o(u,"trySpawn"),u();n.length>0;){let{error:l,done:f,value:d}=await n[0];if(n.shift(),l)throw l;if(f)return;u(),d!==or&&(yield d)}}}}var or,Ai=Xg(()=>{o(Id,"pMap");o(ub,"pMapIterable");or=Symbol("skip")});var ps=m((ZB,ye)=>{"use strict";var lb=require("crypto"),{appendFile:fb,mkdir:xa,readFile:db,readdir:pb,rm:vd,writeFile:mb}=require("fs/promises"),{Minipass:gb}=J(),He=require("path"),yb=St(),Eb=ea(),wb=us(),Sb=sa(),_b=ta()["cache-version"].index,{moveFile:bb}=vi(),Ta=5;ye.exports.NotFoundError=class extends Error{static{o(this,"NotFoundError")}constructor(e,t){super(`No cache entry for ${t} found in ${e}`),this.code="ENOENT",this.cache=e,this.key=t}};ye.exports.compact=Rb;async function Rb(s,e,t,r={}){let i=ar(s,e),n=await xi(i),a=[];for(let d=n.length-1;d>=0;--d){let p=n[d];if(p.integrity===null&&!r.validateEntry)break;(!r.validateEntry||r.validateEntry(p)===!0)&&(a.length===0||!a.find(g=>t(g,p)))&&a.unshift(p)}let c=`
|
|
10
|
-
`+a.map(d=>{let p=JSON.stringify(d);return`${
|
|
11
|
-
`),h=o(async()=>{let d=
|
|
12
|
-
${
|
|
13
|
-
`).forEach(t=>{if(!t)return;let r=t.split(" ");if(!r[1]||Ci(r[1])!==r[0])return;let i;try{i=JSON.parse(r[1])}catch{}i&&e.push(i)}),e}o(Tb,"_bucketEntries");ye.exports.bucketDir=Ca;function Ca(s){return He.join(s,`index-v${_b}`)}o(Ca,"bucketDir");ye.exports.bucketPath=ar;function ar(s,e){let t=xd(e);return He.join.apply(He,[Ca(s)].concat(Sb(t)))}o(ar,"bucketPath");ye.exports.hashKey=xd;function xd(s){return Cd(s,"sha256")}o(xd,"hashKey");ye.exports.hashEntry=Ci;function Ci(s){return Cd(s,"sha1")}o(Ci,"hashEntry");function Cd(s,e){return lb.createHash(e).update(s).digest("hex")}o(Cd,"hash");function Bi(s,e,t){return!e.integrity&&!t?null:{key:e.key,integrity:e.integrity,path:e.integrity?wb(s,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(Bi,"formatEntry");function Aa(s){return pb(s).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(Aa,"readdirOrEmpty")});var gs=m(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.LRUCache=void 0;var Ab=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Nd=new Set,Ba=typeof process=="object"&&process?process:{},Pd=o((s,e,t,r)=>{typeof Ba.emitWarning=="function"&&Ba.emitWarning(s,e,t,r)},"emitWarning"),Ni=globalThis.AbortController,Bd=globalThis.AbortSignal;if(typeof Ni>"u"){Bd=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,i){this._onabort.push(i)}},Ni=class{static{o(this,"AbortController")}constructor(){e()}signal=new Bd;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let i of this.signal._onabort)i(r);this.signal.onabort?.(r)}}};let s=Ba.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{s&&(s=!1,Pd("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var xb=o(s=>!Nd.has(s),"shouldWarn"),JB=Symbol("type"),_t=o(s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),"isPosInt"),Ld=o(s=>_t(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?ms:null:null,"getUintArray"),ms=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},Na=class s{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=Ld(e);if(!t)return[];s.#e=!0;let r=new s(e,t);return s.#e=!1,r}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Pa=class s{static{o(this,"LRUCache")}#e;#t;#s;#r;#i;#a;#l;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#p;#d;#h;#n;#g;#_;#S;#y;#A;#E;#R;#v;#w;#b;#T;#m;#o;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#w,sizes:e.#R,keyMap:e.#d,keyList:e.#h,valList:e.#n,next:e.#g,prev:e.#_,get head(){return e.#S},get tail(){return e.#y},free:e.#A,isBackgroundFetch:o(t=>e.#u(t),"isBackgroundFetch"),backgroundFetch:o((t,r,i,n)=>e.#H(t,r,i,n),"backgroundFetch"),moveToTail:o(t=>e.#M(t),"moveToTail"),indexes:o(t=>e.#C(t),"indexes"),rindexes:o(t=>e.#N(t),"rindexes"),isStale:o(t=>e.#I(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#l}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:h,dispose:u,onInsert:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:p,maxSize:g=0,maxEntrySize:y=0,sizeCalculation:S,fetchMethod:w,memoMethod:T,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:C,ignoreFetchAbort:P,perf:Y}=e;if(Y!==void 0&&typeof Y?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=Y??Ab,t!==0&&!_t(t))throw new TypeError("max option must be a nonnegative integer");let Se=t?Ld(t):Array;if(!Se)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=g,this.maxEntrySize=y||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#l=T,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#T=!!w,this.#d=new Map,this.#h=new Array(t).fill(void 0),this.#n=new Array(t).fill(void 0),this.#g=new Se(t),this.#_=new Se(t),this.#S=0,this.#y=0,this.#A=Na.create(t),this.#c=0,this.#p=0,typeof u=="function"&&(this.#s=u),typeof l=="function"&&(this.#r=l),typeof f=="function"?(this.#i=f,this.#E=[]):(this.#i=void 0,this.#E=void 0),this.#b=!!this.#s,this.#o=!!this.#r,this.#m=!!this.#i,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#t!==0&&!_t(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!_t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=_t(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!_t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let Xe="LRU_CACHE_UNBOUNDED";xb(Xe)&&(Nd.add(Xe),Pd("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Xe,s))}}getRemainingTTL(e){return this.#d.has(e)?1/0:0}#P(){let e=new ms(this.#e),t=new ms(this.#e);this.#w=e,this.#v=t,this.#U=(n,a,c=this.#f.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#I(n)&&this.#B(this.#h[n],"expire")},a+1);h.unref&&h.unref()}},this.#x=n=>{t[n]=e[n]!==0?this.#f.now():0},this.#O=(n,a)=>{if(e[a]){let c=e[a],h=t[a];if(!c||!h)return;n.ttl=c,n.start=h,n.now=r||i();let u=n.now-h;n.remainingTTL=c-u}};let r=0,i=o(()=>{let n=this.#f.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#d.get(n);if(a===void 0)return 0;let c=e[a],h=t[a];if(!c||!h)return 1/0;let u=(r||i())-h;return c-u},this.#I=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(r||i())-a>c}}#x=o(()=>{},"#updateItemAge");#O=o(()=>{},"#statusTTL");#U=o(()=>{},"#setItemTTL");#I=o(()=>!1,"#isStale");#$(){let e=new ms(this.#e);this.#p=0,this.#R=e,this.#L=t=>{this.#p-=e[t],e[t]=0},this.#k=(t,r,i,n)=>{if(this.#u(r))return 0;if(!_t(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(r,t),!_t(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#F=(t,r,i)=>{if(e[t]=r,this.#t){let n=this.#t-e[t];for(;this.#p>n;)this.#D(!0)}this.#p+=e[t],i&&(i.entrySize=r,i.totalCalculatedSize=this.#p)}}#L=o(e=>{},"#removeItemSize");#F=o((e,t,r)=>{},"#addItemSize");#k=o((e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#C({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#y;!(!this.#j(t)||((e||!this.#I(t))&&(yield t),t===this.#S));)t=this.#_[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;!(!this.#j(t)||((e||!this.#I(t))&&(yield t),t===this.#y));)t=this.#g[t]}#j(e){return e!==void 0&&this.#d.get(this.#h[e])===e}*entries(){for(let e of this.#C())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*rentries(){for(let e of this.#N())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*keys(){for(let e of this.#C()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*values(){for(let e of this.#C())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#N())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#C()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#h[r],this))return this.get(this.#h[r],t)}}forEach(e,t=this){for(let r of this.#C()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}rforEach(e,t=this){for(let r of this.#N()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#I(t)&&(this.#B(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#d.get(e);if(t===void 0)return;let r=this.#n[t],i=this.#u(r)?r.__staleWhileFetching:r;if(i===void 0)return;let n={value:i};if(this.#w&&this.#v){let a=this.#w[t],c=this.#v[t];if(a&&c){let h=a-(this.#f.now()-c);n.ttl=h,n.start=Date.now()}}return this.#R&&(n.size=this.#R[t]),n}dump(){let e=[];for(let t of this.#C({allowStale:!0})){let r=this.#h[t],i=this.#n[t],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0||r===void 0)continue;let a={value:n};if(this.#w&&this.#v){a.ttl=this.#w[t];let c=this.#f.now()-this.#v[t];a.start=Math.floor(Date.now()-c)}this.#R&&(a.size=this.#R[t]),e.unshift([r,a])}return e}load(e){this.clear();for(let[t,r]of e){if(r.start){let i=Date.now()-r.start;r.start=this.#f.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){if(t===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:h}=r,{noUpdateTTL:u=this.noUpdateTTL}=r,l=this.#k(e,t,r.size||0,c);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.#B(e,"set"),this;let f=this.#c===0?void 0:this.#d.get(e);if(f===void 0)f=this.#c===0?this.#y:this.#A.length!==0?this.#A.pop():this.#c===this.#e?this.#D(!1):this.#c,this.#h[f]=e,this.#n[f]=t,this.#d.set(e,f),this.#g[this.#y]=f,this.#_[f]=this.#y,this.#y=f,this.#c++,this.#F(f,l,h),h&&(h.set="add"),u=!1,this.#o&&this.#r?.(t,e,"add");else{this.#M(f);let d=this.#n[f];if(t!==d){if(this.#T&&this.#u(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!a&&(this.#b&&this.#s?.(p,e,"set"),this.#m&&this.#E?.push([p,e,"set"]))}else a||(this.#b&&this.#s?.(d,e,"set"),this.#m&&this.#E?.push([d,e,"set"]));if(this.#L(f),this.#F(f,l,h),this.#n[f]=t,h){h.set="replace";let p=d&&this.#u(d)?d.__staleWhileFetching:d;p!==void 0&&(h.oldValue=p)}}else h&&(h.set="update");this.#o&&this.onInsert?.(t,e,t===d?"update":"replace")}if(i!==0&&!this.#w&&this.#P(),this.#w&&(u||this.#U(f,i,n),h&&this.#O(h,f)),!a&&this.#m&&this.#E){let d=this.#E,p;for(;p=d?.shift();)this.#i?.(...p)}return this}pop(){try{for(;this.#c;){let e=this.#n[this.#S];if(this.#D(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#m&&this.#E){let e=this.#E,t;for(;t=e?.shift();)this.#i?.(...t)}}}#D(e){let t=this.#S,r=this.#h[t],i=this.#n[t];return this.#T&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(i,r,"evict"),this.#m&&this.#E?.push([i,r,"evict"])),this.#L(t),e&&(this.#h[t]=void 0,this.#n[t]=void 0,this.#A.push(t)),this.#c===1?(this.#S=this.#y=0,this.#A.length=0):this.#S=this.#g[t],this.#d.delete(r),this.#c--,t}has(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,n=this.#d.get(e);if(n!==void 0){let a=this.#n[n];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#I(n))i&&(i.has="stale",this.#O(i,n));else return r&&this.#x(n),i&&(i.has="hit",this.#O(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{allowStale:r=this.allowStale}=t,i=this.#d.get(e);if(i===void 0||!r&&this.#I(i))return;let n=this.#n[i];return this.#u(n)?n.__staleWhileFetching:n}#H(e,t,r,i){let n=t===void 0?void 0:this.#n[t];if(this.#u(n))return n;let a=new Ni,{signal:c}=r;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let h={signal:a.signal,options:r,context:i},u=o((y,S=!1)=>{let{aborted:w}=a.signal,T=r.ignoreFetchAbort&&y!==void 0;if(r.status&&(w&&!S?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,T&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),w&&!T&&!S)return f(a.signal.reason);let v=p,R=this.#n[t];return(R===p||T&&S&&R===void 0)&&(y===void 0?v.__staleWhileFetching!==void 0?this.#n[t]=v.__staleWhileFetching:this.#B(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,y,h.options))),y},"cb"),l=o(y=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=y),f(y)),"eb"),f=o(y=>{let{aborted:S}=a.signal,w=S&&r.allowStaleOnFetchAbort,T=w||r.allowStaleOnFetchRejection,v=T||r.noDeleteOnFetchRejection,R=p;if(this.#n[t]===p&&(!v||R.__staleWhileFetching===void 0?this.#B(e,"fetch"):w||(this.#n[t]=R.__staleWhileFetching)),T)return r.status&&R.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw y},"fetchFail"),d=o((y,S)=>{let w=this.#a?.(e,n,h);w&&w instanceof Promise&&w.then(T=>y(T===void 0?void 0:T),S),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(y(void 0),r.allowStaleOnFetchAbort&&(y=o(T=>u(T,!0),"res")))})},"pcall");r.status&&(r.status.fetchDispatched=!0);let p=new Promise(d).then(u,l),g=Object.assign(p,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...h.options,status:void 0}),t=this.#d.get(e)):this.#n[t]=g,g}#u(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Ni}async fetch(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:h=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:S=!1,status:w,signal:T}=t;if(!this.#T)return w&&(w.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:w});let v={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:h,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:g,ignoreFetchAbort:p,status:w,signal:T},R=this.#d.get(e);if(R===void 0){w&&(w.fetch="miss");let I=this.#H(e,R,v,y);return I.__returned=I}else{let I=this.#n[R];if(this.#u(I)){let Xe=r&&I.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",Xe&&(w.returnedStale=!0)),Xe?I.__staleWhileFetching:I.__returned=I}let C=this.#I(R);if(!S&&!C)return w&&(w.fetch="hit"),this.#M(R),i&&this.#x(R),w&&this.#O(w,R),I;let P=this.#H(e,R,v,y),Se=P.__staleWhileFetching!==void 0&&r;return w&&(w.fetch=C?"stale":"refresh",Se&&C&&(w.returnedStale=!0)),Se?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,t={}){let r=await this.fetch(e,t);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,t={}){let r=this.#l;if(!r)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let h=r(e,c,{options:a,context:i});return this.set(e,h,a),h}get(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#d.get(e);if(c!==void 0){let h=this.#n[c],u=this.#u(h);return a&&this.#O(a,c),this.#I(c)?(a&&(a.get="stale"),u?(a&&r&&h.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?h.__staleWhileFetching:void 0):(n||this.#B(e,"expire"),a&&r&&(a.returnedStale=!0),r?h:void 0)):(a&&(a.get="hit"),u?h.__staleWhileFetching:(this.#M(c),i&&this.#x(c),h))}else a&&(a.get="miss")}#z(e,t){this.#_[t]=e,this.#g[e]=t}#M(e){e!==this.#y&&(e===this.#S?this.#S=this.#g[e]:this.#z(this.#_[e],this.#g[e]),this.#z(this.#y,e),this.#y=e)}delete(e){return this.#B(e,"delete")}#B(e,t){let r=!1;if(this.#c!==0){let i=this.#d.get(e);if(i!==void 0)if(r=!0,this.#c===1)this.#q(t);else{this.#L(i);let n=this.#n[i];if(this.#u(n)?n.__abortController.abort(new Error("deleted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(n,e,t),this.#m&&this.#E?.push([n,e,t])),this.#d.delete(e),this.#h[i]=void 0,this.#n[i]=void 0,i===this.#y)this.#y=this.#_[i];else if(i===this.#S)this.#S=this.#g[i];else{let a=this.#_[i];this.#g[a]=this.#g[i];let c=this.#g[i];this.#_[c]=this.#_[i]}this.#c--,this.#A.push(i)}}if(this.#m&&this.#E?.length){let i=this.#E,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){return this.#q("delete")}#q(e){for(let t of this.#N({allowStale:!0})){let r=this.#n[t];if(this.#u(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#h[t];this.#b&&this.#s?.(r,i,e),this.#m&&this.#E?.push([r,i,e])}}if(this.#d.clear(),this.#n.fill(void 0),this.#h.fill(void 0),this.#w&&this.#v&&(this.#w.fill(0),this.#v.fill(0)),this.#R&&this.#R.fill(0),this.#S=0,this.#y=0,this.#A.length=0,this.#p=0,this.#c=0,this.#m&&this.#E){let t=this.#E,r;for(;r=t?.shift();)this.#i?.(...r)}}};Pi.LRUCache=Pa});var cr=m((t1,ys)=>{"use strict";var{LRUCache:Cb}=gs(),Li=new Cb({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:o((s,e)=>e.startsWith("key:")?s.data.length:s.length,"sizeCalculation")});ys.exports.clearMemoized=Bb;function Bb(){let s={};return Li.forEach((e,t)=>{s[t]=e}),Li.clear(),s}o(Bb,"clearMemoized");ys.exports.put=Nb;function Nb(s,e,t,r){ki(r).set(`key:${s}:${e.key}`,{entry:e,data:t}),kd(s,e.integrity,t,r)}o(Nb,"put");ys.exports.put.byDigest=kd;function kd(s,e,t,r){ki(r).set(`digest:${s}:${e}`,t)}o(kd,"putDigest");ys.exports.get=Pb;function Pb(s,e,t){return ki(t).get(`key:${s}:${e}`)}o(Pb,"get");ys.exports.get.byDigest=Lb;function Lb(s,e,t){return ki(t).get(`digest:${s}:${e}`)}o(Lb,"getDigest");var La=class{static{o(this,"ObjProxy")}constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}};function ki(s){return!s||!s.memoize?Li:s.memoize.get&&s.memoize.set?s.memoize:typeof s.memoize=="object"?new La(s.memoize):Li}o(ki,"pickMem")});var Hi=m(ur=>{"use strict";var{Minipass:kb}=J(),Db=require("events").EventEmitter,ue=require("fs"),Mb=ue.writev,bs=Symbol("_autoClose"),Pe=Symbol("_close"),hr=Symbol("_ended"),D=Symbol("_fd"),Dd=Symbol("_finished"),Rt=Symbol("_flags"),ka=Symbol("_flush"),Ma=Symbol("_handleChunk"),$a=Symbol("_makeBuf"),qi=Symbol("_mode"),Di=Symbol("_needDrain"),Ss=Symbol("_onerror"),Rs=Symbol("_onopen"),Da=Symbol("_onread"),Es=Symbol("_onwrite"),Ot=Symbol("_open"),ft=Symbol("_path"),qt=Symbol("_pos"),ze=Symbol("_queue"),ws=Symbol("_read"),Md=Symbol("_readSize"),bt=Symbol("_reading"),Mi=Symbol("_remain"),$d=Symbol("_size"),$i=Symbol("_write"),Ft=Symbol("_writing"),Fi=Symbol("_defaultFlag"),_s=Symbol("_errored"),Ui=class extends kb{static{o(this,"ReadStream")}constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[_s]=!1,this[D]=typeof t.fd=="number"?t.fd:null,this[ft]=e,this[Md]=t.readSize||16*1024*1024,this[bt]=!1,this[$d]=typeof t.size=="number"?t.size:1/0,this[Mi]=this[$d],this[bs]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[D]=="number"?this[ws]():this[Ot]()}get fd(){return this[D]}get path(){return this[ft]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ot](){ue.open(this[ft],"r",(e,t)=>this[Rs](e,t))}[Rs](e,t){e?this[Ss](e):(this[D]=t,this.emit("open",t),this[ws]())}[$a](){return Buffer.allocUnsafe(Math.min(this[Md],this[Mi]))}[ws](){if(!this[bt]){this[bt]=!0;let e=this[$a]();if(e.length===0)return process.nextTick(()=>this[Da](null,0,e));ue.read(this[D],e,0,e.length,null,(t,r,i)=>this[Da](t,r,i))}}[Da](e,t,r){this[bt]=!1,e?this[Ss](e):this[Ma](t,r)&&this[ws]()}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Ss](e){this[bt]=!0,this[Pe](),this.emit("error",e)}[Ma](e,t){let r=!1;return this[Mi]-=e,e>0&&(r=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[Mi]<=0)&&(r=!1,this[Pe](),super.end()),r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[D]=="number"&&this[ws]();break;case"error":return this[_s]?void 0:(this[_s]=!0,super.emit(e,t));default:return super.emit(e,t)}}},Fa=class extends Ui{static{o(this,"ReadStreamSync")}[Ot](){let e=!0;try{this[Rs](null,ue.openSync(this[ft],"r")),e=!1}finally{e&&this[Pe]()}}[ws](){let e=!0;try{if(!this[bt]){this[bt]=!0;do{let t=this[$a](),r=t.length===0?0:ue.readSync(this[D],t,0,t.length,null);if(!this[Ma](r,t))break}while(!0);this[bt]=!1}e=!1}finally{e&&this[Pe]()}}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.closeSync(e),this.emit("close")}}},ji=class extends Db{static{o(this,"WriteStream")}constructor(e,t){t=t||{},super(t),this.readable=!1,this.writable=!0,this[_s]=!1,this[Ft]=!1,this[hr]=!1,this[Di]=!1,this[ze]=[],this[ft]=e,this[D]=typeof t.fd=="number"?t.fd:null,this[qi]=t.mode===void 0?438:t.mode,this[qt]=typeof t.start=="number"?t.start:null,this[bs]=typeof t.autoClose=="boolean"?t.autoClose:!0;let r=this[qt]!==null?"r+":"w";this[Fi]=t.flags===void 0,this[Rt]=this[Fi]?r:t.flags,this[D]===null&&this[Ot]()}emit(e,t){if(e==="error"){if(this[_s])return;this[_s]=!0}return super.emit(e,t)}get fd(){return this[D]}get path(){return this[ft]}[Ss](e){this[Pe](),this[Ft]=!0,this.emit("error",e)}[Ot](){ue.open(this[ft],this[Rt],this[qi],(e,t)=>this[Rs](e,t))}[Rs](e,t){this[Fi]&&this[Rt]==="r+"&&e&&e.code==="ENOENT"?(this[Rt]="w",this[Ot]()):e?this[Ss](e):(this[D]=t,this.emit("open",t),this[Ft]||this[ka]())}end(e,t){return e&&this.write(e,t),this[hr]=!0,!this[Ft]&&!this[ze].length&&typeof this[D]=="number"&&this[Es](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[hr]?(this.emit("error",new Error("write() after end()")),!1):this[D]===null||this[Ft]||this[ze].length?(this[ze].push(e),this[Di]=!0,!1):(this[Ft]=!0,this[$i](e),!0)}[$i](e){ue.write(this[D],e,0,e.length,this[qt],(t,r)=>this[Es](t,r))}[Es](e,t){e?this[Ss](e):(this[qt]!==null&&(this[qt]+=t),this[ze].length?this[ka]():(this[Ft]=!1,this[hr]&&!this[Dd]?(this[Dd]=!0,this[Pe](),this.emit("finish")):this[Di]&&(this[Di]=!1,this.emit("drain"))))}[ka](){if(this[ze].length===0)this[hr]&&this[Es](null,0);else if(this[ze].length===1)this[$i](this[ze].pop());else{let e=this[ze];this[ze]=[],Mb(this[D],e,this[qt],(t,r)=>this[Es](t,r))}}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},qa=class extends ji{static{o(this,"WriteStreamSync")}[Ot](){let e;if(this[Fi]&&this[Rt]==="r+")try{e=ue.openSync(this[ft],this[Rt],this[qi])}catch(t){if(t.code==="ENOENT")return this[Rt]="w",this[Ot]();throw t}else e=ue.openSync(this[ft],this[Rt],this[qi]);this[Rs](null,e)}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.closeSync(e),this.emit("close")}}[$i](e){let t=!0;try{this[Es](null,ue.writeSync(this[D],e,0,e.length,this[qt])),t=!1}finally{if(t)try{this[Pe]()}catch{}}}};ur.ReadStream=Ui;ur.ReadStreamSync=Fa;ur.WriteStream=ji;ur.WriteStreamSync=qa});var ja=m((n1,Os)=>{"use strict";var lr=require("fs/promises"),$b=Hi(),Ua=St(),Fb=us(),Fd=hs();Os.exports=qb;var qd=64*1024*1024;async function qb(s,e,t={}){let{size:r}=t,{stat:i,cpath:n,sri:a}=await fr(s,e,async(h,u)=>({stat:r?{size:r}:await lr.stat(h),cpath:h,sri:u}));if(i.size>qd)return Ud(n,i.size,a,new Fd).concat();let c=await lr.readFile(n,{encoding:null});if(i.size!==c.length)throw Hb(i.size,c.length);if(!Ua.checkData(c,a))throw zb(a,n);return c}o(qb,"read");var Ud=o((s,e,t,r)=>(r.push(new $b.ReadStream(s,{size:e,readSize:qd}),Ua.integrityStream({integrity:t,size:e})),r),"readPipeline");Os.exports.stream=jd;Os.exports.readStream=jd;function jd(s,e,t={}){let{size:r}=t,i=new Fd;return Promise.resolve().then(async()=>{let{stat:n,cpath:a,sri:c}=await fr(s,e,async(h,u)=>({stat:r?{size:r}:await lr.stat(h),cpath:h,sri:u}));return Ud(a,n.size,c,i)}).catch(n=>i.emit("error",n)),i}o(jd,"readStream");Os.exports.copy=Ub;function Ub(s,e,t){return fr(s,e,r=>lr.copyFile(r,t))}o(Ub,"copy");Os.exports.hasContent=jb;async function jb(s,e){if(!e)return!1;try{return await fr(s,e,async(t,r)=>{let i=await lr.stat(t);return{size:i.size,sri:r,stat:i}})}catch(t){if(t.code==="ENOENT")return!1;if(t.code==="EPERM"){if(process.platform!=="win32")throw t;return!1}}}o(jb,"hasContent");async function fr(s,e,t){let r=Ua.parse(e),i=r.pickAlgorithm(),n=r[i];if(n.length<=1){let a=Fb(s,n[0]);return t(a,n[0])}else{let a=await Promise.all(n.map(async u=>{try{return await fr(s,u,t)}catch(l){return l.code==="ENOENT"?Object.assign(new Error("No matching content found for "+r.toString()),{code:"ENOENT"}):l}})),c=a.find(u=>!(u instanceof Error));if(c)return c;let h=a.find(u=>u.code==="ENOENT");throw h||a.find(u=>u instanceof Error)}}o(fr,"withContentSri");function Hb(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(Hb,"sizeError");function zb(s,e){let t=new Error(`Integrity verification failed for ${s} (${e})`);return t.code="EINTEGRITY",t.sri=s,t.path=e,t}o(zb,"integrityError")});var Vd=m((a1,pt)=>{"use strict";var Hd=Wo(),{Minipass:zd}=J(),Gd=hs(),Ut=ps(),dt=cr(),jt=ja();async function Gb(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=dt.get(s,e,t);if(a&&i!==!1)return{metadata:a.entry.metadata,data:a.data,integrity:a.entry.integrity,size:a.entry.size};let c=await Ut.find(s,e,t);if(!c)throw new Ut.NotFoundError(s,e);let h=await jt(s,c.integrity,{integrity:r,size:n});return i&&dt.put(s,c,h,t),{data:h,metadata:c.metadata,size:c.size,integrity:c.integrity}}o(Gb,"getData");pt.exports=Gb;async function Vb(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=dt.get.byDigest(s,e,t);if(a&&i!==!1)return a;let c=await jt(s,e,{integrity:r,size:n});return i&&dt.put.byDigest(s,e,c,t),c}o(Vb,"getDataByDigest");pt.exports.byDigest=Vb;var Wb=o(s=>{let e=new zd;return e.on("newListener",function(t,r){t==="metadata"&&r(s.entry.metadata),t==="integrity"&&r(s.entry.integrity),t==="size"&&r(s.entry.size)}),e.end(s.data),e},"getMemoizedStream");function Zb(s,e,t={}){let{memoize:r,size:i}=t,n=dt.get(s,e,t);if(n&&r!==!1)return Wb(n);let a=new Gd;return Promise.resolve().then(async()=>{let c=await Ut.find(s,e);if(!c)throw new Ut.NotFoundError(s,e);a.emit("metadata",c.metadata),a.emit("integrity",c.integrity),a.emit("size",c.size),a.on("newListener",function(u,l){u==="metadata"&&l(c.metadata),u==="integrity"&&l(c.integrity),u==="size"&&l(c.size)});let h=jt.readStream(s,c.integrity,{...t,size:typeof i!="number"?c.size:i});if(r){let u=new Hd.PassThrough;u.on("collect",l=>dt.put(s,c,l,t)),a.unshift(u)}return a.unshift(h),a}).catch(c=>a.emit("error",c)),a}o(Zb,"getStream");pt.exports.stream=Zb;function Kb(s,e,t={}){let{memoize:r}=t,i=dt.get.byDigest(s,e,t);if(i&&r!==!1){let n=new zd;return n.end(i),n}else{let n=jt.readStream(s,e,t);if(!r)return n;let a=new Hd.PassThrough;return a.on("collect",c=>dt.put.byDigest(s,e,c,t)),new Gd(n,a)}}o(Kb,"getStreamDigest");pt.exports.stream.byDigest=Kb;function Yb(s,e,t={}){let{memoize:r}=t,i=dt.get(s,e,t);return i&&r!==!1?Promise.resolve(i.entry):Ut.find(s,e)}o(Yb,"info");pt.exports.info=Yb;async function Xb(s,e,t,r={}){let i=await Ut.find(s,e,r);if(!i)throw new Ut.NotFoundError(s,e);return await jt.copy(s,i.integrity,t,r),{metadata:i.metadata,size:i.size,integrity:i.integrity}}o(Xb,"copy");pt.exports.copy=Xb;async function Jb(s,e,t,r={}){return await jt.copy(s,e,t,r),e}o(Jb,"copyByDigest");pt.exports.copy.byDigest=Jb;pt.exports.hasContent=jt.hasContent});var Xd=m((h1,Va)=>{"use strict";var Wd=require("events"),Qb=us(),pr=require("fs/promises"),{moveFile:eR}=vi(),{Minipass:tR}=J(),Zd=hs(),sR=hi(),Ha=require("path"),za=St(),rR=ea(),iR=Hi();Va.exports=nR;var dr=new Map;async function nR(s,e,t={}){let{algorithms:r,size:i,integrity:n}=t;if(typeof i=="number"&&e.length!==i)throw hR(i,e.length);let a=za.fromData(e,r?{algorithms:r}:{});if(n&&!za.checkData(e,n,t))throw uR(n,a);for(let c in a){let h=await Kd(s,t),u=a[c].toString();try{await pr.writeFile(h.target,e,{flag:"wx"}),await Yd(h,s,u,t)}finally{h.moved||await pr.rm(h.target,{recursive:!0,force:!0})}}return{integrity:a,size:e.length}}o(nR,"write");Va.exports.stream=oR;var Ga=class extends sR{static{o(this,"CacacheWriteStream")}constructor(e,t){super(),this.opts=t,this.cache=e,this.inputStream=new tR,this.inputStream.on("error",r=>this.emit("error",r)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(e,t,r){return this.handleContentP||(this.handleContentP=aR(this.inputStream,this.cache,this.opts),this.handleContentP.catch(i=>this.emit("error",i))),this.inputStream.write(e,t,r)}flush(e){this.inputStream.end(()=>{if(!this.handleContentP){let t=new Error("Cache input stream was empty");return t.code="ENODATA",Promise.reject(t).catch(e)}this.handleContentP.then(t=>{t.integrity&&this.emit("integrity",t.integrity),t.size!==null&&this.emit("size",t.size),e()},t=>e(t))})}};function oR(s,e={}){return new Ga(s,e)}o(oR,"writeStream");async function aR(s,e,t){let r=await Kd(e,t);try{let i=await cR(s,e,r.target,t);return await Yd(r,e,i.integrity,t),i}finally{r.moved||await pr.rm(r.target,{recursive:!0,force:!0})}}o(aR,"handleContent");async function cR(s,e,t,r){let i=new iR.WriteStream(t,{flags:"wx"});if(r.integrityEmitter){let[u,l]=await Promise.all([Wd.once(r.integrityEmitter,"integrity").then(f=>f[0]),Wd.once(r.integrityEmitter,"size").then(f=>f[0]),new Zd(s,i).promise()]);return{integrity:u,size:l}}let n,a,c=za.integrityStream({integrity:r.integrity,algorithms:r.algorithms,size:r.size});return c.on("integrity",u=>{n=u}),c.on("size",u=>{a=u}),await new Zd(s,c,i).promise(),{integrity:n,size:a}}o(cR,"pipeToTmp");async function Kd(s,e){let t=rR(Ha.join(s,"tmp"),e.tmpPrefix);return await pr.mkdir(Ha.dirname(t),{recursive:!0}),{target:t,moved:!1}}o(Kd,"makeTmp");async function Yd(s,e,t){let r=Qb(e,t),i=Ha.dirname(r);return dr.has(r)||dr.set(r,pr.mkdir(i,{recursive:!0}).then(async()=>(await eR(s.target,r,{overwrite:!1}),s.moved=!0,s.moved)).catch(n=>{if(!n.message.startsWith("The destination file exists"))throw Object.assign(n,{code:"EEXIST"})}).finally(()=>{dr.delete(r)})),dr.get(r)}o(Yd,"moveToDestination");function hR(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(hR,"sizeError");function uR(s,e){let t=new Error(`Integrity check failed:
|
|
10
|
+
Found: ${s.length}`);throw c.code="EBADSIZE",c.found=s.length,c.expected=t.size,c.sri=e,c}else{let c=new Error(`Integrity checksum failed when using ${r}: Wanted ${e}, but got ${n}. (${s.length} bytes)`);throw c.code="EINTEGRITY",c.found=n,c.expected=e,c.algorithm=r,c.sri=e,c}}o(GE,"checkData");qe.exports.checkStream=VE;function VE(s,e,t){if(t=t||Object.create(null),t.integrity=e,e=me(e,t),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let r=qo(t);return new Promise((i,n)=>{s.pipe(r),s.on("error",n),r.on("error",n);let a;r.on("verified",c=>{a=c}),r.on("end",()=>i(a)),r.resume()})}o(VE,"checkStream");qe.exports.integrityStream=qo;function qo(s=Object.create(null)){return new $o(s)}o(qo,"integrityStream");qe.exports.create=WE;function WE(s){let e=s?.algorithms||[...Fo],t=Xs(s?.options),r=e.map(Ys.createHash);return{update:o(function(i,n){return r.forEach(a=>a.update(i,n)),this},"update"),digest:o(function(){return e.reduce((n,a)=>{let c=r.shift().digest("base64"),h=new ht(`${a}-${c}${t}`,s);if(h.algorithm&&h.digest){let u=h.algorithm;n[u]||(n[u]=[]),n[u].push(h)}return n},new Dt)},"digest")}}o(WE,"createIntegrity");var ZE=Ys.getHashes(),Au=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(s=>ZE.includes(s));function KE(s,e){return Au.indexOf(s.toLowerCase())>=Au.indexOf(e.toLowerCase())?s:e}o(KE,"getPrioritizedHash")});var jo=m((Px,Pu)=>{var xu=ou(),Cu=vu(),YE=St(),Bu={shared:!1,ignoreCargoCult:!0},XE={status:200,headers:{}},os=o(s=>{let e={method:s.method,url:s.url,headers:{},compress:s.compress};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"requestObject"),Nu=o(s=>{let e={status:s.status,headers:{}};return s.headers.forEach((t,r)=>{e.headers[r]=t}),e},"responseObject"),Uo=class{static{o(this,"CachePolicy")}constructor({entry:e,request:t,response:r,options:i}){this.entry=e,this.request=os(t),this.response=Nu(r),this.options=i,this.policy=new xu(this.request,this.response,Bu),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(e,t){return!t.cachePath||t.cache==="no-store"||!["GET","HEAD"].includes(e.method)?!1:new xu(os(e),XE,Bu).storable()}satisfies(e){let t=os(e);if(this.request.headers.host!==t.headers.host||this.request.compress!==t.compress)return!1;let r=new Cu(this.request),i=new Cu(t);return JSON.stringify(r.mediaTypes())!==JSON.stringify(i.mediaTypes())||JSON.stringify(r.languages())!==JSON.stringify(i.languages())||JSON.stringify(r.encodings())!==JSON.stringify(i.encodings())?!1:this.options.integrity?YE.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(e){let t=os(e);return t.method="GET",!this.policy.satisfiesWithoutRevalidation(t)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(e){let t=os(e);return this.policy.revalidationHeaders(t)}revalidated(e,t){let r=os(e),i=Nu(t);return!this.policy.revalidatedPolicy(r,i).modified}};Pu.exports=Uo});var ku=m((kx,Lu)=>{var Ho=class extends Error{static{o(this,"NotCachedError")}constructor(e){super(`request to ${e} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};Lu.exports={NotCachedError:Ho}});var ui=m((Mx,Fu)=>{var JE=ei(),Du=Symbol("_flush"),Mu=Symbol("_flushed"),$u=Symbol("_flushing"),zo=class extends JE{static{o(this,"Flush")}constructor(e={}){if(typeof e=="function"&&(e={flush:e}),super(e),typeof e.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[Du]=e.flush||this.flush}emit(e,...t){if(e!=="end"&&e!=="finish"||this[Mu])return super.emit(e,...t);if(this[$u])return;this[$u]=!0;let r=o(n=>{this[Mu]=!0,n?super.emit("error",n):super.emit("end")},"afterFlush"),i=this[Du](r);i&&i.then&&i.then(()=>r(),n=>r(n))}};Fu.exports=zo});var Zo=m((Fx,Wo)=>{var{Minipass:qu}=J(),as=Symbol("_data"),cs=Symbol("_length"),Go=class extends qu{static{o(this,"Collect")}constructor(e){super(e),this[as]=[],this[cs]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[as].push(i),this[cs]+=i.length,r&&r(),!0}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[as],this[cs]);return super.write(i),super.end(r)}};Wo.exports=Go;var Vo=class extends qu{static{o(this,"CollectPassThrough")}constructor(e){super(e),this[as]=[],this[cs]=0}write(e,t,r){typeof t=="function"&&(r=t,t="utf8"),t||(t="utf8");let i=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[as].push(i),this[cs]+=i.length,super.write(e,t,r)}end(e,t,r){typeof e=="function"&&(r=e,e=null),typeof t=="function"&&(r=t,t="utf8"),e&&this.write(e,t);let i=Buffer.concat(this[as],this[cs]);return this.emit("collect",i),super.end(r)}};Wo.exports.PassThrough=Vo});var hs=m((Ux,zu)=>{var QE=ei(),ew=require("events"),tw=o(s=>s&&s instanceof ew&&(typeof s.pipe=="function"||typeof s.write=="function"&&typeof s.end=="function"),"isStream"),Mt=Symbol("_head"),ge=Symbol("_tail"),Ko=Symbol("_linkStreams"),Yo=Symbol("_setHead"),Xo=Symbol("_setTail"),Uu=Symbol("_onError"),ju=Symbol("_onData"),Jo=Symbol("_onEnd"),Hu=Symbol("_onDrain"),li=Symbol("_streams"),Qo=class extends QE{static{o(this,"Pipeline")}constructor(e,...t){tw(e)&&(t.unshift(e),e={}),super(e),this[li]=[],t.length&&this.push(...t)}[Ko](e){return e.reduce((t,r)=>(t.on("error",i=>r.emit("error",i)),t.pipe(r),r))}push(...e){this[li].push(...e),this[ge]&&e.unshift(this[ge]);let t=this[Ko](e);this[Xo](t),this[Mt]||this[Yo](e[0])}unshift(...e){this[li].unshift(...e),this[Mt]&&e.push(this[Mt]);let t=this[Ko](e);this[Yo](e[0]),this[ge]||this[Xo](t)}destroy(e){return this[li].forEach(t=>typeof t.destroy=="function"&&t.destroy()),super.destroy(e)}[Xo](e){this[ge]=e,e.on("error",t=>this[Uu](e,t)),e.on("data",t=>this[ju](e,t)),e.on("end",()=>this[Jo](e)),e.on("finish",()=>this[Jo](e))}[Uu](e,t){e===this[ge]&&this.emit("error",t)}[ju](e,t){e===this[ge]&&super.write(t)}[Jo](e){e===this[ge]&&super.end()}pause(){return super.pause(),this[ge]&&this[ge].pause&&this[ge].pause()}emit(e,...t){return e==="resume"&&this[ge]&&this[ge].resume&&this[ge].resume(),super.emit(e,...t)}[Yo](e){this[Mt]=e,e.on("drain",()=>this[Hu](e))}[Hu](e){e===this[Mt]&&this.emit("drain")}write(e,t,r){return this[Mt].write(e,t,r)&&(this.flowing||this.buffer.length===0)}end(e,t,r){return this[Mt].end(e,t,r),this}};zu.exports=Qo});var Gu=m((Hx,ea)=>{(function(){var s;function e(t,r){var i=this instanceof e?this:s;if(i.reset(r),typeof t=="string"&&t.length>0&&i.hash(t),i!==this)return i}o(e,"MurmurHash3"),e.prototype.hash=function(t){var r,i,n,a,c;switch(c=t.length,this.len+=c,i=this.k1,n=0,this.rem){case 0:i^=c>n?t.charCodeAt(n++)&65535:0;case 1:i^=c>n?(t.charCodeAt(n++)&65535)<<8:0;case 2:i^=c>n?(t.charCodeAt(n++)&65535)<<16:0;case 3:i^=c>n?(t.charCodeAt(n)&255)<<24:0,i^=c>n?(t.charCodeAt(n++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(r=this.h1;i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,r^=i,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(n>=c);)i=t.charCodeAt(n++)&65535^(t.charCodeAt(n++)&65535)<<8^(t.charCodeAt(n++)&65535)<<16,a=t.charCodeAt(n++),i^=(a&255)<<24^(a&65280)>>8;switch(i=0,this.rem){case 3:i^=(t.charCodeAt(n+2)&65535)<<16;case 2:i^=(t.charCodeAt(n+1)&65535)<<8;case 1:i^=t.charCodeAt(n)&65535}this.h1=r}return this.k1=i,this},e.prototype.result=function(){var t,r;return t=this.k1,r=this.h1,t>0&&(t=t*11601+(t&65535)*3432906752&4294967295,t=t<<15|t>>>17,t=t*13715+(t&65535)*461832192&4294967295,r^=t),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},e.prototype.reset=function(t){return this.h1=typeof t=="number"?t:0,this.rem=this.k1=this.len=0,this},s=new e,typeof ea<"u"?ea.exports=e:this.MurmurHash3=e})()});var Wu=m((Gx,Vu)=>{"use strict";var sw=Gu();Vu.exports=function(s){if(s){var e=new sw(s);return("00000000"+e.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}});var ta=m((Vx,Zu)=>{var rw=require("path"),iw=Wu();Zu.exports=function(s,e,t){return rw.join(s,(e?e+"-":"")+iw(t))}});var sa=m((Wx,nw)=>{nw.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}});var ra=m((Zx,Ku)=>{"use strict";Ku.exports=ow;function ow(s){return[s.slice(0,2),s.slice(2,4),s.slice(4)]}o(ow,"hashToSegments")});var us=m((Yx,ia)=>{"use strict";var aw=sa()["cache-version"].content,cw=ra(),Yu=require("path"),hw=St();ia.exports=uw;function uw(s,e){let t=hw.parse(e,{single:!0});return Yu.join(Xu(s),t.algorithm,...cw(t.hexDigest()))}o(uw,"contentPath");ia.exports.contentDir=Xu;function Xu(s){return Yu.join(s,`content-v${aw}`)}o(Xu,"contentDir")});var na=m((Jx,Ju)=>{var lw=o((s,{copy:e,wrap:t})=>{let r={};if(s&&typeof s=="object")for(let i of e)s[i]!==void 0&&(r[i]=s[i]);else r[t]=s;return r},"getOptions");Ju.exports=lw});var Js=m((eC,Qu)=>{"use strict";var fw="2.0.0",dw=Number.MAX_SAFE_INTEGER||9007199254740991,pw=16,mw=250,gw=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Qu.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:pw,MAX_SAFE_BUILD_LENGTH:mw,MAX_SAFE_INTEGER:dw,RELEASE_TYPES:gw,SEMVER_SPEC_VERSION:fw,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Qs=m((tC,el)=>{"use strict";var yw=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...s)=>{}:()=>{};el.exports=yw});var ls=m((Ue,tl)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:oa,MAX_SAFE_BUILD_LENGTH:Ew,MAX_LENGTH:ww}=Js(),Sw=Qs();Ue=tl.exports={};var _w=Ue.re=[],bw=Ue.safeRe=[],_=Ue.src=[],Rw=Ue.safeSrc=[],b=Ue.t={},Ow=0,aa="[a-zA-Z0-9-]",Iw=[["\\s",1],["\\d",ww],[aa,Ew]],vw=o(s=>{for(let[e,t]of Iw)s=s.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return s},"makeSafeRegex"),A=o((s,e,t)=>{let r=vw(e),i=Ow++;Sw(s,i,e),b[s]=i,_[i]=e,Rw[i]=r,_w[i]=new RegExp(e,t?"g":void 0),bw[i]=new RegExp(r,t?"g":void 0)},"createToken");A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${aa}*`);A("MAINVERSION",`(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${_[b.NONNUMERICIDENTIFIER]}|${_[b.NUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${_[b.NONNUMERICIDENTIFIER]}|${_[b.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASE",`(?:-(${_[b.PRERELEASEIDENTIFIER]}(?:\\.${_[b.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${_[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[b.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${aa}+`);A("BUILD",`(?:\\+(${_[b.BUILDIDENTIFIER]}(?:\\.${_[b.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${_[b.MAINVERSION]}${_[b.PRERELEASE]}?${_[b.BUILD]}?`);A("FULL",`^${_[b.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${_[b.MAINVERSIONLOOSE]}${_[b.PRERELEASELOOSE]}?${_[b.BUILD]}?`);A("LOOSE",`^${_[b.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${_[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${_[b.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:${_[b.PRERELEASE]})?${_[b.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:${_[b.PRERELEASELOOSE]})?${_[b.BUILD]}?)?)?`);A("XRANGE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${oa}})(?:\\.(\\d{1,${oa}}))?(?:\\.(\\d{1,${oa}}))?`);A("COERCE",`${_[b.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",_[b.COERCEPLAIN]+`(?:${_[b.PRERELEASE]})?(?:${_[b.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",_[b.COERCE],!0);A("COERCERTLFULL",_[b.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${_[b.LONETILDE]}\\s+`,!0);Ue.tildeTrimReplace="$1~";A("TILDE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${_[b.LONECARET]}\\s+`,!0);Ue.caretTrimReplace="$1^";A("CARET",`^${_[b.LONECARET]}${_[b.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${_[b.LONECARET]}${_[b.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${_[b.GTLT]}\\s*(${_[b.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]}|${_[b.XRANGEPLAIN]})`,!0);Ue.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${_[b.XRANGEPLAIN]})\\s+-\\s+(${_[b.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${_[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[b.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var fi=m((rC,sl)=>{"use strict";var Tw=Object.freeze({loose:!0}),Aw=Object.freeze({}),xw=o(s=>s?typeof s!="object"?Tw:s:Aw,"parseOptions");sl.exports=xw});var ca=m((nC,nl)=>{"use strict";var rl=/^[0-9]+$/,il=o((s,e)=>{let t=rl.test(s),r=rl.test(e);return t&&r&&(s=+s,e=+e),s===e?0:t&&!r?-1:r&&!t?1:s<e?-1:1},"compareIdentifiers"),Cw=o((s,e)=>il(e,s),"rcompareIdentifiers");nl.exports={compareIdentifiers:il,rcompareIdentifiers:Cw}});var te=m((aC,al)=>{"use strict";var di=Qs(),{MAX_LENGTH:ol,MAX_SAFE_INTEGER:pi}=Js(),{safeRe:mi,t:gi}=ls(),Bw=fi(),{compareIdentifiers:fs}=ca(),ha=class s{static{o(this,"SemVer")}constructor(e,t){if(t=Bw(t),e instanceof s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ol)throw new TypeError(`version is longer than ${ol} characters`);di("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?mi[gi.LOOSE]:mi[gi.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>pi||this.major<0)throw new TypeError("Invalid major version");if(this.minor>pi||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>pi||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<pi)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(di("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if(typeof e=="string"&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),fs(this.major,e.major)||fs(this.minor,e.minor)||fs(this.patch,e.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(di("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fs(r,i)}while(++t)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(di("build compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return fs(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let i=`-${t}`.match(this.options.loose?mi[gi.PRERELEASELOOSE]:mi[gi.PRERELEASE]);if(!i||i[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(t){let n=[t,i];r===!1&&(n=[t]),fs(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};al.exports=ha});var $t=m((hC,hl)=>{"use strict";var cl=te(),Nw=o((s,e,t=!1)=>{if(s instanceof cl)return s;try{return new cl(s,e)}catch(r){if(!t)return null;throw r}},"parse");hl.exports=Nw});var ll=m((lC,ul)=>{"use strict";var Pw=$t(),Lw=o((s,e)=>{let t=Pw(s,e);return t?t.version:null},"valid");ul.exports=Lw});var dl=m((dC,fl)=>{"use strict";var kw=$t(),Dw=o((s,e)=>{let t=kw(s.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");fl.exports=Dw});var gl=m((mC,ml)=>{"use strict";var pl=te(),Mw=o((s,e,t,r,i)=>{typeof t=="string"&&(i=r,r=t,t=void 0);try{return new pl(s instanceof pl?s.version:s,t).inc(e,r,i).version}catch{return null}},"inc");ml.exports=Mw});var wl=m((yC,El)=>{"use strict";var yl=$t(),$w=o((s,e)=>{let t=yl(s,null,!0),r=yl(e,null,!0),i=t.compare(r);if(i===0)return null;let n=i>0,a=n?t:r,c=n?r:t,h=!!a.prerelease.length;if(!!c.prerelease.length&&!h){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let l=h?"pre":"";return t.major!==r.major?l+"major":t.minor!==r.minor?l+"minor":t.patch!==r.patch?l+"patch":"prerelease"},"diff");El.exports=$w});var _l=m((wC,Sl)=>{"use strict";var Fw=te(),qw=o((s,e)=>new Fw(s,e).major,"major");Sl.exports=qw});var Rl=m((_C,bl)=>{"use strict";var Uw=te(),jw=o((s,e)=>new Uw(s,e).minor,"minor");bl.exports=jw});var Il=m((RC,Ol)=>{"use strict";var Hw=te(),zw=o((s,e)=>new Hw(s,e).patch,"patch");Ol.exports=zw});var Tl=m((IC,vl)=>{"use strict";var Gw=$t(),Vw=o((s,e)=>{let t=Gw(s,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");vl.exports=Vw});var _e=m((TC,xl)=>{"use strict";var Al=te(),Ww=o((s,e,t)=>new Al(s,t).compare(new Al(e,t)),"compare");xl.exports=Ww});var Bl=m((xC,Cl)=>{"use strict";var Zw=_e(),Kw=o((s,e,t)=>Zw(e,s,t),"rcompare");Cl.exports=Kw});var Pl=m((BC,Nl)=>{"use strict";var Yw=_e(),Xw=o((s,e)=>Yw(s,e,!0),"compareLoose");Nl.exports=Xw});var yi=m((PC,kl)=>{"use strict";var Ll=te(),Jw=o((s,e,t)=>{let r=new Ll(s,t),i=new Ll(e,t);return r.compare(i)||r.compareBuild(i)},"compareBuild");kl.exports=Jw});var Ml=m((kC,Dl)=>{"use strict";var Qw=yi(),eS=o((s,e)=>s.sort((t,r)=>Qw(t,r,e)),"sort");Dl.exports=eS});var Fl=m((MC,$l)=>{"use strict";var tS=yi(),sS=o((s,e)=>s.sort((t,r)=>tS(r,t,e)),"rsort");$l.exports=sS});var er=m((FC,ql)=>{"use strict";var rS=_e(),iS=o((s,e,t)=>rS(s,e,t)>0,"gt");ql.exports=iS});var Ei=m((UC,Ul)=>{"use strict";var nS=_e(),oS=o((s,e,t)=>nS(s,e,t)<0,"lt");Ul.exports=oS});var ua=m((HC,jl)=>{"use strict";var aS=_e(),cS=o((s,e,t)=>aS(s,e,t)===0,"eq");jl.exports=cS});var la=m((GC,Hl)=>{"use strict";var hS=_e(),uS=o((s,e,t)=>hS(s,e,t)!==0,"neq");Hl.exports=uS});var wi=m((WC,zl)=>{"use strict";var lS=_e(),fS=o((s,e,t)=>lS(s,e,t)>=0,"gte");zl.exports=fS});var Si=m((KC,Gl)=>{"use strict";var dS=_e(),pS=o((s,e,t)=>dS(s,e,t)<=0,"lte");Gl.exports=pS});var fa=m((XC,Vl)=>{"use strict";var mS=ua(),gS=la(),yS=er(),ES=wi(),wS=Ei(),SS=Si(),_S=o((s,e,t,r)=>{switch(e){case"===":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s===t;case"!==":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s!==t;case"":case"=":case"==":return mS(s,t,r);case"!=":return gS(s,t,r);case">":return yS(s,t,r);case">=":return ES(s,t,r);case"<":return wS(s,t,r);case"<=":return SS(s,t,r);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Vl.exports=_S});var Zl=m((QC,Wl)=>{"use strict";var bS=te(),RS=$t(),{safeRe:_i,t:bi}=ls(),OS=o((s,e)=>{if(s instanceof bS)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;e=e||{};let t=null;if(!e.rtl)t=s.match(e.includePrerelease?_i[bi.COERCEFULL]:_i[bi.COERCE]);else{let h=e.includePrerelease?_i[bi.COERCERTLFULL]:_i[bi.COERCERTL],u;for(;(u=h.exec(s))&&(!t||t.index+t[0].length!==s.length);)(!t||u.index+u[0].length!==t.index+t[0].length)&&(t=u),h.lastIndex=u.index+u[1].length+u[2].length;h.lastIndex=-1}if(t===null)return null;let r=t[2],i=t[3]||"0",n=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return RS(`${r}.${i}.${n}${a}${c}`,e)},"coerce");Wl.exports=OS});var Yl=m((tB,Kl)=>{"use strict";var da=class{static{o(this,"LRUCache")}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 i=this.map.keys().next().value;this.delete(i)}this.map.set(e,t)}return this}};Kl.exports=da});var be=m((rB,ef)=>{"use strict";var IS=/\s+/g,pa=class s{static{o(this,"Range")}constructor(e,t){if(t=TS(t),e instanceof s)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new s(e.raw,t);if(e instanceof ma)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(IS," "),this.set=this.raw.split("||").map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let r=this.set[0];if(this.set=this.set.filter(i=>!Jl(i[0])),this.set.length===0)this.set=[r];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&LS(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let r=0;r<t.length;r++)r>0&&(this.formatted+=" "),this.formatted+=t[r].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let r=((this.options.includePrerelease&&NS)|(this.options.loose&&PS))+":"+e,i=Xl.get(r);if(i)return i;let n=this.options.loose,a=n?he[ne.HYPHENRANGELOOSE]:he[ne.HYPHENRANGE];e=e.replace(a,zS(this.options.includePrerelease)),q("hyphen replace",e),e=e.replace(he[ne.COMPARATORTRIM],xS),q("comparator trim",e),e=e.replace(he[ne.TILDETRIM],CS),q("tilde trim",e),e=e.replace(he[ne.CARETTRIM],BS),q("caret trim",e);let c=e.split(" ").map(f=>kS(f,this.options)).join(" ").split(/\s+/).map(f=>HS(f,this.options));n&&(c=c.filter(f=>(q("loose invalid filter",f,this.options),!!f.match(he[ne.COMPARATORLOOSE])))),q("range list",c);let h=new Map,u=c.map(f=>new ma(f,this.options));for(let f of u){if(Jl(f))return[f];h.set(f.value,f)}h.size>1&&h.has("")&&h.delete("");let l=[...h.values()];return Xl.set(r,l),l}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Range is required");return this.set.some(r=>Ql(r,t)&&e.set.some(i=>Ql(i,t)&&r.every(n=>i.every(a=>n.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AS(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(GS(this.set[t],e,this.options))return!0;return!1}};ef.exports=pa;var vS=Yl(),Xl=new vS,TS=fi(),ma=tr(),q=Qs(),AS=te(),{safeRe:he,t:ne,comparatorTrimReplace:xS,tildeTrimReplace:CS,caretTrimReplace:BS}=ls(),{FLAG_INCLUDE_PRERELEASE:NS,FLAG_LOOSE:PS}=Js(),Jl=o(s=>s.value==="<0.0.0-0","isNullSet"),LS=o(s=>s.value==="","isAny"),Ql=o((s,e)=>{let t=!0,r=s.slice(),i=r.pop();for(;t&&r.length;)t=r.every(n=>i.intersects(n,e)),i=r.pop();return t},"isSatisfiable"),kS=o((s,e)=>(q("comp",s,e),s=$S(s,e),q("caret",s),s=DS(s,e),q("tildes",s),s=qS(s,e),q("xrange",s),s=jS(s,e),q("stars",s),s),"parseComparator"),oe=o(s=>!s||s.toLowerCase()==="x"||s==="*","isX"),DS=o((s,e)=>s.trim().split(/\s+/).map(t=>MS(t,e)).join(" "),"replaceTildes"),MS=o((s,e)=>{let t=e.loose?he[ne.TILDELOOSE]:he[ne.TILDE];return s.replace(t,(r,i,n,a,c)=>{q("tilde",s,r,i,n,a,c);let h;return oe(i)?h="":oe(n)?h=`>=${i}.0.0 <${+i+1}.0.0-0`:oe(a)?h=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:c?(q("replaceTilde pr",c),h=`>=${i}.${n}.${a}-${c} <${i}.${+n+1}.0-0`):h=`>=${i}.${n}.${a} <${i}.${+n+1}.0-0`,q("tilde return",h),h})},"replaceTilde"),$S=o((s,e)=>s.trim().split(/\s+/).map(t=>FS(t,e)).join(" "),"replaceCarets"),FS=o((s,e)=>{q("caret",s,e);let t=e.loose?he[ne.CARETLOOSE]:he[ne.CARET],r=e.includePrerelease?"-0":"";return s.replace(t,(i,n,a,c,h)=>{q("caret",s,i,n,a,c,h);let u;return oe(n)?u="":oe(a)?u=`>=${n}.0.0${r} <${+n+1}.0.0-0`:oe(c)?n==="0"?u=`>=${n}.${a}.0${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.0${r} <${+n+1}.0.0-0`:h?(q("replaceCaret pr",h),n==="0"?a==="0"?u=`>=${n}.${a}.${c}-${h} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}-${h} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c}-${h} <${+n+1}.0.0-0`):(q("no pr"),n==="0"?a==="0"?u=`>=${n}.${a}.${c}${r} <${n}.${a}.${+c+1}-0`:u=`>=${n}.${a}.${c}${r} <${n}.${+a+1}.0-0`:u=`>=${n}.${a}.${c} <${+n+1}.0.0-0`),q("caret return",u),u})},"replaceCaret"),qS=o((s,e)=>(q("replaceXRanges",s,e),s.split(/\s+/).map(t=>US(t,e)).join(" ")),"replaceXRanges"),US=o((s,e)=>{s=s.trim();let t=e.loose?he[ne.XRANGELOOSE]:he[ne.XRANGE];return s.replace(t,(r,i,n,a,c,h)=>{q("xRange",s,r,i,n,a,c,h);let u=oe(n),l=u||oe(a),f=l||oe(c),d=f;return i==="="&&d&&(i=""),h=e.includePrerelease?"-0":"",u?i===">"||i==="<"?r="<0.0.0-0":r="*":i&&d?(l&&(a=0),c=0,i===">"?(i=">=",l?(n=+n+1,a=0,c=0):(a=+a+1,c=0)):i==="<="&&(i="<",l?n=+n+1:a=+a+1),i==="<"&&(h="-0"),r=`${i+n}.${a}.${c}${h}`):l?r=`>=${n}.0.0${h} <${+n+1}.0.0-0`:f&&(r=`>=${n}.${a}.0${h} <${n}.${+a+1}.0-0`),q("xRange return",r),r})},"replaceXRange"),jS=o((s,e)=>(q("replaceStars",s,e),s.trim().replace(he[ne.STAR],"")),"replaceStars"),HS=o((s,e)=>(q("replaceGTE0",s,e),s.trim().replace(he[e.includePrerelease?ne.GTE0PRE:ne.GTE0],"")),"replaceGTE0"),zS=o(s=>(e,t,r,i,n,a,c,h,u,l,f,d)=>(oe(r)?t="":oe(i)?t=`>=${r}.0.0${s?"-0":""}`:oe(n)?t=`>=${r}.${i}.0${s?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${s?"-0":""}`,oe(u)?h="":oe(l)?h=`<${+u+1}.0.0-0`:oe(f)?h=`<${u}.${+l+1}.0-0`:d?h=`<=${u}.${l}.${f}-${d}`:s?h=`<${u}.${l}.${+f+1}-0`:h=`<=${h}`,`${t} ${h}`.trim()),"hyphenReplace"),GS=o((s,e,t)=>{for(let r=0;r<s.length;r++)if(!s[r].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let r=0;r<s.length;r++)if(q(s[r].semver),s[r].semver!==ma.ANY&&s[r].semver.prerelease.length>0){let i=s[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},"testSet")});var tr=m((nB,af)=>{"use strict";var sr=Symbol("SemVer ANY"),Ea=class s{static{o(this,"Comparator")}static get ANY(){return sr}constructor(e,t){if(t=tf(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ya("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===sr?this.value="":this.value=this.operator+this.semver.version,ya("comp",this)}parse(e){let t=this.options.loose?sf[rf.COMPARATORLOOSE]:sf[rf.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new nf(r[2],this.options.loose):this.semver=sr}toString(){return this.value}test(e){if(ya("Comparator.test",e,this.options.loose),this.semver===sr||e===sr)return!0;if(typeof e=="string")try{e=new nf(e,this.options)}catch{return!1}return ga(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new of(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new of(this.value,t).test(e.semver):(t=tf(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||ga(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ga(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};af.exports=Ea;var tf=fi(),{safeRe:sf,t:rf}=ls(),ga=fa(),ya=Qs(),nf=te(),of=be()});var rr=m((aB,cf)=>{"use strict";var VS=be(),WS=o((s,e,t)=>{try{e=new VS(e,t)}catch{return!1}return e.test(s)},"satisfies");cf.exports=WS});var uf=m((hB,hf)=>{"use strict";var ZS=be(),KS=o((s,e)=>new ZS(s,e).set.map(t=>t.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");hf.exports=KS});var ff=m((lB,lf)=>{"use strict";var YS=te(),XS=be(),JS=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new XS(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===-1)&&(r=a,i=new YS(r,t))}),r},"maxSatisfying");lf.exports=JS});var pf=m((dB,df)=>{"use strict";var QS=te(),e_=be(),t_=o((s,e,t)=>{let r=null,i=null,n=null;try{n=new e_(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!r||i.compare(a)===1)&&(r=a,i=new QS(r,t))}),r},"minSatisfying");df.exports=t_});var yf=m((mB,gf)=>{"use strict";var wa=te(),s_=be(),mf=er(),r_=o((s,e)=>{s=new s_(s,e);let t=new wa("0.0.0");if(s.test(t)||(t=new wa("0.0.0-0"),s.test(t)))return t;t=null;for(let r=0;r<s.set.length;++r){let i=s.set[r],n=null;i.forEach(a=>{let c=new wa(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!n||mf(c,n))&&(n=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),n&&(!t||mf(t,n))&&(t=n)}return t&&s.test(t)?t:null},"minVersion");gf.exports=r_});var wf=m((yB,Ef)=>{"use strict";var i_=be(),n_=o((s,e)=>{try{return new i_(s,e).range||"*"}catch{return null}},"validRange");Ef.exports=n_});var Ri=m((wB,Rf)=>{"use strict";var o_=te(),bf=tr(),{ANY:a_}=bf,c_=be(),h_=rr(),Sf=er(),_f=Ei(),u_=Si(),l_=wi(),f_=o((s,e,t,r)=>{s=new o_(s,r),e=new c_(e,r);let i,n,a,c,h;switch(t){case">":i=Sf,n=u_,a=_f,c=">",h=">=";break;case"<":i=_f,n=l_,a=Sf,c="<",h="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(h_(s,e,r))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],f=null,d=null;if(l.forEach(p=>{p.semver===a_&&(p=new bf(">=0.0.0")),f=f||p,d=d||p,i(p.semver,f.semver,r)?f=p:a(p.semver,d.semver,r)&&(d=p)}),f.operator===c||f.operator===h||(!d.operator||d.operator===c)&&n(s,d.semver))return!1;if(d.operator===h&&a(s,d.semver))return!1}return!0},"outside");Rf.exports=f_});var If=m((_B,Of)=>{"use strict";var d_=Ri(),p_=o((s,e,t)=>d_(s,e,">",t),"gtr");Of.exports=p_});var Tf=m((RB,vf)=>{"use strict";var m_=Ri(),g_=o((s,e,t)=>m_(s,e,"<",t),"ltr");vf.exports=g_});var Cf=m((IB,xf)=>{"use strict";var Af=be(),y_=o((s,e,t)=>(s=new Af(s,t),e=new Af(e,t),s.intersects(e,t)),"intersects");xf.exports=y_});var Nf=m((TB,Bf)=>{"use strict";var E_=rr(),w_=_e();Bf.exports=(s,e,t)=>{let r=[],i=null,n=null,a=s.sort((l,f)=>w_(l,f,t));for(let l of a)E_(l,e,t)?(n=l,i||(i=l)):(n&&r.push([i,n]),n=null,i=null);i&&r.push([i,null]);let c=[];for(let[l,f]of r)l===f?c.push(l):!f&&l===a[0]?c.push("*"):f?l===a[0]?c.push(`<=${f}`):c.push(`${l} - ${f}`):c.push(`>=${l}`);let h=c.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return h.length<u.length?h:e}});var $f=m((AB,Mf)=>{"use strict";var Pf=be(),_a=tr(),{ANY:Sa}=_a,ir=rr(),ba=_e(),S_=o((s,e,t={})=>{if(s===e)return!0;s=new Pf(s,t),e=new Pf(e,t);let r=!1;e:for(let i of s.set){for(let n of e.set){let a=b_(i,n,t);if(r=r||a!==null,a)continue e}if(r)return!1}return!0},"subset"),__=[new _a(">=0.0.0-0")],Lf=[new _a(">=0.0.0")],b_=o((s,e,t)=>{if(s===e)return!0;if(s.length===1&&s[0].semver===Sa){if(e.length===1&&e[0].semver===Sa)return!0;t.includePrerelease?s=__:s=Lf}if(e.length===1&&e[0].semver===Sa){if(t.includePrerelease)return!0;e=Lf}let r=new Set,i,n;for(let p of s)p.operator===">"||p.operator===">="?i=kf(i,p,t):p.operator==="<"||p.operator==="<="?n=Df(n,p,t):r.add(p.semver);if(r.size>1)return null;let a;if(i&&n){if(a=ba(i.semver,n.semver,t),a>0)return null;if(a===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of r){if(i&&!ir(p,String(i),t)||n&&!ir(p,String(n),t))return null;for(let g of e)if(!ir(p,String(g),t))return!1;return!0}let c,h,u,l,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of e){if(l=l||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(c=kf(i,p,t),c===p&&c!==i)return!1}else if(i.operator===">="&&!ir(i.semver,String(p),t))return!1}if(n){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(h=Df(n,p,t),h===p&&h!==n)return!1}else if(n.operator==="<="&&!ir(n.semver,String(p),t))return!1}if(!p.operator&&(n||i)&&a!==0)return!1}return!(i&&u&&!n&&a!==0||n&&l&&!i&&a!==0||d||f)},"simpleSubset"),kf=o((s,e,t)=>{if(!s)return e;let r=ba(s.semver,e.semver,t);return r>0?s:r<0||e.operator===">"&&s.operator===">="?e:s},"higherGT"),Df=o((s,e,t)=>{if(!s)return e;let r=ba(s.semver,e.semver,t);return r<0?s:r>0||e.operator==="<"&&s.operator==="<="?e:s},"lowerLT");Mf.exports=S_});var jf=m((CB,Uf)=>{"use strict";var Ra=ls(),Ff=Js(),R_=te(),qf=ca(),O_=$t(),I_=ll(),v_=dl(),T_=gl(),A_=wl(),x_=_l(),C_=Rl(),B_=Il(),N_=Tl(),P_=_e(),L_=Bl(),k_=Pl(),D_=yi(),M_=Ml(),$_=Fl(),F_=er(),q_=Ei(),U_=ua(),j_=la(),H_=wi(),z_=Si(),G_=fa(),V_=Zl(),W_=tr(),Z_=be(),K_=rr(),Y_=uf(),X_=ff(),J_=pf(),Q_=yf(),e0=wf(),t0=Ri(),s0=If(),r0=Tf(),i0=Cf(),n0=Nf(),o0=$f();Uf.exports={parse:O_,valid:I_,clean:v_,inc:T_,diff:A_,major:x_,minor:C_,patch:B_,prerelease:N_,compare:P_,rcompare:L_,compareLoose:k_,compareBuild:D_,sort:M_,rsort:$_,gt:F_,lt:q_,eq:U_,neq:j_,gte:H_,lte:z_,cmp:G_,coerce:V_,Comparator:W_,Range:Z_,satisfies:K_,toComparators:Y_,maxSatisfying:X_,minSatisfying:J_,minVersion:Q_,validRange:e0,outside:t0,gtr:s0,ltr:r0,intersects:i0,simplifyRange:n0,subset:o0,SemVer:R_,re:Ra.re,src:Ra.src,tokens:Ra.t,SEMVER_SPEC_VERSION:Ff.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ff.RELEASE_TYPES,compareIdentifiers:qf.compareIdentifiers,rcompareIdentifiers:qf.rcompareIdentifiers}});var zf=m((BB,Hf)=>{var a0=jf(),c0=o(s=>a0.satisfies(process.version,s,{includePrerelease:!0}),"satisfies");Hf.exports={satisfies:c0}});var Gf=m((kB,Ia)=>{"use strict";var{inspect:h0}=require("util"),Oa=class{static{o(this,"SystemError")}constructor(e,t,r){let i=`${t}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(i+=` ${r.path}`),r.dest!==void 0&&(i+=` => ${r.dest}`),this.code=e,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:i,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(n){r.errno=n},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(n){r.syscall=n},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(n){r.path=n},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(n){r.dest=n},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return h0(this,{...t,getters:!0,customInspect:!1})}};function ut(s,e){Ia.exports[s]=class extends Oa{static{o(this,"NodeError")}constructor(r){super(s,e,r)}}}o(ut,"E");ut("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory");ut("ERR_FS_CP_EEXIST","Target already exists");ut("ERR_FS_CP_EINVAL","Invalid src or dest");ut("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe");ut("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory");ut("ERR_FS_CP_SOCKET","Cannot copy a socket file");ut("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self");ut("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type");ut("ERR_FS_EISDIR","Path is a directory");Ia.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{o(this,"ERR_INVALID_ARG_TYPE")}constructor(e,t,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${e} argument must be ${t}. Received ${typeof r}`}}});var ud=m((MB,hd)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:u0,ERR_FS_CP_EEXIST:l0,ERR_FS_CP_EINVAL:Oi,ERR_FS_CP_FIFO_PIPE:f0,ERR_FS_CP_NON_DIR_TO_DIR:d0,ERR_FS_CP_SOCKET:p0,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:m0,ERR_FS_CP_UNKNOWN:g0,ERR_FS_EISDIR:y0,ERR_INVALID_ARG_TYPE:E0}=Gf(),{constants:{errno:{EEXIST:w0,EISDIR:S0,EINVAL:lt,ENOTDIR:_0}}}=require("os"),{chmod:b0,copyFile:R0,lstat:ed,mkdir:td,readdir:O0,readlink:Vf,stat:ds,symlink:va,unlink:sd,utimes:I0}=require("fs/promises"),{dirname:nr,isAbsolute:Wf,join:Zf,parse:v0,resolve:or,sep:T0,toNamespacedPath:Kf}=require("path"),{fileURLToPath:A0}=require("url"),x0={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function C0(s,e,t){if(t!=null&&typeof t!="object")throw new E0("options",["Object"],t);return B0(Kf(Yf(s)),Kf(Yf(e)),{...x0,...t})}o(C0,"cp");function Yf(s){return s!=null&&s.href&&s.origin?A0(s):s}o(Yf,"getValidatedPath");async function B0(s,e,t){t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let r=await rd(s,e,t),{srcStat:i,destStat:n}=r;return await nd(s,i,e),t.filter?od(Xf,n,s,e,t):Xf(n,s,e,t)}o(B0,"cpFn");async function rd(s,e,t){let{0:r,1:i}=await N0(s,e,t);if(i){if(id(r,i))throw new Oi({message:"src and dest cannot be the same",path:e,syscall:"cp",errno:lt});if(r.isDirectory()&&!i.isDirectory())throw new u0({message:`cannot overwrite directory ${s} with non-directory ${e}`,path:e,syscall:"cp",errno:S0});if(!r.isDirectory()&&i.isDirectory())throw new d0({message:`cannot overwrite non-directory ${s} with directory ${e}`,path:e,syscall:"cp",errno:_0})}if(r.isDirectory()&&Ta(s,e))throw new Oi({message:`cannot copy ${s} to a subdirectory of self ${e}`,path:e,syscall:"cp",errno:lt});return{srcStat:r,destStat:i}}o(rd,"checkPaths");function id(s,e){return e.ino&&e.dev&&e.ino===s.ino&&e.dev===s.dev}o(id,"areIdentical");function N0(s,e,t){let r=t.dereference?i=>ds(i,{bigint:!0}):i=>ed(i,{bigint:!0});return Promise.all([r(s),r(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})])}o(N0,"getStats");async function Xf(s,e,t,r){let i=nr(t);return await P0(i)||await td(i,{recursive:!0}),Ii(s,e,t,r)}o(Xf,"checkParentDir");function P0(s){return ds(s).then(()=>!0,e=>e.code==="ENOENT"?!1:Promise.reject(e))}o(P0,"pathExists");async function nd(s,e,t){let r=or(nr(s)),i=or(nr(t));if(i===r||i===v0(i).root)return;let n;try{n=await ds(i,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(id(e,n))throw new Oi({message:`cannot copy ${s} to a subdirectory of self ${t}`,path:t,syscall:"cp",errno:lt});return nd(s,e,i)}o(nd,"checkParentPaths");var Jf=o(s=>or(s).split(T0).filter(Boolean),"normalizePathToArray");function Ta(s,e){let t=Jf(s),r=Jf(e);return t.every((i,n)=>r[n]===i)}o(Ta,"isSrcSubdir");async function od(s,e,t,r,i,n){if(await i.filter(t,r))return s(e,t,r,i,n)}o(od,"handleFilter");function L0(s,e,t,r){return r.filter?od(Ii,s,e,t,r):Ii(s,e,t,r)}o(L0,"startCopy");async function Ii(s,e,t,r){let n=await(r.dereference?ds:ed)(e);if(n.isDirectory()&&r.recursive)return U0(n,s,e,t,r);if(n.isDirectory())throw new y0({message:`${e} is a directory (not copied)`,path:e,syscall:"cp",errno:lt});if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return k0(n,s,e,t,r);if(n.isSymbolicLink())return H0(s,e,t);throw n.isSocket()?new p0({message:`cannot copy a socket file: ${t}`,path:t,syscall:"cp",errno:lt}):n.isFIFO()?new f0({message:`cannot copy a FIFO pipe: ${t}`,path:t,syscall:"cp",errno:lt}):new g0({message:`cannot copy an unknown file type: ${t}`,path:t,syscall:"cp",errno:lt})}o(Ii,"getStatsForCopy");function k0(s,e,t,r,i){return e?D0(s,t,r,i):ad(s,t,r,i)}o(k0,"onFile");async function D0(s,e,t,r){if(r.force)return await sd(t),ad(s,e,t,r);if(r.errorOnExist)throw new l0({message:`${t} already exists`,path:t,syscall:"cp",errno:w0})}o(D0,"mayCopyFile");async function ad(s,e,t,r){return await R0(e,t),r.preserveTimestamps?M0(s.mode,e,t):vi(t,s.mode)}o(ad,"_copyFile");async function M0(s,e,t){return $0(s)&&await F0(t,s),Qf(s,e,t)}o(M0,"handleTimestampsAndMode");function $0(s){return(s&128)===0}o($0,"fileIsNotWritable");function F0(s,e){return vi(s,e|128)}o(F0,"makeFileWritable");async function Qf(s,e,t){return await q0(e,t),vi(t,s)}o(Qf,"setDestTimestampsAndMode");function vi(s,e){return b0(s,e)}o(vi,"setDestMode");async function q0(s,e){let t=await ds(s);return I0(e,t.atime,t.mtime)}o(q0,"setDestTimestamps");function U0(s,e,t,r,i){return e?cd(t,r,i):j0(s.mode,t,r,i)}o(U0,"onDir");async function j0(s,e,t,r){return await td(t),await cd(e,t,r),vi(t,s)}o(j0,"mkDirAndCopy");async function cd(s,e,t){let r=await O0(s);for(let i=0;i<r.length;i++){let n=r[i],a=Zf(s,n),c=Zf(e,n),{destStat:h}=await rd(a,c,t);await L0(h,a,c,t)}}o(cd,"copyDir");async function H0(s,e,t){let r=await Vf(e);if(Wf(r)||(r=or(nr(e),r)),!s)return va(r,t);let i;try{i=await Vf(t)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return va(r,t);throw a}if(Wf(i)||(i=or(nr(t),i)),Ta(r,i))throw new Oi({message:`cannot copy ${r} to a subdirectory of self ${i}`,path:t,syscall:"cp",errno:lt});if((await ds(e)).isDirectory()&&Ta(i,r))throw new m0({message:`cannot overwrite ${i} with ${r}`,path:t,syscall:"cp",errno:lt});return z0(r,t)}o(H0,"onLink");async function z0(s,e){return await sd(e),va(s,e)}o(z0,"copyLink");hd.exports=C0});var fd=m((FB,ld)=>{var G0=require("fs/promises"),V0=na(),W0=zf(),Z0=ud(),K0=W0.satisfies(">=16.7.0"),Y0=o(async(s,e,t)=>{let r=V0(t,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return K0?G0.cp(s,e,r):Z0(s,e,r)},"cp");ld.exports=Y0});var pd=m((UB,dd)=>{var{join:X0,sep:J0}=require("path"),Q0=na(),{mkdir:eb,mkdtemp:tb,rm:sb}=require("fs/promises"),rb=o(async(s,e,t)=>{let r=Q0(t,{copy:["tmpPrefix"]});await eb(s,{recursive:!0});let i=await tb(X0(`${s}${J0}`,r.tmpPrefix||"")),n,a;try{a=await e(i)}catch(c){n=c}try{await sb(i,{force:!0,recursive:!0})}catch{}if(n)throw n;return a},"withTempDir");dd.exports=rb});var Ed=m((HB,yd)=>{var{readdir:md}=require("fs/promises"),{join:gd}=require("path"),ib=o(async s=>{let e=[];for(let t of await md(s))if(t.startsWith("@"))for(let r of await md(gd(s,t)))e.push(gd(t,r));else e.push(t);return e},"readdirScoped");yd.exports=ib});var Od=m((GB,Rd)=>{var{dirname:wd,join:Sd,resolve:_d,relative:nb,isAbsolute:ob}=require("path"),je=require("fs/promises"),ab=o(async s=>{try{return await je.access(s),!0}catch(e){return e.code!=="ENOENT"}},"pathExists"),bd=o(async(s,e,t={},r=!0,i=[])=>{if(!s||!e)throw new TypeError("`source` and `destination` file required");if(t={overwrite:!0,...t},!t.overwrite&&await ab(e))throw new Error(`The destination file exists: ${e}`);await je.mkdir(wd(e),{recursive:!0});try{await je.rename(s,e)}catch(n){if(n.code==="EXDEV"||n.code==="EPERM"){let a=await je.lstat(s);if(a.isDirectory()){let c=await je.readdir(s);await Promise.all(c.map(h=>bd(Sd(s,h),Sd(e,h),t,!1,i)))}else a.isSymbolicLink()?i.push({source:s,destination:e}):await je.copyFile(s,e)}else throw n}r&&(await Promise.all(i.map(async({source:n,destination:a})=>{let c=await je.readlink(n);ob(c)&&(c=_d(a,nb(n,c)));let h="file";try{h=await je.stat(_d(wd(n),c)),h.isDirectory()&&(h="junction")}catch{}await je.symlink(c,a,h)})),await je.rm(s,{recursive:!0,force:!0}))},"moveFile");Rd.exports=bd});var Ti=m((WB,Id)=>{"use strict";var cb=fd(),hb=pd(),ub=Ed(),lb=Od();Id.exports={cp:cb,withTempDir:hb,readdirScoped:ub,moveFile:lb}});var Ai={};ey(Ai,{default:()=>vd,pMapIterable:()=>fb,pMapSkip:()=>ar});async function vd(s,e,{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:i}={}){return new Promise((n,a)=>{if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);let c=[],h=[],u=new Map,l=!1,f=!1,d=!1,p=0,g=0,y=s[Symbol.iterator]===void 0?s[Symbol.asyncIterator]():s[Symbol.iterator](),S=o(()=>{v(i.reason)},"signalListener"),w=o(()=>{i?.removeEventListener("abort",S)},"cleanup"),T=o(I=>{n(I),w()},"resolve"),v=o(I=>{l=!0,f=!0,a(I),w()},"reject");i&&(i.aborted&&v(i.reason),i.addEventListener("abort",S,{once:!0}));let R=o(async()=>{if(f)return;let I=await y.next(),C=g;if(g++,I.done){if(d=!0,p===0&&!f){if(!r&&h.length>0){v(new AggregateError(h));return}if(f=!0,u.size===0){T(c);return}let P=[];for(let[Y,Se]of c.entries())u.get(Y)!==ar&&P.push(Se);T(P)}return}p++,(async()=>{try{let P=await I.value;if(f)return;let Y=await e(P,C);Y===ar&&u.set(C,Y),c[C]=Y,p--,await R()}catch(P){if(r)v(P);else{h.push(P),p--;try{await R()}catch(Y){v(Y)}}}})()},"next");(async()=>{for(let I=0;I<t;I++){try{await R()}catch(C){v(C);break}if(d||l)break}})()})}function fb(s,e,{concurrency:t=Number.POSITIVE_INFINITY,backpressure:r=t}={}){if(s[Symbol.iterator]===void 0&&s[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof s})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(t)&&t>=1||t===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${t}\` (${typeof t})`);if(!(Number.isSafeInteger(r)&&r>=t||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${t}) and up or \`Infinity\`, got \`${r}\` (${typeof r})`);return{async*[Symbol.asyncIterator](){let i=s[Symbol.asyncIterator]===void 0?s[Symbol.iterator]():s[Symbol.asyncIterator](),n=[],a=0,c=!1,h=0;function u(){if(c||!(a<t&&n.length<r))return;let l=(async()=>{let{done:f,value:d}=await i.next();if(f)return{done:!0};a++,u();try{let p=await e(await d,h++);if(a--,p===ar){let g=n.indexOf(l);g>0&&n.splice(g,1)}return u(),{done:!1,value:p}}catch(p){return c=!0,{error:p}}})();n.push(l)}for(o(u,"trySpawn"),u();n.length>0;){let{error:l,done:f,value:d}=await n[0];if(n.shift(),l)throw l;if(f)return;u(),d!==ar&&(yield d)}}}}var ar,xi=Qg(()=>{o(vd,"pMap");o(fb,"pMapIterable");ar=Symbol("skip")});var ps=m((YB,ye)=>{"use strict";var db=require("crypto"),{appendFile:pb,mkdir:Ca,readFile:mb,readdir:gb,rm:Td,writeFile:yb}=require("fs/promises"),{Minipass:Eb}=J(),He=require("path"),wb=St(),Sb=ta(),_b=us(),bb=ra(),Rb=sa()["cache-version"].index,{moveFile:Ob}=Ti(),Aa=5;ye.exports.NotFoundError=class extends Error{static{o(this,"NotFoundError")}constructor(e,t){super(`No cache entry for ${t} found in ${e}`),this.code="ENOENT",this.cache=e,this.key=t}};ye.exports.compact=Ib;async function Ib(s,e,t,r={}){let i=cr(s,e),n=await Ci(i),a=[];for(let d=n.length-1;d>=0;--d){let p=n[d];if(p.integrity===null&&!r.validateEntry)break;(!r.validateEntry||r.validateEntry(p)===!0)&&(a.length===0||!a.find(g=>t(g,p)))&&a.unshift(p)}let c=`
|
|
11
|
+
`+a.map(d=>{let p=JSON.stringify(d);return`${Bi(p)} ${p}`}).join(`
|
|
12
|
+
`),h=o(async()=>{let d=Sb(He.join(s,"tmp"),r.tmpPrefix);return await Ca(He.dirname(d),{recursive:!0}),{target:d,moved:!1}},"setup"),u=o(async d=>{if(!d.moved)return Td(d.target,{recursive:!0,force:!0})},"teardown"),l=o(async d=>{await yb(d.target,c,{flag:"wx"}),await Ca(He.dirname(i),{recursive:!0}),await Ob(d.target,i),d.moved=!0},"write"),f=await h();try{await l(f)}finally{await u(f)}return a.reverse().map(d=>Ni(s,d,!0))}o(Ib,"compact");ye.exports.insert=Ad;async function Ad(s,e,t,r={}){let{metadata:i,size:n,time:a}=r,c=cr(s,e),h={key:e,integrity:t&&wb.stringify(t),time:a||Date.now(),size:n,metadata:i};try{await Ca(He.dirname(c),{recursive:!0});let u=JSON.stringify(h);await pb(c,`
|
|
13
|
+
${Bi(u)} ${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return Ni(s,h)}o(Ad,"insert");ye.exports.find=vb;async function vb(s,e){let t=cr(s,e);try{return(await Ci(t)).reduce((i,n)=>n&&n.key===e?Ni(s,n):i,null)}catch(r){if(r.code==="ENOENT")return null;throw r}}o(vb,"find");ye.exports.delete=Tb;function Tb(s,e,t={}){if(!t.removeFully)return Ad(s,e,null,t);let r=cr(s,e);return Td(r,{recursive:!0,force:!0})}o(Tb,"del");ye.exports.lsStream=xd;function xd(s){let e=Ba(s),t=new Eb({objectMode:!0});return Promise.resolve().then(async()=>{let{default:r}=await Promise.resolve().then(()=>(xi(),Ai)),i=await xa(e);return await r(i,async n=>{let a=He.join(e,n),c=await xa(a);await r(c,async h=>{let u=He.join(a,h),l=await xa(u);await r(l,async f=>{let d=He.join(u,f);try{let g=(await Ci(d)).reduce((y,S)=>(y.set(S.key,S),y),new Map);for(let y of g.values()){let S=Ni(s,y);S&&t.write(S)}}catch(p){if(p.code==="ENOENT")return;throw p}},{concurrency:Aa})},{concurrency:Aa})},{concurrency:Aa}),t.end(),t}).catch(r=>t.emit("error",r)),t}o(xd,"lsStream");ye.exports.ls=Ab;async function Ab(s){return(await xd(s).collect()).reduce((t,r)=>(t[r.key]=r,t),{})}o(Ab,"ls");ye.exports.bucketEntries=Ci;async function Ci(s,e){let t=await mb(s,"utf8");return xb(t,e)}o(Ci,"bucketEntries");function xb(s){let e=[];return s.split(`
|
|
14
|
+
`).forEach(t=>{if(!t)return;let r=t.split(" ");if(!r[1]||Bi(r[1])!==r[0])return;let i;try{i=JSON.parse(r[1])}catch{}i&&e.push(i)}),e}o(xb,"_bucketEntries");ye.exports.bucketDir=Ba;function Ba(s){return He.join(s,`index-v${Rb}`)}o(Ba,"bucketDir");ye.exports.bucketPath=cr;function cr(s,e){let t=Cd(e);return He.join.apply(He,[Ba(s)].concat(bb(t)))}o(cr,"bucketPath");ye.exports.hashKey=Cd;function Cd(s){return Bd(s,"sha256")}o(Cd,"hashKey");ye.exports.hashEntry=Bi;function Bi(s){return Bd(s,"sha1")}o(Bi,"hashEntry");function Bd(s,e){return db.createHash(e).update(s).digest("hex")}o(Bd,"hash");function Ni(s,e,t){return!e.integrity&&!t?null:{key:e.key,integrity:e.integrity,path:e.integrity?_b(s,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(Ni,"formatEntry");function xa(s){return gb(s).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(xa,"readdirOrEmpty")});var gs=m(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.LRUCache=void 0;var Cb=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Pd=new Set,Na=typeof process=="object"&&process?process:{},Ld=o((s,e,t,r)=>{typeof Na.emitWarning=="function"&&Na.emitWarning(s,e,t,r)},"emitWarning"),Pi=globalThis.AbortController,Nd=globalThis.AbortSignal;if(typeof Pi>"u"){Nd=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,i){this._onabort.push(i)}},Pi=class{static{o(this,"AbortController")}constructor(){e()}signal=new Nd;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let i of this.signal._onabort)i(r);this.signal.onabort?.(r)}}};let s=Na.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{s&&(s=!1,Ld("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Bb=o(s=>!Pd.has(s),"shouldWarn"),e1=Symbol("type"),_t=o(s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),"isPosInt"),kd=o(s=>_t(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?ms:null:null,"getUintArray"),ms=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},Pa=class s{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=kd(e);if(!t)return[];s.#e=!0;let r=new s(e,t);return s.#e=!1,r}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},La=class s{static{o(this,"LRUCache")}#e;#t;#s;#r;#i;#a;#l;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#p;#d;#h;#n;#g;#_;#S;#y;#A;#E;#R;#v;#w;#b;#T;#m;#o;static unsafeExposeInternals(e){return{starts:e.#v,ttls:e.#w,sizes:e.#R,keyMap:e.#d,keyList:e.#h,valList:e.#n,next:e.#g,prev:e.#_,get head(){return e.#S},get tail(){return e.#y},free:e.#A,isBackgroundFetch:o(t=>e.#u(t),"isBackgroundFetch"),backgroundFetch:o((t,r,i,n)=>e.#H(t,r,i,n),"backgroundFetch"),moveToTail:o(t=>e.#M(t),"moveToTail"),indexes:o(t=>e.#C(t),"indexes"),rindexes:o(t=>e.#N(t),"rindexes"),isStale:o(t=>e.#I(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#l}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:h,dispose:u,onInsert:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:p,maxSize:g=0,maxEntrySize:y=0,sizeCalculation:S,fetchMethod:w,memoMethod:T,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:C,ignoreFetchAbort:P,perf:Y}=e;if(Y!==void 0&&typeof Y?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=Y??Cb,t!==0&&!_t(t))throw new TypeError("max option must be a nonnegative integer");let Se=t?kd(t):Array;if(!Se)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=g,this.maxEntrySize=y||this.#t,this.sizeCalculation=S,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#l=T,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#T=!!w,this.#d=new Map,this.#h=new Array(t).fill(void 0),this.#n=new Array(t).fill(void 0),this.#g=new Se(t),this.#_=new Se(t),this.#S=0,this.#y=0,this.#A=Pa.create(t),this.#c=0,this.#p=0,typeof u=="function"&&(this.#s=u),typeof l=="function"&&(this.#r=l),typeof f=="function"?(this.#i=f,this.#E=[]):(this.#i=void 0,this.#E=void 0),this.#b=!!this.#s,this.#o=!!this.#r,this.#m=!!this.#i,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#t!==0&&!_t(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!_t(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=_t(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=r||0,this.ttl){if(!_t(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let Xe="LRU_CACHE_UNBOUNDED";Bb(Xe)&&(Pd.add(Xe),Ld("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Xe,s))}}getRemainingTTL(e){return this.#d.has(e)?1/0:0}#P(){let e=new ms(this.#e),t=new ms(this.#e);this.#w=e,this.#v=t,this.#U=(n,a,c=this.#f.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let h=setTimeout(()=>{this.#I(n)&&this.#B(this.#h[n],"expire")},a+1);h.unref&&h.unref()}},this.#x=n=>{t[n]=e[n]!==0?this.#f.now():0},this.#O=(n,a)=>{if(e[a]){let c=e[a],h=t[a];if(!c||!h)return;n.ttl=c,n.start=h,n.now=r||i();let u=n.now-h;n.remainingTTL=c-u}};let r=0,i=o(()=>{let n=this.#f.now();if(this.ttlResolution>0){r=n;let a=setTimeout(()=>r=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#d.get(n);if(a===void 0)return 0;let c=e[a],h=t[a];if(!c||!h)return 1/0;let u=(r||i())-h;return c-u},this.#I=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(r||i())-a>c}}#x=o(()=>{},"#updateItemAge");#O=o(()=>{},"#statusTTL");#U=o(()=>{},"#setItemTTL");#I=o(()=>!1,"#isStale");#$(){let e=new ms(this.#e);this.#p=0,this.#R=e,this.#L=t=>{this.#p-=e[t],e[t]=0},this.#k=(t,r,i,n)=>{if(this.#u(r))return 0;if(!_t(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(r,t),!_t(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#F=(t,r,i)=>{if(e[t]=r,this.#t){let n=this.#t-e[t];for(;this.#p>n;)this.#D(!0)}this.#p+=e[t],i&&(i.entrySize=r,i.totalCalculatedSize=this.#p)}}#L=o(e=>{},"#removeItemSize");#F=o((e,t,r)=>{},"#addItemSize");#k=o((e,t,r,i)=>{if(r||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#C({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#y;!(!this.#j(t)||((e||!this.#I(t))&&(yield t),t===this.#S));)t=this.#_[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;!(!this.#j(t)||((e||!this.#I(t))&&(yield t),t===this.#y));)t=this.#g[t]}#j(e){return e!==void 0&&this.#d.get(this.#h[e])===e}*entries(){for(let e of this.#C())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*rentries(){for(let e of this.#N())this.#n[e]!==void 0&&this.#h[e]!==void 0&&!this.#u(this.#n[e])&&(yield[this.#h[e],this.#n[e]])}*keys(){for(let e of this.#C()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#h[e];t!==void 0&&!this.#u(this.#n[e])&&(yield t)}}*values(){for(let e of this.#C())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#N())this.#n[e]!==void 0&&!this.#u(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#C()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#h[r],this))return this.get(this.#h[r],t)}}forEach(e,t=this){for(let r of this.#C()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}rforEach(e,t=this){for(let r of this.#N()){let i=this.#n[r],n=this.#u(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(t,n,this.#h[r],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#I(t)&&(this.#B(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#d.get(e);if(t===void 0)return;let r=this.#n[t],i=this.#u(r)?r.__staleWhileFetching:r;if(i===void 0)return;let n={value:i};if(this.#w&&this.#v){let a=this.#w[t],c=this.#v[t];if(a&&c){let h=a-(this.#f.now()-c);n.ttl=h,n.start=Date.now()}}return this.#R&&(n.size=this.#R[t]),n}dump(){let e=[];for(let t of this.#C({allowStale:!0})){let r=this.#h[t],i=this.#n[t],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0||r===void 0)continue;let a={value:n};if(this.#w&&this.#v){a.ttl=this.#w[t];let c=this.#f.now()-this.#v[t];a.start=Math.floor(Date.now()-c)}this.#R&&(a.size=this.#R[t]),e.unshift([r,a])}return e}load(e){this.clear();for(let[t,r]of e){if(r.start){let i=Date.now()-r.start;r.start=this.#f.now()-i}this.set(t,r.value,r)}}set(e,t,r={}){if(t===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:h}=r,{noUpdateTTL:u=this.noUpdateTTL}=r,l=this.#k(e,t,r.size||0,c);if(this.maxEntrySize&&l>this.maxEntrySize)return h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this.#B(e,"set"),this;let f=this.#c===0?void 0:this.#d.get(e);if(f===void 0)f=this.#c===0?this.#y:this.#A.length!==0?this.#A.pop():this.#c===this.#e?this.#D(!1):this.#c,this.#h[f]=e,this.#n[f]=t,this.#d.set(e,f),this.#g[this.#y]=f,this.#_[f]=this.#y,this.#y=f,this.#c++,this.#F(f,l,h),h&&(h.set="add"),u=!1,this.#o&&this.#r?.(t,e,"add");else{this.#M(f);let d=this.#n[f];if(t!==d){if(this.#T&&this.#u(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!a&&(this.#b&&this.#s?.(p,e,"set"),this.#m&&this.#E?.push([p,e,"set"]))}else a||(this.#b&&this.#s?.(d,e,"set"),this.#m&&this.#E?.push([d,e,"set"]));if(this.#L(f),this.#F(f,l,h),this.#n[f]=t,h){h.set="replace";let p=d&&this.#u(d)?d.__staleWhileFetching:d;p!==void 0&&(h.oldValue=p)}}else h&&(h.set="update");this.#o&&this.onInsert?.(t,e,t===d?"update":"replace")}if(i!==0&&!this.#w&&this.#P(),this.#w&&(u||this.#U(f,i,n),h&&this.#O(h,f)),!a&&this.#m&&this.#E){let d=this.#E,p;for(;p=d?.shift();)this.#i?.(...p)}return this}pop(){try{for(;this.#c;){let e=this.#n[this.#S];if(this.#D(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#m&&this.#E){let e=this.#E,t;for(;t=e?.shift();)this.#i?.(...t)}}}#D(e){let t=this.#S,r=this.#h[t],i=this.#n[t];return this.#T&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(i,r,"evict"),this.#m&&this.#E?.push([i,r,"evict"])),this.#L(t),e&&(this.#h[t]=void 0,this.#n[t]=void 0,this.#A.push(t)),this.#c===1?(this.#S=this.#y=0,this.#A.length=0):this.#S=this.#g[t],this.#d.delete(r),this.#c--,t}has(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,n=this.#d.get(e);if(n!==void 0){let a=this.#n[n];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#I(n))i&&(i.has="stale",this.#O(i,n));else return r&&this.#x(n),i&&(i.has="hit",this.#O(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{allowStale:r=this.allowStale}=t,i=this.#d.get(e);if(i===void 0||!r&&this.#I(i))return;let n=this.#n[i];return this.#u(n)?n.__staleWhileFetching:n}#H(e,t,r,i){let n=t===void 0?void 0:this.#n[t];if(this.#u(n))return n;let a=new Pi,{signal:c}=r;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let h={signal:a.signal,options:r,context:i},u=o((y,S=!1)=>{let{aborted:w}=a.signal,T=r.ignoreFetchAbort&&y!==void 0;if(r.status&&(w&&!S?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,T&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),w&&!T&&!S)return f(a.signal.reason);let v=p,R=this.#n[t];return(R===p||T&&S&&R===void 0)&&(y===void 0?v.__staleWhileFetching!==void 0?this.#n[t]=v.__staleWhileFetching:this.#B(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.set(e,y,h.options))),y},"cb"),l=o(y=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=y),f(y)),"eb"),f=o(y=>{let{aborted:S}=a.signal,w=S&&r.allowStaleOnFetchAbort,T=w||r.allowStaleOnFetchRejection,v=T||r.noDeleteOnFetchRejection,R=p;if(this.#n[t]===p&&(!v||R.__staleWhileFetching===void 0?this.#B(e,"fetch"):w||(this.#n[t]=R.__staleWhileFetching)),T)return r.status&&R.__staleWhileFetching!==void 0&&(r.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw y},"fetchFail"),d=o((y,S)=>{let w=this.#a?.(e,n,h);w&&w instanceof Promise&&w.then(T=>y(T===void 0?void 0:T),S),a.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(y(void 0),r.allowStaleOnFetchAbort&&(y=o(T=>u(T,!0),"res")))})},"pcall");r.status&&(r.status.fetchDispatched=!0);let p=new Promise(d).then(u,l),g=Object.assign(p,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...h.options,status:void 0}),t=this.#d.get(e)):this.#n[t]=g,g}#u(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Pi}async fetch(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:h=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:S=!1,status:w,signal:T}=t;if(!this.#T)return w&&(w.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:w});let v={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:h,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:g,ignoreFetchAbort:p,status:w,signal:T},R=this.#d.get(e);if(R===void 0){w&&(w.fetch="miss");let I=this.#H(e,R,v,y);return I.__returned=I}else{let I=this.#n[R];if(this.#u(I)){let Xe=r&&I.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",Xe&&(w.returnedStale=!0)),Xe?I.__staleWhileFetching:I.__returned=I}let C=this.#I(R);if(!S&&!C)return w&&(w.fetch="hit"),this.#M(R),i&&this.#x(R),w&&this.#O(w,R),I;let P=this.#H(e,R,v,y),Se=P.__staleWhileFetching!==void 0&&r;return w&&(w.fetch=C?"stale":"refresh",Se&&C&&(w.returnedStale=!0)),Se?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,t={}){let r=await this.fetch(e,t);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(e,t={}){let r=this.#l;if(!r)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let h=r(e,c,{options:a,context:i});return this.set(e,h,a),h}get(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#d.get(e);if(c!==void 0){let h=this.#n[c],u=this.#u(h);return a&&this.#O(a,c),this.#I(c)?(a&&(a.get="stale"),u?(a&&r&&h.__staleWhileFetching!==void 0&&(a.returnedStale=!0),r?h.__staleWhileFetching:void 0):(n||this.#B(e,"expire"),a&&r&&(a.returnedStale=!0),r?h:void 0)):(a&&(a.get="hit"),u?h.__staleWhileFetching:(this.#M(c),i&&this.#x(c),h))}else a&&(a.get="miss")}#z(e,t){this.#_[t]=e,this.#g[e]=t}#M(e){e!==this.#y&&(e===this.#S?this.#S=this.#g[e]:this.#z(this.#_[e],this.#g[e]),this.#z(this.#y,e),this.#y=e)}delete(e){return this.#B(e,"delete")}#B(e,t){let r=!1;if(this.#c!==0){let i=this.#d.get(e);if(i!==void 0)if(r=!0,this.#c===1)this.#q(t);else{this.#L(i);let n=this.#n[i];if(this.#u(n)?n.__abortController.abort(new Error("deleted")):(this.#b||this.#m)&&(this.#b&&this.#s?.(n,e,t),this.#m&&this.#E?.push([n,e,t])),this.#d.delete(e),this.#h[i]=void 0,this.#n[i]=void 0,i===this.#y)this.#y=this.#_[i];else if(i===this.#S)this.#S=this.#g[i];else{let a=this.#_[i];this.#g[a]=this.#g[i];let c=this.#g[i];this.#_[c]=this.#_[i]}this.#c--,this.#A.push(i)}}if(this.#m&&this.#E?.length){let i=this.#E,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){return this.#q("delete")}#q(e){for(let t of this.#N({allowStale:!0})){let r=this.#n[t];if(this.#u(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#h[t];this.#b&&this.#s?.(r,i,e),this.#m&&this.#E?.push([r,i,e])}}if(this.#d.clear(),this.#n.fill(void 0),this.#h.fill(void 0),this.#w&&this.#v&&(this.#w.fill(0),this.#v.fill(0)),this.#R&&this.#R.fill(0),this.#S=0,this.#y=0,this.#A.length=0,this.#p=0,this.#c=0,this.#m&&this.#E){let t=this.#E,r;for(;r=t?.shift();)this.#i?.(...r)}}};Li.LRUCache=La});var hr=m((r1,ys)=>{"use strict";var{LRUCache:Nb}=gs(),ki=new Nb({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:o((s,e)=>e.startsWith("key:")?s.data.length:s.length,"sizeCalculation")});ys.exports.clearMemoized=Pb;function Pb(){let s={};return ki.forEach((e,t)=>{s[t]=e}),ki.clear(),s}o(Pb,"clearMemoized");ys.exports.put=Lb;function Lb(s,e,t,r){Di(r).set(`key:${s}:${e.key}`,{entry:e,data:t}),Dd(s,e.integrity,t,r)}o(Lb,"put");ys.exports.put.byDigest=Dd;function Dd(s,e,t,r){Di(r).set(`digest:${s}:${e}`,t)}o(Dd,"putDigest");ys.exports.get=kb;function kb(s,e,t){return Di(t).get(`key:${s}:${e}`)}o(kb,"get");ys.exports.get.byDigest=Db;function Db(s,e,t){return Di(t).get(`digest:${s}:${e}`)}o(Db,"getDigest");var ka=class{static{o(this,"ObjProxy")}constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}};function Di(s){return!s||!s.memoize?ki:s.memoize.get&&s.memoize.set?s.memoize:typeof s.memoize=="object"?new ka(s.memoize):ki}o(Di,"pickMem")});var zi=m(lr=>{"use strict";var{Minipass:Mb}=J(),$b=require("events").EventEmitter,ue=require("fs"),Fb=ue.writev,bs=Symbol("_autoClose"),Pe=Symbol("_close"),ur=Symbol("_ended"),D=Symbol("_fd"),Md=Symbol("_finished"),Rt=Symbol("_flags"),Da=Symbol("_flush"),$a=Symbol("_handleChunk"),Fa=Symbol("_makeBuf"),Ui=Symbol("_mode"),Mi=Symbol("_needDrain"),Ss=Symbol("_onerror"),Rs=Symbol("_onopen"),Ma=Symbol("_onread"),Es=Symbol("_onwrite"),Ot=Symbol("_open"),ft=Symbol("_path"),qt=Symbol("_pos"),ze=Symbol("_queue"),ws=Symbol("_read"),$d=Symbol("_readSize"),bt=Symbol("_reading"),$i=Symbol("_remain"),Fd=Symbol("_size"),Fi=Symbol("_write"),Ft=Symbol("_writing"),qi=Symbol("_defaultFlag"),_s=Symbol("_errored"),ji=class extends Mb{static{o(this,"ReadStream")}constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[_s]=!1,this[D]=typeof t.fd=="number"?t.fd:null,this[ft]=e,this[$d]=t.readSize||16*1024*1024,this[bt]=!1,this[Fd]=typeof t.size=="number"?t.size:1/0,this[$i]=this[Fd],this[bs]=typeof t.autoClose=="boolean"?t.autoClose:!0,typeof this[D]=="number"?this[ws]():this[Ot]()}get fd(){return this[D]}get path(){return this[ft]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ot](){ue.open(this[ft],"r",(e,t)=>this[Rs](e,t))}[Rs](e,t){e?this[Ss](e):(this[D]=t,this.emit("open",t),this[ws]())}[Fa](){return Buffer.allocUnsafe(Math.min(this[$d],this[$i]))}[ws](){if(!this[bt]){this[bt]=!0;let e=this[Fa]();if(e.length===0)return process.nextTick(()=>this[Ma](null,0,e));ue.read(this[D],e,0,e.length,null,(t,r,i)=>this[Ma](t,r,i))}}[Ma](e,t,r){this[bt]=!1,e?this[Ss](e):this[$a](t,r)&&this[ws]()}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.close(e,t=>t?this.emit("error",t):this.emit("close"))}}[Ss](e){this[bt]=!0,this[Pe](),this.emit("error",e)}[$a](e,t){let r=!1;return this[$i]-=e,e>0&&(r=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[$i]<=0)&&(r=!1,this[Pe](),super.end()),r}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[D]=="number"&&this[ws]();break;case"error":return this[_s]?void 0:(this[_s]=!0,super.emit(e,t));default:return super.emit(e,t)}}},qa=class extends ji{static{o(this,"ReadStreamSync")}[Ot](){let e=!0;try{this[Rs](null,ue.openSync(this[ft],"r")),e=!1}finally{e&&this[Pe]()}}[ws](){let e=!0;try{if(!this[bt]){this[bt]=!0;do{let t=this[Fa](),r=t.length===0?0:ue.readSync(this[D],t,0,t.length,null);if(!this[$a](r,t))break}while(!0);this[bt]=!1}e=!1}finally{e&&this[Pe]()}}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.closeSync(e),this.emit("close")}}},Hi=class extends $b{static{o(this,"WriteStream")}constructor(e,t){t=t||{},super(t),this.readable=!1,this.writable=!0,this[_s]=!1,this[Ft]=!1,this[ur]=!1,this[Mi]=!1,this[ze]=[],this[ft]=e,this[D]=typeof t.fd=="number"?t.fd:null,this[Ui]=t.mode===void 0?438:t.mode,this[qt]=typeof t.start=="number"?t.start:null,this[bs]=typeof t.autoClose=="boolean"?t.autoClose:!0;let r=this[qt]!==null?"r+":"w";this[qi]=t.flags===void 0,this[Rt]=this[qi]?r:t.flags,this[D]===null&&this[Ot]()}emit(e,t){if(e==="error"){if(this[_s])return;this[_s]=!0}return super.emit(e,t)}get fd(){return this[D]}get path(){return this[ft]}[Ss](e){this[Pe](),this[Ft]=!0,this.emit("error",e)}[Ot](){ue.open(this[ft],this[Rt],this[Ui],(e,t)=>this[Rs](e,t))}[Rs](e,t){this[qi]&&this[Rt]==="r+"&&e&&e.code==="ENOENT"?(this[Rt]="w",this[Ot]()):e?this[Ss](e):(this[D]=t,this.emit("open",t),this[Ft]||this[Da]())}end(e,t){return e&&this.write(e,t),this[ur]=!0,!this[Ft]&&!this[ze].length&&typeof this[D]=="number"&&this[Es](null,0),this}write(e,t){return typeof e=="string"&&(e=Buffer.from(e,t)),this[ur]?(this.emit("error",new Error("write() after end()")),!1):this[D]===null||this[Ft]||this[ze].length?(this[ze].push(e),this[Mi]=!0,!1):(this[Ft]=!0,this[Fi](e),!0)}[Fi](e){ue.write(this[D],e,0,e.length,this[qt],(t,r)=>this[Es](t,r))}[Es](e,t){e?this[Ss](e):(this[qt]!==null&&(this[qt]+=t),this[ze].length?this[Da]():(this[Ft]=!1,this[ur]&&!this[Md]?(this[Md]=!0,this[Pe](),this.emit("finish")):this[Mi]&&(this[Mi]=!1,this.emit("drain"))))}[Da](){if(this[ze].length===0)this[ur]&&this[Es](null,0);else if(this[ze].length===1)this[Fi](this[ze].pop());else{let e=this[ze];this[ze]=[],Fb(this[D],e,this[qt],(t,r)=>this[Es](t,r))}}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.close(e,t=>t?this.emit("error",t):this.emit("close"))}}},Ua=class extends Hi{static{o(this,"WriteStreamSync")}[Ot](){let e;if(this[qi]&&this[Rt]==="r+")try{e=ue.openSync(this[ft],this[Rt],this[Ui])}catch(t){if(t.code==="ENOENT")return this[Rt]="w",this[Ot]();throw t}else e=ue.openSync(this[ft],this[Rt],this[Ui]);this[Rs](null,e)}[Pe](){if(this[bs]&&typeof this[D]=="number"){let e=this[D];this[D]=null,ue.closeSync(e),this.emit("close")}}[Fi](e){let t=!0;try{this[Es](null,ue.writeSync(this[D],e,0,e.length,this[qt])),t=!1}finally{if(t)try{this[Pe]()}catch{}}}};lr.ReadStream=ji;lr.ReadStreamSync=qa;lr.WriteStream=Hi;lr.WriteStreamSync=Ua});var Ha=m((a1,Os)=>{"use strict";var fr=require("fs/promises"),qb=zi(),ja=St(),Ub=us(),qd=hs();Os.exports=jb;var Ud=64*1024*1024;async function jb(s,e,t={}){let{size:r}=t,{stat:i,cpath:n,sri:a}=await dr(s,e,async(h,u)=>({stat:r?{size:r}:await fr.stat(h),cpath:h,sri:u}));if(i.size>Ud)return jd(n,i.size,a,new qd).concat();let c=await fr.readFile(n,{encoding:null});if(i.size!==c.length)throw Gb(i.size,c.length);if(!ja.checkData(c,a))throw Vb(a,n);return c}o(jb,"read");var jd=o((s,e,t,r)=>(r.push(new qb.ReadStream(s,{size:e,readSize:Ud}),ja.integrityStream({integrity:t,size:e})),r),"readPipeline");Os.exports.stream=Hd;Os.exports.readStream=Hd;function Hd(s,e,t={}){let{size:r}=t,i=new qd;return Promise.resolve().then(async()=>{let{stat:n,cpath:a,sri:c}=await dr(s,e,async(h,u)=>({stat:r?{size:r}:await fr.stat(h),cpath:h,sri:u}));return jd(a,n.size,c,i)}).catch(n=>i.emit("error",n)),i}o(Hd,"readStream");Os.exports.copy=Hb;function Hb(s,e,t){return dr(s,e,r=>fr.copyFile(r,t))}o(Hb,"copy");Os.exports.hasContent=zb;async function zb(s,e){if(!e)return!1;try{return await dr(s,e,async(t,r)=>{let i=await fr.stat(t);return{size:i.size,sri:r,stat:i}})}catch(t){if(t.code==="ENOENT")return!1;if(t.code==="EPERM"){if(process.platform!=="win32")throw t;return!1}}}o(zb,"hasContent");async function dr(s,e,t){let r=ja.parse(e),i=r.pickAlgorithm(),n=r[i];if(n.length<=1){let a=Ub(s,n[0]);return t(a,n[0])}else{let a=await Promise.all(n.map(async u=>{try{return await dr(s,u,t)}catch(l){return l.code==="ENOENT"?Object.assign(new Error("No matching content found for "+r.toString()),{code:"ENOENT"}):l}})),c=a.find(u=>!(u instanceof Error));if(c)return c;let h=a.find(u=>u.code==="ENOENT");throw h||a.find(u=>u instanceof Error)}}o(dr,"withContentSri");function Gb(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(Gb,"sizeError");function Vb(s,e){let t=new Error(`Integrity verification failed for ${s} (${e})`);return t.code="EINTEGRITY",t.sri=s,t.path=e,t}o(Vb,"integrityError")});var Wd=m((h1,pt)=>{"use strict";var zd=Zo(),{Minipass:Gd}=J(),Vd=hs(),Ut=ps(),dt=hr(),jt=Ha();async function Wb(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=dt.get(s,e,t);if(a&&i!==!1)return{metadata:a.entry.metadata,data:a.data,integrity:a.entry.integrity,size:a.entry.size};let c=await Ut.find(s,e,t);if(!c)throw new Ut.NotFoundError(s,e);let h=await jt(s,c.integrity,{integrity:r,size:n});return i&&dt.put(s,c,h,t),{data:h,metadata:c.metadata,size:c.size,integrity:c.integrity}}o(Wb,"getData");pt.exports=Wb;async function Zb(s,e,t={}){let{integrity:r,memoize:i,size:n}=t,a=dt.get.byDigest(s,e,t);if(a&&i!==!1)return a;let c=await jt(s,e,{integrity:r,size:n});return i&&dt.put.byDigest(s,e,c,t),c}o(Zb,"getDataByDigest");pt.exports.byDigest=Zb;var Kb=o(s=>{let e=new Gd;return e.on("newListener",function(t,r){t==="metadata"&&r(s.entry.metadata),t==="integrity"&&r(s.entry.integrity),t==="size"&&r(s.entry.size)}),e.end(s.data),e},"getMemoizedStream");function Yb(s,e,t={}){let{memoize:r,size:i}=t,n=dt.get(s,e,t);if(n&&r!==!1)return Kb(n);let a=new Vd;return Promise.resolve().then(async()=>{let c=await Ut.find(s,e);if(!c)throw new Ut.NotFoundError(s,e);a.emit("metadata",c.metadata),a.emit("integrity",c.integrity),a.emit("size",c.size),a.on("newListener",function(u,l){u==="metadata"&&l(c.metadata),u==="integrity"&&l(c.integrity),u==="size"&&l(c.size)});let h=jt.readStream(s,c.integrity,{...t,size:typeof i!="number"?c.size:i});if(r){let u=new zd.PassThrough;u.on("collect",l=>dt.put(s,c,l,t)),a.unshift(u)}return a.unshift(h),a}).catch(c=>a.emit("error",c)),a}o(Yb,"getStream");pt.exports.stream=Yb;function Xb(s,e,t={}){let{memoize:r}=t,i=dt.get.byDigest(s,e,t);if(i&&r!==!1){let n=new Gd;return n.end(i),n}else{let n=jt.readStream(s,e,t);if(!r)return n;let a=new zd.PassThrough;return a.on("collect",c=>dt.put.byDigest(s,e,c,t)),new Vd(n,a)}}o(Xb,"getStreamDigest");pt.exports.stream.byDigest=Xb;function Jb(s,e,t={}){let{memoize:r}=t,i=dt.get(s,e,t);return i&&r!==!1?Promise.resolve(i.entry):Ut.find(s,e)}o(Jb,"info");pt.exports.info=Jb;async function Qb(s,e,t,r={}){let i=await Ut.find(s,e,r);if(!i)throw new Ut.NotFoundError(s,e);return await jt.copy(s,i.integrity,t,r),{metadata:i.metadata,size:i.size,integrity:i.integrity}}o(Qb,"copy");pt.exports.copy=Qb;async function eR(s,e,t,r={}){return await jt.copy(s,e,t,r),e}o(eR,"copyByDigest");pt.exports.copy.byDigest=eR;pt.exports.hasContent=jt.hasContent});var Jd=m((l1,Wa)=>{"use strict";var Zd=require("events"),tR=us(),mr=require("fs/promises"),{moveFile:sR}=Ti(),{Minipass:rR}=J(),Kd=hs(),iR=ui(),za=require("path"),Ga=St(),nR=ta(),oR=zi();Wa.exports=aR;var pr=new Map;async function aR(s,e,t={}){let{algorithms:r,size:i,integrity:n}=t;if(typeof i=="number"&&e.length!==i)throw lR(i,e.length);let a=Ga.fromData(e,r?{algorithms:r}:{});if(n&&!Ga.checkData(e,n,t))throw fR(n,a);for(let c in a){let h=await Yd(s,t),u=a[c].toString();try{await mr.writeFile(h.target,e,{flag:"wx"}),await Xd(h,s,u,t)}finally{h.moved||await mr.rm(h.target,{recursive:!0,force:!0})}}return{integrity:a,size:e.length}}o(aR,"write");Wa.exports.stream=cR;var Va=class extends iR{static{o(this,"CacacheWriteStream")}constructor(e,t){super(),this.opts=t,this.cache=e,this.inputStream=new rR,this.inputStream.on("error",r=>this.emit("error",r)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(e,t,r){return this.handleContentP||(this.handleContentP=hR(this.inputStream,this.cache,this.opts),this.handleContentP.catch(i=>this.emit("error",i))),this.inputStream.write(e,t,r)}flush(e){this.inputStream.end(()=>{if(!this.handleContentP){let t=new Error("Cache input stream was empty");return t.code="ENODATA",Promise.reject(t).catch(e)}this.handleContentP.then(t=>{t.integrity&&this.emit("integrity",t.integrity),t.size!==null&&this.emit("size",t.size),e()},t=>e(t))})}};function cR(s,e={}){return new Va(s,e)}o(cR,"writeStream");async function hR(s,e,t){let r=await Yd(e,t);try{let i=await uR(s,e,r.target,t);return await Xd(r,e,i.integrity,t),i}finally{r.moved||await mr.rm(r.target,{recursive:!0,force:!0})}}o(hR,"handleContent");async function uR(s,e,t,r){let i=new oR.WriteStream(t,{flags:"wx"});if(r.integrityEmitter){let[u,l]=await Promise.all([Zd.once(r.integrityEmitter,"integrity").then(f=>f[0]),Zd.once(r.integrityEmitter,"size").then(f=>f[0]),new Kd(s,i).promise()]);return{integrity:u,size:l}}let n,a,c=Ga.integrityStream({integrity:r.integrity,algorithms:r.algorithms,size:r.size});return c.on("integrity",u=>{n=u}),c.on("size",u=>{a=u}),await new Kd(s,c,i).promise(),{integrity:n,size:a}}o(uR,"pipeToTmp");async function Yd(s,e){let t=nR(za.join(s,"tmp"),e.tmpPrefix);return await mr.mkdir(za.dirname(t),{recursive:!0}),{target:t,moved:!1}}o(Yd,"makeTmp");async function Xd(s,e,t){let r=tR(e,t),i=za.dirname(r);return pr.has(r)||pr.set(r,mr.mkdir(i,{recursive:!0}).then(async()=>(await sR(s.target,r,{overwrite:!1}),s.moved=!0,s.moved)).catch(n=>{if(!n.message.startsWith("The destination file exists"))throw Object.assign(n,{code:"EEXIST"})}).finally(()=>{pr.delete(r)})),pr.get(r)}o(Xd,"moveToDestination");function lR(s,e){let t=new Error(`Bad data size: expected inserted data to be ${s} bytes, but got ${e} instead`);return t.expected=s,t.found=e,t.code="EBADSIZE",t}o(lR,"sizeError");function fR(s,e){let t=new Error(`Integrity check failed:
|
|
14
15
|
Wanted: ${s}
|
|
15
|
-
Found: ${e}`);return t.code="EINTEGRITY",t.expected=s,t.found=e,t}o(uR,"checksumError")});var sp=m((l1,Wa)=>{"use strict";var Jd=ps(),Qd=cr(),ep=Xd(),lR=hi(),{PassThrough:fR}=Wo(),dR=hs(),tp=o(s=>({algorithms:["sha512"],...s}),"putOpts");Wa.exports=pR;async function pR(s,e,t,r={}){let{memoize:i}=r;r=tp(r);let n=await ep(s,t,r),a=await Jd.insert(s,e,n.integrity,{...r,size:n.size});return i&&Qd.put(s,a,t,r),n.integrity}o(pR,"putData");Wa.exports.stream=mR;function mR(s,e,t={}){let{memoize:r}=t;t=tp(t);let i,n,a,c,h=new dR;if(r){let l=new fR().on("collect",f=>{c=f});h.push(l)}let u=ep.stream(s,t).on("integrity",l=>{i=l}).on("size",l=>{n=l}).on("error",l=>{a=l});return h.push(u),h.push(new lR({async flush(){if(!a){let l=await Jd.insert(s,e,i,{...t,size:n});r&&c&&Qd.put(s,l,c,t),h.emit("integrity",i),h.emit("size",n)}}})),h}o(mR,"putStream")});var ip=m(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.range=Ht.balanced=void 0;var gR=o((s,e,t)=>{let r=s instanceof RegExp?rp(s,t):s,i=e instanceof RegExp?rp(e,t):e,n=r!==null&&i!=null&&(0,Ht.range)(r,i,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+i.length)}},"balanced");Ht.balanced=gR;var rp=o((s,e)=>{let t=e.match(s);return t?t[0]:null},"maybeMatch"),yR=o((s,e,t)=>{let r,i,n,a,c,h=t.indexOf(s),u=t.indexOf(e,h+1),l=h;if(h>=0&&u>0){if(s===e)return[h,u];for(r=[],n=t.length;l>=0&&!c;){if(l===h)r.push(l),h=t.indexOf(s,l+1);else if(r.length===1){let f=r.pop();f!==void 0&&(c=[f,u])}else i=r.pop(),i!==void 0&&i<n&&(n=i,a=u),u=t.indexOf(e,l+1);l=h<u&&h>=0?h:u}r.length&&a!==void 0&&(c=[n,a])}return c},"range");Ht.range=yR});var lp=m(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.expand=CR;var np=ip(),op="\0SLASH"+Math.random()+"\0",ap="\0OPEN"+Math.random()+"\0",Ka="\0CLOSE"+Math.random()+"\0",cp="\0COMMA"+Math.random()+"\0",hp="\0PERIOD"+Math.random()+"\0",ER=new RegExp(op,"g"),wR=new RegExp(ap,"g"),SR=new RegExp(Ka,"g"),_R=new RegExp(cp,"g"),bR=new RegExp(hp,"g"),RR=/\\\\/g,OR=/\\{/g,IR=/\\}/g,vR=/\\,/g,TR=/\\./g;function Za(s){return isNaN(s)?s.charCodeAt(0):parseInt(s,10)}o(Za,"numeric");function AR(s){return s.replace(RR,op).replace(OR,ap).replace(IR,Ka).replace(vR,cp).replace(TR,hp)}o(AR,"escapeBraces");function xR(s){return s.replace(ER,"\\").replace(wR,"{").replace(SR,"}").replace(_R,",").replace(bR,".")}o(xR,"unescapeBraces");function up(s){if(!s)return[""];let e=[],t=(0,np.balanced)("{","}",s);if(!t)return s.split(",");let{pre:r,body:i,post:n}=t,a=r.split(",");a[a.length-1]+="{"+i+"}";let c=up(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(up,"parseCommaParts");function CR(s){return s?(s.slice(0,2)==="{}"&&(s="\\{\\}"+s.slice(2)),mr(AR(s),!0).map(xR)):[]}o(CR,"expand");function BR(s){return"{"+s+"}"}o(BR,"embrace");function NR(s){return/^-?0\d/.test(s)}o(NR,"isPadded");function PR(s,e){return s<=e}o(PR,"lte");function LR(s,e){return s>=e}o(LR,"gte");function mr(s,e){let t=[],r=(0,np.balanced)("{","}",s);if(!r)return[s];let i=r.pre,n=r.post.length?mr(r.post,!1):[""];if(/\$$/.test(r.pre))for(let a=0;a<n.length;a++){let c=i+"{"+r.body+"}"+n[a];t.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=a||c,u=r.body.indexOf(",")>=0;if(!h&&!u)return r.post.match(/,(?!,).*\}/)?(s=r.pre+"{"+r.body+Ka+r.post,mr(s)):[s];let l;if(h)l=r.body.split(/\.\./);else if(l=up(r.body),l.length===1&&l[0]!==void 0&&(l=mr(l[0],!1).map(BR),l.length===1))return n.map(d=>r.pre+l[0]+d);let f;if(h&&l[0]!==void 0&&l[1]!==void 0){let d=Za(l[0]),p=Za(l[1]),g=Math.max(l[0].length,l[1].length),y=l.length===3&&l[2]!==void 0?Math.abs(Za(l[2])):1,S=PR;p<d&&(y*=-1,S=LR);let T=l.some(NR);f=[];for(let v=d;S(v,p);v+=y){let R;if(c)R=String.fromCharCode(v),R==="\\"&&(R="");else if(R=String(v),T){let I=g-R.length;if(I>0){let C=new Array(I+1).join("0");v<0?R="-"+C+R.slice(1):R=C+R}}f.push(R)}}else{f=[];for(let d=0;d<l.length;d++)f.push.apply(f,mr(l[d],!1))}for(let d=0;d<f.length;d++)for(let p=0;p<n.length;p++){let g=i+f[d]+n[p];(!e||h||g)&&t.push(g)}}return t}o(mr,"expand_")});var fp=m(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.assertValidPattern=void 0;var kR=1024*64,DR=o(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>kR)throw new TypeError("pattern is too long")},"assertValidPattern");zi.assertValidPattern=DR});var pp=m(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.parseClass=void 0;var MR={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gr=o(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),$R=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),dp=o(s=>s.join(""),"rangesToString"),FR=o((s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],n=t+1,a=!1,c=!1,h=!1,u=!1,l=t,f="";e:for(;n<s.length;){let y=s.charAt(n);if((y==="!"||y==="^")&&n===t+1){u=!0,n++;continue}if(y==="]"&&a&&!h){l=n+1;break}if(a=!0,y==="\\"&&!h){h=!0,n++;continue}if(y==="["&&!h){for(let[S,[w,T,v]]of Object.entries(MR))if(s.startsWith(S,n)){if(f)return["$.",!1,s.length-t,!0];n+=S.length,v?i.push(w):r.push(w),c=c||T;continue e}}if(h=!1,f){y>f?r.push(gr(f)+"-"+gr(y)):y===f&&r.push(gr(y)),f="",n++;continue}if(s.startsWith("-]",n+1)){r.push(gr(y+"-")),n+=2;continue}if(s.startsWith("-",n+1)){f=y,n+=2;continue}r.push(gr(y)),n++}if(l<n)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,s.length-t,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[$R(y),!1,l-t,!1]}let d="["+(u?"^":"")+dp(r)+"]",p="["+(u?"":"^")+dp(i)+"]";return[r.length&&i.length?"("+d+"|"+p+")":r.length?d:p,c,l-t,!0]},"parseClass");Gi.parseClass=FR});var Wi=m(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.unescape=void 0;var qR=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");Vi.unescape=qR});var Qa=m(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.AST=void 0;var UR=pp(),Zi=Wi(),jR=new Set(["!","?","+","*","@"]),mp=o(s=>jR.has(s),"isExtglobType"),HR="(?!(?:^|/)\\.\\.?(?:$|/))",Ki="(?!\\.)",zR=new Set(["[","."]),GR=new Set(["..","."]),VR=new Set("().*{}+?[]^$\\!"),WR=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Ja="[^/]",gp=Ja+"*?",yp=Ja+"+?",Xa=class s{static{o(this,"AST")}type;#e;#t;#s=!1;#r=[];#i;#a;#l;#f=!1;#c;#p;#d=!1;constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?r:this.#e.#c,this.#l=this.#e===this?[]:this.#e.#l,e==="!"&&!this.#e.#f&&this.#l.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#p=this.#r.map(e=>String(e)).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#l.pop();){if(e.type!=="!")continue;let t=e,r=t.#i;for(;r;){for(let i=t.#a+1;!r.type&&i<r.#r.length;i++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(r.#r[i])}t=r,r=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#i===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let r=e.#r[t];if(!(r instanceof s&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let r of this.#r)t.copyIn(r);return t}static#n(e,t,r,i){let n=!1,a=!1,c=-1,h=!1;if(t.type===null){let p=r,g="";for(;p<e.length;){let y=e.charAt(p++);if(n||y==="\\"){n=!n,g+=y;continue}if(a){p===c+1?(y==="^"||y==="!")&&(h=!0):y==="]"&&!(p===c+2&&h)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,c=p,h=!1,g+=y;continue}if(!i.noext&&mp(y)&&e.charAt(p)==="("){t.push(g),g="";let S=new s(y,t);p=s.#n(e,S,p,i),t.push(S);continue}g+=y}return t.push(g),p}let u=r+1,l=new s(null,t),f=[],d="";for(;u<e.length;){let p=e.charAt(u++);if(n||p==="\\"){n=!n,d+=p;continue}if(a){u===c+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(u===c+2&&h)&&(a=!1),d+=p;continue}else if(p==="["){a=!0,c=u,h=!1,d+=p;continue}if(mp(p)&&e.charAt(u)==="("){l.push(d),d="";let g=new s(p,l);l.push(g),u=s.#n(e,g,u,i);continue}if(p==="|"){l.push(d),d="",f.push(l),l=new s(null,t);continue}if(p===")")return d===""&&t.#r.length===0&&(t.#d=!0),l.push(d),d="",t.push(...f,l),u;d+=p}return t.type=null,t.#t=void 0,t.#r=[e.substring(r-1)],u}static fromGlob(e,t={}){let r=new s(null,void 0,t);return s.#n(e,r,0,t),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,r,i,n]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let c=(this.#c.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&this.#h(),!this.type){let h=this.isStart()&&this.isEnd(),u=this.#r.map(p=>{let[g,y,S,w]=typeof p=="string"?s.#_(p,this.#t,h):p.toRegExpSource(e);return this.#t=this.#t||S,this.#s=this.#s||w,g}).join(""),l="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&GR.has(this.#r[0]))){let g=zR,y=t&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),S=!t&&!e&&g.has(u.charAt(0));l=y?HR:S?Ki:""}let f="";return this.isEnd()&&this.#e.#f&&this.#i?.type==="!"&&(f="(?:$|\\/)"),[l+u+f,(0,Zi.unescape)(u),this.#t=!!this.#t,this.#s]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#g(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#r=[h],this.type=null,this.#t=void 0,[h,(0,Zi.unescape)(this.toString()),!1,!1]}let a=!r||e||t||!Ki?"":this.#g(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#d)c=(this.isStart()&&!t?Ki:"")+yp;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Ki:"")+gp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=i+n+h}return[c,(0,Zi.unescape)(n),this.#t=!!this.#t,this.#s]}#g(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,n,a]=t.toRegExpSource(e);return this.#s=this.#s||a,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#_(e,t,r=!1){let i=!1,n="",a=!1;for(let c=0;c<e.length;c++){let h=e.charAt(c);if(i){i=!1,n+=(VR.has(h)?"\\":"")+h;continue}if(h==="\\"){c===e.length-1?n+="\\\\":i=!0;continue}if(h==="["){let[u,l,f,d]=(0,UR.parseClass)(e,c);if(f){n+=u,a=a||l,c+=f-1,t=t||d;continue}}if(h==="*"){r&&e==="*"?n+=yp:n+=gp,t=!0;continue}if(h==="?"){n+=Ja,t=!0;continue}n+=WR(h)}return[n,(0,Zi.unescape)(e),!!t,a]}};Yi.AST=Xa});var ec=m(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.escape=void 0;var ZR=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");Xi.escape=ZR});var It=m(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.unescape=O.escape=O.AST=O.Minimatch=O.match=O.makeRe=O.braceExpand=O.defaults=O.filter=O.GLOBSTAR=O.sep=O.minimatch=void 0;var KR=lp(),Ji=fp(),Sp=Qa(),YR=ec(),XR=Wi(),JR=o((s,e,t={})=>((0,Ji.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new zt(e,t).match(s)),"minimatch");O.minimatch=JR;var QR=/^\*+([^+@!?\*\[\(]*)$/,eO=o(s=>e=>!e.startsWith(".")&&e.endsWith(s),"starDotExtTest"),tO=o(s=>e=>e.endsWith(s),"starDotExtTestDot"),sO=o(s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),"starDotExtTestNocase"),rO=o(s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),iO=/^\*+\.\*+$/,nO=o(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),oO=o(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),aO=/^\.\*+$/,cO=o(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),hO=/^\*+$/,uO=o(s=>s.length!==0&&!s.startsWith("."),"starTest"),lO=o(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),fO=/^\?+([^+@!?\*\[\(]*)?$/,dO=o(([s,e=""])=>{let t=_p([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),pO=o(([s,e=""])=>{let t=bp([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),mO=o(([s,e=""])=>{let t=bp([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTestDot"),gO=o(([s,e=""])=>{let t=_p([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTest"),_p=o(([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),bp=o(([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),Rp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ep={win32:{sep:"\\"},posix:{sep:"/"}};O.sep=Rp==="win32"?Ep.win32.sep:Ep.posix.sep;O.minimatch.sep=O.sep;O.GLOBSTAR=Symbol("globstar **");O.minimatch.GLOBSTAR=O.GLOBSTAR;var yO="[^/]",EO=yO+"*?",wO="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",SO="(?:(?!(?:\\/|^)\\.).)*?",_O=o((s,e={})=>t=>(0,O.minimatch)(t,s,e),"filter");O.filter=_O;O.minimatch.filter=O.filter;var Re=o((s,e={})=>Object.assign({},s,e),"ext"),bO=o(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return O.minimatch;let e=O.minimatch;return Object.assign(o((r,i,n={})=>e(r,i,Re(s,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(i,n={}){super(i,Re(s,n))}static defaults(i){return e.defaults(Re(s,i)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(i,n,a={}){super(i,n,Re(s,a))}static fromGlob(i,n={}){return e.AST.fromGlob(i,Re(s,n))}},unescape:o((r,i={})=>e.unescape(r,Re(s,i)),"unescape"),escape:o((r,i={})=>e.escape(r,Re(s,i)),"escape"),filter:o((r,i={})=>e.filter(r,Re(s,i)),"filter"),defaults:o(r=>e.defaults(Re(s,r)),"defaults"),makeRe:o((r,i={})=>e.makeRe(r,Re(s,i)),"makeRe"),braceExpand:o((r,i={})=>e.braceExpand(r,Re(s,i)),"braceExpand"),match:o((r,i,n={})=>e.match(r,i,Re(s,n)),"match"),sep:e.sep,GLOBSTAR:O.GLOBSTAR})},"defaults");O.defaults=bO;O.minimatch.defaults=O.defaults;var RO=o((s,e={})=>((0,Ji.assertValidPattern)(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,KR.expand)(s)),"braceExpand");O.braceExpand=RO;O.minimatch.braceExpand=O.braceExpand;var OO=o((s,e={})=>new zt(s,e).makeRe(),"makeRe");O.makeRe=OO;O.minimatch.makeRe=O.makeRe;var IO=o((s,e,t={})=>{let r=new zt(e,t);return s=s.filter(i=>r.match(i)),r.options.nonull&&!s.length&&s.push(e),s},"match");O.match=IO;O.minimatch.match=O.match;var wp=/[?*]|[+@!]\(.*?\)|\[|\]/,vO=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),zt=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,Ji.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Rp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>{}),this.debug(this.pattern,this.globSet);let r=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((n,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=n[0]===""&&n[1]===""&&(n[2]==="?"||!wp.test(n[2]))&&!wp.test(n[3]),u=/^[a-z]:/i.test(n[0]);if(h)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(u)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let i=0;i<e[r].length;i++)e[r][i]==="**"&&(e[r][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let n=r[r.length-1];return i==="**"&&n==="**"?r:i===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let n=e[i];i===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let c=r[i+1],h=r[i+2],u=r[i+3];if(c!==".."||!h||h==="."||h===".."||!u||u==="."||u==="..")continue;t=!0,r.splice(i,1);let l=r.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(t=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let a=r[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let h=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...h),r.length===0&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let i=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(i){e[t]=[],e[r]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let i=0,n=0,a=[],c="";for(;i<e.length&&n<t.length;)if(e[i]===t[n])a.push(c==="b"?t[n]:e[i]),i++,n++;else if(r&&e[i]==="**"&&t[n]===e[i+1])a.push(e[i]),i++;else if(r&&t[n]==="**"&&e[i]===t[n+1])a.push(t[n]),n++;else if(e[i]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[i]),i++,n++}else if(t[n]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),i++,n++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let i=this.options;if(this.isWindows){let y=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!y&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),w=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),T=!w&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),v=S?3:y?0:void 0,R=T?3:w?0:void 0;if(typeof v=="number"&&typeof R=="number"){let[I,C]=[e[v],t[R]];I.toLowerCase()===C.toLowerCase()&&(t[R]=I,R>v?t=t.slice(R):v>R&&(e=e.slice(v)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,c=0,h=e.length,u=t.length;a<h&&c<u;a++,c++){this.debug("matchOne loop");var l=t[c],f=e[a];if(this.debug(t,l,f),l===!1)return!1;if(l===O.GLOBSTAR){this.debug("GLOBSTAR",[t,l,f]);var d=a,p=c+1;if(p===u){for(this.debug("** at the end");a<h;a++)if(e[a]==="."||e[a]===".."||!i.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<h;){var g=e[d];if(this.debug(`
|
|
16
|
+
Found: ${e}`);return t.code="EINTEGRITY",t.expected=s,t.found=e,t}o(fR,"checksumError")});var rp=m((d1,Za)=>{"use strict";var Qd=ps(),ep=hr(),tp=Jd(),dR=ui(),{PassThrough:pR}=Zo(),mR=hs(),sp=o(s=>({algorithms:["sha512"],...s}),"putOpts");Za.exports=gR;async function gR(s,e,t,r={}){let{memoize:i}=r;r=sp(r);let n=await tp(s,t,r),a=await Qd.insert(s,e,n.integrity,{...r,size:n.size});return i&&ep.put(s,a,t,r),n.integrity}o(gR,"putData");Za.exports.stream=yR;function yR(s,e,t={}){let{memoize:r}=t;t=sp(t);let i,n,a,c,h=new mR;if(r){let l=new pR().on("collect",f=>{c=f});h.push(l)}let u=tp.stream(s,t).on("integrity",l=>{i=l}).on("size",l=>{n=l}).on("error",l=>{a=l});return h.push(u),h.push(new dR({async flush(){if(!a){let l=await Qd.insert(s,e,i,{...t,size:n});r&&c&&ep.put(s,l,c,t),h.emit("integrity",i),h.emit("size",n)}}})),h}o(yR,"putStream")});var np=m(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.range=Ht.balanced=void 0;var ER=o((s,e,t)=>{let r=s instanceof RegExp?ip(s,t):s,i=e instanceof RegExp?ip(e,t):e,n=r!==null&&i!=null&&(0,Ht.range)(r,i,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+i.length)}},"balanced");Ht.balanced=ER;var ip=o((s,e)=>{let t=e.match(s);return t?t[0]:null},"maybeMatch"),wR=o((s,e,t)=>{let r,i,n,a,c,h=t.indexOf(s),u=t.indexOf(e,h+1),l=h;if(h>=0&&u>0){if(s===e)return[h,u];for(r=[],n=t.length;l>=0&&!c;){if(l===h)r.push(l),h=t.indexOf(s,l+1);else if(r.length===1){let f=r.pop();f!==void 0&&(c=[f,u])}else i=r.pop(),i!==void 0&&i<n&&(n=i,a=u),u=t.indexOf(e,l+1);l=h<u&&h>=0?h:u}r.length&&a!==void 0&&(c=[n,a])}return c},"range");Ht.range=wR});var fp=m(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.expand=NR;var op=np(),ap="\0SLASH"+Math.random()+"\0",cp="\0OPEN"+Math.random()+"\0",Ya="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",up="\0PERIOD"+Math.random()+"\0",SR=new RegExp(ap,"g"),_R=new RegExp(cp,"g"),bR=new RegExp(Ya,"g"),RR=new RegExp(hp,"g"),OR=new RegExp(up,"g"),IR=/\\\\/g,vR=/\\{/g,TR=/\\}/g,AR=/\\,/g,xR=/\\./g;function Ka(s){return isNaN(s)?s.charCodeAt(0):parseInt(s,10)}o(Ka,"numeric");function CR(s){return s.replace(IR,ap).replace(vR,cp).replace(TR,Ya).replace(AR,hp).replace(xR,up)}o(CR,"escapeBraces");function BR(s){return s.replace(SR,"\\").replace(_R,"{").replace(bR,"}").replace(RR,",").replace(OR,".")}o(BR,"unescapeBraces");function lp(s){if(!s)return[""];let e=[],t=(0,op.balanced)("{","}",s);if(!t)return s.split(",");let{pre:r,body:i,post:n}=t,a=r.split(",");a[a.length-1]+="{"+i+"}";let c=lp(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(lp,"parseCommaParts");function NR(s){return s?(s.slice(0,2)==="{}"&&(s="\\{\\}"+s.slice(2)),gr(CR(s),!0).map(BR)):[]}o(NR,"expand");function PR(s){return"{"+s+"}"}o(PR,"embrace");function LR(s){return/^-?0\d/.test(s)}o(LR,"isPadded");function kR(s,e){return s<=e}o(kR,"lte");function DR(s,e){return s>=e}o(DR,"gte");function gr(s,e){let t=[],r=(0,op.balanced)("{","}",s);if(!r)return[s];let i=r.pre,n=r.post.length?gr(r.post,!1):[""];if(/\$$/.test(r.pre))for(let a=0;a<n.length;a++){let c=i+"{"+r.body+"}"+n[a];t.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),h=a||c,u=r.body.indexOf(",")>=0;if(!h&&!u)return r.post.match(/,(?!,).*\}/)?(s=r.pre+"{"+r.body+Ya+r.post,gr(s)):[s];let l;if(h)l=r.body.split(/\.\./);else if(l=lp(r.body),l.length===1&&l[0]!==void 0&&(l=gr(l[0],!1).map(PR),l.length===1))return n.map(d=>r.pre+l[0]+d);let f;if(h&&l[0]!==void 0&&l[1]!==void 0){let d=Ka(l[0]),p=Ka(l[1]),g=Math.max(l[0].length,l[1].length),y=l.length===3&&l[2]!==void 0?Math.abs(Ka(l[2])):1,S=kR;p<d&&(y*=-1,S=DR);let T=l.some(LR);f=[];for(let v=d;S(v,p);v+=y){let R;if(c)R=String.fromCharCode(v),R==="\\"&&(R="");else if(R=String(v),T){let I=g-R.length;if(I>0){let C=new Array(I+1).join("0");v<0?R="-"+C+R.slice(1):R=C+R}}f.push(R)}}else{f=[];for(let d=0;d<l.length;d++)f.push.apply(f,gr(l[d],!1))}for(let d=0;d<f.length;d++)for(let p=0;p<n.length;p++){let g=i+f[d]+n[p];(!e||h||g)&&t.push(g)}}return t}o(gr,"expand_")});var dp=m(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.assertValidPattern=void 0;var MR=1024*64,$R=o(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>MR)throw new TypeError("pattern is too long")},"assertValidPattern");Gi.assertValidPattern=$R});var mp=m(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.parseClass=void 0;var FR={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},yr=o(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),qR=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),pp=o(s=>s.join(""),"rangesToString"),UR=o((s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let r=[],i=[],n=t+1,a=!1,c=!1,h=!1,u=!1,l=t,f="";e:for(;n<s.length;){let y=s.charAt(n);if((y==="!"||y==="^")&&n===t+1){u=!0,n++;continue}if(y==="]"&&a&&!h){l=n+1;break}if(a=!0,y==="\\"&&!h){h=!0,n++;continue}if(y==="["&&!h){for(let[S,[w,T,v]]of Object.entries(FR))if(s.startsWith(S,n)){if(f)return["$.",!1,s.length-t,!0];n+=S.length,v?i.push(w):r.push(w),c=c||T;continue e}}if(h=!1,f){y>f?r.push(yr(f)+"-"+yr(y)):y===f&&r.push(yr(y)),f="",n++;continue}if(s.startsWith("-]",n+1)){r.push(yr(y+"-")),n+=2;continue}if(s.startsWith("-",n+1)){f=y,n+=2;continue}r.push(yr(y)),n++}if(l<n)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,s.length-t,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){let y=r[0].length===2?r[0].slice(-1):r[0];return[qR(y),!1,l-t,!1]}let d="["+(u?"^":"")+pp(r)+"]",p="["+(u?"":"^")+pp(i)+"]";return[r.length&&i.length?"("+d+"|"+p+")":r.length?d:p,c,l-t,!0]},"parseClass");Vi.parseClass=UR});var Zi=m(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.unescape=void 0;var jR=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");Wi.unescape=jR});var ec=m(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.AST=void 0;var HR=mp(),Ki=Zi(),zR=new Set(["!","?","+","*","@"]),gp=o(s=>zR.has(s),"isExtglobType"),GR="(?!(?:^|/)\\.\\.?(?:$|/))",Yi="(?!\\.)",VR=new Set(["[","."]),WR=new Set(["..","."]),ZR=new Set("().*{}+?[]^$\\!"),KR=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Qa="[^/]",yp=Qa+"*?",Ep=Qa+"+?",Ja=class s{static{o(this,"AST")}type;#e;#t;#s=!1;#r=[];#i;#a;#l;#f=!1;#c;#p;#d=!1;constructor(e,t,r={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?r:this.#e.#c,this.#l=this.#e===this?[]:this.#e.#l,e==="!"&&!this.#e.#f&&this.#l.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#p=this.#r.map(e=>String(e)).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#l.pop();){if(e.type!=="!")continue;let t=e,r=t.#i;for(;r;){for(let i=t.#a+1;!r.type&&i<r.#r.length;i++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(r.#r[i])}t=r,r=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#i===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#r.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let r=e.#r[t];if(!(r instanceof s&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let r of this.#r)t.copyIn(r);return t}static#n(e,t,r,i){let n=!1,a=!1,c=-1,h=!1;if(t.type===null){let p=r,g="";for(;p<e.length;){let y=e.charAt(p++);if(n||y==="\\"){n=!n,g+=y;continue}if(a){p===c+1?(y==="^"||y==="!")&&(h=!0):y==="]"&&!(p===c+2&&h)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,c=p,h=!1,g+=y;continue}if(!i.noext&&gp(y)&&e.charAt(p)==="("){t.push(g),g="";let S=new s(y,t);p=s.#n(e,S,p,i),t.push(S);continue}g+=y}return t.push(g),p}let u=r+1,l=new s(null,t),f=[],d="";for(;u<e.length;){let p=e.charAt(u++);if(n||p==="\\"){n=!n,d+=p;continue}if(a){u===c+1?(p==="^"||p==="!")&&(h=!0):p==="]"&&!(u===c+2&&h)&&(a=!1),d+=p;continue}else if(p==="["){a=!0,c=u,h=!1,d+=p;continue}if(gp(p)&&e.charAt(u)==="("){l.push(d),d="";let g=new s(p,l);l.push(g),u=s.#n(e,g,u,i);continue}if(p==="|"){l.push(d),d="",f.push(l),l=new s(null,t);continue}if(p===")")return d===""&&t.#r.length===0&&(t.#d=!0),l.push(d),d="",t.push(...f,l),u;d+=p}return t.type=null,t.#t=void 0,t.#r=[e.substring(r-1)],u}static fromGlob(e,t={}){let r=new s(null,void 0,t);return s.#n(e,r,0,t),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,r,i,n]=this.toRegExpSource();if(!(i||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;let c=(this.#c.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&this.#h(),!this.type){let h=this.isStart()&&this.isEnd(),u=this.#r.map(p=>{let[g,y,S,w]=typeof p=="string"?s.#_(p,this.#t,h):p.toRegExpSource(e);return this.#t=this.#t||S,this.#s=this.#s||w,g}).join(""),l="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&WR.has(this.#r[0]))){let g=VR,y=t&&g.has(u.charAt(0))||u.startsWith("\\.")&&g.has(u.charAt(2))||u.startsWith("\\.\\.")&&g.has(u.charAt(4)),S=!t&&!e&&g.has(u.charAt(0));l=y?GR:S?Yi:""}let f="";return this.isEnd()&&this.#e.#f&&this.#i?.type==="!"&&(f="(?:$|\\/)"),[l+u+f,(0,Ki.unescape)(u),this.#t=!!this.#t,this.#s]}let r=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#g(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#r=[h],this.type=null,this.#t=void 0,[h,(0,Ki.unescape)(this.toString()),!1,!1]}let a=!r||e||t||!Yi?"":this.#g(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#d)c=(this.isStart()&&!t?Yi:"")+Ep;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Yi:"")+yp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=i+n+h}return[c,(0,Ki.unescape)(n),this.#t=!!this.#t,this.#s]}#g(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[r,i,n,a]=t.toRegExpSource(e);return this.#s=this.#s||a,r}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#_(e,t,r=!1){let i=!1,n="",a=!1;for(let c=0;c<e.length;c++){let h=e.charAt(c);if(i){i=!1,n+=(ZR.has(h)?"\\":"")+h;continue}if(h==="\\"){c===e.length-1?n+="\\\\":i=!0;continue}if(h==="["){let[u,l,f,d]=(0,HR.parseClass)(e,c);if(f){n+=u,a=a||l,c+=f-1,t=t||d;continue}}if(h==="*"){r&&e==="*"?n+=Ep:n+=yp,t=!0;continue}if(h==="?"){n+=Qa,t=!0;continue}n+=KR(h)}return[n,(0,Ki.unescape)(e),!!t,a]}};Xi.AST=Ja});var tc=m(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.escape=void 0;var YR=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");Ji.escape=YR});var It=m(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.unescape=O.escape=O.AST=O.Minimatch=O.match=O.makeRe=O.braceExpand=O.defaults=O.filter=O.GLOBSTAR=O.sep=O.minimatch=void 0;var XR=fp(),Qi=dp(),_p=ec(),JR=tc(),QR=Zi(),eO=o((s,e,t={})=>((0,Qi.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new zt(e,t).match(s)),"minimatch");O.minimatch=eO;var tO=/^\*+([^+@!?\*\[\(]*)$/,sO=o(s=>e=>!e.startsWith(".")&&e.endsWith(s),"starDotExtTest"),rO=o(s=>e=>e.endsWith(s),"starDotExtTestDot"),iO=o(s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),"starDotExtTestNocase"),nO=o(s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),oO=/^\*+\.\*+$/,aO=o(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),cO=o(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),hO=/^\.\*+$/,uO=o(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),lO=/^\*+$/,fO=o(s=>s.length!==0&&!s.startsWith("."),"starTest"),dO=o(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),pO=/^\?+([^+@!?\*\[\(]*)?$/,mO=o(([s,e=""])=>{let t=bp([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),gO=o(([s,e=""])=>{let t=Rp([s]);return e?(e=e.toLowerCase(),r=>t(r)&&r.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),yO=o(([s,e=""])=>{let t=Rp([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTestDot"),EO=o(([s,e=""])=>{let t=bp([s]);return e?r=>t(r)&&r.endsWith(e):t},"qmarksTest"),bp=o(([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),Rp=o(([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),Op=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",wp={win32:{sep:"\\"},posix:{sep:"/"}};O.sep=Op==="win32"?wp.win32.sep:wp.posix.sep;O.minimatch.sep=O.sep;O.GLOBSTAR=Symbol("globstar **");O.minimatch.GLOBSTAR=O.GLOBSTAR;var wO="[^/]",SO=wO+"*?",_O="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",bO="(?:(?!(?:\\/|^)\\.).)*?",RO=o((s,e={})=>t=>(0,O.minimatch)(t,s,e),"filter");O.filter=RO;O.minimatch.filter=O.filter;var Re=o((s,e={})=>Object.assign({},s,e),"ext"),OO=o(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return O.minimatch;let e=O.minimatch;return Object.assign(o((r,i,n={})=>e(r,i,Re(s,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(i,n={}){super(i,Re(s,n))}static defaults(i){return e.defaults(Re(s,i)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(i,n,a={}){super(i,n,Re(s,a))}static fromGlob(i,n={}){return e.AST.fromGlob(i,Re(s,n))}},unescape:o((r,i={})=>e.unescape(r,Re(s,i)),"unescape"),escape:o((r,i={})=>e.escape(r,Re(s,i)),"escape"),filter:o((r,i={})=>e.filter(r,Re(s,i)),"filter"),defaults:o(r=>e.defaults(Re(s,r)),"defaults"),makeRe:o((r,i={})=>e.makeRe(r,Re(s,i)),"makeRe"),braceExpand:o((r,i={})=>e.braceExpand(r,Re(s,i)),"braceExpand"),match:o((r,i,n={})=>e.match(r,i,Re(s,n)),"match"),sep:e.sep,GLOBSTAR:O.GLOBSTAR})},"defaults");O.defaults=OO;O.minimatch.defaults=O.defaults;var IO=o((s,e={})=>((0,Qi.assertValidPattern)(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,XR.expand)(s)),"braceExpand");O.braceExpand=IO;O.minimatch.braceExpand=O.braceExpand;var vO=o((s,e={})=>new zt(s,e).makeRe(),"makeRe");O.makeRe=vO;O.minimatch.makeRe=O.makeRe;var TO=o((s,e,t={})=>{let r=new zt(e,t);return s=s.filter(i=>r.match(i)),r.options.nonull&&!s.length&&s.push(e),s},"match");O.match=TO;O.minimatch.match=O.match;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,AO=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),zt=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,Qi.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Op,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>{}),this.debug(this.pattern,this.globSet);let r=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((n,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=n[0]===""&&n[1]===""&&(n[2]==="?"||!Sp.test(n[2]))&&!Sp.test(n[3]),u=/^[a-z]:/i.test(n[0]);if(h)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(u)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(h=>this.parse(h))});if(this.debug(this.pattern,i),this.set=i.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let r=0;r<e.length;r++)for(let i=0;i<e[r].length;i++)e[r][i]==="**"&&(e[r][i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let r=-1;for(;(r=t.indexOf("**",r+1))!==-1;){let i=r;for(;t[i+1]==="**";)i++;i!==r&&t.splice(r,i-r)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((r,i)=>{let n=r[r.length-1];return i==="**"&&n==="**"?r:i===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(r.pop(),r):(r.push(i),r)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let n=e[i];i===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let r=0;for(;(r=e.indexOf("..",r+1))!==-1;){let i=e[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let c=r[i+1],h=r[i+2],u=r[i+3];if(c!==".."||!h||h==="."||h===".."||!u||u==="."||u==="..")continue;t=!0,r.splice(i,1);let l=r.slice(0);l[i]="**",e.push(l),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(t=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(t=!0,r.pop())}let n=0;for(;(n=r.indexOf("..",n+1))!==-1;){let a=r[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let h=n===1&&r[n+1]==="**"?["."]:[];r.splice(n-1,2,...h),r.length===0&&r.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){let i=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);if(i){e[t]=[],e[r]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,r=!1){let i=0,n=0,a=[],c="";for(;i<e.length&&n<t.length;)if(e[i]===t[n])a.push(c==="b"?t[n]:e[i]),i++,n++;else if(r&&e[i]==="**"&&t[n]===e[i+1])a.push(e[i]),i++;else if(r&&t[n]==="**"&&e[i]===t[n+1])a.push(t[n]),n++;else if(e[i]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[i]),i++,n++}else if(t[n]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),i++,n++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,r=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){let i=this.options;if(this.isWindows){let y=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!y&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),w=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),T=!w&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),v=S?3:y?0:void 0,R=T?3:w?0:void 0;if(typeof v=="number"&&typeof R=="number"){let[I,C]=[e[v],t[R]];I.toLowerCase()===C.toLowerCase()&&(t[R]=I,R>v?t=t.slice(R):v>R&&(e=e.slice(v)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,c=0,h=e.length,u=t.length;a<h&&c<u;a++,c++){this.debug("matchOne loop");var l=t[c],f=e[a];if(this.debug(t,l,f),l===!1)return!1;if(l===O.GLOBSTAR){this.debug("GLOBSTAR",[t,l,f]);var d=a,p=c+1;if(p===u){for(this.debug("** at the end");a<h;a++)if(e[a]==="."||e[a]===".."||!i.dot&&e[a].charAt(0)===".")return!1;return!0}for(;d<h;){var g=e[d];if(this.debug(`
|
|
16
17
|
globstar while`,e,d,t,p,g),this.matchOne(e.slice(d),t.slice(p),r))return this.debug("globstar found match!",d,h,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(r&&(this.debug(`
|
|
17
|
-
>>> no match, partial?`,e,d,t,p),d===h))}let y;if(typeof l=="string"?(y=f===l,this.debug("string match",l,f,y)):(y=l.test(f),this.debug("pattern match",l,f,y)),!y)return!1}if(a===h&&c===u)return!0;if(a===h)return r;if(c===u)return a===h-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,O.braceExpand)(this.pattern,this.options)}parse(e){(0,Ji.assertValidPattern)(e);let t=this.options;if(e==="**")return O.GLOBSTAR;if(e==="")return"";let r,i=null;(r=e.match(hO))?i=t.dot?lO:uO:(r=e.match(QR))?i=(t.nocase?t.dot?rO:sO:t.dot?tO:eO)(r[1]):(r=e.match(fO))?i=(t.nocase?t.dot?pO:dO:t.dot?mO:gO)(r):(r=e.match(iO))?i=t.dot?oO:nO:(r=e.match(aO))&&(i=cO);let n=Sp.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:i}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?EO:t.dot?wO:SO,i=new Set(t.nocase?["i"]:[]),n=e.map(h=>{let u=h.map(l=>{if(l instanceof RegExp)for(let f of l.flags.split(""))i.add(f);return typeof l=="string"?vO(l):l===O.GLOBSTAR?O.GLOBSTAR:l._src});return u.forEach((l,f)=>{let d=u[f+1],p=u[f-1];l!==O.GLOBSTAR||p===O.GLOBSTAR||(p===void 0?d!==void 0&&d!==O.GLOBSTAR?u[f+1]="(?:\\/|"+r+"\\/)?"+d:u[f]=r:d===void 0?u[f-1]=p+"(?:\\/|"+r+")?":d!==O.GLOBSTAR&&(u[f-1]=p+"(?:\\/|\\/"+r+"\\/)"+d,u[f+1]=O.GLOBSTAR))}),u.filter(l=>l!==O.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let n=this.set;this.debug(this.pattern,"set",n);let a=i[i.length-1];if(!a)for(let c=i.length-2;!a&&c>=0;c--)a=i[c];for(let c=0;c<n.length;c++){let h=n[c],u=i;if(r.matchBase&&h.length===1&&(u=[a]),this.matchOne(u,h,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return O.minimatch.defaults(e).Minimatch}};O.Minimatch=zt;var TO=Qa();Object.defineProperty(O,"AST",{enumerable:!0,get:o(function(){return TO.AST},"get")});var AO=ec();Object.defineProperty(O,"escape",{enumerable:!0,get:o(function(){return AO.escape},"get")});var xO=Wi();Object.defineProperty(O,"unescape",{enumerable:!0,get:o(function(){return xO.unescape},"get")});O.minimatch.AST=Sp.AST;O.minimatch.Minimatch=zt;O.minimatch.escape=YR.escape;O.minimatch.unescape=XR.unescape});var $p=m(L=>{"use strict";var CO=L&&L.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),BO=L&&L.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),NO=L&&L.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&CO(e,s,t);return BO(e,s),e};Object.defineProperty(L,"__esModule",{value:!0});L.PathScurry=L.Path=L.PathScurryDarwin=L.PathScurryPosix=L.PathScurryWin32=L.PathScurryBase=L.PathPosix=L.PathWin32=L.PathBase=L.ChildrenCache=L.ResolveCache=void 0;var xp=gs(),rn=require("node:path"),PO=require("node:url"),Er=require("fs"),LO=NO(require("node:fs")),kO=Er.realpathSync.native,Qi=require("node:fs/promises"),Op=J(),wr={lstatSync:Er.lstatSync,readdir:Er.readdir,readdirSync:Er.readdirSync,readlinkSync:Er.readlinkSync,realpathSync:kO,promises:{lstat:Qi.lstat,readdir:Qi.readdir,readlink:Qi.readlink,realpath:Qi.realpath}},Cp=o(s=>!s||s===wr||s===LO?wr:{...wr,...s,promises:{...wr.promises,...s.promises||{}}},"fsFromOption"),Bp=/^\\\\\?\\([a-z]:)\\?$/i,DO=o(s=>s.replace(/\//g,"\\").replace(Bp,"$1\\"),"uncToDrive"),MO=/[\\\/]/,Ie=0,Np=1,Pp=2,Ge=4,Lp=6,kp=8,Gt=10,Dp=12,Oe=15,yr=~Oe,tc=16,Ip=32,Sr=64,Le=128,en=256,sn=512,vp=Sr|Le|sn,$O=1023,sc=o(s=>s.isFile()?kp:s.isDirectory()?Ge:s.isSymbolicLink()?Gt:s.isCharacterDevice()?Pp:s.isBlockDevice()?Lp:s.isSocket()?Dp:s.isFIFO()?Np:Ie,"entToType"),Tp=new Map,_r=o(s=>{let e=Tp.get(s);if(e)return e;let t=s.normalize("NFKD");return Tp.set(s,t),t},"normalize"),Ap=new Map,tn=o(s=>{let e=Ap.get(s);if(e)return e;let t=_r(s.toLowerCase());return Ap.set(s,t),t},"normalizeNocase"),br=class extends xp.LRUCache{static{o(this,"ResolveCache")}constructor(){super({max:256})}};L.ResolveCache=br;var nn=class extends xp.LRUCache{static{o(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:o(t=>t.length+1,"sizeCalculation")})}};L.ChildrenCache=nn;var Mp=Symbol("PathScurry setAsCwd"),K=class{static{o(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#l;get rdev(){return this.#l}#f;get blksize(){return this.#f}#c;get ino(){return this.#c}#p;get size(){return this.#p}#d;get blocks(){return this.#d}#h;get atimeMs(){return this.#h}#n;get mtimeMs(){return this.#n}#g;get ctimeMs(){return this.#g}#_;get birthtimeMs(){return this.#_}#S;get atime(){return this.#S}#y;get mtime(){return this.#y}#A;get ctime(){return this.#A}#E;get birthtime(){return this.#E}#R;#v;#w;#b;#T;#m;#o;#P;#x;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ie,r,i,n,a,c){this.name=e,this.#R=n?tn(e):_r(e),this.#o=t&$O,this.nocase=n,this.roots=i,this.root=r||this,this.#P=a,this.#w=c.fullpath,this.#T=c.relative,this.#m=c.relativePosix,this.parent=c.parent,this.parent?this.#e=this.parent.#e:this.#e=Cp(c.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#U(i):this.#U(i)}#U(e){let t=this;for(let r of e)t=t.child(r);return t}children(){let e=this.#P.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#P.set(this,t),this.#o&=~tc,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let r=this.children(),i=this.nocase?tn(e):_r(e);for(let h of r)if(h.#R===i)return h;let n=this.parent?this.sep:"",a=this.#w?this.#w+n+e:void 0,c=this.newChild(e,Ie,{...t,parent:this,fullpath:a});return this.canReaddir()||(c.#o|=Le),r.push(c),c}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.fullpathPosix();let r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let e=this.parent,t=e.fullpathPosix(),r=t+(!t||!e.parent?"":"/")+this.name;return this.#b=r}isUnknown(){return(this.#o&Oe)===Ie}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Oe)===kp}isDirectory(){return(this.#o&Oe)===Ge}isCharacterDevice(){return(this.#o&Oe)===Pp}isBlockDevice(){return(this.#o&Oe)===Lp}isFIFO(){return(this.#o&Oe)===Np}isSocket(){return(this.#o&Oe)===Dp}isSymbolicLink(){return(this.#o&Gt)===Gt}lstatCached(){return this.#o&Ip?this:void 0}readlinkCached(){return this.#x}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#x)return!0;if(!this.parent)return!1;let e=this.#o&Oe;return!(e!==Ie&&e!==Gt||this.#o&en||this.#o&Le)}calledReaddir(){return!!(this.#o&tc)}isENOENT(){return!!(this.#o&Le)}isNamed(e){return this.nocase?this.#R===tn(e):this.#R===_r(e)}async readlink(){let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(t);if(r)return this.#x=r}catch(t){this.#j(t.code);return}}readlinkSync(){let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(t);if(r)return this.#x=r}catch(t){this.#j(t.code);return}}#I(e){this.#o|=tc;for(let t=e.provisional;t<e.length;t++){let r=e[t];r&&r.#$()}}#$(){this.#o&Le||(this.#o=(this.#o|Le)&yr,this.#L())}#L(){let e=this.children();e.provisional=0;for(let t of e)t.#$()}#F(){this.#o|=sn,this.#k()}#k(){if(this.#o&Sr)return;let e=this.#o;(e&Oe)===Ge&&(e&=yr),this.#o=e|Sr,this.#L()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#k():e==="ENOENT"?this.#$():this.children().provisional=0}#N(e=""){e==="ENOTDIR"?this.parent.#k():e==="ENOENT"&&this.#$()}#j(e=""){let t=this.#o;t|=en,e==="ENOENT"&&(t|=Le),(e==="EINVAL"||e==="UNKNOWN")&&(t&=yr),this.#o=t,e==="ENOTDIR"&&this.parent&&this.parent.#k()}#D(e,t){return this.#u(e,t)||this.#H(e,t)}#H(e,t){let r=sc(e),i=this.newChild(e.name,r,{parent:this}),n=i.#o&Oe;return n!==Ge&&n!==Gt&&n!==Ie&&(i.#o|=Sr),t.unshift(i),t.provisional++,i}#u(e,t){for(let r=t.provisional;r<t.length;r++){let i=t[r];if((this.nocase?tn(e.name):_r(e.name))===i.#R)return this.#z(e,i,r,t)}}#z(e,t,r,i){let n=t.name;return t.#o=t.#o&yr|sc(e),n!==e.name&&(t.name=e.name),r!==i.provisional&&(r===i.length-1?i.pop():i.splice(r,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#o&Le)===0)try{return this.#M(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#N(e.code)}}lstatSync(){if((this.#o&Le)===0)try{return this.#M(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#N(e.code)}}#M(e){let{atime:t,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:a,blocks:c,ctime:h,ctimeMs:u,dev:l,gid:f,ino:d,mode:p,mtime:g,mtimeMs:y,nlink:S,rdev:w,size:T,uid:v}=e;this.#S=t,this.#h=r,this.#E=i,this.#_=n,this.#f=a,this.#d=c,this.#A=h,this.#g=u,this.#t=l,this.#a=f,this.#c=d,this.#s=p,this.#y=g,this.#n=y,this.#r=S,this.#l=w,this.#p=T,this.#i=v;let R=sc(e);this.#o=this.#o&yr|R|Ip,R!==Ie&&R!==Ge&&R!==Gt&&(this.#o|=Sr)}#B=[];#q=!1;#V(e){this.#q=!1;let t=this.#B.slice();this.#B.length=0,t.forEach(r=>r(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let r=this.children();if(this.calledReaddir()){let n=r.slice(0,r.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#B.push(e),this.#q)return;this.#q=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(n,a)=>{if(n)this.#C(n.code),r.provisional=0;else{for(let c of a)this.#D(c,r);this.#I(r)}this.#V(r.slice(0,r.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#G)await this.#G;else{let r=o(()=>{},"resolve");this.#G=new Promise(i=>r=i);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#D(i,e);this.#I(e)}catch(i){this.#C(i.code),e.provisional=0}this.#G=void 0,r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let r of this.#e.readdirSync(t,{withFileTypes:!0}))this.#D(r,e);this.#I(e)}catch(r){this.#C(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#o&vp)return!1;let e=Oe&this.#o;return e===Ie||e===Ge||e===Gt}shouldWalk(e,t){return(this.#o&Ge)===Ge&&!(this.#o&vp)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((sn|en|Le)&this.#o))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#F()}}realpathSync(){if(this.#O)return this.#O;if(!((sn|en|Le)&this.#o))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#F()}}[Mp](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),r=[],i=this;for(;i&&i.parent;)t.add(i),i.#T=r.join(this.sep),i.#m=r.join("/"),i=i.parent,r.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#T=void 0,i.#m=void 0,i=i.parent}};L.PathBase=K;var Rr=class s extends K{static{o(this,"PathWin32")}sep="\\";splitSep=MO;constructor(e,t=Ie,r,i,n,a,c){super(e,t,r,i,n,a,c)}newChild(e,t=Ie,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return rn.win32.parse(e).root}getRoot(e){if(e=DO(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,r]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=r;return this.roots[e]=new vr(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Bp,"$1\\"),e===t}};L.PathWin32=Rr;var Or=class s extends K{static{o(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=Ie,r,i,n,a,c){super(e,t,r,i,n,a,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ie,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}};L.PathPosix=Or;var Ir=class{static{o(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#s;nocase;#r;constructor(e=process.cwd(),t,r,{nocase:i,childrenCacheSize:n=16*1024,fs:a=wr}={}){this.#r=Cp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,PO.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#e=new br,this.#t=new br,this.#s=new nn(n);let h=c.substring(this.rootPath.length).split(r);if(h.length===1&&!h[0]&&h.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let u=this.root,l=h.length-1,f=t.sep,d=this.rootPath,p=!1;for(let g of h){let y=l--;u=u.child(g,{relative:new Array(y).fill("..").join(f),relativePosix:new Array(y).fill("..").join("/"),fullpath:d+=(p?"":f)+g}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#e.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpath();return this.#e.set(t,i),i}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#t.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r}=t;if(e.canReaddir()){let i=await e.readdir();return r?i:i.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set,u=o((f,d)=>{h.add(f),f.readdirCB((p,g)=>{if(p)return d(p);let y=g.length;if(!y)return d();let S=o(()=>{--y===0&&d()},"next");for(let w of g)(!n||n(w))&&c.push(r?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(h,a)?u(T,S):S()):w.shouldWalk(h,a)?u(w,S):S()},!0)},"walk"),l=e;return new Promise((f,d)=>{u(l,p=>{if(p)return d(p);f(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set([e]);for(let u of h){let l=u.readdirSync();for(let f of l){(!n||n(f))&&c.push(r?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(h,a)&&h.add(d)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t;(!n||n(e))&&(yield r?e:e.fullpath());let c=new Set([e]);for(let h of c){let u=h.readdirSync();for(let l of u){(!n||n(l))&&(yield r?l:l.fullpath());let f=l;if(l.isSymbolicLink()){if(!(i&&(f=l.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(c,a)&&c.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new Op.Minipass({objectMode:!0});(!n||n(e))&&c.write(r?e:e.fullpath());let h=new Set,u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let g=o((S,w,T=!1)=>{if(S)return c.emit("error",S);if(i&&!T){let v=[];for(let R of w)R.isSymbolicLink()&&v.push(R.realpath().then(I=>I?.isUnknown()?I.lstat():I));if(v.length){Promise.all(v).then(()=>g(null,w,!0));return}}for(let v of w)v&&(!n||n(v))&&(c.write(r?v:v.fullpath())||(d=!0));l--;for(let v of w){let R=v.realpathCached()||v;R.shouldWalk(h,a)&&u.push(R)}d&&!c.flowing?c.once("drain",f):y||f()},"onReaddir"),y=!0;p.readdirCB(g,!0),y=!1}},"process");return f(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new Op.Minipass({objectMode:!0}),h=new Set;(!n||n(e))&&c.write(r?e:e.fullpath());let u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let g=p.readdirSync();for(let y of g)(!n||n(y))&&(c.write(r?y:y.fullpath())||(d=!0));l--;for(let y of g){let S=y;if(y.isSymbolicLink()){if(!(i&&(S=y.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(h,a)&&u.push(S)}}d&&!c.flowing&&c.once("drain",f)},"process");return f(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Mp](t)}};L.PathScurryBase=Ir;var vr=class extends Ir{static{o(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,rn.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return rn.win32.parse(e).root.toUpperCase()}newRoot(e){return new Rr(this.rootPath,Ge,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};L.PathScurryWin32=vr;var Tr=class extends Ir{static{o(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:r=!1}=t;super(e,rn.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new Or(this.rootPath,Ge,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};L.PathScurryPosix=Tr;var on=class extends Tr{static{o(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,{...t,nocase:r})}};L.PathScurryDarwin=on;L.Path=process.platform==="win32"?Rr:Or;L.PathScurry=process.platform==="win32"?vr:process.platform==="darwin"?on:Tr});var ic=m(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.Pattern=void 0;var FO=It(),qO=o(s=>s.length>=1,"isPatternList"),UO=o(s=>s.length>=1,"isGlobList"),rc=class s{static{o(this,"Pattern")}#e;#t;#s;length;#r;#i;#a;#l;#f;#c;#p=!0;constructor(e,t,r,i){if(!qO(e))throw new TypeError("empty pattern list");if(!UO(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#s=r,this.#r=i,this.#s===0){if(this.isUNC()){let[n,a,c,h,...u]=this.#e,[l,f,d,p,...g]=this.#t;u[0]===""&&(u.shift(),g.shift());let y=[n,a,c,h,""].join("/"),S=[l,f,d,p,""].join("/");this.#e=[y,...u],this.#t=[S,...g],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...a]=this.#e,[c,...h]=this.#t;a[0]===""&&(a.shift(),h.shift());let u=n+"/",l=c+"/";this.#e=[u,...a],this.#t=[l,...h],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===FO.GLOBSTAR}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#a=this.#a||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new s(this.#e,this.#t,this.#s+1,this.#r),this.#i.#c=this.#c,this.#i.#f=this.#f,this.#i.#l=this.#l,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#r==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#r==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#p)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#p?!1:(this.#p=!1,!0)}};an.Pattern=rc});var oc=m(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.Ignore=void 0;var Fp=It(),jO=ic(),HO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",nc=class{static{o(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:i,noglobstar:n,platform:a=HO}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:i,noglobstar:n,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new Fp.Minimatch(e,this.mmopts);for(let r=0;r<t.set.length;r++){let i=t.set[r],n=t.globParts[r];if(!i||!n)throw new Error("invalid pattern object");for(;i[0]==="."&&n[0]===".";)i.shift(),n.shift();let a=new jO.Pattern(i,n,0,this.platform),c=new Fp.Minimatch(a.globString(),this.mmopts),h=n[n.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(c):this.relative.push(c),h&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),r=`${t}/`,i=e.relative()||".",n=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(n))return!0;for(let a of this.absolute)if(a.match(t)||a.match(r))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(r))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}};cn.Ignore=nc});var Up=m(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Processor=Ve.SubWalks=Ve.MatchRecord=Ve.HasWalkedCache=void 0;var qp=It(),hn=class s{static{o(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let r=e.fullpath(),i=this.store.get(r);i?i.add(t.globString()):this.store.set(r,new Set([t.globString()]))}};Ve.HasWalkedCache=hn;var un=class{static{o(this,"MatchRecord")}store=new Map;add(e,t,r){let i=(t?2:0)|(r?1:0),n=this.store.get(e);this.store.set(e,n===void 0?i:i&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};Ve.MatchRecord=un;var ln=class{static{o(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let r=this.store.get(e);r?r.find(i=>i.globString()===t.globString())||r.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};Ve.SubWalks=ln;var ac=class s{static{o(this,"Processor")}hasWalkedCache;matches=new un;subwalks=new ln;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new hn}processPatterns(e,t){this.patterns=t;let r=t.map(i=>[e,i]);for(let[i,n]of r){this.hasWalkedCache.storeWalked(i,n);let a=n.root(),c=n.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let f=n.rest();if(f)n=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let h,u,l=!1;for(;typeof(h=n.pattern())=="string"&&(u=n.rest());)i=i.resolve(h),n=u,l=!0;if(h=n.pattern(),u=n.rest(),l){if(this.hasWalkedCache.hasWalked(i,n))continue;this.hasWalkedCache.storeWalked(i,n)}if(typeof h=="string"){let f=h===".."||h===""||h===".";this.matches.add(i.resolve(h),c,f);continue}else if(h===qp.GLOBSTAR){(!i.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(i,n);let f=u?.pattern(),d=u?.rest();if(!u||(f===""||f===".")&&!d)this.matches.add(i,c,f===""||f===".");else if(f===".."){let p=i.parent||i;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,c,!0)}}else h instanceof RegExp&&this.subwalks.add(i,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let r=this.subwalks.get(e),i=this.child();for(let n of t)for(let a of r){let c=a.isAbsolute(),h=a.pattern(),u=a.rest();h===qp.GLOBSTAR?i.testGlobstar(n,a,u,c):h instanceof RegExp?i.testRegExp(n,h,u,c):i.testString(n,h,u,c)}return i}testGlobstar(e,t,r,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){let n=r.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,r.rest(),i);else if(n===".."){let a=e.parent||e;this.subwalks.add(a,r)}else n instanceof RegExp&&this.testRegExp(e,n,r.rest(),i)}}testRegExp(e,t,r,i){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}testString(e,t,r,i){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}};Ve.Processor=ac});var zp=m(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.GlobStream=vt.GlobWalker=vt.GlobUtil=void 0;var zO=J(),jp=oc(),Hp=Up(),GO=o((s,e)=>typeof s=="string"?new jp.Ignore([s],e):Array.isArray(s)?new jp.Ignore(s,e):s,"makeIgnore"),Ar=class{static{o(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,t,r){if(this.patterns=e,this.path=t,this.opts=r,this.#s=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#t=GO(r.ignore??[],r),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=await n.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=n.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let n=`${e.relativePosix()}/**`;this.#t.add(n)}let r=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){let n=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!n.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(n?a+n+i:"."+i)}}async match(e,t,r){let i=await this.matchCheck(e,r);i&&this.matchFinish(i,t)}matchSync(e,t,r){let i=this.matchCheckSync(e,r);i&&this.matchFinish(i,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new Hp.Processor(this.opts),r)}walkCB2(e,t,r,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,r,i));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirCached();c.calledReaddir()?this.walkCB3(c,h,r,a):c.readdirCB((u,l)=>this.walkCB3(c,l,r,a),!0)}a()}walkCB3(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let[c,h]of r.subwalks.entries())n++,this.walkCB2(c,h,r.child(),a);a()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new Hp.Processor(this.opts),r)}walkCB2Sync(e,t,r,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,r,i));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirSync();this.walkCB3Sync(c,h,r,a)}a()}walkCB3Sync(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let[c,h]of r.subwalks.entries())n++,this.walkCB2Sync(c,h,r.child(),a);a()}};vt.GlobUtil=Ar;var cc=class extends Ar{static{o(this,"GlobWalker")}matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};vt.GlobWalker=cc;var hc=class extends Ar{static{o(this,"GlobStream")}results;constructor(e,t,r){super(e,t,r),this.results=new zO.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};vt.GlobStream=hc});var lc=m(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.Glob=void 0;var VO=It(),WO=require("node:url"),fn=$p(),ZO=ic(),dn=zp(),KO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",uc=class{static{o(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,WO.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(h=>h.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(h=>h.includes("/")?h:`./**/${h}`)}if(this.pattern=e,this.platform=t.platform||KO,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let h=t.platform==="win32"?fn.PathScurryWin32:t.platform==="darwin"?fn.PathScurryDarwin:t.platform?fn.PathScurryPosix:fn.PathScurry;this.scurry=new h(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let r=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(h=>new VO.Minimatch(h,i)),[a,c]=n.reduce((h,u)=>(h[0].push(...u.set),h[1].push(...u.globParts),h),[[],[]]);this.patterns=a.map((h,u)=>{let l=c[u];if(!l)throw new Error("invalid pattern object");return new ZO.Pattern(h,l,0,this.platform)})}async walk(){return[...await new dn.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new dn.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new dn.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new dn.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};pn.Glob=uc});var fc=m(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.hasMagic=void 0;var YO=It(),XO=o((s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new YO.Minimatch(t,e).hasMagic())return!0;return!1},"hasMagic");mn.hasMagic=XO});var Zp=m(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.glob=N.sync=N.iterate=N.iterateSync=N.stream=N.streamSync=N.Ignore=N.hasMagic=N.Glob=N.unescape=N.escape=void 0;N.globStreamSync=xr;N.globStream=dc;N.globSync=pc;N.globIterateSync=Cr;N.globIterate=mc;var Gp=It(),Vt=lc(),JO=fc(),Wp=It();Object.defineProperty(N,"escape",{enumerable:!0,get:o(function(){return Wp.escape},"get")});Object.defineProperty(N,"unescape",{enumerable:!0,get:o(function(){return Wp.unescape},"get")});var QO=lc();Object.defineProperty(N,"Glob",{enumerable:!0,get:o(function(){return QO.Glob},"get")});var eI=fc();Object.defineProperty(N,"hasMagic",{enumerable:!0,get:o(function(){return eI.hasMagic},"get")});var tI=oc();Object.defineProperty(N,"Ignore",{enumerable:!0,get:o(function(){return tI.Ignore},"get")});function xr(s,e={}){return new Vt.Glob(s,e).streamSync()}o(xr,"globStreamSync");function dc(s,e={}){return new Vt.Glob(s,e).stream()}o(dc,"globStream");function pc(s,e={}){return new Vt.Glob(s,e).walkSync()}o(pc,"globSync");async function Vp(s,e={}){return new Vt.Glob(s,e).walk()}o(Vp,"glob_");function Cr(s,e={}){return new Vt.Glob(s,e).iterateSync()}o(Cr,"globIterateSync");function mc(s,e={}){return new Vt.Glob(s,e).iterate()}o(mc,"globIterate");N.streamSync=xr;N.stream=Object.assign(dc,{sync:xr});N.iterateSync=Cr;N.iterate=Object.assign(mc,{sync:Cr});N.sync=Object.assign(pc,{stream:xr,iterate:Cr});N.glob=Object.assign(Vp,{glob:Vp,globSync:pc,sync:N.sync,globStream:dc,stream:N.stream,globStreamSync:xr,streamSync:N.streamSync,globIterate:mc,iterate:N.iterate,globIterateSync:Cr,iterateSync:N.iterateSync,Glob:Vt.Glob,hasMagic:JO.hasMagic,escape:Gp.escape,unescape:Gp.unescape});N.glob.glob=N.glob});var gc=m((W1,Yp)=>{"use strict";var{glob:sI}=Zp(),Kp=require("path"),rI=o(s=>s.split(Kp.win32.sep).join(Kp.posix.sep),"globify");Yp.exports=(s,e)=>sI(rI(s),e)});var Jp=m((K1,Xp)=>{"use strict";var iI=require("fs/promises"),nI=us(),{hasContent:oI}=ja();Xp.exports=aI;async function aI(s,e){let t=await oI(s,e);return t&&t.sri?(await iI.rm(nI(s,t.sri),{recursive:!0,force:!0}),!0):!1}o(aI,"rm")});var em=m((X1,Br)=>{"use strict";var{rm:cI}=require("fs/promises"),hI=gc(),uI=ps(),yc=cr(),lI=require("path"),fI=Jp();Br.exports=Qp;Br.exports.entry=Qp;function Qp(s,e,t){return yc.clearMemoized(),uI.delete(s,e,t)}o(Qp,"entry");Br.exports.content=dI;function dI(s,e){return yc.clearMemoized(),fI(s,e)}o(dI,"content");Br.exports.all=pI;async function pI(s){yc.clearMemoized();let e=await hI(lI.join(s,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(e.map(t=>cI(t,{recursive:!0,force:!0})))}o(pI,"all")});var sm=m((Q1,_c)=>{"use strict";var{mkdir:mI,readFile:gI,rm:wc,stat:Sc,truncate:yI,writeFile:EI}=require("fs/promises"),tm=us(),wI=Hi(),SI=gc(),Is=ps(),gn=require("path"),Ec=St(),_I=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),bI=o(s=>({concurrency:20,log:{silly(){}},...s}),"verifyOpts");_c.exports=RI;async function RI(s,e){e=bI(e),e.log.silly("verify","verifying cache at",s);let t=[OI,vI,TI,xI,BI,NI,II],r={};for(let i of t){let n=i.name,a=new Date,c=await i(s,e);c&&Object.keys(c).forEach(u=>{r[u]=c[u]});let h=new Date;r.runTime||(r.runTime={}),r.runTime[n]=h-a}return r.runTime.total=r.endTime-r.startTime,e.log.silly("verify","verification finished for",s,"in",`${r.runTime.total}ms`),r}o(RI,"verify");async function OI(){return{startTime:new Date}}o(OI,"markStartTime");async function II(){return{endTime:new Date}}o(II,"markEndTime");async function vI(s,e){return e.log.silly("verify","fixing cache permissions"),await mI(s,{recursive:!0}),null}o(vI,"fixPerms");async function TI(s,e){e.log.silly("verify","garbage collecting content");let{default:t}=await Promise.resolve().then(()=>(Ai(),Ti)),r=Is.lsStream(s),i=new Set;r.on("data",h=>{if(e.filter&&!e.filter(h))return;let u=Ec.parse(h.integrity);for(let l in u)i.add(u[l].toString())}),await new Promise((h,u)=>{r.on("end",h).on("error",u)});let n=tm.contentDir(s),a=await SI(gn.join(n,"**"),{follow:!1,nodir:!0,nosort:!0}),c={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await t(a,async h=>{let u=h.split(/[/\\]/),l=u.slice(u.length-3).join(""),f=u[u.length-4],d=Ec.fromHex(l,f);if(i.has(d.toString())){let p=await AI(h,d);p.valid?(c.verifiedContent++,c.keptSize+=p.size):(c.reclaimedCount++,c.badContentCount++,c.reclaimedSize+=p.size)}else{c.reclaimedCount++;let p=await Sc(h);await wc(h,{recursive:!0,force:!0}),c.reclaimedSize+=p.size}return c},{concurrency:e.concurrency}),c}o(TI,"garbageCollect");async function AI(s,e){let t={};try{let{size:r}=await Sc(s);t.size=r,t.valid=!0,await Ec.checkStream(new wI.ReadStream(s),e)}catch(r){if(r.code==="ENOENT")return{size:0,valid:!1};if(r.code!=="EINTEGRITY")throw r;await wc(s,{recursive:!0,force:!0}),t.valid=!1}return t}o(AI,"verifyContent");async function xI(s,e){e.log.silly("verify","rebuilding index");let{default:t}=await Promise.resolve().then(()=>(Ai(),Ti)),r=await Is.ls(s),i={missingContent:0,rejectedEntries:0,totalEntries:0},n={};for(let a in r)if(_I(r,a)){let c=Is.hashKey(a),h=r[a],u=e.filter&&!e.filter(h);u&&i.rejectedEntries++,n[c]&&!u?n[c].push(h):n[c]&&u||(u?(n[c]=[],n[c]._path=Is.bucketPath(s,a)):(n[c]=[h],n[c]._path=Is.bucketPath(s,a)))}return await t(Object.keys(n),a=>CI(s,n[a],i,e),{concurrency:e.concurrency}),i}o(xI,"rebuildIndex");async function CI(s,e,t){await yI(e._path);for(let r of e){let i=tm(s,r.integrity);try{await Sc(i),await Is.insert(s,r.key,r.integrity,{metadata:r.metadata,size:r.size,time:r.time}),t.totalEntries++}catch(n){if(n.code==="ENOENT")t.rejectedEntries++,t.missingContent++;else throw n}}}o(CI,"rebuildBucket");function BI(s,e){return e.log.silly("verify","cleaning tmp directory"),wc(gn.join(s,"tmp"),{recursive:!0,force:!0})}o(BI,"cleanTmp");async function NI(s,e){let t=gn.join(s,"_lastverified");return e.log.silly("verify","writing verifile to "+t),EI(t,`${Date.now()}`)}o(NI,"writeVerifile");_c.exports.lastRun=PI;async function PI(s){let e=await gI(gn.join(s,"_lastverified"),{encoding:"utf8"});return new Date(+e)}o(PI,"lastRun")});var im=m((tN,Rc)=>{"use strict";var{withTempDir:LI}=vi(),rm=require("fs/promises"),bc=require("path");Rc.exports.mkdir=kI;async function kI(s,e={}){let{tmpPrefix:t}=e,r=bc.join(s,"tmp");await rm.mkdir(r,{recursive:!0,owner:"inherit"});let i=`${r}${bc.sep}${t||""}`;return rm.mkdtemp(i,{owner:"inherit"})}o(kI,"mktmpdir");Rc.exports.withTmp=DI;function DI(s,e,t){return t||(t=e,e={}),LI(bc.join(s,"tmp"),t,e)}o(DI,"withTmp")});var cm=m((rN,M)=>{"use strict";var Tt=Vd(),nm=sp(),Oc=em(),om=sm(),{clearMemoized:MI}=cr(),am=im(),yn=ps();M.exports.index={};M.exports.index.compact=yn.compact;M.exports.index.insert=yn.insert;M.exports.ls=yn.ls;M.exports.ls.stream=yn.lsStream;M.exports.get=Tt;M.exports.get.byDigest=Tt.byDigest;M.exports.get.stream=Tt.stream;M.exports.get.stream.byDigest=Tt.stream.byDigest;M.exports.get.copy=Tt.copy;M.exports.get.copy.byDigest=Tt.copy.byDigest;M.exports.get.info=Tt.info;M.exports.get.hasContent=Tt.hasContent;M.exports.put=nm;M.exports.put.stream=nm.stream;M.exports.rm=Oc.entry;M.exports.rm.all=Oc.all;M.exports.rm.entry=M.exports.rm;M.exports.rm.content=Oc.content;M.exports.clearMemoized=MI;M.exports.tmp={};M.exports.tmp.mkdir=am.mkdir;M.exports.tmp.withTmp=am.withTmp;M.exports.verify=om;M.exports.verify.lastRun=om.lastRun});var vc=m((iN,hm)=>{"use strict";var $I=hs(),Ic=class extends $I{static{o(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(e,...t){super(),this.#e=e.events,t.length&&this.push(...t)}on(e,t){return this.#e.includes(e)&&this.#t.has(e)?t(...this.#t.get(e)):super.on(e,t)}emit(e,...t){return this.#e.includes(e)&&this.#t.set(e,t),super.emit(e,...t)}};hm.exports=Ic});var lm=m((oN,um)=>{var{URL:FI,format:qI}=require("url"),UI={auth:!1,fragment:!1,search:!0,unicode:!1},jI=o(s=>{let e=new FI(s.url);return`make-fetch-happen:request-cache:${qI(e,UI)}`},"cacheKey");um.exports=jI});var pm=m((cN,dm)=>{"use strict";function fm(s,e){for(let t in e)Object.defineProperty(s,t,{value:e[t],enumerable:!0,configurable:!0});return s}o(fm,"assign");function HI(s,e,t){if(!s||typeof s=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=void 0),e!=null&&(t.code=e);try{return fm(s,t)}catch{t.message=s.message,t.stack=s.stack;let i=o(function(){},"ErrClass");return i.prototype=Object.create(Object.getPrototypeOf(s)),fm(new i,t)}}o(HI,"createError");dm.exports=HI});var gm=m((uN,mm)=>{function ve(s,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(s)),this._timeouts=s,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(ve,"RetryOperation");mm.exports=ve;ve.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};ve.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};ve.prototype.retry=function(s){if(this._timeout&&clearTimeout(this._timeout),!s)return!1;var e=new Date().getTime();if(s&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(s);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&i.unref(),!0};ve.prototype.attempt=function(s,e){this._fn=s,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ve.prototype.try=function(s){this.attempt(s)};ve.prototype.start=function(s){this.attempt(s)};ve.prototype.start=ve.prototype.try;ve.prototype.errors=function(){return this._errors};ve.prototype.attempts=function(){return this._attempts};ve.prototype.mainError=function(){if(this._errors.length===0)return null;for(var s={},e=null,t=0,r=0;r<this._errors.length;r++){var i=this._errors[r],n=i.message,a=(s[n]||0)+1;s[n]=a,a>=t&&(e=i,t=a)}return e}});var ym=m(Wt=>{var zI=gm();Wt.operation=function(s){var e=Wt.timeouts(s);return new zI(e,{forever:s&&s.forever,unref:s&&s.unref,maxRetryTime:s&&s.maxRetryTime})};Wt.timeouts=function(s){if(s instanceof Array)return[].concat(s);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in s)e[t]=s[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<e.retries;i++)r.push(this.createTimeout(i,e));return s&&s.forever&&!r.length&&r.push(this.createTimeout(i,e)),r.sort(function(n,a){return n-a}),r};Wt.createTimeout=function(s,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,s));return r=Math.min(r,e.maxTimeout),r};Wt.wrap=function(s,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in s)typeof s[r]=="function"&&t.push(r)}for(var i=0;i<t.length;i++){var n=t[i],a=s[n];s[n]=o(function(h){var u=Wt.operation(e),l=Array.prototype.slice.call(arguments,1),f=l.pop();l.push(function(d){u.retry(d)||(d&&(arguments[0]=u.mainError()),f.apply(this,arguments))}),u.attempt(function(){h.apply(s,l)})},"retryWrapper").bind(s,a),s[n].options=e}}});var wm=m((pN,Em)=>{Em.exports=ym()});var bm=m((mN,_m)=>{"use strict";var GI=pm(),VI=wm(),WI=Object.prototype.hasOwnProperty;function Sm(s){return s&&s.code==="EPROMISERETRY"&&WI.call(s,"retried")}o(Sm,"isRetryError");function ZI(s,e){var t,r;return typeof s=="object"&&typeof e=="function"&&(t=e,e=s,s=t),r=VI.operation(e),new Promise(function(i,n){r.attempt(function(a){Promise.resolve().then(function(){return s(function(c){throw Sm(c)&&(c=c.retried),GI(new Error("Retrying"),"EPROMISERETRY",{retried:c})},a)}).then(i,function(c){Sm(c)&&(c=c.retried,r.retry(c||new Error))||n(c)})})})}o(ZI,"promiseRetry");_m.exports=ZI});var Om=m((yN,Rm)=>{var KI=Symbol("proc-log.meta");Rm.exports={META:KI,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:o(function(...s){return process.emit("output","standard",...s)},"standard"),error:o(function(...s){return process.emit("output","error",...s)},"error"),buffer:o(function(...s){return process.emit("output","buffer",...s)},"buffer"),flush:o(function(...s){return process.emit("output","flush",...s)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:o(function(...s){return process.emit("log","error",...s)},"error"),notice:o(function(...s){return process.emit("log","notice",...s)},"notice"),warn:o(function(...s){return process.emit("log","warn",...s)},"warn"),info:o(function(...s){return process.emit("log","info",...s)},"info"),verbose:o(function(...s){return process.emit("log","verbose",...s)},"verbose"),http:o(function(...s){return process.emit("log","http",...s)},"http"),silly:o(function(...s){return process.emit("log","silly",...s)},"silly"),timing:o(function(...s){return process.emit("log","timing",...s)},"timing"),pause:o(function(){return process.emit("log","pause")},"pause"),resume:o(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:o(function(s,e){process.emit("time","start",s);function t(){return process.emit("time","end",s)}if(o(t,"end"),typeof e=="function"){let r=e();return r&&r.finally?r.finally(t):(t(),r)}return t},"start"),end:o(function(s){return process.emit("time","end",s)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:o(function(s){process.emit("input","start");function e(){return process.emit("input","end")}if(o(e,"end"),typeof s=="function"){let t=s();return t&&t.finally?t.finally(e):(e(),t)}return e},"start"),end:o(function(){return process.emit("input","end")},"end"),read:o(function(...s){let e,t,r=new Promise((i,n)=>{e=i,t=n});return process.emit("input","read",e,t,...s),r},"read")}}});var Tc=m((wN,vm)=>{"use strict";var{LRUCache:YI}=gs(),Im=require("dns"),En=new YI({max:50}),XI=o(({family:s=0,hints:e=Im.ADDRCONFIG,all:t=!1,verbatim:r=void 0,ttl:i=300*1e3,lookup:n=Im.lookup})=>({hints:e,lookup:o((a,...c)=>{let h=c.pop(),u=c[0]??{},l={family:s,hints:e,all:t,verbatim:r,...typeof u=="number"?{family:u}:u},f=JSON.stringify({hostname:a,...l});if(En.has(f)){let d=En.get(f);return process.nextTick(h,null,...d)}n(a,l,(d,...p)=>d?h(d):(En.set(f,p,{ttl:i}),h(null,...p)))},"lookup")}),"getOptions");vm.exports={cache:En,getOptions:XI}});var Ac=m((_N,Am)=>{"use strict";var JI=Tc(),QI=o(s=>{let e=parseInt(s.family??"0",10),t=s.keepAlive??!0,r={keepAliveMsecs:t?1e3:void 0,maxSockets:s.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:t?256:void 0,scheduling:"fifo",...s,family:e,keepAlive:t,timeouts:{idle:s.timeout??0,connection:0,response:0,transfer:0,...s.timeouts},...JI.getOptions({family:e,...s.dns})};return delete r.timeout,r},"normalizeOptions"),Tm=o(s=>{let e="",t=Object.entries(s).sort((r,i)=>r[0]-i[0]);for(let[r,i]of t)i==null?i="null":i instanceof URL?i=i.toString():typeof i=="object"&&(i=Tm(i)),e+=`${r}:${i}:`;return e},"createKey"),ev=o(({secureEndpoint:s,...e})=>Tm({secureEndpoint:!!s,family:e.family,hints:e.hints,localAddress:e.localAddress,strictSsl:s?!!e.rejectUnauthorized:!1,ca:s?e.ca:null,cert:s?e.cert:null,key:s?e.key:null,keepAlive:e.keepAlive,keepAliveMsecs:e.keepAliveMsecs,maxSockets:e.maxSockets,maxTotalSockets:e.maxTotalSockets,maxFreeSockets:e.maxFreeSockets,scheduling:e.scheduling,timeouts:e.timeouts,proxy:e.proxy}),"cacheOptions");Am.exports={normalizeOptions:QI,cacheOptions:ev}});var Pr=m((RN,xm)=>{"use strict";function Nr(){return o(function(){},"noop")}o(Nr,"debug");Nr.enabled=!1;Nr.names=[];Nr.skips=[];Nr.formatters={};xm.exports=Nr});var Nm=m(le=>{"use strict";var tv=le&&le.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),sv=le&&le.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Cm=le&&le.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&tv(e,s,t);return sv(e,s),e};Object.defineProperty(le,"__esModule",{value:!0});le.req=le.json=le.toBuffer=void 0;var rv=Cm(require("http")),iv=Cm(require("https"));async function Bm(s){let e=0,t=[];for await(let r of s)e+=r.length,t.push(r);return Buffer.concat(t,e)}o(Bm,"toBuffer");le.toBuffer=Bm;async function nv(s){let t=(await Bm(s)).toString("utf8");try{return JSON.parse(t)}catch(r){let i=r;throw i.message+=` (input: ${t})`,i}}o(nv,"json");le.json=nv;function ov(s,e={}){let r=((typeof s=="string"?s:s.href).startsWith("https:")?iv:rv).request(s,e),i=new Promise((n,a)=>{r.once("response",n).once("error",a).end()});return r.then=i.then.bind(i),r}o(ov,"req");le.req=ov});var Lr=m(Ee=>{"use strict";var Lm=Ee&&Ee.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),av=Ee&&Ee.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),km=Ee&&Ee.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&Lm(e,s,t);return av(e,s),e},cv=Ee&&Ee.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Lm(e,s,t)};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Agent=void 0;var hv=km(require("net")),Pm=km(require("http")),uv=require("https");cv(Nm(),Ee);var We=Symbol("AgentBaseInternalState"),xc=class extends Pm.Agent{static{o(this,"Agent")}constructor(e){super(e),this[We]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
18
|
-
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new
|
|
18
|
+
>>> no match, partial?`,e,d,t,p),d===h))}let y;if(typeof l=="string"?(y=f===l,this.debug("string match",l,f,y)):(y=l.test(f),this.debug("pattern match",l,f,y)),!y)return!1}if(a===h&&c===u)return!0;if(a===h)return r;if(c===u)return a===h-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,O.braceExpand)(this.pattern,this.options)}parse(e){(0,Qi.assertValidPattern)(e);let t=this.options;if(e==="**")return O.GLOBSTAR;if(e==="")return"";let r,i=null;(r=e.match(lO))?i=t.dot?dO:fO:(r=e.match(tO))?i=(t.nocase?t.dot?nO:iO:t.dot?rO:sO)(r[1]):(r=e.match(pO))?i=(t.nocase?t.dot?gO:mO:t.dot?yO:EO)(r):(r=e.match(oO))?i=t.dot?cO:aO:(r=e.match(hO))&&(i=uO);let n=_p.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:i}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,r=t.noglobstar?SO:t.dot?_O:bO,i=new Set(t.nocase?["i"]:[]),n=e.map(h=>{let u=h.map(l=>{if(l instanceof RegExp)for(let f of l.flags.split(""))i.add(f);return typeof l=="string"?AO(l):l===O.GLOBSTAR?O.GLOBSTAR:l._src});return u.forEach((l,f)=>{let d=u[f+1],p=u[f-1];l!==O.GLOBSTAR||p===O.GLOBSTAR||(p===void 0?d!==void 0&&d!==O.GLOBSTAR?u[f+1]="(?:\\/|"+r+"\\/)?"+d:u[f]=r:d===void 0?u[f-1]=p+"(?:\\/|"+r+")?":d!==O.GLOBSTAR&&(u[f-1]=p+"(?:\\/|\\/"+r+"\\/)"+d,u[f+1]=O.GLOBSTAR))}),u.filter(l=>l!==O.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let r=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let n=this.set;this.debug(this.pattern,"set",n);let a=i[i.length-1];if(!a)for(let c=i.length-2;!a&&c>=0;c--)a=i[c];for(let c=0;c<n.length;c++){let h=n[c],u=i;if(r.matchBase&&h.length===1&&(u=[a]),this.matchOne(u,h,t))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(e){return O.minimatch.defaults(e).Minimatch}};O.Minimatch=zt;var xO=ec();Object.defineProperty(O,"AST",{enumerable:!0,get:o(function(){return xO.AST},"get")});var CO=tc();Object.defineProperty(O,"escape",{enumerable:!0,get:o(function(){return CO.escape},"get")});var BO=Zi();Object.defineProperty(O,"unescape",{enumerable:!0,get:o(function(){return BO.unescape},"get")});O.minimatch.AST=_p.AST;O.minimatch.Minimatch=zt;O.minimatch.escape=JR.escape;O.minimatch.unescape=QR.unescape});var Fp=m(L=>{"use strict";var NO=L&&L.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),PO=L&&L.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),LO=L&&L.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&NO(e,s,t);return PO(e,s),e};Object.defineProperty(L,"__esModule",{value:!0});L.PathScurry=L.Path=L.PathScurryDarwin=L.PathScurryPosix=L.PathScurryWin32=L.PathScurryBase=L.PathPosix=L.PathWin32=L.PathBase=L.ChildrenCache=L.ResolveCache=void 0;var Cp=gs(),nn=require("node:path"),kO=require("node:url"),wr=require("fs"),DO=LO(require("node:fs")),MO=wr.realpathSync.native,en=require("node:fs/promises"),Ip=J(),Sr={lstatSync:wr.lstatSync,readdir:wr.readdir,readdirSync:wr.readdirSync,readlinkSync:wr.readlinkSync,realpathSync:MO,promises:{lstat:en.lstat,readdir:en.readdir,readlink:en.readlink,realpath:en.realpath}},Bp=o(s=>!s||s===Sr||s===DO?Sr:{...Sr,...s,promises:{...Sr.promises,...s.promises||{}}},"fsFromOption"),Np=/^\\\\\?\\([a-z]:)\\?$/i,$O=o(s=>s.replace(/\//g,"\\").replace(Np,"$1\\"),"uncToDrive"),FO=/[\\\/]/,Ie=0,Pp=1,Lp=2,Ge=4,kp=6,Dp=8,Gt=10,Mp=12,Oe=15,Er=~Oe,sc=16,vp=32,_r=64,Le=128,tn=256,rn=512,Tp=_r|Le|rn,qO=1023,rc=o(s=>s.isFile()?Dp:s.isDirectory()?Ge:s.isSymbolicLink()?Gt:s.isCharacterDevice()?Lp:s.isBlockDevice()?kp:s.isSocket()?Mp:s.isFIFO()?Pp:Ie,"entToType"),Ap=new Map,br=o(s=>{let e=Ap.get(s);if(e)return e;let t=s.normalize("NFKD");return Ap.set(s,t),t},"normalize"),xp=new Map,sn=o(s=>{let e=xp.get(s);if(e)return e;let t=br(s.toLowerCase());return xp.set(s,t),t},"normalizeNocase"),Rr=class extends Cp.LRUCache{static{o(this,"ResolveCache")}constructor(){super({max:256})}};L.ResolveCache=Rr;var on=class extends Cp.LRUCache{static{o(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:o(t=>t.length+1,"sizeCalculation")})}};L.ChildrenCache=on;var $p=Symbol("PathScurry setAsCwd"),K=class{static{o(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#r;get nlink(){return this.#r}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#l;get rdev(){return this.#l}#f;get blksize(){return this.#f}#c;get ino(){return this.#c}#p;get size(){return this.#p}#d;get blocks(){return this.#d}#h;get atimeMs(){return this.#h}#n;get mtimeMs(){return this.#n}#g;get ctimeMs(){return this.#g}#_;get birthtimeMs(){return this.#_}#S;get atime(){return this.#S}#y;get mtime(){return this.#y}#A;get ctime(){return this.#A}#E;get birthtime(){return this.#E}#R;#v;#w;#b;#T;#m;#o;#P;#x;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ie,r,i,n,a,c){this.name=e,this.#R=n?sn(e):br(e),this.#o=t&qO,this.nocase=n,this.roots=i,this.root=r||this,this.#P=a,this.#w=c.fullpath,this.#T=c.relative,this.#m=c.relativePosix,this.parent=c.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(c.fs)}depth(){return this.#v!==void 0?this.#v:this.parent?this.#v=this.parent.depth()+1:this.#v=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#U(i):this.#U(i)}#U(e){let t=this;for(let r of e)t=t.child(r);return t}children(){let e=this.#P.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#P.set(this,t),this.#o&=~sc,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let r=this.children(),i=this.nocase?sn(e):br(e);for(let h of r)if(h.#R===i)return h;let n=this.parent?this.sep:"",a=this.#w?this.#w+n+e:void 0,c=this.newChild(e,Ie,{...t,parent:this,fullpath:a});return this.canReaddir()||(c.#o|=Le),r.push(c),c}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.name;let r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.fullpathPosix();let r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=i}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep==="/")return this.#b=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#b=`//?/${i}`:this.#b=i}let e=this.parent,t=e.fullpathPosix(),r=t+(!t||!e.parent?"":"/")+this.name;return this.#b=r}isUnknown(){return(this.#o&Oe)===Ie}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Oe)===Dp}isDirectory(){return(this.#o&Oe)===Ge}isCharacterDevice(){return(this.#o&Oe)===Lp}isBlockDevice(){return(this.#o&Oe)===kp}isFIFO(){return(this.#o&Oe)===Pp}isSocket(){return(this.#o&Oe)===Mp}isSymbolicLink(){return(this.#o&Gt)===Gt}lstatCached(){return this.#o&vp?this:void 0}readlinkCached(){return this.#x}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#x)return!0;if(!this.parent)return!1;let e=this.#o&Oe;return!(e!==Ie&&e!==Gt||this.#o&tn||this.#o&Le)}calledReaddir(){return!!(this.#o&sc)}isENOENT(){return!!(this.#o&Le)}isNamed(e){return this.nocase?this.#R===sn(e):this.#R===br(e)}async readlink(){let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(t);if(r)return this.#x=r}catch(t){this.#j(t.code);return}}readlinkSync(){let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(t);if(r)return this.#x=r}catch(t){this.#j(t.code);return}}#I(e){this.#o|=sc;for(let t=e.provisional;t<e.length;t++){let r=e[t];r&&r.#$()}}#$(){this.#o&Le||(this.#o=(this.#o|Le)&Er,this.#L())}#L(){let e=this.children();e.provisional=0;for(let t of e)t.#$()}#F(){this.#o|=rn,this.#k()}#k(){if(this.#o&_r)return;let e=this.#o;(e&Oe)===Ge&&(e&=Er),this.#o=e|_r,this.#L()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#k():e==="ENOENT"?this.#$():this.children().provisional=0}#N(e=""){e==="ENOTDIR"?this.parent.#k():e==="ENOENT"&&this.#$()}#j(e=""){let t=this.#o;t|=tn,e==="ENOENT"&&(t|=Le),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Er),this.#o=t,e==="ENOTDIR"&&this.parent&&this.parent.#k()}#D(e,t){return this.#u(e,t)||this.#H(e,t)}#H(e,t){let r=rc(e),i=this.newChild(e.name,r,{parent:this}),n=i.#o&Oe;return n!==Ge&&n!==Gt&&n!==Ie&&(i.#o|=_r),t.unshift(i),t.provisional++,i}#u(e,t){for(let r=t.provisional;r<t.length;r++){let i=t[r];if((this.nocase?sn(e.name):br(e.name))===i.#R)return this.#z(e,i,r,t)}}#z(e,t,r,i){let n=t.name;return t.#o=t.#o&Er|rc(e),n!==e.name&&(t.name=e.name),r!==i.provisional&&(r===i.length-1?i.pop():i.splice(r,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#o&Le)===0)try{return this.#M(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#N(e.code)}}lstatSync(){if((this.#o&Le)===0)try{return this.#M(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#N(e.code)}}#M(e){let{atime:t,atimeMs:r,birthtime:i,birthtimeMs:n,blksize:a,blocks:c,ctime:h,ctimeMs:u,dev:l,gid:f,ino:d,mode:p,mtime:g,mtimeMs:y,nlink:S,rdev:w,size:T,uid:v}=e;this.#S=t,this.#h=r,this.#E=i,this.#_=n,this.#f=a,this.#d=c,this.#A=h,this.#g=u,this.#t=l,this.#a=f,this.#c=d,this.#s=p,this.#y=g,this.#n=y,this.#r=S,this.#l=w,this.#p=T,this.#i=v;let R=rc(e);this.#o=this.#o&Er|R|vp,R!==Ie&&R!==Ge&&R!==Gt&&(this.#o|=_r)}#B=[];#q=!1;#V(e){this.#q=!1;let t=this.#B.slice();this.#B.length=0,t.forEach(r=>r(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let r=this.children();if(this.calledReaddir()){let n=r.slice(0,r.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#B.push(e),this.#q)return;this.#q=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(n,a)=>{if(n)this.#C(n.code),r.provisional=0;else{for(let c of a)this.#D(c,r);this.#I(r)}this.#V(r.slice(0,r.provisional))})}#G;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#G)await this.#G;else{let r=o(()=>{},"resolve");this.#G=new Promise(i=>r=i);try{for(let i of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#D(i,e);this.#I(e)}catch(i){this.#C(i.code),e.provisional=0}this.#G=void 0,r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let r of this.#e.readdirSync(t,{withFileTypes:!0}))this.#D(r,e);this.#I(e)}catch(r){this.#C(r.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#o&Tp)return!1;let e=Oe&this.#o;return e===Ie||e===Ge||e===Gt}shouldWalk(e,t){return(this.#o&Ge)===Ge&&!(this.#o&Tp)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#O)return this.#O;if(!((rn|tn|Le)&this.#o))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#F()}}realpathSync(){if(this.#O)return this.#O;if(!((rn|tn|Le)&this.#o))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#F()}}[$p](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),r=[],i=this;for(;i&&i.parent;)t.add(i),i.#T=r.join(this.sep),i.#m=r.join("/"),i=i.parent,r.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#T=void 0,i.#m=void 0,i=i.parent}};L.PathBase=K;var Or=class s extends K{static{o(this,"PathWin32")}sep="\\";splitSep=FO;constructor(e,t=Ie,r,i,n,a,c){super(e,t,r,i,n,a,c)}newChild(e,t=Ie,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return nn.win32.parse(e).root}getRoot(e){if(e=$O(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,r]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=r;return this.roots[e]=new Tr(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Np,"$1\\"),e===t}};L.PathWin32=Or;var Ir=class s extends K{static{o(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=Ie,r,i,n,a,c){super(e,t,r,i,n,a,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ie,r={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}};L.PathPosix=Ir;var vr=class{static{o(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#s;nocase;#r;constructor(e=process.cwd(),t,r,{nocase:i,childrenCacheSize:n=16*1024,fs:a=Sr}={}){this.#r=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,kO.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#e=new Rr,this.#t=new Rr,this.#s=new on(n);let h=c.substring(this.rootPath.length).split(r);if(h.length===1&&!h[0]&&h.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let u=this.root,l=h.length-1,f=t.sep,d=this.rootPath,p=!1;for(let g of h){let y=l--;u=u.child(g,{relative:new Array(y).fill("..").join(f),relativePosix:new Array(y).fill("..").join("/"),fullpath:d+=(p?"":f)+g}),p=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#e.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpath();return this.#e.set(t,i),i}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let r=this.#t.get(t);if(r!==void 0)return r;let i=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r}=t;if(e.canReaddir()){let i=await e.readdir();return r?i:i.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0}=t;return e.canReaddir()?r?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e.withFileTypes,e=this.cwd);let r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set,u=o((f,d)=>{h.add(f),f.readdirCB((p,g)=>{if(p)return d(p);let y=g.length;if(!y)return d();let S=o(()=>{--y===0&&d()},"next");for(let w of g)(!n||n(w))&&c.push(r?w:w.fullpath()),i&&w.isSymbolicLink()?w.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(h,a)?u(T,S):S()):w.shouldWalk(h,a)?u(w,S):S()},!0)},"walk"),l=e;return new Promise((f,d)=>{u(l,p=>{if(p)return d(p);f(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(r?e:e.fullpath());let h=new Set([e]);for(let u of h){let l=u.readdirSync();for(let f of l){(!n||n(f))&&c.push(r?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(h,a)&&h.add(d)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t;(!n||n(e))&&(yield r?e:e.fullpath());let c=new Set([e]);for(let h of c){let u=h.readdirSync();for(let l of u){(!n||n(l))&&(yield r?l:l.fullpath());let f=l;if(l.isSymbolicLink()){if(!(i&&(f=l.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(c,a)&&c.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new Ip.Minipass({objectMode:!0});(!n||n(e))&&c.write(r?e:e.fullpath());let h=new Set,u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let g=o((S,w,T=!1)=>{if(S)return c.emit("error",S);if(i&&!T){let v=[];for(let R of w)R.isSymbolicLink()&&v.push(R.realpath().then(I=>I?.isUnknown()?I.lstat():I));if(v.length){Promise.all(v).then(()=>g(null,w,!0));return}}for(let v of w)v&&(!n||n(v))&&(c.write(r?v:v.fullpath())||(d=!0));l--;for(let v of w){let R=v.realpathCached()||v;R.shouldWalk(h,a)&&u.push(R)}d&&!c.flowing?c.once("drain",f):y||f()},"onReaddir"),y=!0;p.readdirCB(g,!0),y=!1}},"process");return f(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof K||(t=e,e=this.cwd);let{withFileTypes:r=!0,follow:i=!1,filter:n,walkFilter:a}=t,c=new Ip.Minipass({objectMode:!0}),h=new Set;(!n||n(e))&&c.write(r?e:e.fullpath());let u=[e],l=0,f=o(()=>{let d=!1;for(;!d;){let p=u.shift();if(!p){l===0&&c.end();return}l++,h.add(p);let g=p.readdirSync();for(let y of g)(!n||n(y))&&(c.write(r?y:y.fullpath())||(d=!0));l--;for(let y of g){let S=y;if(y.isSymbolicLink()){if(!(i&&(S=y.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(h,a)&&u.push(S)}}d&&!c.flowing&&c.once("drain",f)},"process");return f(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[$p](t)}};L.PathScurryBase=vr;var Tr=class extends vr{static{o(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,nn.win32,"\\",{...t,nocase:r}),this.nocase=r;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return nn.win32.parse(e).root.toUpperCase()}newRoot(e){return new Or(this.rootPath,Ge,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};L.PathScurryWin32=Tr;var Ar=class extends vr{static{o(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:r=!1}=t;super(e,nn.posix,"/",{...t,nocase:r}),this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new Ir(this.rootPath,Ge,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};L.PathScurryPosix=Ar;var an=class extends Ar{static{o(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:r=!0}=t;super(e,{...t,nocase:r})}};L.PathScurryDarwin=an;L.Path=process.platform==="win32"?Or:Ir;L.PathScurry=process.platform==="win32"?Tr:process.platform==="darwin"?an:Ar});var nc=m(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.Pattern=void 0;var UO=It(),jO=o(s=>s.length>=1,"isPatternList"),HO=o(s=>s.length>=1,"isGlobList"),ic=class s{static{o(this,"Pattern")}#e;#t;#s;length;#r;#i;#a;#l;#f;#c;#p=!0;constructor(e,t,r,i){if(!jO(e))throw new TypeError("empty pattern list");if(!HO(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,r<0||r>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=t,this.#s=r,this.#r=i,this.#s===0){if(this.isUNC()){let[n,a,c,h,...u]=this.#e,[l,f,d,p,...g]=this.#t;u[0]===""&&(u.shift(),g.shift());let y=[n,a,c,h,""].join("/"),S=[l,f,d,p,""].join("/");this.#e=[y,...u],this.#t=[S,...g],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...a]=this.#e,[c,...h]=this.#t;a[0]===""&&(a.shift(),h.shift());let u=n+"/",l=c+"/";this.#e=[u,...a],this.#t=[l,...h],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===UO.GLOBSTAR}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#a=this.#a||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new s(this.#e,this.#t,this.#s+1,this.#r),this.#i.#c=this.#c,this.#i.#f=this.#f,this.#i.#l=this.#l,this.#i):this.#i=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#r==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#r==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#p)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#p?!1:(this.#p=!1,!0)}};cn.Pattern=ic});var ac=m(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.Ignore=void 0;var qp=It(),zO=nc(),GO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",oc=class{static{o(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:i,noglobstar:n,platform:a=GO}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:r,noext:i,noglobstar:n,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new qp.Minimatch(e,this.mmopts);for(let r=0;r<t.set.length;r++){let i=t.set[r],n=t.globParts[r];if(!i||!n)throw new Error("invalid pattern object");for(;i[0]==="."&&n[0]===".";)i.shift(),n.shift();let a=new zO.Pattern(i,n,0,this.platform),c=new qp.Minimatch(a.globString(),this.mmopts),h=n[n.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(c):this.relative.push(c),h&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),r=`${t}/`,i=e.relative()||".",n=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(n))return!0;for(let a of this.absolute)if(a.match(t)||a.match(r))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(r))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}};hn.Ignore=oc});var jp=m(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Processor=Ve.SubWalks=Ve.MatchRecord=Ve.HasWalkedCache=void 0;var Up=It(),un=class s{static{o(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let r=e.fullpath(),i=this.store.get(r);i?i.add(t.globString()):this.store.set(r,new Set([t.globString()]))}};Ve.HasWalkedCache=un;var ln=class{static{o(this,"MatchRecord")}store=new Map;add(e,t,r){let i=(t?2:0)|(r?1:0),n=this.store.get(e);this.store.set(e,n===void 0?i:i&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};Ve.MatchRecord=ln;var fn=class{static{o(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let r=this.store.get(e);r?r.find(i=>i.globString()===t.globString())||r.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};Ve.SubWalks=fn;var cc=class s{static{o(this,"Processor")}hasWalkedCache;matches=new ln;subwalks=new fn;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new un}processPatterns(e,t){this.patterns=t;let r=t.map(i=>[e,i]);for(let[i,n]of r){this.hasWalkedCache.storeWalked(i,n);let a=n.root(),c=n.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let f=n.rest();if(f)n=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let h,u,l=!1;for(;typeof(h=n.pattern())=="string"&&(u=n.rest());)i=i.resolve(h),n=u,l=!0;if(h=n.pattern(),u=n.rest(),l){if(this.hasWalkedCache.hasWalked(i,n))continue;this.hasWalkedCache.storeWalked(i,n)}if(typeof h=="string"){let f=h===".."||h===""||h===".";this.matches.add(i.resolve(h),c,f);continue}else if(h===Up.GLOBSTAR){(!i.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(i,n);let f=u?.pattern(),d=u?.rest();if(!u||(f===""||f===".")&&!d)this.matches.add(i,c,f===""||f===".");else if(f===".."){let p=i.parent||i;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,c,!0)}}else h instanceof RegExp&&this.subwalks.add(i,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let r=this.subwalks.get(e),i=this.child();for(let n of t)for(let a of r){let c=a.isAbsolute(),h=a.pattern(),u=a.rest();h===Up.GLOBSTAR?i.testGlobstar(n,a,u,c):h instanceof RegExp?i.testRegExp(n,h,u,c):i.testString(n,h,u,c)}return i}testGlobstar(e,t,r,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){let n=r.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,r.rest(),i);else if(n===".."){let a=e.parent||e;this.subwalks.add(a,r)}else n instanceof RegExp&&this.testRegExp(e,n,r.rest(),i)}}testRegExp(e,t,r,i){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}testString(e,t,r,i){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,i,!1))}};Ve.Processor=cc});var Gp=m(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.GlobStream=vt.GlobWalker=vt.GlobUtil=void 0;var VO=J(),Hp=ac(),zp=jp(),WO=o((s,e)=>typeof s=="string"?new Hp.Ignore([s],e):Array.isArray(s)?new Hp.Ignore(s,e):s,"makeIgnore"),xr=class{static{o(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,t,r){if(this.patterns=e,this.path=t,this.opts=r,this.#s=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#t=WO(r.ignore??[],r),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#i(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=await n.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=n.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#t?.add){let n=`${e.relativePosix()}/**`;this.#t.add(n)}let r=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){let n=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!n.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(n?a+n+i:"."+i)}}async match(e,t,r){let i=await this.matchCheck(e,r);i&&this.matchFinish(i,t)}matchSync(e,t,r){let i=this.matchCheckSync(e,r);i&&this.matchFinish(i,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new zp.Processor(this.opts),r)}walkCB2(e,t,r,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,r,i));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirCached();c.calledReaddir()?this.walkCB3(c,h,r,a):c.readdirCB((u,l)=>this.walkCB3(c,l,r,a),!0)}a()}walkCB3(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||(n++,this.match(c,h,u).then(()=>a()));for(let[c,h]of r.subwalks.entries())n++,this.walkCB2(c,h,r.child(),a);a()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new zp.Processor(this.opts),r)}walkCB2Sync(e,t,r,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,r,i));return}r.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let c of r.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let h=c.readdirSync();this.walkCB3Sync(c,h,r,a)}a()}walkCB3Sync(e,t,r,i){r=r.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&i()},"next");for(let[c,h,u]of r.matches.entries())this.#r(c)||this.matchSync(c,h,u);for(let[c,h]of r.subwalks.entries())n++,this.walkCB2Sync(c,h,r.child(),a);a()}};vt.GlobUtil=xr;var hc=class extends xr{static{o(this,"GlobWalker")}matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};vt.GlobWalker=hc;var uc=class extends xr{static{o(this,"GlobStream")}results;constructor(e,t,r){super(e,t,r),this.results=new VO.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};vt.GlobStream=uc});var fc=m(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Glob=void 0;var ZO=It(),KO=require("node:url"),dn=Fp(),YO=nc(),pn=Gp(),XO=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",lc=class{static{o(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,KO.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(h=>h.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(h=>h.includes("/")?h:`./**/${h}`)}if(this.pattern=e,this.platform=t.platform||XO,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let h=t.platform==="win32"?dn.PathScurryWin32:t.platform==="darwin"?dn.PathScurryDarwin:t.platform?dn.PathScurryPosix:dn.PathScurry;this.scurry=new h(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let r=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(h=>new ZO.Minimatch(h,i)),[a,c]=n.reduce((h,u)=>(h[0].push(...u.set),h[1].push(...u.globParts),h),[[],[]]);this.patterns=a.map((h,u)=>{let l=c[u];if(!l)throw new Error("invalid pattern object");return new YO.Pattern(h,l,0,this.platform)})}async walk(){return[...await new pn.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new pn.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new pn.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new pn.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};mn.Glob=lc});var dc=m(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.hasMagic=void 0;var JO=It(),QO=o((s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new JO.Minimatch(t,e).hasMagic())return!0;return!1},"hasMagic");gn.hasMagic=QO});var Kp=m(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.glob=N.sync=N.iterate=N.iterateSync=N.stream=N.streamSync=N.Ignore=N.hasMagic=N.Glob=N.unescape=N.escape=void 0;N.globStreamSync=Cr;N.globStream=pc;N.globSync=mc;N.globIterateSync=Br;N.globIterate=gc;var Vp=It(),Vt=fc(),eI=dc(),Zp=It();Object.defineProperty(N,"escape",{enumerable:!0,get:o(function(){return Zp.escape},"get")});Object.defineProperty(N,"unescape",{enumerable:!0,get:o(function(){return Zp.unescape},"get")});var tI=fc();Object.defineProperty(N,"Glob",{enumerable:!0,get:o(function(){return tI.Glob},"get")});var sI=dc();Object.defineProperty(N,"hasMagic",{enumerable:!0,get:o(function(){return sI.hasMagic},"get")});var rI=ac();Object.defineProperty(N,"Ignore",{enumerable:!0,get:o(function(){return rI.Ignore},"get")});function Cr(s,e={}){return new Vt.Glob(s,e).streamSync()}o(Cr,"globStreamSync");function pc(s,e={}){return new Vt.Glob(s,e).stream()}o(pc,"globStream");function mc(s,e={}){return new Vt.Glob(s,e).walkSync()}o(mc,"globSync");async function Wp(s,e={}){return new Vt.Glob(s,e).walk()}o(Wp,"glob_");function Br(s,e={}){return new Vt.Glob(s,e).iterateSync()}o(Br,"globIterateSync");function gc(s,e={}){return new Vt.Glob(s,e).iterate()}o(gc,"globIterate");N.streamSync=Cr;N.stream=Object.assign(pc,{sync:Cr});N.iterateSync=Br;N.iterate=Object.assign(gc,{sync:Br});N.sync=Object.assign(mc,{stream:Cr,iterate:Br});N.glob=Object.assign(Wp,{glob:Wp,globSync:mc,sync:N.sync,globStream:pc,stream:N.stream,globStreamSync:Cr,streamSync:N.streamSync,globIterate:gc,iterate:N.iterate,globIterateSync:Br,iterateSync:N.iterateSync,Glob:Vt.Glob,hasMagic:eI.hasMagic,escape:Vp.escape,unescape:Vp.unescape});N.glob.glob=N.glob});var yc=m((K1,Xp)=>{"use strict";var{glob:iI}=Kp(),Yp=require("path"),nI=o(s=>s.split(Yp.win32.sep).join(Yp.posix.sep),"globify");Xp.exports=(s,e)=>iI(nI(s),e)});var Qp=m((X1,Jp)=>{"use strict";var oI=require("fs/promises"),aI=us(),{hasContent:cI}=Ha();Jp.exports=hI;async function hI(s,e){let t=await cI(s,e);return t&&t.sri?(await oI.rm(aI(s,t.sri),{recursive:!0,force:!0}),!0):!1}o(hI,"rm")});var tm=m((Q1,Nr)=>{"use strict";var{rm:uI}=require("fs/promises"),lI=yc(),fI=ps(),Ec=hr(),dI=require("path"),pI=Qp();Nr.exports=em;Nr.exports.entry=em;function em(s,e,t){return Ec.clearMemoized(),fI.delete(s,e,t)}o(em,"entry");Nr.exports.content=mI;function mI(s,e){return Ec.clearMemoized(),pI(s,e)}o(mI,"content");Nr.exports.all=gI;async function gI(s){Ec.clearMemoized();let e=await lI(dI.join(s,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(e.map(t=>uI(t,{recursive:!0,force:!0})))}o(gI,"all")});var rm=m((tN,bc)=>{"use strict";var{mkdir:yI,readFile:EI,rm:Sc,stat:_c,truncate:wI,writeFile:SI}=require("fs/promises"),sm=us(),_I=zi(),bI=yc(),Is=ps(),yn=require("path"),wc=St(),RI=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),OI=o(s=>({concurrency:20,log:{silly(){}},...s}),"verifyOpts");bc.exports=II;async function II(s,e){e=OI(e),e.log.silly("verify","verifying cache at",s);let t=[vI,AI,xI,BI,PI,LI,TI],r={};for(let i of t){let n=i.name,a=new Date,c=await i(s,e);c&&Object.keys(c).forEach(u=>{r[u]=c[u]});let h=new Date;r.runTime||(r.runTime={}),r.runTime[n]=h-a}return r.runTime.total=r.endTime-r.startTime,e.log.silly("verify","verification finished for",s,"in",`${r.runTime.total}ms`),r}o(II,"verify");async function vI(){return{startTime:new Date}}o(vI,"markStartTime");async function TI(){return{endTime:new Date}}o(TI,"markEndTime");async function AI(s,e){return e.log.silly("verify","fixing cache permissions"),await yI(s,{recursive:!0}),null}o(AI,"fixPerms");async function xI(s,e){e.log.silly("verify","garbage collecting content");let{default:t}=await Promise.resolve().then(()=>(xi(),Ai)),r=Is.lsStream(s),i=new Set;r.on("data",h=>{if(e.filter&&!e.filter(h))return;let u=wc.parse(h.integrity);for(let l in u)i.add(u[l].toString())}),await new Promise((h,u)=>{r.on("end",h).on("error",u)});let n=sm.contentDir(s),a=await bI(yn.join(n,"**"),{follow:!1,nodir:!0,nosort:!0}),c={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await t(a,async h=>{let u=h.split(/[/\\]/),l=u.slice(u.length-3).join(""),f=u[u.length-4],d=wc.fromHex(l,f);if(i.has(d.toString())){let p=await CI(h,d);p.valid?(c.verifiedContent++,c.keptSize+=p.size):(c.reclaimedCount++,c.badContentCount++,c.reclaimedSize+=p.size)}else{c.reclaimedCount++;let p=await _c(h);await Sc(h,{recursive:!0,force:!0}),c.reclaimedSize+=p.size}return c},{concurrency:e.concurrency}),c}o(xI,"garbageCollect");async function CI(s,e){let t={};try{let{size:r}=await _c(s);t.size=r,t.valid=!0,await wc.checkStream(new _I.ReadStream(s),e)}catch(r){if(r.code==="ENOENT")return{size:0,valid:!1};if(r.code!=="EINTEGRITY")throw r;await Sc(s,{recursive:!0,force:!0}),t.valid=!1}return t}o(CI,"verifyContent");async function BI(s,e){e.log.silly("verify","rebuilding index");let{default:t}=await Promise.resolve().then(()=>(xi(),Ai)),r=await Is.ls(s),i={missingContent:0,rejectedEntries:0,totalEntries:0},n={};for(let a in r)if(RI(r,a)){let c=Is.hashKey(a),h=r[a],u=e.filter&&!e.filter(h);u&&i.rejectedEntries++,n[c]&&!u?n[c].push(h):n[c]&&u||(u?(n[c]=[],n[c]._path=Is.bucketPath(s,a)):(n[c]=[h],n[c]._path=Is.bucketPath(s,a)))}return await t(Object.keys(n),a=>NI(s,n[a],i,e),{concurrency:e.concurrency}),i}o(BI,"rebuildIndex");async function NI(s,e,t){await wI(e._path);for(let r of e){let i=sm(s,r.integrity);try{await _c(i),await Is.insert(s,r.key,r.integrity,{metadata:r.metadata,size:r.size,time:r.time}),t.totalEntries++}catch(n){if(n.code==="ENOENT")t.rejectedEntries++,t.missingContent++;else throw n}}}o(NI,"rebuildBucket");function PI(s,e){return e.log.silly("verify","cleaning tmp directory"),Sc(yn.join(s,"tmp"),{recursive:!0,force:!0})}o(PI,"cleanTmp");async function LI(s,e){let t=yn.join(s,"_lastverified");return e.log.silly("verify","writing verifile to "+t),SI(t,`${Date.now()}`)}o(LI,"writeVerifile");bc.exports.lastRun=kI;async function kI(s){let e=await EI(yn.join(s,"_lastverified"),{encoding:"utf8"});return new Date(+e)}o(kI,"lastRun")});var nm=m((rN,Oc)=>{"use strict";var{withTempDir:DI}=Ti(),im=require("fs/promises"),Rc=require("path");Oc.exports.mkdir=MI;async function MI(s,e={}){let{tmpPrefix:t}=e,r=Rc.join(s,"tmp");await im.mkdir(r,{recursive:!0,owner:"inherit"});let i=`${r}${Rc.sep}${t||""}`;return im.mkdtemp(i,{owner:"inherit"})}o(MI,"mktmpdir");Oc.exports.withTmp=$I;function $I(s,e,t){return t||(t=e,e={}),DI(Rc.join(s,"tmp"),t,e)}o($I,"withTmp")});var hm=m((nN,M)=>{"use strict";var Tt=Wd(),om=rp(),Ic=tm(),am=rm(),{clearMemoized:FI}=hr(),cm=nm(),En=ps();M.exports.index={};M.exports.index.compact=En.compact;M.exports.index.insert=En.insert;M.exports.ls=En.ls;M.exports.ls.stream=En.lsStream;M.exports.get=Tt;M.exports.get.byDigest=Tt.byDigest;M.exports.get.stream=Tt.stream;M.exports.get.stream.byDigest=Tt.stream.byDigest;M.exports.get.copy=Tt.copy;M.exports.get.copy.byDigest=Tt.copy.byDigest;M.exports.get.info=Tt.info;M.exports.get.hasContent=Tt.hasContent;M.exports.put=om;M.exports.put.stream=om.stream;M.exports.rm=Ic.entry;M.exports.rm.all=Ic.all;M.exports.rm.entry=M.exports.rm;M.exports.rm.content=Ic.content;M.exports.clearMemoized=FI;M.exports.tmp={};M.exports.tmp.mkdir=cm.mkdir;M.exports.tmp.withTmp=cm.withTmp;M.exports.verify=am;M.exports.verify.lastRun=am.lastRun});var Tc=m((oN,um)=>{"use strict";var qI=hs(),vc=class extends qI{static{o(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(e,...t){super(),this.#e=e.events,t.length&&this.push(...t)}on(e,t){return this.#e.includes(e)&&this.#t.has(e)?t(...this.#t.get(e)):super.on(e,t)}emit(e,...t){return this.#e.includes(e)&&this.#t.set(e,t),super.emit(e,...t)}};um.exports=vc});var fm=m((cN,lm)=>{var{URL:UI,format:jI}=require("url"),HI={auth:!1,fragment:!1,search:!0,unicode:!1},zI=o(s=>{let e=new UI(s.url);return`make-fetch-happen:request-cache:${jI(e,HI)}`},"cacheKey");lm.exports=zI});var mm=m((uN,pm)=>{"use strict";function dm(s,e){for(let t in e)Object.defineProperty(s,t,{value:e[t],enumerable:!0,configurable:!0});return s}o(dm,"assign");function GI(s,e,t){if(!s||typeof s=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=void 0),e!=null&&(t.code=e);try{return dm(s,t)}catch{t.message=s.message,t.stack=s.stack;let i=o(function(){},"ErrClass");return i.prototype=Object.create(Object.getPrototypeOf(s)),dm(new i,t)}}o(GI,"createError");pm.exports=GI});var ym=m((fN,gm)=>{function ve(s,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(s)),this._timeouts=s,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(ve,"RetryOperation");gm.exports=ve;ve.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};ve.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};ve.prototype.retry=function(s){if(this._timeout&&clearTimeout(this._timeout),!s)return!1;var e=new Date().getTime();if(s&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(s);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t);return this._options.unref&&i.unref(),!0};ve.prototype.attempt=function(s,e){this._fn=s,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ve.prototype.try=function(s){this.attempt(s)};ve.prototype.start=function(s){this.attempt(s)};ve.prototype.start=ve.prototype.try;ve.prototype.errors=function(){return this._errors};ve.prototype.attempts=function(){return this._attempts};ve.prototype.mainError=function(){if(this._errors.length===0)return null;for(var s={},e=null,t=0,r=0;r<this._errors.length;r++){var i=this._errors[r],n=i.message,a=(s[n]||0)+1;s[n]=a,a>=t&&(e=i,t=a)}return e}});var Em=m(Wt=>{var VI=ym();Wt.operation=function(s){var e=Wt.timeouts(s);return new VI(e,{forever:s&&s.forever,unref:s&&s.unref,maxRetryTime:s&&s.maxRetryTime})};Wt.timeouts=function(s){if(s instanceof Array)return[].concat(s);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in s)e[t]=s[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<e.retries;i++)r.push(this.createTimeout(i,e));return s&&s.forever&&!r.length&&r.push(this.createTimeout(i,e)),r.sort(function(n,a){return n-a}),r};Wt.createTimeout=function(s,e){var t=e.randomize?Math.random()+1:1,r=Math.round(t*e.minTimeout*Math.pow(e.factor,s));return r=Math.min(r,e.maxTimeout),r};Wt.wrap=function(s,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var r in s)typeof s[r]=="function"&&t.push(r)}for(var i=0;i<t.length;i++){var n=t[i],a=s[n];s[n]=o(function(h){var u=Wt.operation(e),l=Array.prototype.slice.call(arguments,1),f=l.pop();l.push(function(d){u.retry(d)||(d&&(arguments[0]=u.mainError()),f.apply(this,arguments))}),u.attempt(function(){h.apply(s,l)})},"retryWrapper").bind(s,a),s[n].options=e}}});var Sm=m((gN,wm)=>{wm.exports=Em()});var Rm=m((yN,bm)=>{"use strict";var WI=mm(),ZI=Sm(),KI=Object.prototype.hasOwnProperty;function _m(s){return s&&s.code==="EPROMISERETRY"&&KI.call(s,"retried")}o(_m,"isRetryError");function YI(s,e){var t,r;return typeof s=="object"&&typeof e=="function"&&(t=e,e=s,s=t),r=ZI.operation(e),new Promise(function(i,n){r.attempt(function(a){Promise.resolve().then(function(){return s(function(c){throw _m(c)&&(c=c.retried),WI(new Error("Retrying"),"EPROMISERETRY",{retried:c})},a)}).then(i,function(c){_m(c)&&(c=c.retried,r.retry(c||new Error))||n(c)})})})}o(YI,"promiseRetry");bm.exports=YI});var Im=m((wN,Om)=>{var XI=Symbol("proc-log.meta");Om.exports={META:XI,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:o(function(...s){return process.emit("output","standard",...s)},"standard"),error:o(function(...s){return process.emit("output","error",...s)},"error"),buffer:o(function(...s){return process.emit("output","buffer",...s)},"buffer"),flush:o(function(...s){return process.emit("output","flush",...s)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:o(function(...s){return process.emit("log","error",...s)},"error"),notice:o(function(...s){return process.emit("log","notice",...s)},"notice"),warn:o(function(...s){return process.emit("log","warn",...s)},"warn"),info:o(function(...s){return process.emit("log","info",...s)},"info"),verbose:o(function(...s){return process.emit("log","verbose",...s)},"verbose"),http:o(function(...s){return process.emit("log","http",...s)},"http"),silly:o(function(...s){return process.emit("log","silly",...s)},"silly"),timing:o(function(...s){return process.emit("log","timing",...s)},"timing"),pause:o(function(){return process.emit("log","pause")},"pause"),resume:o(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:o(function(s,e){process.emit("time","start",s);function t(){return process.emit("time","end",s)}if(o(t,"end"),typeof e=="function"){let r=e();return r&&r.finally?r.finally(t):(t(),r)}return t},"start"),end:o(function(s){return process.emit("time","end",s)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:o(function(s){process.emit("input","start");function e(){return process.emit("input","end")}if(o(e,"end"),typeof s=="function"){let t=s();return t&&t.finally?t.finally(e):(e(),t)}return e},"start"),end:o(function(){return process.emit("input","end")},"end"),read:o(function(...s){let e,t,r=new Promise((i,n)=>{e=i,t=n});return process.emit("input","read",e,t,...s),r},"read")}}});var Ac=m((_N,Tm)=>{"use strict";var{LRUCache:JI}=gs(),vm=require("dns"),wn=new JI({max:50}),QI=o(({family:s=0,hints:e=vm.ADDRCONFIG,all:t=!1,verbatim:r=void 0,ttl:i=300*1e3,lookup:n=vm.lookup})=>({hints:e,lookup:o((a,...c)=>{let h=c.pop(),u=c[0]??{},l={family:s,hints:e,all:t,verbatim:r,...typeof u=="number"?{family:u}:u},f=JSON.stringify({hostname:a,...l});if(wn.has(f)){let d=wn.get(f);return process.nextTick(h,null,...d)}n(a,l,(d,...p)=>d?h(d):(wn.set(f,p,{ttl:i}),h(null,...p)))},"lookup")}),"getOptions");Tm.exports={cache:wn,getOptions:QI}});var xc=m((RN,xm)=>{"use strict";var ev=Ac(),tv=o(s=>{let e=parseInt(s.family??"0",10),t=s.keepAlive??!0,r={keepAliveMsecs:t?1e3:void 0,maxSockets:s.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:t?256:void 0,scheduling:"fifo",...s,family:e,keepAlive:t,timeouts:{idle:s.timeout??0,connection:0,response:0,transfer:0,...s.timeouts},...ev.getOptions({family:e,...s.dns})};return delete r.timeout,r},"normalizeOptions"),Am=o(s=>{let e="",t=Object.entries(s).sort((r,i)=>r[0]-i[0]);for(let[r,i]of t)i==null?i="null":i instanceof URL?i=i.toString():typeof i=="object"&&(i=Am(i)),e+=`${r}:${i}:`;return e},"createKey"),sv=o(({secureEndpoint:s,...e})=>Am({secureEndpoint:!!s,family:e.family,hints:e.hints,localAddress:e.localAddress,strictSsl:s?!!e.rejectUnauthorized:!1,ca:s?e.ca:null,cert:s?e.cert:null,key:s?e.key:null,keepAlive:e.keepAlive,keepAliveMsecs:e.keepAliveMsecs,maxSockets:e.maxSockets,maxTotalSockets:e.maxTotalSockets,maxFreeSockets:e.maxFreeSockets,scheduling:e.scheduling,timeouts:e.timeouts,proxy:e.proxy}),"cacheOptions");xm.exports={normalizeOptions:tv,cacheOptions:sv}});var Lr=m((IN,Cm)=>{"use strict";function Pr(){return o(function(){},"noop")}o(Pr,"debug");Pr.enabled=!1;Pr.names=[];Pr.skips=[];Pr.formatters={};Cm.exports=Pr});var Pm=m(le=>{"use strict";var rv=le&&le.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),iv=le&&le.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Bm=le&&le.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&rv(e,s,t);return iv(e,s),e};Object.defineProperty(le,"__esModule",{value:!0});le.req=le.json=le.toBuffer=void 0;var nv=Bm(require("http")),ov=Bm(require("https"));async function Nm(s){let e=0,t=[];for await(let r of s)e+=r.length,t.push(r);return Buffer.concat(t,e)}o(Nm,"toBuffer");le.toBuffer=Nm;async function av(s){let t=(await Nm(s)).toString("utf8");try{return JSON.parse(t)}catch(r){let i=r;throw i.message+=` (input: ${t})`,i}}o(av,"json");le.json=av;function cv(s,e={}){let r=((typeof s=="string"?s:s.href).startsWith("https:")?ov:nv).request(s,e),i=new Promise((n,a)=>{r.once("response",n).once("error",a).end()});return r.then=i.then.bind(i),r}o(cv,"req");le.req=cv});var kr=m(Ee=>{"use strict";var km=Ee&&Ee.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),hv=Ee&&Ee.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Dm=Ee&&Ee.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&km(e,s,t);return hv(e,s),e},uv=Ee&&Ee.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&km(e,s,t)};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Agent=void 0;var lv=Dm(require("net")),Lm=Dm(require("http")),fv=require("https");uv(Pm(),Ee);var We=Symbol("AgentBaseInternalState"),Cc=class extends Lm.Agent{static{o(this,"Agent")}constructor(e){super(e),this[We]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
19
|
+
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new lv.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let r=this.sockets[e],i=r.indexOf(t);i!==-1&&(r.splice(i,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?fv.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,r){let i={...t,secureEndpoint:this.isSecureEndpoint(t)},n=this.getName(i),a=this.incrementSockets(n);Promise.resolve().then(()=>this.connect(e,i)).then(c=>{if(this.decrementSockets(n,a),c instanceof Lm.Agent)try{return c.addRequest(e,i)}catch(h){return r(h)}this[We].currentSocket=c,super.createSocket(e,t,r)},c=>{this.decrementSockets(n,a),r(c)})}createConnection(){let e=this[We].currentSocket;if(this[We].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[We].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[We]&&(this[We].defaultPort=e)}get protocol(){return this[We].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[We]&&(this[We].protocol=e)}};Ee.Agent=Cc});var Fm=m(Te=>{"use strict";var dv=Te&&Te.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),pv=Te&&Te.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),$m=Te&&Te.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&dv(e,s,t);return pv(e,s),e},mv=Te&&Te.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Te,"__esModule",{value:!0});Te.HttpProxyAgent=void 0;var gv=$m(require("net")),yv=$m(require("tls")),Ev=mv(Lr()),wv=require("events"),Sv=kr(),Mm=require("url"),vs=(0,Ev.default)("http-proxy-agent"),Sn=class extends Sv.Agent{static{o(this,"HttpProxyAgent")}constructor(e,t){super(t),this.proxy=typeof e=="string"?new Mm.URL(e):e,this.proxyHeaders=t?.headers??{},vs("Creating new HttpProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...t?_v(t,"headers"):null,host:r,port:i}}addRequest(e,t){e._header=null,this.setRequestProps(e,t),super.addRequest(e,t)}setRequestProps(e,t){let{proxy:r}=this,i=t.secureEndpoint?"https:":"http:",n=e.getHeader("host")||"localhost",a=`${i}//${n}`,c=new Mm.URL(e.path,a);t.port!==80&&(c.port=String(t.port)),e.path=String(c);let h=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(r.username||r.password){let u=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;h["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}h["Proxy-Connection"]||(h["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(h)){let l=h[u];l&&e.setHeader(u,l)}}async connect(e,t){e._header=null,e.path.includes("://")||this.setRequestProps(e,t);let r,i;vs("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(vs("Patching connection write() output buffer with updated header"),r=e.outputData[0].data,i=r.indexOf(`\r
|
|
19
20
|
\r
|
|
20
|
-
`)+4,e.outputData[0].data=e._header+r.substring(i),vs("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(vs("Creating `tls.Socket`: %o",this.connectOpts),n=
|
|
21
|
+
`)+4,e.outputData[0].data=e._header+r.substring(i),vs("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(vs("Creating `tls.Socket`: %o",this.connectOpts),n=yv.connect(this.connectOpts)):(vs("Creating `net.Socket`: %o",this.connectOpts),n=gv.connect(this.connectOpts)),await(0,wv.once)(n,"connect"),n}};Sn.protocols=["http","https"];Te.HttpProxyAgent=Sn;function _v(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(_v,"omit")});var qm=m(Ts=>{"use strict";var bv=Ts&&Ts.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ts,"__esModule",{value:!0});Ts.parseProxyResponse=void 0;var Rv=bv(Lr()),_n=(0,Rv.default)("https-proxy-agent:parse-proxy-response");function Ov(s){return new Promise((e,t)=>{let r=0,i=[];function n(){let l=s.read();l?u(l):s.once("readable",n)}o(n,"read");function a(){s.removeListener("end",c),s.removeListener("error",h),s.removeListener("readable",n)}o(a,"cleanup");function c(){a(),_n("onend"),t(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function h(l){a(),_n("onerror %o",l),t(l)}o(h,"onerror");function u(l){i.push(l),r+=l.length;let f=Buffer.concat(i,r),d=f.indexOf(`\r
|
|
21
22
|
\r
|
|
22
|
-
`);if(d===-1){
|
|
23
|
-
`),g=p.shift();if(!g)return s.destroy(),t(new Error("No header received from proxy CONNECT response"));let y=g.split(" "),S=+y[1],w=y.slice(2).join(" "),T={};for(let v of p){if(!v)continue;let R=v.indexOf(":");if(R===-1)return s.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${v}"`));let I=v.slice(0,R).toLowerCase(),C=v.slice(R+1).trimStart(),P=T[I];typeof P=="string"?T[I]=[P,C]:Array.isArray(P)?P.push(C):T[I]=C}
|
|
23
|
+
`);if(d===-1){_n("have not received end of HTTP headers yet..."),n();return}let p=f.slice(0,d).toString("ascii").split(`\r
|
|
24
|
+
`),g=p.shift();if(!g)return s.destroy(),t(new Error("No header received from proxy CONNECT response"));let y=g.split(" "),S=+y[1],w=y.slice(2).join(" "),T={};for(let v of p){if(!v)continue;let R=v.indexOf(":");if(R===-1)return s.destroy(),t(new Error(`Invalid header from proxy CONNECT response: "${v}"`));let I=v.slice(0,R).toLowerCase(),C=v.slice(R+1).trimStart(),P=T[I];typeof P=="string"?T[I]=[P,C]:Array.isArray(P)?P.push(C):T[I]=C}_n("got proxy server response: %o %o",g,T),a(),e({connect:{statusCode:S,statusText:w,headers:T},buffered:f})}o(u,"ondata"),s.on("error",h),s.on("end",c),n()})}o(Ov,"parseProxyResponse");Ts.parseProxyResponse=Ov});var Vm=m(Ae=>{"use strict";var Iv=Ae&&Ae.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),vv=Ae&&Ae.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),zm=Ae&&Ae.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&Iv(e,s,t);return vv(e,s),e},Gm=Ae&&Ae.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.HttpsProxyAgent=void 0;var bn=zm(require("net")),Um=zm(require("tls")),Tv=Gm(require("assert")),Av=Gm(Lr()),xv=kr(),Cv=require("url"),Bv=qm(),Dr=(0,Av.default)("https-proxy-agent"),jm=o(s=>s.servername===void 0&&s.host&&!bn.isIP(s.host)?{...s,servername:s.host}:s,"setServernameFromNonIpHost"),Rn=class extends xv.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e=="string"?new Cv.URL(e):e,this.proxyHeaders=t?.headers??{},Dr("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?Hm(t,"headers"):null,host:r,port:i}}async connect(e,t){let{proxy:r}=this;if(!t.host)throw new TypeError('No "host" provided');let i;r.protocol==="https:"?(Dr("Creating `tls.Socket`: %o",this.connectOpts),i=Um.connect(jm(this.connectOpts))):(Dr("Creating `net.Socket`: %o",this.connectOpts),i=bn.connect(this.connectOpts));let n=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=bn.isIPv6(t.host)?`[${t.host}]`:t.host,c=`CONNECT ${a}:${t.port} HTTP/1.1\r
|
|
24
25
|
`;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;n["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}n.Host=`${a}:${t.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(n))c+=`${d}: ${n[d]}\r
|
|
25
|
-
`;let h=(0,
|
|
26
|
-
`);let{connect:u,buffered:l}=await h;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Cv),t.secureEndpoint?(kr("Upgrading socket connection to TLS"),qm.connect({...jm(Um(t),"host","path","port"),socket:i})):i;i.destroy();let f=new _n.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{kr("Replaying proxy buffer for failed request"),(0,Iv.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),f}};bn.protocols=["http","https"];Ae.HttpsProxyAgent=bn;function Cv(s){s.resume()}o(Cv,"resume");function jm(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(jm,"omit")});var Km=m(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});var Vm=require("buffer"),Zt={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};mt.ERRORS=Zt;function Bv(s){if(!Vm.Buffer.isEncoding(s))throw new Error(Zt.INVALID_ENCODING)}o(Bv,"checkEncoding");mt.checkEncoding=Bv;function Wm(s){return typeof s=="number"&&isFinite(s)&&kv(s)}o(Wm,"isFiniteInteger");mt.isFiniteInteger=Wm;function Zm(s,e){if(typeof s=="number"){if(!Wm(s)||s<0)throw new Error(e?Zt.INVALID_OFFSET:Zt.INVALID_LENGTH)}else throw new Error(e?Zt.INVALID_OFFSET_NON_NUMBER:Zt.INVALID_LENGTH_NON_NUMBER)}o(Zm,"checkOffsetOrLengthValue");function Nv(s){Zm(s,!1)}o(Nv,"checkLengthValue");mt.checkLengthValue=Nv;function Pv(s){Zm(s,!0)}o(Pv,"checkOffsetValue");mt.checkOffsetValue=Pv;function Lv(s,e){if(s<0||s>e.length)throw new Error(Zt.INVALID_TARGET_OFFSET)}o(Lv,"checkTargetOffset");mt.checkTargetOffset=Lv;function kv(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}o(kv,"isInteger");function Dv(s){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof Vm.Buffer.prototype[s]>"u")throw new Error(`Platform does not support Buffer.prototype.${s}.`)}o(Dv,"bigIntAndBufferInt64Check");mt.bigIntAndBufferInt64Check=Dv});var Xm=m(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});var x=Km(),Ym=4096,Mv="utf8",Cc=class s{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=Mv,this._writeOffset=0,this._readOffset=0,s.isSmartBufferOptions(e))if(e.encoding&&(x.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(x.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Ym);else{if(typeof e<"u")throw new Error(x.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Ym)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return x.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return x.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return x.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return x.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(x.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t<"u"&&x.checkEncoding(t);let i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,i}insertString(e,t,r){return x.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e<"u"&&x.checkEncoding(e);let t=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){t=i;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return x.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&x.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),i=this._buff.slice(this._readOffset,r);return this._readOffset=r,i}insertBuffer(e,t){return x.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return x.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t<"u"&&x.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){x.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return x.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,i){let n=this._writeOffset,a=this._encoding;typeof r=="number"?n=r:typeof r=="string"&&(x.checkEncoding(r),a=r),typeof i=="string"&&(x.checkEncoding(i),a=i);let c=Buffer.byteLength(e,a);return t?this.ensureInsertable(c,n):this._ensureWriteable(c,n),this._buff.write(e,n,c,a),t?this._writeOffset+=c:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+c):this._writeOffset+=c,this}_handleBuffer(e,t,r){let i=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,i):this._ensureWriteable(e.length,i),e.copy(this._buff,i),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,i+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t<"u"&&(x.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(x.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){x.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,i=t*3/2+1;i<e&&(i=e),this._buff=Buffer.allocUnsafe(i),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let i=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r>"u"&&(this._readOffset+=t),i}_insertNumberValue(e,t,r,i){return x.checkOffsetValue(i),this.ensureInsertable(t,i),e.call(this._buff,r,i),this._writeOffset+=t,this}_writeNumberValue(e,t,r,i){if(typeof i=="number"){if(i<0)throw new Error(x.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);x.checkOffsetValue(i)}let n=typeof i=="number"?i:this._writeOffset;return this._ensureWriteable(t,n),e.call(this._buff,r,n),typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+t):this._writeOffset+=t,this}};Bc.SmartBuffer=Cc});var Nc=m($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.SOCKS5_NO_ACCEPTABLE_AUTH=$.SOCKS5_CUSTOM_AUTH_END=$.SOCKS5_CUSTOM_AUTH_START=$.SOCKS_INCOMING_PACKET_SIZES=$.SocksClientState=$.Socks5Response=$.Socks5HostType=$.Socks5Auth=$.Socks4Response=$.SocksCommand=$.ERRORS=$.DEFAULT_TIMEOUT=void 0;var $v=3e4;$.DEFAULT_TIMEOUT=$v;var Fv={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};$.ERRORS=Fv;var qv={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:o(s=>s+7,"Socks5ResponseHostname"),Socks4Response:8};$.SOCKS_INCOMING_PACKET_SIZES=qv;var Jm;(function(s){s[s.connect=1]="connect",s[s.bind=2]="bind",s[s.associate=3]="associate"})(Jm||($.SocksCommand=Jm={}));var Qm;(function(s){s[s.Granted=90]="Granted",s[s.Failed=91]="Failed",s[s.Rejected=92]="Rejected",s[s.RejectedIdent=93]="RejectedIdent"})(Qm||($.Socks4Response=Qm={}));var eg;(function(s){s[s.NoAuth=0]="NoAuth",s[s.GSSApi=1]="GSSApi",s[s.UserPass=2]="UserPass"})(eg||($.Socks5Auth=eg={}));var Uv=128;$.SOCKS5_CUSTOM_AUTH_START=Uv;var jv=254;$.SOCKS5_CUSTOM_AUTH_END=jv;var Hv=255;$.SOCKS5_NO_ACCEPTABLE_AUTH=Hv;var tg;(function(s){s[s.Granted=0]="Granted",s[s.Failure=1]="Failure",s[s.NotAllowed=2]="NotAllowed",s[s.NetworkUnreachable=3]="NetworkUnreachable",s[s.HostUnreachable=4]="HostUnreachable",s[s.ConnectionRefused=5]="ConnectionRefused",s[s.TTLExpired=6]="TTLExpired",s[s.CommandNotSupported=7]="CommandNotSupported",s[s.AddressNotSupported=8]="AddressNotSupported"})(tg||($.Socks5Response=tg={}));var sg;(function(s){s[s.IPv4=1]="IPv4",s[s.Hostname=3]="Hostname",s[s.IPv6=4]="IPv6"})(sg||($.Socks5HostType=sg={}));var rg;(function(s){s[s.Created=0]="Created",s[s.Connecting=1]="Connecting",s[s.Connected=2]="Connected",s[s.SentInitialHandshake=3]="SentInitialHandshake",s[s.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",s[s.SentAuthentication=5]="SentAuthentication",s[s.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",s[s.SentFinalHandshake=7]="SentFinalHandshake",s[s.ReceivedFinalResponse=8]="ReceivedFinalResponse",s[s.BoundWaitingForConnection=9]="BoundWaitingForConnection",s[s.Established=10]="Established",s[s.Disconnected=11]="Disconnected",s[s.Error=99]="Error"})(rg||($.SocksClientState=rg={}))});var Lc=m(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.shuffleArray=As.SocksClientError=void 0;var Pc=class extends Error{static{o(this,"SocksClientError")}constructor(e,t){super(e),this.options=t}};As.SocksClientError=Pc;function zv(s){for(let e=s.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[s[e],s[t]]=[s[t],s[e]]}}o(zv,"shuffleArray");As.shuffleArray=zv});var Rn=m(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.isInSubnet=Gv;Kt.isCorrect=Vv;Kt.numberToPaddedHex=ig;Kt.stringToPaddedHex=Wv;Kt.testBit=Zv;function Gv(s){return this.subnetMask<s.subnetMask?!1:this.mask(s.subnetMask)===s.mask()}o(Gv,"isInSubnet");function Vv(s){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===s&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}o(Vv,"isCorrect");function ig(s){return s.toString(16).padStart(2,"0")}o(ig,"numberToPaddedHex");function Wv(s){return ig(parseInt(s,10))}o(Wv,"stringToPaddedHex");function Zv(s,e){let{length:t}=s;if(e>t)return!1;let r=t-e;return s.substring(r,r+1)==="1"}o(Zv,"testBit")});var kc=m(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.RE_SUBNET_STRING=Ze.RE_ADDRESS=Ze.GROUPS=Ze.BITS=void 0;Ze.BITS=32;Ze.GROUPS=4;Ze.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Ze.RE_SUBNET_STRING=/\/\d{1,2}$/});var In=m(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.AddressError=void 0;var Dc=class extends Error{static{o(this,"AddressError")}constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};On.AddressError=Dc});var $c=m(Ke=>{"use strict";var Kv=Ke&&Ke.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),Yv=Ke&&Ke.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),og=Ke&&Ke.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&Kv(e,s,t);return Yv(e,s),e};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Address4=void 0;var xs=og(Rn()),ke=og(kc()),ng=In(),Mc=class s{static{o(this,"Address4")}constructor(e){this.groups=ke.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=xs.isCorrect(ke.BITS),this.isInSubnet=xs.isInSubnet,this.address=e;let t=ke.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>ke.BITS)throw new ng.AddressError("Invalid subnet mask.");e=e.replace(ke.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new s(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(ke.RE_ADDRESS))throw new ng.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),r=[],i;for(i=0;i<8;i+=2){let n=t.slice(i,i+2);r.push(parseInt(n,16))}return new s(r.join("."))}static fromInteger(e){return s.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new s(r)}toHex(){return this.parsedAddress.map(e=>xs.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<ke.GROUPS;t+=2)e.push(`${xs.stringToPaddedHex(this.parsedAddress[t])}${xs.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>xs.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(ke.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(ke.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}static fromBigInt(e){return s.fromHex(e.toString(16))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new s("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart(ke.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(ke.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Ke.Address4=Mc});var Fc=m(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.RE_URL_WITH_PORT=U.RE_URL=U.RE_ZONE_STRING=U.RE_SUBNET_STRING=U.RE_BAD_ADDRESS=U.RE_BAD_CHARACTERS=U.TYPES=U.SCOPES=U.GROUPS=U.BITS=void 0;U.BITS=128;U.GROUPS=8;U.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};U.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};U.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;U.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;U.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;U.RE_ZONE_STRING=/%.*$/;U.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/;U.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/});var qc=m(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.spanAllZeroes=ag;Cs.spanAll=Xv;Cs.spanLeadingZeroes=Jv;Cs.simpleGroup=Qv;function ag(s){return s.replace(/(0+)/g,'<span class="zero">$1</span>')}o(ag,"spanAllZeroes");function Xv(s,e=0){return s.split("").map((r,i)=>`<span class="digit value-${r} position-${i+e}">${ag(r)}</span>`).join("")}o(Xv,"spanAll");function cg(s){return s.replace(/^(0+)/,'<span class="zero">$1</span>')}o(cg,"spanLeadingZeroesSimple");function Jv(s){return s.split(":").map(t=>cg(t)).join(":")}o(Jv,"spanLeadingZeroes");function Qv(s,e=0){return s.split(":").map((r,i)=>/group-v4/.test(r)?r:`<span class="hover-group group-${i+e}">${cg(r)}</span>`)}o(Qv,"simpleGroup")});var hg=m(fe=>{"use strict";var eT=fe&&fe.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),tT=fe&&fe.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),sT=fe&&fe.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&eT(e,s,t);return tT(e,s),e};Object.defineProperty(fe,"__esModule",{value:!0});fe.ADDRESS_BOUNDARY=void 0;fe.groupPossibilities=Tn;fe.padGroup=vn;fe.simpleRegularExpression=iT;fe.possibleElisions=nT;var rT=sT(Fc());function Tn(s){return`(${s.join("|")})`}o(Tn,"groupPossibilities");function vn(s){return s.length<4?`0{0,${4-s.length}}${s}`:s}o(vn,"padGroup");fe.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function iT(s){let e=[];s.forEach((r,i)=>{parseInt(r,16)===0&&e.push(i)});let t=e.map(r=>s.map((i,n)=>{if(n===r){let a=n===0||n===rT.GROUPS-1?":":"";return Tn([vn(i),a])}return vn(i)}).join(":"));return t.push(s.map(vn).join(":")),Tn(t)}o(iT,"simpleRegularExpression");function nT(s,e,t){let r=e?"":":",i=t?"":":",n=[];!e&&!t&&n.push("::"),e&&t&&n.push(""),(t&&!e||!t&&e)&&n.push(":"),n.push(`${r}(:0{1,4}){1,${s-1}}`),n.push(`(0{1,4}:){1,${s-1}}${i}`),n.push(`(0{1,4}:){${s-1}}0{1,4}`);for(let a=1;a<s-1;a++)for(let c=1;c<s-a;c++)n.push(`(0{1,4}:){${c}}:(0{1,4}:){${s-c-a-1}}0{1,4}`);return Tn(n)}o(nT,"possibleElisions")});var dg=m(Ye=>{"use strict";var oT=Ye&&Ye.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),aT=Ye&&Ye.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Cn=Ye&&Ye.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&oT(e,s,t);return aT(e,s),e};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Address6=void 0;var ug=Cn(Rn()),Uc=Cn(kc()),F=Cn(Fc()),jc=Cn(qc()),Yt=$c(),Xt=hg(),gt=In(),An=Rn();function xn(s){if(!s)throw new Error("Assertion failed.")}o(xn,"assert");function cT(s){let e=/(\d+)(\d{3})/;for(;e.test(s);)s=s.replace(e,"$1,$2");return s}o(cT,"addCommas");function hT(s){return s=s.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),s=s.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),s}o(hT,"spanLeadingZeroes4");function uT(s,e){let t=[],r=[],i;for(i=0;i<s.length;i++)i<e[0]?t.push(s[i]):i>e[1]&&r.push(s[i]);return t.concat(["compact"]).concat(r)}o(uT,"compact");function lg(s){return parseInt(s,16).toString(16).padStart(4,"0")}o(lg,"paddedHex");function fg(s){return s&255}o(fg,"unsignByte");var Hc=class s{static{o(this,"Address6")}constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=ug.isInSubnet,this.isCorrect=ug.isCorrect(F.BITS),t===void 0?this.groups=F.GROUPS:this.groups=t,this.address=e;let r=F.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>F.BITS)throw new gt.AddressError("Invalid subnet mask.");e=e.replace(F.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new gt.AddressError("Invalid subnet mask.");let i=F.RE_ZONE_STRING.exec(e);i&&(this.zone=i[0],e=e.replace(F.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new s(e),!0}catch{return!1}}static fromBigInt(e){let t=e.toString(16).padStart(32,"0"),r=[],i;for(i=0;i<F.GROUPS;i++)r.push(t.slice(i*4,(i+1)*4));return new s(r.join(":"))}static fromURL(e){let t,r=null,i;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(i=F.RE_URL_WITH_PORT.exec(e),i===null)return{error:"failed to parse address with port",address:null,port:null};t=i[1],r=i[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),i=F.RE_URL.exec(e),i===null)return{error:"failed to parse address from URL",address:null,port:null};t=i[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new s(t),port:r}}static fromAddress4(e){let t=new Yt.Address4(e),r=F.BITS-(Uc.BITS-t.subnetMask);return new s(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new gt.AddressError("Invalid 'ip6.arpa' form.");let i=t.split(".").reverse();for(let n=r;n>0;n--){let a=n*4;i.splice(a,0,":")}return t=i.join(""),new s(t)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=F.BITS-this.subnetMask,r=Math.abs(e-F.BITS),i=t-r;return i<0?"0":cT((BigInt("2")**BigInt(i)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(F.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(F.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}getScope(){let e=F.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(F.TYPES))if(this.isInSubnet(new s(e)))return F.TYPES[e];return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,F.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,i=[];for(e=0;e<this.parsedAddress.length;e++){let c=parseInt(this.parsedAddress[e],16);c===0&&r++,c!==0&&r>0&&(r>1&&i.push([e-r,e-1]),r=0)}r>1&&i.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let n=i.map(c=>c[1]-c[0]+1);if(i.length>0){let c=n.indexOf(Math.max(...n));t=uT(this.parsedAddress,i[c])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/(^compact)|(compact$)/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInt().toString(2).padStart(F.BITS,"0")}parse4in6(e){let t=e.split(":"),i=t.slice(-1)[0].match(Uc.RE_ADDRESS);if(i){this.parsedAddress4=i[0],this.address4=new Yt.Address4(this.parsedAddress4);for(let n=0;n<this.address4.groups;n++)if(/^0[0-9]+/.test(this.address4.parsedAddress[n]))throw new gt.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(Uc.RE_ADDRESS,this.address4.parsedAddress.map(hT).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(F.RE_BAD_CHARACTERS);if(t)throw new gt.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace(F.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(F.RE_BAD_ADDRESS);if(r)throw new gt.AddressError(`Address failed regex: ${r.join("")}`,e.replace(F.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let i=[],n=e.split("::");if(n.length===2){let a=n[0].split(":"),c=n[1].split(":");a.length===1&&a[0]===""&&(a=[]),c.length===1&&c[0]===""&&(c=[]);let h=this.groups-(a.length+c.length);if(!h)throw new gt.AddressError("Error parsing groups");this.elidedGroups=h,this.elisionBegin=a.length,this.elisionEnd=a.length+this.elidedGroups,i=i.concat(a);for(let u=0;u<h;u++)i.push("0");i=i.concat(c)}else if(n.length===1)i=e.split(":"),this.elidedGroups=0;else throw new gt.AddressError("Too many :: groups found");if(i=i.map(a=>parseInt(a,16).toString(16)),i.length!==this.groups)throw new gt.AddressError("Incorrect number of groups found");return i}canonicalForm(){return this.parsedAddress.map(lg).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(lg).join("")}`)}to4(){let e=this.binaryZeroPad().split("");return Yt.Address4.fromHex(BigInt(`0b${e.slice(96,128).join("")}`).toString(16))}to4in6(){let e=this.to4(),r=new s(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),i="";return/:$/.test(r)||(i=":"),r+i+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),i=Yt.Address4.fromHex(this.getBitsBase16(32,64)),n=this.getBits(96,128),a=Yt.Address4.fromHex((n^BigInt("0xffffffff")).toString(16)),c=this.getBitsBase2(64,80),h=(0,An.testBit)(c,15),u=(0,An.testBit)(c,14),l=(0,An.testBit)(c,8),f=(0,An.testBit)(c,9),d=BigInt(`0b${c.slice(2,6)+c.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:i.address,client4:a.address,flags:c,coneNat:h,microsoft:{reserved:u,universalLocal:f,groupIndividual:l,nonce:d},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Yt.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new s(e)}toByteArray(){let e=this.bigInt().toString(16),r=`${"0".repeat(e.length%2)}${e}`,i=[];for(let n=0,a=r.length;n<a;n+=2)i.push(parseInt(r.substring(n,n+2),16));return i}toUnsignedByteArray(){return this.toByteArray().map(fg)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(fg))}static fromUnsignedByteArray(e){let t=BigInt("256"),r=BigInt("0"),i=BigInt("1");for(let n=e.length-1;n>=0;n--)r+=i*BigInt(e[n].toString(10)),i*=t;return s.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new s("2001::/32"))}is6to4(){return this.isInSubnet(new s("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this);return e.className?`<a href="${e.prefix}${r}" class="${e.className}">${r}</a>`:`<a href="${e.prefix}${r}">${r}</a>`}group(){if(this.elidedGroups===0)return jc.simpleGroup(this.address).join(":");xn(typeof this.elidedGroups=="number"),xn(typeof this.elisionBegin=="number");let e=[],[t,r]=this.address.split("::");t.length?e.push(...jc.simpleGroup(t)):e.push("");let i=["hover-group"];for(let n=this.elisionBegin;n<this.elisionBegin+this.elidedGroups;n++)i.push(`group-${n}`);return e.push(`<span class="${i.join(" ")}"></span>`),r.length?e.push(...jc.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(xn(this.address4 instanceof Yt.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new s(this.correctForm());if(r.elidedGroups===0)t.push((0,Xt.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===F.GROUPS)t.push((0,Xt.possibleElisions)(F.GROUPS));else{let i=r.address.split("::");i[0].length&&t.push((0,Xt.simpleRegularExpression)(i[0].split(":"))),xn(typeof r.elidedGroups=="number"),t.push((0,Xt.possibleElisions)(r.elidedGroups,i[0].length!==0,i[1].length!==0)),i[1].length&&t.push((0,Xt.simpleRegularExpression)(i[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Xt.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Xt.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Ye.Address6=Hc});var zc=m(se=>{"use strict";var lT=se&&se.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),fT=se&&se.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),dT=se&&se.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&lT(e,s,t);return fT(e,s),e};Object.defineProperty(se,"__esModule",{value:!0});se.v6=se.AddressError=se.Address6=se.Address4=void 0;var pT=$c();Object.defineProperty(se,"Address4",{enumerable:!0,get:o(function(){return pT.Address4},"get")});var mT=dg();Object.defineProperty(se,"Address6",{enumerable:!0,get:o(function(){return mT.Address6},"get")});var gT=In();Object.defineProperty(se,"AddressError",{enumerable:!0,get:o(function(){return gT.AddressError},"get")});var yT=dT(qc());se.v6={helpers:yT}});var wg=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.ipToBuffer=xe.int32ToIpv4=xe.ipv4ToInt32=xe.validateSocksClientChainOptions=xe.validateSocksClientOptions=void 0;var ae=Lc(),Z=Nc(),ET=require("stream"),Gc=zc(),pg=require("net");function wT(s,e=["connect","bind","associate"]){if(!Z.SocksCommand[s.command])throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommand,s);if(e.indexOf(s.command)===-1)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommandForOperation,s);if(!gg(s.destination))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsDestination,s);if(!yg(s.proxy))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxy,s);if(mg(s.proxy,s),s.timeout&&!Eg(s.timeout))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsTimeout,s);if(s.existing_socket&&!(s.existing_socket instanceof ET.Duplex))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsExistingSocket,s)}o(wT,"validateSocksClientOptions");xe.validateSocksClientOptions=wT;function ST(s){if(s.command!=="connect")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommandChain,s);if(!gg(s.destination))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsDestination,s);if(!(s.proxies&&Array.isArray(s.proxies)&&s.proxies.length>=2))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxiesLength,s);if(s.proxies.forEach(e=>{if(!yg(e))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxy,s);mg(e,s)}),s.timeout&&!Eg(s.timeout))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsTimeout,s)}o(ST,"validateSocksClientChainOptions");xe.validateSocksClientChainOptions=ST;function mg(s,e){if(s.custom_auth_method!==void 0){if(s.custom_auth_method<Z.SOCKS5_CUSTOM_AUTH_START||s.custom_auth_method>Z.SOCKS5_CUSTOM_AUTH_END)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(s.custom_auth_request_handler===void 0||typeof s.custom_auth_request_handler!="function")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_size===void 0)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_handler===void 0||typeof s.custom_auth_response_handler!="function")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}o(mg,"validateCustomProxyAuth");function gg(s){return s&&typeof s.host=="string"&&Buffer.byteLength(s.host)<256&&typeof s.port=="number"&&s.port>=0&&s.port<=65535}o(gg,"isValidSocksRemoteHost");function yg(s){return s&&(typeof s.host=="string"||typeof s.ipaddress=="string")&&typeof s.port=="number"&&s.port>=0&&s.port<=65535&&(s.type===4||s.type===5)}o(yg,"isValidSocksProxy");function Eg(s){return typeof s=="number"&&s>0}o(Eg,"isValidTimeoutValue");function _T(s){return new Gc.Address4(s).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}o(_T,"ipv4ToInt32");xe.ipv4ToInt32=_T;function bT(s){let e=s>>>24&255,t=s>>>16&255,r=s>>>8&255,i=s&255;return[e,t,r,i].join(".")}o(bT,"int32ToIpv4");xe.int32ToIpv4=bT;function RT(s){if(pg.isIPv4(s)){let e=new Gc.Address4(s);return Buffer.from(e.toArray())}else if(pg.isIPv6(s)){let e=new Gc.Address6(s);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}o(RT,"ipToBuffer");xe.ipToBuffer=RT});var Sg=m(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ReceiveBuffer=void 0;var Vc=class{static{o(this,"ReceiveBuffer")}constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};Bn.ReceiveBuffer=Vc});var _g=m(At=>{"use strict";var Bs=At&&At.__awaiter||function(s,e,t,r){function i(n){return n instanceof t?n:new t(function(a){a(n)})}return o(i,"adopt"),new(t||(t=Promise))(function(n,a){function c(l){try{u(r.next(l))}catch(f){a(f)}}o(c,"fulfilled");function h(l){try{u(r.throw(l))}catch(f){a(f)}}o(h,"rejected");function u(l){l.done?n(l.value):i(l.value).then(c,h)}o(u,"step"),u((r=r.apply(s,e||[])).next())})};Object.defineProperty(At,"__esModule",{value:!0});At.SocksClientError=At.SocksClient=void 0;var OT=require("events"),Ns=require("net"),de=Xm(),E=Nc(),we=wg(),IT=Sg(),Zc=Lc();Object.defineProperty(At,"SocksClientError",{enumerable:!0,get:o(function(){return Zc.SocksClientError},"get")});var Wc=zc(),Kc=class s extends OT.EventEmitter{static{o(this,"SocksClient")}constructor(e){super(),this.options=Object.assign({},e),(0,we.validateSocksClientOptions)(e),this.setState(E.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,i)=>{try{(0,we.validateSocksClientOptions)(e,["connect"])}catch(a){return typeof t=="function"?(t(a),r(a)):i(a)}let n=new s(e);n.connect(e.existing_socket),n.once("established",a=>{n.removeAllListeners(),typeof t=="function"&&t(null,a),r(a)}),n.once("error",a=>{n.removeAllListeners(),typeof t=="function"?(t(a),r(a)):i(a)})})}static createConnectionChain(e,t){return new Promise((r,i)=>Bs(this,void 0,void 0,function*(){try{(0,we.validateSocksClientChainOptions)(e)}catch(n){return typeof t=="function"?(t(n),r(n)):i(n)}e.randomizeChain&&(0,Zc.shuffleArray)(e.proxies);try{let n;for(let a=0;a<e.proxies.length;a++){let c=e.proxies[a],h=a===e.proxies.length-1?e.destination:{host:e.proxies[a+1].host||e.proxies[a+1].ipaddress,port:e.proxies[a+1].port},u=yield s.createConnection({command:"connect",proxy:c,destination:h,existing_socket:n});n=n||u.socket}typeof t=="function"?(t(null,{socket:n}),r({socket:n})):r({socket:n})}catch(n){typeof t=="function"?(t(n),r(n)):i(n)}}))}static createUDPFrame(e){let t=new de.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Ns.isIPv4(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv4),t.writeUInt32BE((0,we.ipv4ToInt32)(e.remoteHost.host))):Ns.isIPv6(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv6),t.writeBuffer((0,we.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(E.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),i=t.readUInt8(),n;i===E.Socks5HostType.IPv4?n=(0,we.int32ToIpv4)(t.readUInt32BE()):i===E.Socks5HostType.IPv6?n=Wc.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():n=t.readString(t.readUInt8());let a=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:n,port:a},data:t.readBuffer()}}setState(e){this.state!==E.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||E.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Ns.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(E.SocksClientState.Connecting),this.receiveBuffer=new IT.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let i=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",i)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.BoundWaitingForConnection&&this.closeSocket(E.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(E.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(E.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===E.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===E.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===E.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===E.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(E.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(E.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==E.SocksClientState.Error&&(this.setState(E.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new Zc.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new de.SmartBuffer;t.writeUInt8(4),t.writeUInt8(E.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Ns.isIPv4(this.options.destination.host)?(t.writeBuffer((0,we.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedConnection} - (${E.Socks4Response[e[1]]})`);else if(E.SocksCommand[this.options.command]===E.SocksCommand.bind){let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,we.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(E.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${E.Socks4Response[e[1]]})`);else{let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,we.int32ToIpv4)(t.readUInt32BE())};this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new de.SmartBuffer,t=[E.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(E.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(E.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===E.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===E.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=E.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===E.Socks5Auth.UserPass?(this.socks5ChosenAuthType=E.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new de.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(E.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Bs(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(E.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Bs(this,void 0,void 0,function*(){this.setState(E.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===E.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===E.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(E.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new de.SmartBuffer;e.writeUInt8(5),e.writeUInt8(E.SocksCommand[this.options.command]),e.writeUInt8(0),Ns.isIPv4(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv4),e.writeBuffer((0,we.ipToBuffer)(this.options.destination.host))):Ns.isIPv6(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv6),e.writeBuffer((0,we.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(E.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,we.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:Wc.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.ReceivedFinalResponse),E.SocksCommand[this.options.command]===E.SocksCommand.connect?(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.bind?(this.setState(E.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.associate&&(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,we.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:Wc.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};At.SocksClient=Kc});var bg=m(Jt=>{"use strict";var vT=Jt&&Jt.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),TT=Jt&&Jt.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&vT(e,s,t)};Object.defineProperty(Jt,"__esModule",{value:!0});TT(_g(),Jt)});var Rg=m(Ce=>{"use strict";var AT=Ce&&Ce.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),xT=Ce&&Ce.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Yc=Ce&&Ce.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&AT(e,s,t);return xT(e,s),e},CT=Ce&&Ce.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SocksProxyAgent=void 0;var BT=bg(),NT=Lr(),PT=CT(Pr()),LT=Yc(require("dns")),kT=Yc(require("net")),DT=Yc(require("tls")),MT=require("url"),Nn=(0,PT.default)("socks-proxy-agent"),$T=o(s=>s.servername===void 0&&s.host&&!kT.isIP(s.host)?{...s,servername:s.host}:s,"setServernameFromNonIpHost");function FT(s){let e=!1,t=5,r=s.hostname,i=parseInt(s.port,10)||1080;switch(s.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(s.protocol)}`)}let n={host:r,port:i,type:t};return s.username&&Object.defineProperty(n,"userId",{value:decodeURIComponent(s.username),enumerable:!1}),s.password!=null&&Object.defineProperty(n,"password",{value:decodeURIComponent(s.password),enumerable:!1}),{lookup:e,proxy:n}}o(FT,"parseSocksURL");var Pn=class extends NT.Agent{static{o(this,"SocksProxyAgent")}constructor(e,t){super(t);let r=typeof e=="string"?new MT.URL(e):e,{proxy:i,lookup:n}=FT(r);this.shouldLookup=n,this.proxy=i,this.timeout=t?.timeout??null,this.socketOptions=t?.socketOptions??null}async connect(e,t){let{shouldLookup:r,proxy:i,timeout:n}=this;if(!t.host)throw new Error("No `host` defined!");let{host:a}=t,{port:c,lookup:h=LT.lookup}=t;r&&(a=await new Promise((d,p)=>{h(a,{},(g,y)=>{g?p(g):d(y)})}));let u={proxy:i,destination:{host:a,port:typeof c=="number"?c:parseInt(c,10)},command:"connect",timeout:n??void 0,socket_options:this.socketOptions??void 0},l=o(d=>{e.destroy(),f.destroy(),d&&d.destroy()},"cleanup");Nn("Creating socks proxy connection: %o",u);let{socket:f}=await BT.SocksClient.createConnection(u);if(Nn("Successfully created socks proxy connection"),n!==null&&(f.setTimeout(n),f.on("timeout",()=>l())),t.secureEndpoint){Nn("Upgrading socket connection to TLS");let d=DT.connect({...qT($T(t),"host","path","port"),socket:f});return d.once("error",p=>{Nn("Socket TLS error",p.message),l(d)}),d}return f}};Pn.protocols=["socks","socks4","socks4a","socks5","socks5h"];Ce.SocksProxyAgent=Pn;function qT(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(qT,"omit")});var sh=m((mP,Og)=>{"use strict";var Xc=class extends Error{static{o(this,"InvalidProxyProtocolError")}constructor(e){super(`Invalid protocol \`${e.protocol}\` connecting to proxy \`${e.host}\``),this.code="EINVALIDPROXY",this.proxy=e}},Jc=class extends Error{static{o(this,"ConnectionTimeoutError")}constructor(e){super(`Timeout connecting to host \`${e}\``),this.code="ECONNECTIONTIMEOUT",this.host=e}},Qc=class extends Error{static{o(this,"IdleTimeoutError")}constructor(e){super(`Idle timeout reached for host \`${e}\``),this.code="EIDLETIMEOUT",this.host=e}},eh=class extends Error{static{o(this,"ResponseTimeoutError")}constructor(e,t){let r="Response timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`connecting to host \`${e.host}\``,super(r),this.code="ERESPONSETIMEOUT",this.proxy=t,this.request=e}},th=class extends Error{static{o(this,"TransferTimeoutError")}constructor(e,t){let r="Transfer timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`for \`${e.host}\``,super(r),this.code="ETRANSFERTIMEOUT",this.proxy=t,this.request=e}};Og.exports={InvalidProxyProtocolError:Xc,ConnectionTimeoutError:Jc,IdleTimeoutError:Qc,ResponseTimeoutError:eh,TransferTimeoutError:th}});var rh=m((yP,vg)=>{"use strict";var{HttpProxyAgent:UT}=$m(),{HttpsProxyAgent:jT}=Gm(),{SocksProxyAgent:Ig}=Rg(),{LRUCache:HT}=gs(),{InvalidProxyProtocolError:zT}=sh(),GT=new HT({max:20}),VT=new Set(Ig.protocols),WT=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),Dr=Object.entries(process.env).reduce((s,[e,t])=>(e=e.toLowerCase(),WT.has(e)&&(s[e]=t),s),{}),ZT=o(s=>{s=new URL(s);let e=s.protocol.slice(0,-1);if(VT.has(e))return Ig;if(e==="https"||e==="http")return[UT,jT];throw new zT(s)},"getProxyAgent"),KT=o((s,e)=>{if(typeof e=="string"&&(e=e.split(",").map(r=>r.trim()).filter(Boolean)),!e||!e.length)return!1;let t=s.hostname.split(".").reverse();return e.some(r=>{let i=r.split(".").filter(Boolean).reverse();if(!i.length)return!1;for(let n=0;n<i.length;n++)if(t[n]!==i[n])return!1;return!0})},"isNoProxy"),YT=o((s,{proxy:e,noProxy:t})=>(s=new URL(s),e||(e=s.protocol==="https:"?Dr.https_proxy:Dr.https_proxy||Dr.http_proxy||Dr.proxy),t||(t=Dr.no_proxy),!e||KT(s,t)?null:new URL(e)),"getProxy");vg.exports={getProxyAgent:ZT,getProxy:YT,proxyCache:GT}});var xg=m((SP,Ag)=>{"use strict";var XT=require("net"),JT=require("tls"),{once:Tg}=require("events"),QT=require("timers/promises"),{normalizeOptions:eA,cacheOptions:tA}=Ac(),{getProxy:sA,getProxyAgent:rA,proxyCache:ih}=rh(),Ln=sh(),{Agent:iA}=Lr();Ag.exports=class extends iA{static{o(this,"Agent")}#e;#t;#s;#r;#i;constructor(e={}){let{timeouts:t,proxy:r,noProxy:i,...n}=eA(e);super(n),this.#e=n,this.#t=t,r&&(this.#s=new URL(r),this.#r=i,this.#i=rA(r))}get proxy(){return this.#s?{url:this.#s}:{}}#a(e){if(!this.#s)return;let t=sA(`${e.protocol}//${e.host}:${e.port}`,{proxy:this.#s,noProxy:this.#r});if(!t)return;let r=tA({...e,...this.#e,timeouts:this.#t,proxy:t});if(ih.has(r))return ih.get(r);let i=this.#i;Array.isArray(i)&&(i=this.isSecureEndpoint(e)?i[1]:i[0]);let n=new i(t,{...this.#e,socketOptions:{family:this.#e.family}});return ih.set(r,n),n}async#l({promises:e,options:t,timeout:r},i=new AbortController){if(r){let a=QT.setTimeout(r,null,{signal:i.signal}).then(()=>{throw new Ln.ConnectionTimeoutError(`${t.host}:${t.port}`)}).catch(c=>{if(c.name!=="AbortError")throw c});e.push(a)}let n;try{n=await Promise.race(e),i.abort()}catch(a){throw i.abort(),a}return n}async connect(e,t){t.lookup??=this.#e.lookup;let r,i=this.#t.connection,n=this.isSecureEndpoint(t),a=this.#a(t);if(a){let l=Date.now();r=await this.#l({options:t,timeout:i,promises:[a.connect(e,t)]}),i&&(i=i-(Date.now()-l))}else r=(n?JT:XT).connect(t);r.setKeepAlive(this.keepAlive,this.keepAliveMsecs),r.setNoDelay(this.keepAlive);let c=new AbortController,{signal:h}=c,u=r[n?"secureConnecting":"connecting"]?Tg(r,n?"secureConnect":"connect",{signal:h}):Promise.resolve();return await this.#l({options:t,timeout:i,promises:[u,Tg(r,"error",{signal:h}).then(l=>{throw l[0]})]},c),this.#t.idle&&r.setTimeout(this.#t.idle,()=>{r.destroy(new Ln.IdleTimeoutError(`${t.host}:${t.port}`))}),r}addRequest(e,t){let r=this.#a(t);if(r?.setRequestProps&&r.setRequestProps(e,t),e.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let i;e.once("finish",()=>{setTimeout(()=>{e.destroy(new Ln.ResponseTimeoutError(e,this.#s))},this.#t.response)}),e.once("response",()=>{clearTimeout(i)})}if(this.#t.transfer){let i;e.once("response",n=>{setTimeout(()=>{n.destroy(new Ln.TransferTimeoutError(e,this.#s))},this.#t.transfer),n.once("close",()=>{clearTimeout(i)})})}return super.addRequest(e,t)}}});var Pg=m((bP,Ng)=>{"use strict";var{LRUCache:nA}=gs(),{normalizeOptions:oA,cacheOptions:aA}=Ac(),{getProxy:cA,proxyCache:Cg}=rh(),Bg=Tc(),kn=xg(),Mr=new nA({max:20}),hA=o((s,{agent:e,proxy:t,noProxy:r,...i}={})=>{if(e!=null)return e;s=new URL(s);let n=cA(s,{proxy:t,noProxy:r}),a={...oA(i),proxy:n},c=aA({...a,secureEndpoint:s.protocol==="https:"});if(Mr.has(c))return Mr.get(c);let h=new kn(a);return Mr.set(c,h),h},"getAgent");Ng.exports={getAgent:hA,Agent:kn,HttpAgent:kn,HttpsAgent:kn,cache:{proxy:Cg,agent:Mr,dns:Bg.cache,clear:o(()=>{Cg.clear(),Mr.clear(),Bg.cache.clear()},"clear")}}});var Lg=m((OP,uA)=>{uA.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var Mn=m((IP,Dg)=>{var{Minipass:lA}=J(),Dn=Ws(),fA=bm(),dA=St(),{log:kg}=Om(),pA=vc(),{getAgent:mA}=Pg(),nh=Lg(),gA=`${nh.name}/${nh.version} (+https://npm.im/${nh.name})`,yA=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],EA=["request-timeout"],wA=o((s,e)=>{let t=mA(s.url,{...e,signal:void 0});s.headers.has("connection")||s.headers.set("connection",t?"keep-alive":"close"),s.headers.has("user-agent")||s.headers.set("user-agent",gA);let r={...e,agent:t,redirect:"manual"};return fA(async(i,n)=>{let a=new Dn.Request(s,r);try{let c=await Dn(a,r);if(r.integrity&&c.status===200){let l=dA.integrityStream({algorithms:r.algorithms,integrity:r.integrity,size:r.size}),f=new pA({events:["integrity","size"]},c.body,l);l.on("integrity",d=>f.emit("integrity",d)),l.on("size",d=>f.emit("size",d)),c=new Dn.Response(f,c),c.body.hasIntegrityEmitter=!0}c.headers.set("x-fetch-attempts",n);let h=lA.isStream(a.body);return a.method!=="POST"&&!h&&([408,420,429].includes(c.status)||c.status>=500)?(typeof e.onRetry=="function"&&e.onRetry(c),kg.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.status}`),i(c)):c}catch(c){let h=c.code==="EPROMISERETRY"?c.retried.code:c.code,u=c.retried instanceof Dn.Response||yA.includes(h)&&EA.includes(c.type);if(a.method==="POST"||u)throw c;return typeof e.onRetry=="function"&&e.onRetry(c),kg.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.code}`),i(c)}},e.retry).catch(i=>{if(i.status>=400&&i.type!=="system")return i;throw i})},"remoteFetch");Dg.exports=wA});var jg=m((TP,Ug)=>{var{Request:Mg,Response:oh}=Ws(),{Minipass:$g}=J(),SA=hi(),Qt=cm(),_A=require("url"),bA=vc(),RA=Uo(),ah=lm(),OA=Mn(),$r=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),IA=["accept-charset","accept-encoding","accept-language","accept","cache-control"],qg=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],Fg=o((s,e,t)=>{let r={time:Date.now(),url:s.url,reqHeaders:{},resHeaders:{},options:{compress:t.compress!=null?t.compress:s.compress}};e.status!==200&&e.status!==304&&(r.status=e.status);for(let a of IA)s.headers.has(a)&&(r.reqHeaders[a]=s.headers.get(a));let i=s.headers.get("host"),n=new _A.URL(s.url);if(i&&n.host!==i&&(r.reqHeaders.host=i),e.headers.has("vary")){let a=e.headers.get("vary");if(a!=="*"){let c=a.trim().toLowerCase().split(/\s*,\s*/);for(let h of c)s.headers.has(h)&&(r.reqHeaders[h]=s.headers.get(h))}}for(let a of qg)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));for(let a of t.cacheAdditionalHeaders)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));return r},"getMetadata"),$n=Symbol("request"),Fn=Symbol("response"),qn=Symbol("policy"),ch=class s{static{o(this,"CacheEntry")}constructor({entry:e,request:t,response:r,options:i}){e?(this.key=e.key,this.entry=e,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=ah(t),this.options=i,this[$n]=t,this[Fn]=r,this[qn]=null}static async find(e,t){try{var r=await Qt.index.compact(t.cachePath,ah(e),(n,a)=>{let c=new s({entry:n,options:t}),h=new s({entry:a,options:t});return c.policy.satisfies(h.request)},{validateEntry:o(n=>n.metadata&&n.metadata.resHeaders&&n.metadata.resHeaders["content-encoding"]===null?!1:n.integrity===null?!!(n.metadata&&n.metadata.status):!0,"validateEntry")})}catch{return}if(t.cache==="reload")return;let i;for(let n of r){let a=new s({entry:n,options:t});if(a.policy.satisfies(e)){i=a;break}}return i}static async invalidate(e,t){let r=ah(e);try{await Qt.rm.entry(t.cachePath,r,{removeFully:!0})}catch{}}get request(){return this[$n]||(this[$n]=new Mg(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[$n]}get response(){return this[Fn]||(this[Fn]=new oh(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[Fn]}get policy(){return this[qn]||(this[qn]=new RA({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[qn]}async store(e){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let t=this.response.headers.get("content-length"),r={algorithms:this.options.algorithms,metadata:Fg(this.request,this.response,this.options),size:t,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},i=null;if(this.response.status===200){let a,c,h=new Promise((l,f)=>{a=l,c=f}).catch(l=>{i.emit("error",l)});i=new bA({events:["integrity","size"]},new SA({flush(){return h}})),i.hasIntegrityEmitter=!0;let u=o(()=>{let l=new $g,f=Qt.put.stream(this.options.cachePath,this.key,r);f.on("integrity",d=>i.emit("integrity",d)),f.on("size",d=>i.emit("size",d)),l.pipe(f),f.promise().then(a,c),i.unshift(l),i.unshift(this.response.body)},"onResume");i.once("resume",u),i.once("end",()=>i.removeListener("resume",u))}else await Qt.index.insert(this.options.cachePath,this.key,null,r);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",e),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new oh(i,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(e,t,r){let i;if(e==="HEAD"||[301,308].includes(this.response.status))i=this.response;else{let n=new $g,a={...this.policy.responseHeaders()},c=o(()=>{let h=Qt.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});h.on("error",async u=>{h.pause(),u.code==="EINTEGRITY"&&await Qt.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(u.code==="ENOENT"||u.code==="EINTEGRITY")&&await s.invalidate(this.request,this.options),n.emit("error",u),h.resume()}),n.emit("integrity",this.entry.integrity),n.emit("size",Number(a["content-length"])),h.pipe(n)},"onResume");n.once("resume",c),n.once("end",()=>n.removeListener("resume",c)),i=new oh(n,{url:this.entry.metadata.url,counter:t.counter,status:200,headers:a})}return i.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),i.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),i.headers.set("x-local-cache-key",encodeURIComponent(this.key)),i.headers.set("x-local-cache-mode","stream"),i.headers.set("x-local-cache-status",r),i.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),i}async revalidate(e,t){let r=new Mg(e,{headers:this.policy.revalidationHeaders(e)});try{var i=await OA(r,{...t,headers:void 0})}catch(a){if(!this.policy.mustRevalidate)return this.respond(e.method,t,"stale");throw a}if(this.policy.revalidated(r,i)){let a=Fg(e,i,t);for(let c of qg)!$r(a.resHeaders,c)&&$r(this.entry.metadata.resHeaders,c)&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]);for(let c of t.cacheAdditionalHeaders){let h=$r(a.resHeaders,c),u=$r(this.entry.metadata.resHeaders,c),l=$r(this.policy.response.headers,c);!h&&u&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]),!l&&h&&(this.policy.response.headers[c]=a.resHeaders[c])}try{await Qt.index.insert(t.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:a})}catch{}return this.respond(e.method,t,"revalidated")}return new s({request:e,response:i,options:t}).store("updated")}};Ug.exports=ch});var Gg=m((xP,zg)=>{var{NotCachedError:vA}=Lu(),hh=jg(),TA=Mn(),Hg=o(async(s,e)=>{let t=await hh.find(s,e);if(!t){if(e.cache==="only-if-cached")throw new vA(s.url);let i=await TA(s,e);return new hh({request:s,response:i,options:e}).store("miss")}if(e.cache==="no-cache")return t.revalidate(s,e);let r=t.policy.needsRevalidation(s);return e.cache==="force-cache"||e.cache==="only-if-cached"||!r?t.respond(s.method,e,r?"stale":"hit"):t.revalidate(s,e)},"cacheFetch");Hg.invalidate=async(s,e)=>{if(e.cachePath)return hh.invalidate(s,e)};zg.exports=Hg});var Kg=m((BP,Zg)=>{"use strict";var{FetchError:uh,Request:AA,isRedirect:xA}=Ws(),lh=require("url"),CA=Uo(),Vg=Gg(),BA=Mn(),NA=o((s,e,t)=>{if(!xA(e.status)||t.redirect==="manual")return!1;if(t.redirect==="error")throw new uh(`redirect mode is set to error: ${s.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!e.headers.has("location"))throw new uh(`redirect location header missing for: ${s.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(s.counter>=s.follow)throw new uh(`maximum redirect reached at: ${s.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),PA=o((s,e,t)=>{let r={...t},i=e.headers.get("location"),n=new lh.URL(i,/^https?:/.test(i)?void 0:s.url);return new lh.URL(s.url).hostname!==n.hostname&&(s.headers.delete("authorization"),s.headers.delete("cookie")),(e.status===303||s.method==="POST"&&[301,302].includes(e.status))&&(r.method="GET",r.body=null,s.headers.delete("content-length")),r.headers={},s.headers.forEach((c,h)=>{r.headers[h]=c}),r.counter=++s.counter,{request:new AA(lh.format(n),r),options:r}},"getRedirect"),Wg=o(async(s,e)=>{let t=CA.storable(s,e)?await Vg(s,e):await BA(s,e);if(!["GET","HEAD"].includes(s.method)&&t.status>=200&&t.status<=399&&await Vg.invalidate(s,e),!NA(s,t,e))return t;let r=PA(s,t,e);return Wg(r.request,r.options)},"fetch");Zg.exports=Wg});var{FetchError:LA,Headers:kA,Request:Yg,Response:DA}=Ws(),MA=ru(),$A=Kg(),Un=o((s,e)=>{let t=MA(e),r=new Yg(s,t);return $A(r,t)},"makeFetchHappen");Un.defaults=(s,e={},t=Un)=>{typeof s=="object"&&(e=s,s=null);let r=o((i,n={})=>{let a=i||s,c={...e,...n,headers:{...e.headers,...n.headers}};return t(a,c)},"defaultedFetch");return r.defaults=(i,n={})=>Un.defaults(i,n,r),r};module.exports=Un;module.exports.FetchError=LA;module.exports.Headers=kA;module.exports.Request=Yg;module.exports.Response=DA;
|
|
26
|
+
`;let h=(0,Bv.parseProxyResponse)(i);i.write(`${c}\r
|
|
27
|
+
`);let{connect:u,buffered:l}=await h;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",Nv),t.secureEndpoint?(Dr("Upgrading socket connection to TLS"),Um.connect({...Hm(jm(t),"host","path","port"),socket:i})):i;i.destroy();let f=new bn.Socket({writable:!1});return f.readable=!0,e.once("socket",d=>{Dr("Replaying proxy buffer for failed request"),(0,Tv.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),f}};Rn.protocols=["http","https"];Ae.HttpsProxyAgent=Rn;function Nv(s){s.resume()}o(Nv,"resume");function Hm(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(Hm,"omit")});var Ym=m(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});var Wm=require("buffer"),Zt={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};mt.ERRORS=Zt;function Pv(s){if(!Wm.Buffer.isEncoding(s))throw new Error(Zt.INVALID_ENCODING)}o(Pv,"checkEncoding");mt.checkEncoding=Pv;function Zm(s){return typeof s=="number"&&isFinite(s)&&Mv(s)}o(Zm,"isFiniteInteger");mt.isFiniteInteger=Zm;function Km(s,e){if(typeof s=="number"){if(!Zm(s)||s<0)throw new Error(e?Zt.INVALID_OFFSET:Zt.INVALID_LENGTH)}else throw new Error(e?Zt.INVALID_OFFSET_NON_NUMBER:Zt.INVALID_LENGTH_NON_NUMBER)}o(Km,"checkOffsetOrLengthValue");function Lv(s){Km(s,!1)}o(Lv,"checkLengthValue");mt.checkLengthValue=Lv;function kv(s){Km(s,!0)}o(kv,"checkOffsetValue");mt.checkOffsetValue=kv;function Dv(s,e){if(s<0||s>e.length)throw new Error(Zt.INVALID_TARGET_OFFSET)}o(Dv,"checkTargetOffset");mt.checkTargetOffset=Dv;function Mv(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}o(Mv,"isInteger");function $v(s){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof Wm.Buffer.prototype[s]>"u")throw new Error(`Platform does not support Buffer.prototype.${s}.`)}o($v,"bigIntAndBufferInt64Check");mt.bigIntAndBufferInt64Check=$v});var Jm=m(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var x=Ym(),Xm=4096,Fv="utf8",Bc=class s{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=Fv,this._writeOffset=0,this._readOffset=0,s.isSmartBufferOptions(e))if(e.encoding&&(x.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(x.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(x.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Xm);else{if(typeof e<"u")throw new Error(x.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Xm)}}static fromSize(e,t){return new this({size:e,encoding:t})}static fromBuffer(e,t){return new this({buff:e,encoding:t})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let t=e;return t&&(t.encoding!==void 0||t.size!==void 0||t.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffer.prototype.readInt32BE,4,e)}readInt32LE(e){return this._readNumberValue(Buffer.prototype.readInt32LE,4,e)}readBigInt64BE(e){return x.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,e)}readBigInt64LE(e){return x.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,e)}writeInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeInt8,1,e,t),this}insertInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeInt8,1,e,t)}writeInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}insertInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,e,t)}writeInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}insertInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,e,t)}writeInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}insertInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,e,t)}writeInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}insertInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,e,t)}writeBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}insertBigInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,e,t)}writeBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}insertBigInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,e,t)}readUInt8(e){return this._readNumberValue(Buffer.prototype.readUInt8,1,e)}readUInt16BE(e){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,e)}readUInt16LE(e){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,e)}readUInt32BE(e){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,e)}readUInt32LE(e){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,e)}readBigUInt64BE(e){return x.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,e)}readBigUInt64LE(e){return x.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,e)}writeUInt8(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,e,t)}insertUInt8(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,e,t)}writeUInt16BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}insertUInt16BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,e,t)}writeUInt16LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}insertUInt16LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,e,t)}writeUInt32BE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}insertUInt32BE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,e,t)}writeUInt32LE(e,t){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}insertUInt32LE(e,t){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,e,t)}writeBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}insertBigUInt64BE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,e,t)}writeBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}insertBigUInt64LE(e,t){return x.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,e,t)}readFloatBE(e){return this._readNumberValue(Buffer.prototype.readFloatBE,4,e)}readFloatLE(e){return this._readNumberValue(Buffer.prototype.readFloatLE,4,e)}writeFloatBE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}insertFloatBE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,e,t)}writeFloatLE(e,t){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}insertFloatLE(e,t){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,e,t)}readDoubleBE(e){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,e)}readDoubleLE(e){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,e)}writeDoubleBE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}insertDoubleBE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,e,t)}writeDoubleLE(e,t){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}insertDoubleLE(e,t){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,e,t)}readString(e,t){let r;typeof e=="number"?(x.checkLengthValue(e),r=Math.min(e,this.length-this._readOffset)):(t=e,r=this.length-this._readOffset),typeof t<"u"&&x.checkEncoding(t);let i=this._buff.slice(this._readOffset,this._readOffset+r).toString(t||this._encoding);return this._readOffset+=r,i}insertString(e,t,r){return x.checkOffsetValue(t),this._handleString(e,!0,t,r)}writeString(e,t,r){return this._handleString(e,!1,t,r)}readStringNT(e){typeof e<"u"&&x.checkEncoding(e);let t=this.length;for(let i=this._readOffset;i<this.length;i++)if(this._buff[i]===0){t=i;break}let r=this._buff.slice(this._readOffset,t);return this._readOffset=t+1,r.toString(e||this._encoding)}insertStringNT(e,t,r){return x.checkOffsetValue(t),this.insertString(e,t,r),this.insertUInt8(0,t+e.length),this}writeStringNT(e,t,r){return this.writeString(e,t,r),this.writeUInt8(0,typeof t=="number"?t+e.length:this.writeOffset),this}readBuffer(e){typeof e<"u"&&x.checkLengthValue(e);let t=typeof e=="number"?e:this.length,r=Math.min(this.length,this._readOffset+t),i=this._buff.slice(this._readOffset,r);return this._readOffset=r,i}insertBuffer(e,t){return x.checkOffsetValue(t),this._handleBuffer(e,!0,t)}writeBuffer(e,t){return this._handleBuffer(e,!1,t)}readBufferNT(){let e=this.length;for(let r=this._readOffset;r<this.length;r++)if(this._buff[r]===0){e=r;break}let t=this._buff.slice(this._readOffset,e);return this._readOffset=e+1,t}insertBufferNT(e,t){return x.checkOffsetValue(t),this.insertBuffer(e,t),this.insertUInt8(0,t+e.length),this}writeBufferNT(e,t){return typeof t<"u"&&x.checkOffsetValue(t),this.writeBuffer(e,t),this.writeUInt8(0,typeof t=="number"?t+e.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._readOffset=e}get writeOffset(){return this._writeOffset}set writeOffset(e){x.checkOffsetValue(e),x.checkTargetOffset(e,this),this._writeOffset=e}get encoding(){return this._encoding}set encoding(e){x.checkEncoding(e),this._encoding=e}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(e){let t=typeof e=="string"?e:this._encoding;return x.checkEncoding(t),this._buff.toString(t,0,this.length)}destroy(){return this.clear(),this}_handleString(e,t,r,i){let n=this._writeOffset,a=this._encoding;typeof r=="number"?n=r:typeof r=="string"&&(x.checkEncoding(r),a=r),typeof i=="string"&&(x.checkEncoding(i),a=i);let c=Buffer.byteLength(e,a);return t?this.ensureInsertable(c,n):this._ensureWriteable(c,n),this._buff.write(e,n,c,a),t?this._writeOffset+=c:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,n+c):this._writeOffset+=c,this}_handleBuffer(e,t,r){let i=typeof r=="number"?r:this._writeOffset;return t?this.ensureInsertable(e.length,i):this._ensureWriteable(e.length,i),e.copy(this._buff,i),t?this._writeOffset+=e.length:typeof r=="number"?this._writeOffset=Math.max(this._writeOffset,i+e.length):this._writeOffset+=e.length,this}ensureReadable(e,t){let r=this._readOffset;if(typeof t<"u"&&(x.checkOffsetValue(t),r=t),r<0||r+e>this.length)throw new Error(x.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(e,t){x.checkOffsetValue(t),this._ensureCapacity(this.length+e),t<this.length&&this._buff.copy(this._buff,t+e,t,this._buff.length),t+e>this.length?this.length=t+e:this.length+=e}_ensureWriteable(e,t){let r=typeof t=="number"?t:this._writeOffset;this._ensureCapacity(r+e),r+e>this.length&&(this.length=r+e)}_ensureCapacity(e){let t=this._buff.length;if(e>t){let r=this._buff,i=t*3/2+1;i<e&&(i=e),this._buff=Buffer.allocUnsafe(i),r.copy(this._buff,0,0,t)}}_readNumberValue(e,t,r){this.ensureReadable(t,r);let i=e.call(this._buff,typeof r=="number"?r:this._readOffset);return typeof r>"u"&&(this._readOffset+=t),i}_insertNumberValue(e,t,r,i){return x.checkOffsetValue(i),this.ensureInsertable(t,i),e.call(this._buff,r,i),this._writeOffset+=t,this}_writeNumberValue(e,t,r,i){if(typeof i=="number"){if(i<0)throw new Error(x.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);x.checkOffsetValue(i)}let n=typeof i=="number"?i:this._writeOffset;return this._ensureWriteable(t,n),e.call(this._buff,r,n),typeof i=="number"?this._writeOffset=Math.max(this._writeOffset,n+t):this._writeOffset+=t,this}};Nc.SmartBuffer=Bc});var Pc=m($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.SOCKS5_NO_ACCEPTABLE_AUTH=$.SOCKS5_CUSTOM_AUTH_END=$.SOCKS5_CUSTOM_AUTH_START=$.SOCKS_INCOMING_PACKET_SIZES=$.SocksClientState=$.Socks5Response=$.Socks5HostType=$.Socks5Auth=$.Socks4Response=$.SocksCommand=$.ERRORS=$.DEFAULT_TIMEOUT=void 0;var qv=3e4;$.DEFAULT_TIMEOUT=qv;var Uv={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};$.ERRORS=Uv;var jv={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:o(s=>s+7,"Socks5ResponseHostname"),Socks4Response:8};$.SOCKS_INCOMING_PACKET_SIZES=jv;var Qm;(function(s){s[s.connect=1]="connect",s[s.bind=2]="bind",s[s.associate=3]="associate"})(Qm||($.SocksCommand=Qm={}));var eg;(function(s){s[s.Granted=90]="Granted",s[s.Failed=91]="Failed",s[s.Rejected=92]="Rejected",s[s.RejectedIdent=93]="RejectedIdent"})(eg||($.Socks4Response=eg={}));var tg;(function(s){s[s.NoAuth=0]="NoAuth",s[s.GSSApi=1]="GSSApi",s[s.UserPass=2]="UserPass"})(tg||($.Socks5Auth=tg={}));var Hv=128;$.SOCKS5_CUSTOM_AUTH_START=Hv;var zv=254;$.SOCKS5_CUSTOM_AUTH_END=zv;var Gv=255;$.SOCKS5_NO_ACCEPTABLE_AUTH=Gv;var sg;(function(s){s[s.Granted=0]="Granted",s[s.Failure=1]="Failure",s[s.NotAllowed=2]="NotAllowed",s[s.NetworkUnreachable=3]="NetworkUnreachable",s[s.HostUnreachable=4]="HostUnreachable",s[s.ConnectionRefused=5]="ConnectionRefused",s[s.TTLExpired=6]="TTLExpired",s[s.CommandNotSupported=7]="CommandNotSupported",s[s.AddressNotSupported=8]="AddressNotSupported"})(sg||($.Socks5Response=sg={}));var rg;(function(s){s[s.IPv4=1]="IPv4",s[s.Hostname=3]="Hostname",s[s.IPv6=4]="IPv6"})(rg||($.Socks5HostType=rg={}));var ig;(function(s){s[s.Created=0]="Created",s[s.Connecting=1]="Connecting",s[s.Connected=2]="Connected",s[s.SentInitialHandshake=3]="SentInitialHandshake",s[s.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",s[s.SentAuthentication=5]="SentAuthentication",s[s.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",s[s.SentFinalHandshake=7]="SentFinalHandshake",s[s.ReceivedFinalResponse=8]="ReceivedFinalResponse",s[s.BoundWaitingForConnection=9]="BoundWaitingForConnection",s[s.Established=10]="Established",s[s.Disconnected=11]="Disconnected",s[s.Error=99]="Error"})(ig||($.SocksClientState=ig={}))});var kc=m(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.shuffleArray=As.SocksClientError=void 0;var Lc=class extends Error{static{o(this,"SocksClientError")}constructor(e,t){super(e),this.options=t}};As.SocksClientError=Lc;function Vv(s){for(let e=s.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[s[e],s[t]]=[s[t],s[e]]}}o(Vv,"shuffleArray");As.shuffleArray=Vv});var On=m(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.isInSubnet=Wv;Kt.isCorrect=Zv;Kt.numberToPaddedHex=ng;Kt.stringToPaddedHex=Kv;Kt.testBit=Yv;function Wv(s){return this.subnetMask<s.subnetMask?!1:this.mask(s.subnetMask)===s.mask()}o(Wv,"isInSubnet");function Zv(s){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===s&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}o(Zv,"isCorrect");function ng(s){return s.toString(16).padStart(2,"0")}o(ng,"numberToPaddedHex");function Kv(s){return ng(parseInt(s,10))}o(Kv,"stringToPaddedHex");function Yv(s,e){let{length:t}=s;if(e>t)return!1;let r=t-e;return s.substring(r,r+1)==="1"}o(Yv,"testBit")});var Dc=m(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.RE_SUBNET_STRING=Ze.RE_ADDRESS=Ze.GROUPS=Ze.BITS=void 0;Ze.BITS=32;Ze.GROUPS=4;Ze.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Ze.RE_SUBNET_STRING=/\/\d{1,2}$/});var vn=m(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.AddressError=void 0;var Mc=class extends Error{static{o(this,"AddressError")}constructor(e,t){super(e),this.name="AddressError",this.parseMessage=t}};In.AddressError=Mc});var Fc=m(Ke=>{"use strict";var Xv=Ke&&Ke.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),Jv=Ke&&Ke.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),ag=Ke&&Ke.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&Xv(e,s,t);return Jv(e,s),e};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Address4=void 0;var xs=ag(On()),ke=ag(Dc()),og=vn(),$c=class s{static{o(this,"Address4")}constructor(e){this.groups=ke.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=xs.isCorrect(ke.BITS),this.isInSubnet=xs.isInSubnet,this.address=e;let t=ke.RE_SUBNET_STRING.exec(e);if(t){if(this.parsedSubnet=t[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>ke.BITS)throw new og.AddressError("Invalid subnet mask.");e=e.replace(ke.RE_SUBNET_STRING,"")}this.addressMinusSuffix=e,this.parsedAddress=this.parse(e)}static isValid(e){try{return new s(e),!0}catch{return!1}}parse(e){let t=e.split(".");if(!e.match(ke.RE_ADDRESS))throw new og.AddressError("Invalid IPv4 address.");return t}correctForm(){return this.parsedAddress.map(e=>parseInt(e,10)).join(".")}static fromHex(e){let t=e.replace(/:/g,"").padStart(8,"0"),r=[],i;for(i=0;i<8;i+=2){let n=t.slice(i,i+2);r.push(parseInt(n,16))}return new s(r.join("."))}static fromInteger(e){return s.fromHex(e.toString(16))}static fromArpa(e){let r=e.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new s(r)}toHex(){return this.parsedAddress.map(e=>xs.stringToPaddedHex(e)).join(":")}toArray(){return this.parsedAddress.map(e=>parseInt(e,10))}toGroup6(){let e=[],t;for(t=0;t<ke.GROUPS;t+=2)e.push(`${xs.stringToPaddedHex(this.parsedAddress[t])}${xs.stringToPaddedHex(this.parsedAddress[t+1])}`);return e.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(e=>xs.stringToPaddedHex(e)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(ke.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(ke.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}static fromBigInt(e){return s.fromHex(e.toString(16))}mask(e){return e===void 0&&(e=this.subnetMask),this.getBitsBase2(0,e)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}reverseForm(e){e||(e={});let t=this.correctForm().split(".").reverse().join(".");return e.omitSuffix?t:`${t}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new s("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart(ke.BITS,"0")}groupForV6(){let e=this.parsedAddress;return this.address.replace(ke.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${e.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${e.slice(2,4).join(".")}</span>`)}};Ke.Address4=$c});var qc=m(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.RE_URL_WITH_PORT=U.RE_URL=U.RE_ZONE_STRING=U.RE_SUBNET_STRING=U.RE_BAD_ADDRESS=U.RE_BAD_CHARACTERS=U.TYPES=U.SCOPES=U.GROUPS=U.BITS=void 0;U.BITS=128;U.GROUPS=8;U.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};U.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};U.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;U.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;U.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;U.RE_ZONE_STRING=/%.*$/;U.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/;U.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/});var Uc=m(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.spanAllZeroes=cg;Cs.spanAll=Qv;Cs.spanLeadingZeroes=eT;Cs.simpleGroup=tT;function cg(s){return s.replace(/(0+)/g,'<span class="zero">$1</span>')}o(cg,"spanAllZeroes");function Qv(s,e=0){return s.split("").map((r,i)=>`<span class="digit value-${r} position-${i+e}">${cg(r)}</span>`).join("")}o(Qv,"spanAll");function hg(s){return s.replace(/^(0+)/,'<span class="zero">$1</span>')}o(hg,"spanLeadingZeroesSimple");function eT(s){return s.split(":").map(t=>hg(t)).join(":")}o(eT,"spanLeadingZeroes");function tT(s,e=0){return s.split(":").map((r,i)=>/group-v4/.test(r)?r:`<span class="hover-group group-${i+e}">${hg(r)}</span>`)}o(tT,"simpleGroup")});var ug=m(fe=>{"use strict";var sT=fe&&fe.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),rT=fe&&fe.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),iT=fe&&fe.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&sT(e,s,t);return rT(e,s),e};Object.defineProperty(fe,"__esModule",{value:!0});fe.ADDRESS_BOUNDARY=void 0;fe.groupPossibilities=An;fe.padGroup=Tn;fe.simpleRegularExpression=oT;fe.possibleElisions=aT;var nT=iT(qc());function An(s){return`(${s.join("|")})`}o(An,"groupPossibilities");function Tn(s){return s.length<4?`0{0,${4-s.length}}${s}`:s}o(Tn,"padGroup");fe.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function oT(s){let e=[];s.forEach((r,i)=>{parseInt(r,16)===0&&e.push(i)});let t=e.map(r=>s.map((i,n)=>{if(n===r){let a=n===0||n===nT.GROUPS-1?":":"";return An([Tn(i),a])}return Tn(i)}).join(":"));return t.push(s.map(Tn).join(":")),An(t)}o(oT,"simpleRegularExpression");function aT(s,e,t){let r=e?"":":",i=t?"":":",n=[];!e&&!t&&n.push("::"),e&&t&&n.push(""),(t&&!e||!t&&e)&&n.push(":"),n.push(`${r}(:0{1,4}){1,${s-1}}`),n.push(`(0{1,4}:){1,${s-1}}${i}`),n.push(`(0{1,4}:){${s-1}}0{1,4}`);for(let a=1;a<s-1;a++)for(let c=1;c<s-a;c++)n.push(`(0{1,4}:){${c}}:(0{1,4}:){${s-c-a-1}}0{1,4}`);return An(n)}o(aT,"possibleElisions")});var pg=m(Ye=>{"use strict";var cT=Ye&&Ye.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),hT=Ye&&Ye.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Bn=Ye&&Ye.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&cT(e,s,t);return hT(e,s),e};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Address6=void 0;var lg=Bn(On()),jc=Bn(Dc()),F=Bn(qc()),Hc=Bn(Uc()),Yt=Fc(),Xt=ug(),gt=vn(),xn=On();function Cn(s){if(!s)throw new Error("Assertion failed.")}o(Cn,"assert");function uT(s){let e=/(\d+)(\d{3})/;for(;e.test(s);)s=s.replace(e,"$1,$2");return s}o(uT,"addCommas");function lT(s){return s=s.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),s=s.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),s}o(lT,"spanLeadingZeroes4");function fT(s,e){let t=[],r=[],i;for(i=0;i<s.length;i++)i<e[0]?t.push(s[i]):i>e[1]&&r.push(s[i]);return t.concat(["compact"]).concat(r)}o(fT,"compact");function fg(s){return parseInt(s,16).toString(16).padStart(4,"0")}o(fg,"paddedHex");function dg(s){return s&255}o(dg,"unsignByte");var zc=class s{static{o(this,"Address6")}constructor(e,t){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=lg.isInSubnet,this.isCorrect=lg.isCorrect(F.BITS),t===void 0?this.groups=F.GROUPS:this.groups=t,this.address=e;let r=F.RE_SUBNET_STRING.exec(e);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>F.BITS)throw new gt.AddressError("Invalid subnet mask.");e=e.replace(F.RE_SUBNET_STRING,"")}else if(/\//.test(e))throw new gt.AddressError("Invalid subnet mask.");let i=F.RE_ZONE_STRING.exec(e);i&&(this.zone=i[0],e=e.replace(F.RE_ZONE_STRING,"")),this.addressMinusSuffix=e,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(e){try{return new s(e),!0}catch{return!1}}static fromBigInt(e){let t=e.toString(16).padStart(32,"0"),r=[],i;for(i=0;i<F.GROUPS;i++)r.push(t.slice(i*4,(i+1)*4));return new s(r.join(":"))}static fromURL(e){let t,r=null,i;if(e.indexOf("[")!==-1&&e.indexOf("]:")!==-1){if(i=F.RE_URL_WITH_PORT.exec(e),i===null)return{error:"failed to parse address with port",address:null,port:null};t=i[1],r=i[2]}else if(e.indexOf("/")!==-1){if(e=e.replace(/^[a-z0-9]+:\/\//,""),i=F.RE_URL.exec(e),i===null)return{error:"failed to parse address from URL",address:null,port:null};t=i[1]}else t=e;return r?(r=parseInt(r,10),(r<0||r>65536)&&(r=null)):r=null,{address:new s(t),port:r}}static fromAddress4(e){let t=new Yt.Address4(e),r=F.BITS-(jc.BITS-t.subnetMask);return new s(`::ffff:${t.correctForm()}/${r}`)}static fromArpa(e){let t=e.replace(/(\.ip6\.arpa)?\.$/,""),r=7;if(t.length!==63)throw new gt.AddressError("Invalid 'ip6.arpa' form.");let i=t.split(".").reverse();for(let n=r;n>0;n--){let a=n*4;i.splice(a,0,":")}return t=i.join(""),new s(t)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(e=this.subnetMask){return this.getBitsBase2(0,e)}possibleSubnets(e=128){let t=F.BITS-this.subnetMask,r=Math.abs(e-F.BITS),i=t-r;return i<0?"0":uT((BigInt("2")**BigInt(i)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(F.BITS-this.subnetMask)}`)}startAddress(){return s.fromBigInt(this._startAddress())}startAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._startAddress()+e)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(F.BITS-this.subnetMask)}`)}endAddress(){return s.fromBigInt(this._endAddress())}endAddressExclusive(){let e=BigInt("1");return s.fromBigInt(this._endAddress()-e)}getScope(){let e=F.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&e!=="Link local"&&(e="Global"),e||"Unknown"}getType(){for(let e of Object.keys(F.TYPES))if(this.isInSubnet(new s(e)))return F.TYPES[e];return"Global unicast"}getBits(e,t){return BigInt(`0b${this.getBitsBase2(e,t)}`)}getBitsBase2(e,t){return this.binaryZeroPad().slice(e,t)}getBitsBase16(e,t){let r=t-e;if(r%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(e,t).toString(16).padStart(r/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,F.BITS)}reverseForm(e){e||(e={});let t=Math.floor(this.subnetMask/4),r=this.canonicalForm().replace(/:/g,"").split("").slice(0,t).reverse().join(".");return t>0?e.omitSuffix?r:`${r}.ip6.arpa.`:e.omitSuffix?"":"ip6.arpa."}correctForm(){let e,t=[],r=0,i=[];for(e=0;e<this.parsedAddress.length;e++){let c=parseInt(this.parsedAddress[e],16);c===0&&r++,c!==0&&r>0&&(r>1&&i.push([e-r,e-1]),r=0)}r>1&&i.push([this.parsedAddress.length-r,this.parsedAddress.length-1]);let n=i.map(c=>c[1]-c[0]+1);if(i.length>0){let c=n.indexOf(Math.max(...n));t=fT(this.parsedAddress,i[c])}else t=this.parsedAddress;for(e=0;e<t.length;e++)t[e]!=="compact"&&(t[e]=parseInt(t[e],16).toString(16));let a=t.join(":");return a=a.replace(/^compact$/,"::"),a=a.replace(/(^compact)|(compact$)/,":"),a=a.replace(/compact/,""),a}binaryZeroPad(){return this.bigInt().toString(2).padStart(F.BITS,"0")}parse4in6(e){let t=e.split(":"),i=t.slice(-1)[0].match(jc.RE_ADDRESS);if(i){this.parsedAddress4=i[0],this.address4=new Yt.Address4(this.parsedAddress4);for(let n=0;n<this.address4.groups;n++)if(/^0[0-9]+/.test(this.address4.parsedAddress[n]))throw new gt.AddressError("IPv4 addresses can't have leading zeroes.",e.replace(jc.RE_ADDRESS,this.address4.parsedAddress.map(lT).join(".")));this.v4=!0,t[t.length-1]=this.address4.toGroup6(),e=t.join(":")}return e}parse(e){e=this.parse4in6(e);let t=e.match(F.RE_BAD_CHARACTERS);if(t)throw new gt.AddressError(`Bad character${t.length>1?"s":""} detected in address: ${t.join("")}`,e.replace(F.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let r=e.match(F.RE_BAD_ADDRESS);if(r)throw new gt.AddressError(`Address failed regex: ${r.join("")}`,e.replace(F.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let i=[],n=e.split("::");if(n.length===2){let a=n[0].split(":"),c=n[1].split(":");a.length===1&&a[0]===""&&(a=[]),c.length===1&&c[0]===""&&(c=[]);let h=this.groups-(a.length+c.length);if(!h)throw new gt.AddressError("Error parsing groups");this.elidedGroups=h,this.elisionBegin=a.length,this.elisionEnd=a.length+this.elidedGroups,i=i.concat(a);for(let u=0;u<h;u++)i.push("0");i=i.concat(c)}else if(n.length===1)i=e.split(":"),this.elidedGroups=0;else throw new gt.AddressError("Too many :: groups found");if(i=i.map(a=>parseInt(a,16).toString(16)),i.length!==this.groups)throw new gt.AddressError("Incorrect number of groups found");return i}canonicalForm(){return this.parsedAddress.map(fg).join(":")}decimal(){return this.parsedAddress.map(e=>parseInt(e,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(fg).join("")}`)}to4(){let e=this.binaryZeroPad().split("");return Yt.Address4.fromHex(BigInt(`0b${e.slice(96,128).join("")}`).toString(16))}to4in6(){let e=this.to4(),r=new s(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),i="";return/:$/.test(r)||(i=":"),r+i+e.address}inspectTeredo(){let e=this.getBitsBase16(0,32),r=(this.getBits(80,96)^BigInt("0xffff")).toString(),i=Yt.Address4.fromHex(this.getBitsBase16(32,64)),n=this.getBits(96,128),a=Yt.Address4.fromHex((n^BigInt("0xffffffff")).toString(16)),c=this.getBitsBase2(64,80),h=(0,xn.testBit)(c,15),u=(0,xn.testBit)(c,14),l=(0,xn.testBit)(c,8),f=(0,xn.testBit)(c,9),d=BigInt(`0b${c.slice(2,6)+c.slice(8,16)}`).toString(10);return{prefix:`${e.slice(0,4)}:${e.slice(4,8)}`,server4:i.address,client4:a.address,flags:c,coneNat:h,microsoft:{reserved:u,universalLocal:f,groupIndividual:l,nonce:d},udpPort:r}}inspect6to4(){let e=this.getBitsBase16(0,16),t=Yt.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:e.slice(0,4),gateway:t.address}}to6to4(){if(!this.is4())return null;let e=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new s(e)}toByteArray(){let e=this.bigInt().toString(16),r=`${"0".repeat(e.length%2)}${e}`,i=[];for(let n=0,a=r.length;n<a;n+=2)i.push(parseInt(r.substring(n,n+2),16));return i}toUnsignedByteArray(){return this.toByteArray().map(dg)}static fromByteArray(e){return this.fromUnsignedByteArray(e.map(dg))}static fromUnsignedByteArray(e){let t=BigInt("256"),r=BigInt("0"),i=BigInt("1");for(let n=e.length-1;n>=0;n--)r+=i*BigInt(e[n].toString(10)),i*=t;return s.fromBigInt(r)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new s("2001::/32"))}is6to4(){return this.isInSubnet(new s("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(e){return e===void 0?e="":e=`:${e}`,`http://[${this.correctForm()}]${e}/`}link(e){e||(e={}),e.className===void 0&&(e.className=""),e.prefix===void 0&&(e.prefix="/#address="),e.v4===void 0&&(e.v4=!1);let t=this.correctForm;e.v4&&(t=this.to4in6);let r=t.call(this);return e.className?`<a href="${e.prefix}${r}" class="${e.className}">${r}</a>`:`<a href="${e.prefix}${r}">${r}</a>`}group(){if(this.elidedGroups===0)return Hc.simpleGroup(this.address).join(":");Cn(typeof this.elidedGroups=="number"),Cn(typeof this.elisionBegin=="number");let e=[],[t,r]=this.address.split("::");t.length?e.push(...Hc.simpleGroup(t)):e.push("");let i=["hover-group"];for(let n=this.elisionBegin;n<this.elisionBegin+this.elidedGroups;n++)i.push(`group-${n}`);return e.push(`<span class="${i.join(" ")}"></span>`),r.length?e.push(...Hc.simpleGroup(r,this.elisionEnd)):e.push(""),this.is4()&&(Cn(this.address4 instanceof Yt.Address4),e.pop(),e.push(this.address4.groupForV6())),e.join(":")}regularExpressionString(e=!1){let t=[],r=new s(this.correctForm());if(r.elidedGroups===0)t.push((0,Xt.simpleRegularExpression)(r.parsedAddress));else if(r.elidedGroups===F.GROUPS)t.push((0,Xt.possibleElisions)(F.GROUPS));else{let i=r.address.split("::");i[0].length&&t.push((0,Xt.simpleRegularExpression)(i[0].split(":"))),Cn(typeof r.elidedGroups=="number"),t.push((0,Xt.possibleElisions)(r.elidedGroups,i[0].length!==0,i[1].length!==0)),i[1].length&&t.push((0,Xt.simpleRegularExpression)(i[1].split(":"))),t=[t.join(":")]}return e||(t=["(?=^|",Xt.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...t,")(?=[^\\w\\:]|",Xt.ADDRESS_BOUNDARY,"|$)"]),t.join("")}regularExpression(e=!1){return new RegExp(this.regularExpressionString(e),"i")}};Ye.Address6=zc});var Gc=m(se=>{"use strict";var dT=se&&se.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),pT=se&&se.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),mT=se&&se.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&dT(e,s,t);return pT(e,s),e};Object.defineProperty(se,"__esModule",{value:!0});se.v6=se.AddressError=se.Address6=se.Address4=void 0;var gT=Fc();Object.defineProperty(se,"Address4",{enumerable:!0,get:o(function(){return gT.Address4},"get")});var yT=pg();Object.defineProperty(se,"Address6",{enumerable:!0,get:o(function(){return yT.Address6},"get")});var ET=vn();Object.defineProperty(se,"AddressError",{enumerable:!0,get:o(function(){return ET.AddressError},"get")});var wT=mT(Uc());se.v6={helpers:wT}});var Sg=m(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.ipToBuffer=xe.int32ToIpv4=xe.ipv4ToInt32=xe.validateSocksClientChainOptions=xe.validateSocksClientOptions=void 0;var ae=kc(),Z=Pc(),ST=require("stream"),Vc=Gc(),mg=require("net");function _T(s,e=["connect","bind","associate"]){if(!Z.SocksCommand[s.command])throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommand,s);if(e.indexOf(s.command)===-1)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommandForOperation,s);if(!yg(s.destination))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsDestination,s);if(!Eg(s.proxy))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxy,s);if(gg(s.proxy,s),s.timeout&&!wg(s.timeout))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsTimeout,s);if(s.existing_socket&&!(s.existing_socket instanceof ST.Duplex))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsExistingSocket,s)}o(_T,"validateSocksClientOptions");xe.validateSocksClientOptions=_T;function bT(s){if(s.command!=="connect")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksCommandChain,s);if(!yg(s.destination))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsDestination,s);if(!(s.proxies&&Array.isArray(s.proxies)&&s.proxies.length>=2))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxiesLength,s);if(s.proxies.forEach(e=>{if(!Eg(e))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsProxy,s);gg(e,s)}),s.timeout&&!wg(s.timeout))throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsTimeout,s)}o(bT,"validateSocksClientChainOptions");xe.validateSocksClientChainOptions=bT;function gg(s,e){if(s.custom_auth_method!==void 0){if(s.custom_auth_method<Z.SOCKS5_CUSTOM_AUTH_START||s.custom_auth_method>Z.SOCKS5_CUSTOM_AUTH_END)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthRange,e);if(s.custom_auth_request_handler===void 0||typeof s.custom_auth_request_handler!="function")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_size===void 0)throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e);if(s.custom_auth_response_handler===void 0||typeof s.custom_auth_response_handler!="function")throw new ae.SocksClientError(Z.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,e)}}o(gg,"validateCustomProxyAuth");function yg(s){return s&&typeof s.host=="string"&&Buffer.byteLength(s.host)<256&&typeof s.port=="number"&&s.port>=0&&s.port<=65535}o(yg,"isValidSocksRemoteHost");function Eg(s){return s&&(typeof s.host=="string"||typeof s.ipaddress=="string")&&typeof s.port=="number"&&s.port>=0&&s.port<=65535&&(s.type===4||s.type===5)}o(Eg,"isValidSocksProxy");function wg(s){return typeof s=="number"&&s>0}o(wg,"isValidTimeoutValue");function RT(s){return new Vc.Address4(s).toArray().reduce((t,r)=>(t<<8)+r,0)>>>0}o(RT,"ipv4ToInt32");xe.ipv4ToInt32=RT;function OT(s){let e=s>>>24&255,t=s>>>16&255,r=s>>>8&255,i=s&255;return[e,t,r,i].join(".")}o(OT,"int32ToIpv4");xe.int32ToIpv4=OT;function IT(s){if(mg.isIPv4(s)){let e=new Vc.Address4(s);return Buffer.from(e.toArray())}else if(mg.isIPv6(s)){let e=new Vc.Address6(s);return Buffer.from(e.canonicalForm().split(":").map(t=>t.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}o(IT,"ipToBuffer");xe.ipToBuffer=IT});var _g=m(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.ReceiveBuffer=void 0;var Wc=class{static{o(this,"ReceiveBuffer")}constructor(e=4096){this.buffer=Buffer.allocUnsafe(e),this.offset=0,this.originalSize=e}get length(){return this.offset}append(e){if(!Buffer.isBuffer(e))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+e.length>=this.buffer.length){let t=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+e.length)),t.copy(this.buffer)}return e.copy(this.buffer,this.offset),this.offset+=e.length}peek(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,e)}get(e){if(e>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let t=Buffer.allocUnsafe(e);return this.buffer.slice(0,e).copy(t),this.buffer.copyWithin(0,e,e+this.offset-e),this.offset-=e,t}};Nn.ReceiveBuffer=Wc});var bg=m(At=>{"use strict";var Bs=At&&At.__awaiter||function(s,e,t,r){function i(n){return n instanceof t?n:new t(function(a){a(n)})}return o(i,"adopt"),new(t||(t=Promise))(function(n,a){function c(l){try{u(r.next(l))}catch(f){a(f)}}o(c,"fulfilled");function h(l){try{u(r.throw(l))}catch(f){a(f)}}o(h,"rejected");function u(l){l.done?n(l.value):i(l.value).then(c,h)}o(u,"step"),u((r=r.apply(s,e||[])).next())})};Object.defineProperty(At,"__esModule",{value:!0});At.SocksClientError=At.SocksClient=void 0;var vT=require("events"),Ns=require("net"),de=Jm(),E=Pc(),we=Sg(),TT=_g(),Kc=kc();Object.defineProperty(At,"SocksClientError",{enumerable:!0,get:o(function(){return Kc.SocksClientError},"get")});var Zc=Gc(),Yc=class s extends vT.EventEmitter{static{o(this,"SocksClient")}constructor(e){super(),this.options=Object.assign({},e),(0,we.validateSocksClientOptions)(e),this.setState(E.SocksClientState.Created)}static createConnection(e,t){return new Promise((r,i)=>{try{(0,we.validateSocksClientOptions)(e,["connect"])}catch(a){return typeof t=="function"?(t(a),r(a)):i(a)}let n=new s(e);n.connect(e.existing_socket),n.once("established",a=>{n.removeAllListeners(),typeof t=="function"&&t(null,a),r(a)}),n.once("error",a=>{n.removeAllListeners(),typeof t=="function"?(t(a),r(a)):i(a)})})}static createConnectionChain(e,t){return new Promise((r,i)=>Bs(this,void 0,void 0,function*(){try{(0,we.validateSocksClientChainOptions)(e)}catch(n){return typeof t=="function"?(t(n),r(n)):i(n)}e.randomizeChain&&(0,Kc.shuffleArray)(e.proxies);try{let n;for(let a=0;a<e.proxies.length;a++){let c=e.proxies[a],h=a===e.proxies.length-1?e.destination:{host:e.proxies[a+1].host||e.proxies[a+1].ipaddress,port:e.proxies[a+1].port},u=yield s.createConnection({command:"connect",proxy:c,destination:h,existing_socket:n});n=n||u.socket}typeof t=="function"?(t(null,{socket:n}),r({socket:n})):r({socket:n})}catch(n){typeof t=="function"?(t(n),r(n)):i(n)}}))}static createUDPFrame(e){let t=new de.SmartBuffer;return t.writeUInt16BE(0),t.writeUInt8(e.frameNumber||0),Ns.isIPv4(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv4),t.writeUInt32BE((0,we.ipv4ToInt32)(e.remoteHost.host))):Ns.isIPv6(e.remoteHost.host)?(t.writeUInt8(E.Socks5HostType.IPv6),t.writeBuffer((0,we.ipToBuffer)(e.remoteHost.host))):(t.writeUInt8(E.Socks5HostType.Hostname),t.writeUInt8(Buffer.byteLength(e.remoteHost.host)),t.writeString(e.remoteHost.host)),t.writeUInt16BE(e.remoteHost.port),t.writeBuffer(e.data),t.toBuffer()}static parseUDPFrame(e){let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r=t.readUInt8(),i=t.readUInt8(),n;i===E.Socks5HostType.IPv4?n=(0,we.int32ToIpv4)(t.readUInt32BE()):i===E.Socks5HostType.IPv6?n=Zc.Address6.fromByteArray(Array.from(t.readBuffer(16))).canonicalForm():n=t.readString(t.readUInt8());let a=t.readUInt16BE();return{frameNumber:r,remoteHost:{host:n,port:a},data:t.readBuffer()}}setState(e){this.state!==E.SocksClientState.Error&&(this.state=e)}connect(e){this.onDataReceived=r=>this.onDataReceivedHandler(r),this.onClose=()=>this.onCloseHandler(),this.onError=r=>this.onErrorHandler(r),this.onConnect=()=>this.onConnectHandler();let t=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||E.DEFAULT_TIMEOUT);t.unref&&typeof t.unref=="function"&&t.unref(),e?this.socket=e:this.socket=new Ns.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(E.SocksClientState.Connecting),this.receiveBuffer=new TT.ReceiveBuffer,e?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",r=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let i=this.receiveBuffer.get(this.receiveBuffer.length);r.socket.emit("data",i)}r.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.BoundWaitingForConnection&&this.closeSocket(E.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(E.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(E.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(e){this.receiveBuffer.append(e),this.processData()}processData(){for(;this.state!==E.SocksClientState.Established&&this.state!==E.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===E.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===E.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===E.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===E.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(E.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(E.ERRORS.SocketClosed)}onErrorHandler(e){this.closeSocket(e.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(e){this.state!==E.SocksClientState.Error&&(this.setState(E.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new Kc.SocksClientError(e,this.options)))}sendSocks4InitialHandshake(){let e=this.options.proxy.userId||"",t=new de.SmartBuffer;t.writeUInt8(4),t.writeUInt8(E.SocksCommand[this.options.command]),t.writeUInt16BE(this.options.destination.port),Ns.isIPv4(this.options.destination.host)?(t.writeBuffer((0,we.ipToBuffer)(this.options.destination.host)),t.writeStringNT(e)):(t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(0),t.writeUInt8(1),t.writeStringNT(e),t.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(t.toBuffer())}handleSocks4FinalHandshakeResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedConnection} - (${E.Socks4Response[e[1]]})`);else if(E.SocksCommand[this.options.command]===E.SocksCommand.bind){let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,we.int32ToIpv4)(t.readUInt32BE())};r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress),this.setState(E.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:r,socket:this.socket})}else this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let e=this.receiveBuffer.get(8);if(e[1]!==E.Socks4Response.Granted)this.closeSocket(`${E.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${E.Socks4Response[e[1]]})`);else{let t=de.SmartBuffer.fromBuffer(e);t.readOffset=2;let r={port:t.readUInt16BE(),host:(0,we.int32ToIpv4)(t.readUInt32BE())};this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}sendSocks5InitialHandshake(){let e=new de.SmartBuffer,t=[E.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&t.push(E.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&t.push(this.options.proxy.custom_auth_method),e.writeUInt8(5),e.writeUInt8(t.length);for(let r of t)e.writeUInt8(r);this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let e=this.receiveBuffer.get(2);e[0]!==5?this.closeSocket(E.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):e[1]===E.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):e[1]===E.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=E.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):e[1]===E.Socks5Auth.UserPass?(this.socks5ChosenAuthType=E.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):e[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(E.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let e=this.options.proxy.userId||"",t=this.options.proxy.password||"",r=new de.SmartBuffer;r.writeUInt8(1),r.writeUInt8(Buffer.byteLength(e)),r.writeString(e),r.writeUInt8(Buffer.byteLength(t)),r.writeString(t),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(r.toBuffer()),this.setState(E.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return Bs(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(E.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(e)})}handleSocks5AuthenticationNoAuthHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return e[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(e){return Bs(this,void 0,void 0,function*(){return e[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return Bs(this,void 0,void 0,function*(){this.setState(E.SocksClientState.ReceivedAuthenticationResponse);let e=!1;this.socks5ChosenAuthType===E.Socks5Auth.NoAuth?e=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===E.Socks5Auth.UserPass?e=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(e=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),e?this.sendSocks5CommandRequest():this.closeSocket(E.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let e=new de.SmartBuffer;e.writeUInt8(5),e.writeUInt8(E.SocksCommand[this.options.command]),e.writeUInt8(0),Ns.isIPv4(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv4),e.writeBuffer((0,we.ipToBuffer)(this.options.destination.host))):Ns.isIPv6(this.options.destination.host)?(e.writeUInt8(E.Socks5HostType.IPv6),e.writeBuffer((0,we.ipToBuffer)(this.options.destination.host))):(e.writeUInt8(E.Socks5HostType.Hostname),e.writeUInt8(this.options.destination.host.length),e.writeString(this.options.destination.host)),e.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(e.toBuffer()),this.setState(E.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,we.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:Zc.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.ReceivedFinalResponse),E.SocksCommand[this.options.command]===E.SocksCommand.connect?(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.bind?(this.setState(E.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:r,socket:this.socket})):E.SocksCommand[this.options.command]===E.SocksCommand.associate&&(this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let e=this.receiveBuffer.peek(5);if(e[0]!==5||e[1]!==E.Socks5Response.Granted)this.closeSocket(`${E.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${E.Socks5Response[e[1]]}`);else{let t=e[3],r,i;if(t===E.Socks5HostType.IPv4){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:(0,we.int32ToIpv4)(i.readUInt32BE()),port:i.readUInt16BE()},r.host==="0.0.0.0"&&(r.host=this.options.proxy.ipaddress)}else if(t===E.Socks5HostType.Hostname){let n=e[4],a=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(n);if(this.receiveBuffer.length<a){this.nextRequiredPacketBufferSize=a;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(a).slice(5)),r={host:i.readString(n),port:i.readUInt16BE()}}else if(t===E.Socks5HostType.IPv6){let n=E.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<n){this.nextRequiredPacketBufferSize=n;return}i=de.SmartBuffer.fromBuffer(this.receiveBuffer.get(n).slice(4)),r={host:Zc.Address6.fromByteArray(Array.from(i.readBuffer(16))).canonicalForm(),port:i.readUInt16BE()}}this.setState(E.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:r,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};At.SocksClient=Yc});var Rg=m(Jt=>{"use strict";var AT=Jt&&Jt.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),xT=Jt&&Jt.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&AT(e,s,t)};Object.defineProperty(Jt,"__esModule",{value:!0});xT(bg(),Jt)});var Og=m(Ce=>{"use strict";var CT=Ce&&Ce.__createBinding||(Object.create?(function(s,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,r,i)}):(function(s,e,t,r){r===void 0&&(r=t),s[r]=e[t]})),BT=Ce&&Ce.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),Xc=Ce&&Ce.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&CT(e,s,t);return BT(e,s),e},NT=Ce&&Ce.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.SocksProxyAgent=void 0;var PT=Rg(),LT=kr(),kT=NT(Lr()),DT=Xc(require("dns")),MT=Xc(require("net")),$T=Xc(require("tls")),FT=require("url"),Pn=(0,kT.default)("socks-proxy-agent"),qT=o(s=>s.servername===void 0&&s.host&&!MT.isIP(s.host)?{...s,servername:s.host}:s,"setServernameFromNonIpHost");function UT(s){let e=!1,t=5,r=s.hostname,i=parseInt(s.port,10)||1080;switch(s.protocol.replace(":","")){case"socks4":e=!0,t=4;break;case"socks4a":t=4;break;case"socks5":e=!0,t=5;break;case"socks":t=5;break;case"socks5h":t=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(s.protocol)}`)}let n={host:r,port:i,type:t};return s.username&&Object.defineProperty(n,"userId",{value:decodeURIComponent(s.username),enumerable:!1}),s.password!=null&&Object.defineProperty(n,"password",{value:decodeURIComponent(s.password),enumerable:!1}),{lookup:e,proxy:n}}o(UT,"parseSocksURL");var Ln=class extends LT.Agent{static{o(this,"SocksProxyAgent")}constructor(e,t){super(t);let r=typeof e=="string"?new FT.URL(e):e,{proxy:i,lookup:n}=UT(r);this.shouldLookup=n,this.proxy=i,this.timeout=t?.timeout??null,this.socketOptions=t?.socketOptions??null}async connect(e,t){let{shouldLookup:r,proxy:i,timeout:n}=this;if(!t.host)throw new Error("No `host` defined!");let{host:a}=t,{port:c,lookup:h=DT.lookup}=t;r&&(a=await new Promise((d,p)=>{h(a,{},(g,y)=>{g?p(g):d(y)})}));let u={proxy:i,destination:{host:a,port:typeof c=="number"?c:parseInt(c,10)},command:"connect",timeout:n??void 0,socket_options:this.socketOptions??void 0},l=o(d=>{e.destroy(),f.destroy(),d&&d.destroy()},"cleanup");Pn("Creating socks proxy connection: %o",u);let{socket:f}=await PT.SocksClient.createConnection(u);if(Pn("Successfully created socks proxy connection"),n!==null&&(f.setTimeout(n),f.on("timeout",()=>l())),t.secureEndpoint){Pn("Upgrading socket connection to TLS");let d=$T.connect({...jT(qT(t),"host","path","port"),socket:f});return d.once("error",p=>{Pn("Socket TLS error",p.message),l(d)}),d}return f}};Ln.protocols=["socks","socks4","socks4a","socks5","socks5h"];Ce.SocksProxyAgent=Ln;function jT(s,...e){let t={},r;for(r in s)e.includes(r)||(t[r]=s[r]);return t}o(jT,"omit")});var rh=m((yP,Ig)=>{"use strict";var Jc=class extends Error{static{o(this,"InvalidProxyProtocolError")}constructor(e){super(`Invalid protocol \`${e.protocol}\` connecting to proxy \`${e.host}\``),this.code="EINVALIDPROXY",this.proxy=e}},Qc=class extends Error{static{o(this,"ConnectionTimeoutError")}constructor(e){super(`Timeout connecting to host \`${e}\``),this.code="ECONNECTIONTIMEOUT",this.host=e}},eh=class extends Error{static{o(this,"IdleTimeoutError")}constructor(e){super(`Idle timeout reached for host \`${e}\``),this.code="EIDLETIMEOUT",this.host=e}},th=class extends Error{static{o(this,"ResponseTimeoutError")}constructor(e,t){let r="Response timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`connecting to host \`${e.host}\``,super(r),this.code="ERESPONSETIMEOUT",this.proxy=t,this.request=e}},sh=class extends Error{static{o(this,"TransferTimeoutError")}constructor(e,t){let r="Transfer timeout ";t&&(r+=`from proxy \`${t.host}\` `),r+=`for \`${e.host}\``,super(r),this.code="ETRANSFERTIMEOUT",this.proxy=t,this.request=e}};Ig.exports={InvalidProxyProtocolError:Jc,ConnectionTimeoutError:Qc,IdleTimeoutError:eh,ResponseTimeoutError:th,TransferTimeoutError:sh}});var ih=m((wP,Tg)=>{"use strict";var{HttpProxyAgent:HT}=Fm(),{HttpsProxyAgent:zT}=Vm(),{SocksProxyAgent:vg}=Og(),{LRUCache:GT}=gs(),{InvalidProxyProtocolError:VT}=rh(),WT=new GT({max:20}),ZT=new Set(vg.protocols),KT=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),Mr=Object.entries(process.env).reduce((s,[e,t])=>(e=e.toLowerCase(),KT.has(e)&&(s[e]=t),s),{}),YT=o(s=>{s=new URL(s);let e=s.protocol.slice(0,-1);if(ZT.has(e))return vg;if(e==="https"||e==="http")return[HT,zT];throw new VT(s)},"getProxyAgent"),XT=o((s,e)=>{if(typeof e=="string"&&(e=e.split(",").map(r=>r.trim()).filter(Boolean)),!e||!e.length)return!1;let t=s.hostname.split(".").reverse();return e.some(r=>{let i=r.split(".").filter(Boolean).reverse();if(!i.length)return!1;for(let n=0;n<i.length;n++)if(t[n]!==i[n])return!1;return!0})},"isNoProxy"),JT=o((s,{proxy:e,noProxy:t})=>(s=new URL(s),e||(e=s.protocol==="https:"?Mr.https_proxy:Mr.https_proxy||Mr.http_proxy||Mr.proxy),t||(t=Mr.no_proxy),!e||XT(s,t)?null:new URL(e)),"getProxy");Tg.exports={getProxyAgent:YT,getProxy:JT,proxyCache:WT}});var Cg=m((bP,xg)=>{"use strict";var QT=require("net"),eA=require("tls"),{once:Ag}=require("events"),tA=require("timers/promises"),{normalizeOptions:sA,cacheOptions:rA}=xc(),{getProxy:iA,getProxyAgent:nA,proxyCache:nh}=ih(),kn=rh(),{Agent:oA}=kr();xg.exports=class extends oA{static{o(this,"Agent")}#e;#t;#s;#r;#i;constructor(e={}){let{timeouts:t,proxy:r,noProxy:i,...n}=sA(e);super(n),this.#e=n,this.#t=t,r&&(this.#s=new URL(r),this.#r=i,this.#i=nA(r))}get proxy(){return this.#s?{url:this.#s}:{}}#a(e){if(!this.#s)return;let t=iA(`${e.protocol}//${e.host}:${e.port}`,{proxy:this.#s,noProxy:this.#r});if(!t)return;let r=rA({...e,...this.#e,timeouts:this.#t,proxy:t});if(nh.has(r))return nh.get(r);let i=this.#i;Array.isArray(i)&&(i=this.isSecureEndpoint(e)?i[1]:i[0]);let n=new i(t,{...this.#e,socketOptions:{family:this.#e.family}});return nh.set(r,n),n}async#l({promises:e,options:t,timeout:r},i=new AbortController){if(r){let a=tA.setTimeout(r,null,{signal:i.signal}).then(()=>{throw new kn.ConnectionTimeoutError(`${t.host}:${t.port}`)}).catch(c=>{if(c.name!=="AbortError")throw c});e.push(a)}let n;try{n=await Promise.race(e),i.abort()}catch(a){throw i.abort(),a}return n}async connect(e,t){t.lookup??=this.#e.lookup;let r,i=this.#t.connection,n=this.isSecureEndpoint(t),a=this.#a(t);if(a){let l=Date.now();r=await this.#l({options:t,timeout:i,promises:[a.connect(e,t)]}),i&&(i=i-(Date.now()-l))}else r=(n?eA:QT).connect(t);r.setKeepAlive(this.keepAlive,this.keepAliveMsecs),r.setNoDelay(this.keepAlive);let c=new AbortController,{signal:h}=c,u=r[n?"secureConnecting":"connecting"]?Ag(r,n?"secureConnect":"connect",{signal:h}):Promise.resolve();return await this.#l({options:t,timeout:i,promises:[u,Ag(r,"error",{signal:h}).then(l=>{throw l[0]})]},c),this.#t.idle&&r.setTimeout(this.#t.idle,()=>{r.destroy(new kn.IdleTimeoutError(`${t.host}:${t.port}`))}),r}addRequest(e,t){let r=this.#a(t);if(r?.setRequestProps&&r.setRequestProps(e,t),e.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let i;e.once("finish",()=>{setTimeout(()=>{e.destroy(new kn.ResponseTimeoutError(e,this.#s))},this.#t.response)}),e.once("response",()=>{clearTimeout(i)})}if(this.#t.transfer){let i;e.once("response",n=>{setTimeout(()=>{n.destroy(new kn.TransferTimeoutError(e,this.#s))},this.#t.transfer),n.once("close",()=>{clearTimeout(i)})})}return super.addRequest(e,t)}}});var Lg=m((OP,Pg)=>{"use strict";var{LRUCache:aA}=gs(),{normalizeOptions:cA,cacheOptions:hA}=xc(),{getProxy:uA,proxyCache:Bg}=ih(),Ng=Ac(),Dn=Cg(),$r=new aA({max:20}),lA=o((s,{agent:e,proxy:t,noProxy:r,...i}={})=>{if(e!=null)return e;s=new URL(s);let n=uA(s,{proxy:t,noProxy:r}),a={...cA(i),proxy:n},c=hA({...a,secureEndpoint:s.protocol==="https:"});if($r.has(c))return $r.get(c);let h=new Dn(a);return $r.set(c,h),h},"getAgent");Pg.exports={getAgent:lA,Agent:Dn,HttpAgent:Dn,HttpsAgent:Dn,cache:{proxy:Bg,agent:$r,dns:Ng.cache,clear:o(()=>{Bg.clear(),$r.clear(),Ng.cache.clear()},"clear")}}});var kg=m((vP,fA)=>{fA.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}});var $n=m((TP,Mg)=>{var{Minipass:dA}=J(),Mn=Zs(),pA=Rm(),mA=St(),{log:Dg}=Im(),gA=Tc(),{getAgent:yA}=Lg(),oh=kg(),EA=`${oh.name}/${oh.version} (+https://npm.im/${oh.name})`,wA=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],SA=["request-timeout"],_A=o((s,e)=>{let t=yA(s.url,{...e,signal:void 0});s.headers.has("connection")||s.headers.set("connection",t?"keep-alive":"close"),s.headers.has("user-agent")||s.headers.set("user-agent",EA);let r={...e,agent:t,redirect:"manual"};return pA(async(i,n)=>{let a=new Mn.Request(s,r);try{let c=await Mn(a,r);if(r.integrity&&c.status===200){let l=mA.integrityStream({algorithms:r.algorithms,integrity:r.integrity,size:r.size}),f=new gA({events:["integrity","size"]},c.body,l);l.on("integrity",d=>f.emit("integrity",d)),l.on("size",d=>f.emit("size",d)),c=new Mn.Response(f,c),c.body.hasIntegrityEmitter=!0}c.headers.set("x-fetch-attempts",n);let h=dA.isStream(a.body);return a.method!=="POST"&&!h&&([408,420,429].includes(c.status)||c.status>=500)?(typeof e.onRetry=="function"&&e.onRetry(c),Dg.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.status}`),i(c)):c}catch(c){let h=c.code==="EPROMISERETRY"?c.retried.code:c.code,u=c.retried instanceof Mn.Response||wA.includes(h)&&SA.includes(c.type);if(a.method==="POST"||u)throw c;return typeof e.onRetry=="function"&&e.onRetry(c),Dg.http("fetch",`${a.method} ${a.url} attempt ${n} failed with ${c.code}`),i(c)}},e.retry).catch(i=>{if(i.status>=400&&i.type!=="system")return i;throw i})},"remoteFetch");Mg.exports=_A});var Hg=m((xP,jg)=>{var{Request:$g,Response:ah}=Zs(),{Minipass:Fg}=J(),bA=ui(),Qt=hm(),RA=require("url"),OA=Tc(),IA=jo(),ch=fm(),vA=$n(),Fr=o((s,e)=>Object.prototype.hasOwnProperty.call(s,e),"hasOwnProperty"),TA=["accept-charset","accept-encoding","accept-language","accept","cache-control"],Ug=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],qg=o((s,e,t)=>{let r={time:Date.now(),url:s.url,reqHeaders:{},resHeaders:{},options:{compress:t.compress!=null?t.compress:s.compress}};e.status!==200&&e.status!==304&&(r.status=e.status);for(let a of TA)s.headers.has(a)&&(r.reqHeaders[a]=s.headers.get(a));let i=s.headers.get("host"),n=new RA.URL(s.url);if(i&&n.host!==i&&(r.reqHeaders.host=i),e.headers.has("vary")){let a=e.headers.get("vary");if(a!=="*"){let c=a.trim().toLowerCase().split(/\s*,\s*/);for(let h of c)s.headers.has(h)&&(r.reqHeaders[h]=s.headers.get(h))}}for(let a of Ug)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));for(let a of t.cacheAdditionalHeaders)e.headers.has(a)&&(r.resHeaders[a]=e.headers.get(a));return r},"getMetadata"),Fn=Symbol("request"),qn=Symbol("response"),Un=Symbol("policy"),hh=class s{static{o(this,"CacheEntry")}constructor({entry:e,request:t,response:r,options:i}){e?(this.key=e.key,this.entry=e,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=ch(t),this.options=i,this[Fn]=t,this[qn]=r,this[Un]=null}static async find(e,t){try{var r=await Qt.index.compact(t.cachePath,ch(e),(n,a)=>{let c=new s({entry:n,options:t}),h=new s({entry:a,options:t});return c.policy.satisfies(h.request)},{validateEntry:o(n=>n.metadata&&n.metadata.resHeaders&&n.metadata.resHeaders["content-encoding"]===null?!1:n.integrity===null?!!(n.metadata&&n.metadata.status):!0,"validateEntry")})}catch{return}if(t.cache==="reload")return;let i;for(let n of r){let a=new s({entry:n,options:t});if(a.policy.satisfies(e)){i=a;break}}return i}static async invalidate(e,t){let r=ch(e);try{await Qt.rm.entry(t.cachePath,r,{removeFully:!0})}catch{}}get request(){return this[Fn]||(this[Fn]=new $g(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[Fn]}get response(){return this[qn]||(this[qn]=new ah(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[qn]}get policy(){return this[Un]||(this[Un]=new IA({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[Un]}async store(e){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let t=this.response.headers.get("content-length"),r={algorithms:this.options.algorithms,metadata:qg(this.request,this.response,this.options),size:t,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},i=null;if(this.response.status===200){let a,c,h=new Promise((l,f)=>{a=l,c=f}).catch(l=>{i.emit("error",l)});i=new OA({events:["integrity","size"]},new bA({flush(){return h}})),i.hasIntegrityEmitter=!0;let u=o(()=>{let l=new Fg,f=Qt.put.stream(this.options.cachePath,this.key,r);f.on("integrity",d=>i.emit("integrity",d)),f.on("size",d=>i.emit("size",d)),l.pipe(f),f.promise().then(a,c),i.unshift(l),i.unshift(this.response.body)},"onResume");i.once("resume",u),i.once("end",()=>i.removeListener("resume",u))}else await Qt.index.insert(this.options.cachePath,this.key,null,r);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",e),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new ah(i,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(e,t,r){let i;if(e==="HEAD"||[301,308].includes(this.response.status))i=this.response;else{let n=new Fg,a={...this.policy.responseHeaders()},c=o(()=>{let h=Qt.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});h.on("error",async u=>{h.pause(),u.code==="EINTEGRITY"&&await Qt.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(u.code==="ENOENT"||u.code==="EINTEGRITY")&&await s.invalidate(this.request,this.options),n.emit("error",u),h.resume()}),n.emit("integrity",this.entry.integrity),n.emit("size",Number(a["content-length"])),h.pipe(n)},"onResume");n.once("resume",c),n.once("end",()=>n.removeListener("resume",c)),i=new ah(n,{url:this.entry.metadata.url,counter:t.counter,status:200,headers:a})}return i.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),i.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),i.headers.set("x-local-cache-key",encodeURIComponent(this.key)),i.headers.set("x-local-cache-mode","stream"),i.headers.set("x-local-cache-status",r),i.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),i}async revalidate(e,t){let r=new $g(e,{headers:this.policy.revalidationHeaders(e)});try{var i=await vA(r,{...t,headers:void 0})}catch(a){if(!this.policy.mustRevalidate)return this.respond(e.method,t,"stale");throw a}if(this.policy.revalidated(r,i)){let a=qg(e,i,t);for(let c of Ug)!Fr(a.resHeaders,c)&&Fr(this.entry.metadata.resHeaders,c)&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]);for(let c of t.cacheAdditionalHeaders){let h=Fr(a.resHeaders,c),u=Fr(this.entry.metadata.resHeaders,c),l=Fr(this.policy.response.headers,c);!h&&u&&(a.resHeaders[c]=this.entry.metadata.resHeaders[c]),!l&&h&&(this.policy.response.headers[c]=a.resHeaders[c])}try{await Qt.index.insert(t.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:a})}catch{}return this.respond(e.method,t,"revalidated")}return new s({request:e,response:i,options:t}).store("updated")}};jg.exports=hh});var Vg=m((BP,Gg)=>{var{NotCachedError:AA}=ku(),uh=Hg(),xA=$n(),zg=o(async(s,e)=>{let t=await uh.find(s,e);if(!t){if(e.cache==="only-if-cached")throw new AA(s.url);let i=await xA(s,e);return new uh({request:s,response:i,options:e}).store("miss")}if(e.cache==="no-cache")return t.revalidate(s,e);let r=t.policy.needsRevalidation(s);return e.cache==="force-cache"||e.cache==="only-if-cached"||!r?t.respond(s.method,e,r?"stale":"hit"):t.revalidate(s,e)},"cacheFetch");zg.invalidate=async(s,e)=>{if(e.cachePath)return uh.invalidate(s,e)};Gg.exports=zg});var Yg=m((PP,Kg)=>{"use strict";var{FetchError:lh,Request:CA,isRedirect:BA}=Zs(),fh=require("url"),NA=jo(),Wg=Vg(),PA=$n(),LA=o((s,e,t)=>{if(!BA(e.status)||t.redirect==="manual")return!1;if(t.redirect==="error")throw new lh(`redirect mode is set to error: ${s.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!e.headers.has("location"))throw new lh(`redirect location header missing for: ${s.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(s.counter>=s.follow)throw new lh(`maximum redirect reached at: ${s.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),kA=o((s,e,t)=>{let r={...t},i=e.headers.get("location"),n=new fh.URL(i,/^https?:/.test(i)?void 0:s.url);return new fh.URL(s.url).hostname!==n.hostname&&(s.headers.delete("authorization"),s.headers.delete("cookie")),(e.status===303||s.method==="POST"&&[301,302].includes(e.status))&&(r.method="GET",r.body=null,s.headers.delete("content-length")),r.headers={},s.headers.forEach((c,h)=>{r.headers[h]=c}),r.counter=++s.counter,{request:new CA(fh.format(n),r),options:r}},"getRedirect"),Zg=o(async(s,e)=>{let t=NA.storable(s,e)?await Wg(s,e):await PA(s,e);if(!["GET","HEAD"].includes(s.method)&&t.status>=200&&t.status<=399&&await Wg.invalidate(s,e),!LA(s,t,e))return t;let r=kA(s,t,e);return Zg(r.request,r.options)},"fetch");Kg.exports=Zg});var Jg=m((kP,Ps)=>{var{FetchError:DA,Headers:MA,Request:Xg,Response:$A}=Zs(),FA=iu(),qA=Yg(),jn=o((s,e)=>{let t=FA(e),r=new Xg(s,t);return qA(r,t)},"makeFetchHappen");jn.defaults=(s,e={},t=jn)=>{typeof s=="object"&&(e=s,s=null);let r=o((i,n={})=>{let a=i||s,c={...e,...n,headers:{...e.headers,...n.headers}};return t(a,c)},"defaultedFetch");return r.defaults=(i,n={})=>jn.defaults(i,n,r),r};Ps.exports=jn;Ps.exports.FetchError=DA;Ps.exports.Headers=MA;Ps.exports.Request=Xg;Ps.exports.Response=$A});module.exports=Jg();
|
|
27
28
|
/*! Bundled license information:
|
|
28
29
|
|
|
29
30
|
negotiator/index.js:
|