@capgo/cli 7.94.8 → 7.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/dist/src/sdk.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ Expecting one of '${B.join("', '")}'`);if(this._lifeCycleHooks[A])this._lifeCycl
|
|
|
91
91
|
`),this.outputHelp({error:!0});let B=Q||{},D=B.exitCode||1,E=B.code||"commander.error";this._exit(D,E,A)}_parseOptionsEnv(){this.options.forEach((A)=>{if(A.envVar&&A.envVar in lD.env){let Q=A.attributeName();if(this.getOptionValue(Q)===void 0||["default","config","env"].includes(this.getOptionValueSource(Q)))if(A.required||A.optional)this.emit(`optionEnv:${A.name()}`,lD.env[A.envVar]);else this.emit(`optionEnv:${A.name()}`)}})}_parseOptionsImplied(){let A=new dkA(this.options),Q=(B)=>{return this.getOptionValue(B)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(B))};this.options.filter((B)=>B.implied!==void 0&&Q(B.attributeName())&&A.valueFromOption(this.getOptionValue(B.attributeName()),B)).forEach((B)=>{Object.keys(B.implied).filter((D)=>!Q(D)).forEach((D)=>{this.setOptionValueWithSource(D,B.implied[D],"implied")})})}missingArgument(A){let Q=`error: missing required argument '${A}'`;this.error(Q,{code:"commander.missingArgument"})}optionMissingArgument(A){let Q=`error: option '${A.flags}' argument missing`;this.error(Q,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(A){let Q=`error: required option '${A.flags}' not specified`;this.error(Q,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(A,Q){let B=(I)=>{let C=I.attributeName(),F=this.getOptionValue(C),$=this.options.find((U)=>U.negate&&C===U.attributeName()),J=this.options.find((U)=>!U.negate&&C===U.attributeName());if($&&($.presetArg===void 0&&F===!1||$.presetArg!==void 0&&F===$.presetArg))return $;return J||I},D=(I)=>{let C=B(I),F=C.attributeName();if(this.getOptionValueSource(F)==="env")return`environment variable '${C.envVar}'`;return`option '${C.flags}'`},E=`error: ${D(A)} cannot be used with ${D(Q)}`;this.error(E,{code:"commander.conflictingOption"})}unknownOption(A){if(this._allowUnknownOption)return;let Q="";if(A.startsWith("--")&&this._showSuggestionAfterError){let D=[],E=this;do{let I=E.createHelp().visibleOptions(E).filter((C)=>C.long).map((C)=>C.long);D=D.concat(I),E=E.parent}while(E&&!E._enablePositionalOptions);Q=Pe(A,D)}let B=`error: unknown option '${A}'${Q}`;this.error(B,{code:"commander.unknownOption"})}_excessArguments(A){if(this._allowExcessArguments)return;let Q=this.registeredArguments.length,B=Q===1?"":"s",E=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${Q} argument${B} but got ${A.length}.`;this.error(E,{code:"commander.excessArguments"})}unknownCommand(){let A=this.args[0],Q="";if(this._showSuggestionAfterError){let D=[];this.createHelp().visibleCommands(this).forEach((E)=>{if(D.push(E.name()),E.alias())D.push(E.alias())}),Q=Pe(A,D)}let B=`error: unknown command '${A}'${Q}`;this.error(B,{code:"commander.unknownCommand"})}version(A,Q,B){if(A===void 0)return this._version;this._version=A,Q=Q||"-V, --version",B=B||"output the version number";let D=this.createOption(Q,B);return this._versionOptionName=D.attributeName(),this._registerOption(D),this.on("option:"+D.name(),()=>{this._outputConfiguration.writeOut(`${A}
|
|
92
92
|
`),this._exit(0,"commander.version",A)}),this}description(A,Q){if(A===void 0&&Q===void 0)return this._description;if(this._description=A,Q)this._argsDescription=Q;return this}summary(A){if(A===void 0)return this._summary;return this._summary=A,this}alias(A){if(A===void 0)return this._aliases[0];let Q=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)Q=this.commands[this.commands.length-1];if(A===Q._name)throw Error("Command alias can't be the same as its name");let B=this.parent?._findCommand(A);if(B){let D=[B.name()].concat(B.aliases()).join("|");throw Error(`cannot add alias '${A}' to command '${this.name()}' as already have command '${D}'`)}return Q._aliases.push(A),this}aliases(A){if(A===void 0)return this._aliases;return A.forEach((Q)=>this.alias(Q)),this}usage(A){if(A===void 0){if(this._usage)return this._usage;let Q=this.registeredArguments.map((B)=>{return mkA(B)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?Q:[]).join(" ")}return this._usage=A,this}name(A){if(A===void 0)return this._name;return this._name=A,this}helpGroup(A){if(A===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=A,this}commandsGroup(A){if(A===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=A,this}optionsGroup(A){if(A===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=A,this}_initOptionGroup(A){if(this._defaultOptionGroup&&!A.helpGroupHeading)A.helpGroup(this._defaultOptionGroup)}_initCommandGroup(A){if(this._defaultCommandGroup&&!A.helpGroup())A.helpGroup(this._defaultCommandGroup)}nameFromFilename(A){return this._name=o4.basename(A,o4.extname(A)),this}executableDir(A){if(A===void 0)return this._executableDir;return this._executableDir=A,this}helpInformation(A){let Q=this.createHelp(),B=this._getOutputContext(A);Q.prepareContext({error:B.error,helpWidth:B.helpWidth,outputHasColors:B.hasColors});let D=Q.formatHelp(this,Q);if(B.hasColors)return D;return this._outputConfiguration.stripColor(D)}_getOutputContext(A){A=A||{};let Q=!!A.error,B,D,E;if(Q)B=(C)=>this._outputConfiguration.writeErr(C),D=this._outputConfiguration.getErrHasColors(),E=this._outputConfiguration.getErrHelpWidth();else B=(C)=>this._outputConfiguration.writeOut(C),D=this._outputConfiguration.getOutHasColors(),E=this._outputConfiguration.getOutHelpWidth();return{error:Q,write:(C)=>{if(!D)C=this._outputConfiguration.stripColor(C);return B(C)},hasColors:D,helpWidth:E}}outputHelp(A){let Q;if(typeof A==="function")Q=A,A=void 0;let B=this._getOutputContext(A),D={error:B.error,write:B.write,command:this};this._getCommandAndAncestors().reverse().forEach((I)=>I.emit("beforeAllHelp",D)),this.emit("beforeHelp",D);let E=this.helpInformation({error:B.error});if(Q){if(E=Q(E),typeof E!=="string"&&!Buffer.isBuffer(E))throw Error("outputHelp callback must return a string or a Buffer")}if(B.write(E),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",D),this._getCommandAndAncestors().forEach((I)=>I.emit("afterAllHelp",D))}helpOption(A,Q){if(typeof A==="boolean"){if(A){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(A??"-h, --help",Q??"display help for command"),A||Q)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(A){return this._helpOption=A,this._initOptionGroup(A),this}help(A){this.outputHelp(A);let Q=Number(lD.exitCode??0);if(Q===0&&A&&typeof A!=="function"&&A.error)Q=1;this._exit(Q,"commander.help","(outputHelp)")}addHelpText(A,Q){let B=["beforeAll","before","after","afterAll"];if(!B.includes(A))throw Error(`Unexpected value for position to addHelpText.
|
|
93
93
|
Expecting one of '${B.join("', '")}'`);let D=`${A}Help`;return this.on(D,(E)=>{let I;if(typeof Q==="function")I=Q({error:E.error,command:E.command});else I=Q;if(I)E.write(`${I}
|
|
94
|
-
`)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find((D)=>Q.is(D)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function _e(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,D="127.0.0.1",E="9229",I;if((I=Q.match(/^(--inspect(-brk)?)$/))!==null)B=I[1];else if((I=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=I[1],/^\d+$/.test(I[3]))E=I[3];else D=I[3];else if((I=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=I[1],D=I[3],E=I[4];if(B&&E!=="0")return`${B}=${D}:${parseInt(E)+1}`;return Q})}function jk(){if(lD.env.NO_COLOR||lD.env.FORCE_COLOR==="0"||lD.env.FORCE_COLOR==="false")return!1;if(lD.env.FORCE_COLOR||lD.env.CLICOLOR_FORCE!==void 0)return!0;return}pkA.Command=Pk;pkA.useColor=jk});var be=k((akA)=>{var{Argument:ke}=BN(),{Command:_k}=ve(),{CommanderError:rkA,InvalidArgumentError:xe}=mH(),{Help:okA}=zk(),{Option:ge}=Vk();akA.program=new _k;akA.createCommand=(A)=>new _k(A);akA.createOption=(A,Q)=>new ge(A,Q);akA.createArgument=(A,Q)=>new ke(A,Q);akA.Command=_k;akA.Option=ge;akA.Argument=ke;akA.Help=okA;akA.CommanderError=rkA;akA.InvalidArgumentError=xe;akA.InvalidOptionArgumentError=xe});var Y1;var J9=SA(()=>{Y1={name:"@capgo/cli",type:"module",version:"7.94.8",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts"',"lint:fix":'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.5","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.0.0","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^18.3.28","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^5.2.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.3.3",qrcode:"^1.5.4",react:"^18.3.1"}}});var CN=k((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.isNXMonorepo=fe.isMonorepo=fe.findPackageRelativePathInMonorepo=fe.findPackagePath=fe.findNXMonorepoRoot=fe.findMonorepoRoot=void 0;var cH=PA("node:fs"),K$=PA("node:path");function IN(A){let Q=(0,K$.join)(A,"package.json"),B=(0,K$.join)(A,"pnpm-workspace.yaml");if((0,cH.existsSync)(B)||(0,cH.existsSync)(Q)&&JSON.parse((0,cH.readFileSync)(Q,"utf-8")).workspaces)return A;let D=(0,K$.dirname)(A);if(D===A)throw Error("Monorepo root not found");return IN(D)}fe.findMonorepoRoot=IN;function vk(A){let Q=(0,K$.join)(A,"nx.json");if((0,cH.existsSync)(Q))return A;let B=(0,K$.dirname)(A);if(B===A)throw Error("Monorepo root not found");return vk(B)}fe.findNXMonorepoRoot=vk;function kk(A,Q,B){let D=(0,K$.join)(Q,"node_modules",A);if((0,cH.existsSync)(D))return D;if(Q===B)return null;let E=(0,K$.dirname)(Q);return kk(A,E,B)}fe.findPackagePath=kk;function GxA(A,Q){let B=IN(Q),D=kk(A,Q,B);if(D)return(0,K$.relative)(Q,D);return null}fe.findPackageRelativePathInMonorepo=GxA;function JxA(A){try{return IN(A),!0}catch(Q){return!1}}fe.isMonorepo=JxA;function YxA(A){try{return vk(A),!0}catch(Q){return!1}}fe.isNXMonorepo=YxA});import{existsSync as $8}from"fs";var lH=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,D=`${A}/bun.lock`,E=`${A}/pnpm-lock.yaml`,I=`${A}/shrinkwrap.yaml`,C=`${A}/yarn.lock`,F=`${A}/package-lock.json`,$=`${A}/npm-shrinkwrap.json`;if($8(B)||$8(D))return"bun";if($8(E)||$8(I))return"pnpm";if($8(C))return"yarn";if($8(F)||$8($))return"npm";return Q},FN=(A=lH(),Q=!1)=>{switch(A){case"bun":return Q?"bun install":"install";case"pnpm":return Q?"pnpm install":"install";case"yarn":return Q?"yarn install":"install";case"npm":return Q?"npm install":"install";case"unknown":return Q?"unknown unknown":"unknown";default:return Q?"npm install":"install"}},he=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,D=`${A}/bun.lock`,E=`${A}/pnpm-lock.yaml`,I=`${A}/shrinkwrap.yaml`,C=`${A}/yarn.lock`,F=`${A}/package-lock.json`,$=`${A}/npm-shrinkwrap.json`;if($8(B)||$8(D))return"bunx";if($8(E)||$8(I))return"pnpm exec";if($8(C))return"yarn dlx";if($8(F)||$8($))return"npx";return Q};var me=()=>{};function $N(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function de(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function gk(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let D=0;D<B;D++){let E=A[D],I=Q[D];if(E===void 0&&I===void 0)return 0;if(I===void 0)return 1;if(E===void 0)return-1;if(typeof E==="string"&&typeof I==="number")return 1;if(typeof E==="number"&&typeof I==="string")return-1;if(E<I)return-1;if(E>I)return 1}return 0}function bk(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function G8(A){return A.split(".").filter(Boolean).map((Q)=>{if(NxA.test(Q)){let B=Number(Q);if(bk(B))return B}return Q})}function nF(A){return A.split(".").filter(Boolean)}function JN(A,Q){let B=Number(A);if(!bk(B))throw TypeError(Q);return B}function a4(A){return Number.isNaN(A.major)&&Number.isNaN(A.minor)&&Number.isNaN(A.patch)&&(A.prerelease===void 0||A.prerelease.length===0)&&(A.build===void 0||A.build.length===0)}var m7="0|[1-9]\\d*",MxA="\\d*[a-zA-Z-][a-zA-Z0-9-]*",qxA,ce,pe,le="[0-9A-Za-z-]+",ne,ie,re,oe="(?:<|>)?=?",wxA="x|X|\\*",xk,GN,ae,se,yk=256,NxA;var u8=SA(()=>{qxA=`(?<major>${m7})\\.(?<minor>${m7})\\.(?<patch>${m7})`,ce=`(?:${m7}|${MxA})`,pe=`(?:-(?<prerelease>${ce}(?:\\.${ce})*))`,ne=`(?:\\+(?<buildmetadata>${le}(?:\\.${le})*))`,ie=`v?${qxA}${pe}?${ne}?`,re=new RegExp(`^${ie}$`),xk=`${m7}|${wxA}`,GN=`[v=\\s]*(?<major>${xk})(?:\\.(?<minor>${xk})(?:\\.(?<patch>${xk})${pe}?${ne}?)?)?`,ae=new RegExp(`^(?<operator>~>?|\\^|${oe})\\s*${GN}$`),se=new RegExp(`^(?<operator>${oe})\\s*(${ie})$|^$`);NxA=new RegExp(`^${m7}$`)});function b1(A,Q){if(A===Q)return 0;return $N(A.major,Q.major)||$N(A.minor,Q.minor)||$N(A.patch,Q.patch)||de(A.prerelease,Q.prerelease)||gk(A.prerelease,Q.prerelease)}var FC=SA(()=>{u8()});var te=SA(()=>{u8()});function fk(A){return A.toFixed(0)}function cI(A){let Q=fk(A.major),B=fk(A.minor),D=fk(A.patch),E=A.prerelease?.join(".")??"",I=A.build?.join(".")??"";return[[`${Q}.${B}.${D}`,E].filter(($)=>$).join("-"),I].filter(($)=>$).join("+")}function ZxA(A,Q){if(a4(Q))return!0;let B=b1(A,Q);switch(Q.operator){case"=":case void 0:return B===0;case"!=":return B!==0;case">":return B>0;case"<":return B<0;case">=":return B>=0;case"<=":return B<=0}}function YN(A,Q){for(let B of Q)if(!ZxA(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(a4(B))continue;if(!B.prerelease?.length)continue;let{major:D,minor:E,patch:I}=B;if(A.major===D&&A.minor===E&&A.patch===I)return!0}return!1}var UN=SA(()=>{u8();FC()});function dH(A,Q){return Q.some((B)=>YN(A,B))}var pH=SA(()=>{UN()});function LxA(A=[]){let Q=[...A],B=Q.length;while(B>=0){let D=Q[B];if(typeof D==="number"){Q[B]=D+1;break}B-=1}if(B===-1)Q.push(0);return Q}function nH(A=[],Q){let B=LxA(A);if(!Q)return B;let D=G8(Q);if(D.every((E)=>typeof E==="string")){if(D.every((E,I)=>E===B[I])&&typeof B[D.length]==="number")return B;D=[...D,0]}return D}function M$(A,Q,B={}){let D=B.build!==void 0?nF(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:nH(A.prerelease,B.prerelease),build:D};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:nH(A.prerelease,B.prerelease),build:D};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:nH(A.prerelease,B.prerelease),build:D};case"prerelease":{let I=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:I,prerelease:nH(A.prerelease,B.prerelease),build:D}}case"major":return{major:(A.prerelease??[]).length===0||A.minor!==0||A.patch!==0?A.major+1:A.major,minor:0,patch:0,prerelease:[],build:D};case"minor":{let I=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:I,patch:0,prerelease:[],build:D}}case"patch":{let I=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:I,prerelease:[],build:D}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:nH(A.prerelease,B.prerelease),build:D};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var ee=SA(()=>{u8()});var HN,c7;var iH=SA(()=>{HN={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},c7={operator:void 0,...HN}});var uk=SA(()=>{iH();u8()});function hk(A,Q){return b1(A,Q)>0}var mk=SA(()=>{FC()});var AAA=SA(()=>{pH();mk()});function h8(A,Q){return b1(A,Q)<0}var ck=SA(()=>{FC()});var QAA=SA(()=>{pH();ck()});function RxA(A){let B=A.match(se)?.groups;if(!B)return null;let{operator:D}=B;return{operator:D||void 0,...HN}}function z0(A){return!A||A.toLowerCase()==="x"||A==="*"}function OxA(A){if(z0(A.major))return;if(z0(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(z0(A.patch))return{operator:">=",major:+A.major,minor:+A.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:A.prerelease?G8(A.prerelease):[],build:[]}}function zxA(A){if(z0(A.major))return;if(z0(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(z0(A.patch))return{operator:"<",major:+A.major,minor:+A.minor+1,patch:0,prerelease:[],build:[]};if(A.prerelease)return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:G8(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function VxA(A){let Q=A.match(new RegExp(`^${GN}`)),B=Q?.groups;if(!B)return null;let D=Q[0].length,E=A.slice(D).match(/^\s+-\s+/);if(!E)return null;let I=E[0].length,F=A.slice(D+I).match(new RegExp(`^${GN}\\s*$`))?.groups,$=OxA(B),J=zxA(F);return[$,J].filter(Boolean)}function SxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D){if(E===0)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E+1,minor:0,patch:0}]}let F=G8(A.prerelease??"");if(E===0){if(I===0)return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I,patch:C+1}];return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I+1,patch:0}]}return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E+1,minor:0,patch:0}]}function TxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??"");return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I+1,patch:0}]}function jxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if(D)return[{operator:"<",major:E,minor:0,patch:0}];return[{operator:"<",major:E,minor:0,patch:0}]}if(D)return[{operator:"<",major:E,minor:I,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:"<",major:E,minor:I,patch:C,prerelease:F,build:$}]}function PxA(A){let Q=z0(A.minor),B=z0(A.patch),D=+A.major,E=+A.minor,I=+A.patch;if(Q)return[{operator:"<",major:D+1,minor:0,patch:0}];if(B)return[{operator:"<",major:D,minor:E+1,patch:0}];let C=G8(A.prerelease??""),F=nF(A.build??"");return[{operator:"<=",major:D,minor:E,patch:I,prerelease:C,build:F}]}function _xA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:">",major:E,minor:I,patch:C,prerelease:F,build:$}]}function vxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:">=",major:E,minor:I,patch:C,prerelease:F,build:$}]}function kxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:E,minor:I,patch:C,prerelease:F,build:$}]}function xxA(A){let Q=A.match(ae)?.groups;if(!Q)return RxA(A);switch(Q.operator){case"^":return SxA(Q);case"~":case"~>":return TxA(Q);case"<":return jxA(Q);case"<=":return PxA(Q);case">":return _xA(Q);case">=":return vxA(Q);default:return kxA(Q)}}function gxA(A){return A.split(/\s+/).flatMap(xxA)}function XN(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>VxA(B)||gxA(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var lk=SA(()=>{u8();iH()});function gB(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>yk)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${yk}`);A=A.trim();let Q=A.match(re)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=JN(Q.major,`Cannot parse version ${A}: invalid major version`),D=JN(Q.minor,`Cannot parse version ${A}: invalid minor version`),E=JN(Q.patch,`Cannot parse version ${A}: invalid patch version`),I=Q.prerelease?G8(Q.prerelease):[],C=Q.buildmetadata?nF(Q.buildmetadata):[];return{major:B,minor:D,patch:E,prerelease:I,build:C}}var WN=SA(()=>{u8();u8()});function BAA(A,Q){let B=A.operator,D=Q.operator;if(B===void 0){if(a4(A))return!0;return dH(A,[[Q]])}if(D===void 0){if(a4(Q))return!0;return dH(Q,[[A]])}let E=b1(A,Q);return(B===">="||B===">")&&(D===">="||D===">")||(B==="<="||B==="<")&&(D==="<="||D==="<")||E===0&&((B===">="||B==="<=")&&(D===">="||D==="<="))||E===-1&&(B===">="||B===">")&&(D==="<="||D==="<")||E===1&&(B==="<="||B==="<")&&(D===">="||D===">")}function bxA(A){return A.every((Q)=>{return Q.some((B)=>yxA(B))})}function yxA(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let D of A.slice(Q+1))if(!BAA(B,D))return!1}return!0}function DAA(A,Q){return bxA([A,Q])&&A.some((B)=>{return Q.some((D)=>{return B.every((E)=>{return D.every((I)=>BAA(E,I))})})})}var EAA=SA(()=>{u8();FC();pH()});var IAA=SA(()=>{lk()});var CAA=SA(()=>{iH();iH();uk()});function rH(A){try{return gB(A),!0}catch{return!1}}var FAA=SA(()=>{WN()});var $AA=SA(()=>{WN()});var GAA=SA(()=>{u8()});var JAA=SA(()=>{FC()});var YAA=SA(()=>{FC()});var UAA=SA(()=>{UN();u8();FC()});function HAA(A,Q){return b1(A,Q)>=0}var XAA=SA(()=>{FC()});var WAA=SA(()=>{UN();u8();FC()});var KAA=SA(()=>{FC()});var iF=SA(()=>{FC();te();pH();ee();uk();AAA();QAA();lk();WN();EAA();IAA();CAA();FAA();$AA();GAA();JAA();YAA();mk();UAA();XAA();ck();WAA();KAA()});var J8=k((OjQ,qN)=>{var MAA,qAA,wAA,NAA,ZAA,LAA,RAA,OAA,zAA,VAA,SAA,TAA,jAA,KN,dk,PAA,_AA,vAA,l7,kAA,xAA,gAA,bAA,yAA,fAA,uAA,hAA,mAA,MN,cAA,lAA,dAA;(function(A){var Q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(D){A(B(Q,B(D)))});else if(typeof qN==="object"&&typeof OjQ==="object")A(B(Q,B(OjQ)));else A(B(Q));function B(D,E){if(D!==Q)if(typeof Object.create==="function")Object.defineProperty(D,"__esModule",{value:!0});else D.__esModule=!0;return function(I,C){return D[I]=E?E(I,C):C}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,C){I.__proto__=C}||function(I,C){for(var F in C)if(Object.prototype.hasOwnProperty.call(C,F))I[F]=C[F]};MAA=function(I,C){if(typeof C!=="function"&&C!==null)throw TypeError("Class extends value "+String(C)+" is not a constructor or null");Q(I,C);function F(){this.constructor=I}I.prototype=C===null?Object.create(C):(F.prototype=C.prototype,new F)},qAA=Object.assign||function(I){for(var C,F=1,$=arguments.length;F<$;F++){C=arguments[F];for(var J in C)if(Object.prototype.hasOwnProperty.call(C,J))I[J]=C[J]}return I},wAA=function(I,C){var F={};for(var $ in I)if(Object.prototype.hasOwnProperty.call(I,$)&&C.indexOf($)<0)F[$]=I[$];if(I!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var J=0,$=Object.getOwnPropertySymbols(I);J<$.length;J++)if(C.indexOf($[J])<0&&Object.prototype.propertyIsEnumerable.call(I,$[J]))F[$[J]]=I[$[J]]}return F},NAA=function(I,C,F,$){var J=arguments.length,U=J<3?C:$===null?$=Object.getOwnPropertyDescriptor(C,F):$,H;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(I,C,F,$);else for(var W=I.length-1;W>=0;W--)if(H=I[W])U=(J<3?H(U):J>3?H(C,F,U):H(C,F))||U;return J>3&&U&&Object.defineProperty(C,F,U),U},ZAA=function(I,C){return function(F,$){C(F,$,I)}},LAA=function(I,C,F,$,J,U){function H(m){if(m!==void 0&&typeof m!=="function")throw TypeError("Function expected");return m}var W=$.kind,K=W==="getter"?"get":W==="setter"?"set":"value",q=!C&&I?$.static?I:I.prototype:null,N=C||(q?Object.getOwnPropertyDescriptor(q,$.name):{}),L,R=!1;for(var S=F.length-1;S>=0;S--){var z={};for(var V in $)z[V]=V==="access"?{}:$[V];for(var V in $.access)z.access[V]=$.access[V];z.addInitializer=function(m){if(R)throw TypeError("Cannot add initializers after decoration has completed");U.push(H(m||null))};var T=(0,F[S])(W==="accessor"?{get:N.get,set:N.set}:N[K],z);if(W==="accessor"){if(T===void 0)continue;if(T===null||typeof T!=="object")throw TypeError("Object expected");if(L=H(T.get))N.get=L;if(L=H(T.set))N.set=L;if(L=H(T.init))J.unshift(L)}else if(L=H(T))if(W==="field")J.unshift(L);else N[K]=L}if(q)Object.defineProperty(q,$.name,N);R=!0},RAA=function(I,C,F){var $=arguments.length>2;for(var J=0;J<C.length;J++)F=$?C[J].call(I,F):C[J].call(I);return $?F:void 0},OAA=function(I){return typeof I==="symbol"?I:"".concat(I)},zAA=function(I,C,F){if(typeof C==="symbol")C=C.description?"[".concat(C.description,"]"):"";return Object.defineProperty(I,"name",{configurable:!0,value:F?"".concat(F," ",C):C})},VAA=function(I,C){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(I,C)},SAA=function(I,C,F,$){function J(U){return U instanceof F?U:new F(function(H){H(U)})}return new(F||(F=Promise))(function(U,H){function W(N){try{q($.next(N))}catch(L){H(L)}}function K(N){try{q($.throw(N))}catch(L){H(L)}}function q(N){N.done?U(N.value):J(N.value).then(W,K)}q(($=$.apply(I,C||[])).next())})},TAA=function(I,C){var F={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},$,J,U,H=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return H.next=W(0),H.throw=W(1),H.return=W(2),typeof Symbol==="function"&&(H[Symbol.iterator]=function(){return this}),H;function W(q){return function(N){return K([q,N])}}function K(q){if($)throw TypeError("Generator is already executing.");while(H&&(H=0,q[0]&&(F=0)),F)try{if($=1,J&&(U=q[0]&2?J.return:q[0]?J.throw||((U=J.return)&&U.call(J),0):J.next)&&!(U=U.call(J,q[1])).done)return U;if(J=0,U)q=[q[0]&2,U.value];switch(q[0]){case 0:case 1:U=q;break;case 4:return F.label++,{value:q[1],done:!1};case 5:F.label++,J=q[1],q=[0];continue;case 7:q=F.ops.pop(),F.trys.pop();continue;default:if((U=F.trys,!(U=U.length>0&&U[U.length-1]))&&(q[0]===6||q[0]===2)){F=0;continue}if(q[0]===3&&(!U||q[1]>U[0]&&q[1]<U[3])){F.label=q[1];break}if(q[0]===6&&F.label<U[1]){F.label=U[1],U=q;break}if(U&&F.label<U[2]){F.label=U[2],F.ops.push(q);break}if(U[2])F.ops.pop();F.trys.pop();continue}q=C.call(I,F)}catch(N){q=[6,N],J=0}finally{$=U=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},jAA=function(I,C){for(var F in I)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(C,F))MN(C,I,F)},MN=Object.create?function(I,C,F,$){if($===void 0)$=F;var J=Object.getOwnPropertyDescriptor(C,F);if(!J||("get"in J?!C.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return C[F]}};Object.defineProperty(I,$,J)}:function(I,C,F,$){if($===void 0)$=F;I[$]=C[F]},KN=function(I){var C=typeof Symbol==="function"&&Symbol.iterator,F=C&&I[C],$=0;if(F)return F.call(I);if(I&&typeof I.length==="number")return{next:function(){if(I&&$>=I.length)I=void 0;return{value:I&&I[$++],done:!I}}};throw TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},dk=function(I,C){var F=typeof Symbol==="function"&&I[Symbol.iterator];if(!F)return I;var $=F.call(I),J,U=[],H;try{while((C===void 0||C-- >0)&&!(J=$.next()).done)U.push(J.value)}catch(W){H={error:W}}finally{try{if(J&&!J.done&&(F=$.return))F.call($)}finally{if(H)throw H.error}}return U},PAA=function(){for(var I=[],C=0;C<arguments.length;C++)I=I.concat(dk(arguments[C]));return I},_AA=function(){for(var I=0,C=0,F=arguments.length;C<F;C++)I+=arguments[C].length;for(var $=Array(I),J=0,C=0;C<F;C++)for(var U=arguments[C],H=0,W=U.length;H<W;H++,J++)$[J]=U[H];return $},vAA=function(I,C,F){if(F||arguments.length===2){for(var $=0,J=C.length,U;$<J;$++)if(U||!($ in C)){if(!U)U=Array.prototype.slice.call(C,0,$);U[$]=C[$]}}return I.concat(U||Array.prototype.slice.call(C))},l7=function(I){return this instanceof l7?(this.v=I,this):new l7(I)},kAA=function(I,C,F){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var $=F.apply(I,C||[]),J,U=[];return J=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),W("next"),W("throw"),W("return",H),J[Symbol.asyncIterator]=function(){return this},J;function H(S){return function(z){return Promise.resolve(z).then(S,L)}}function W(S,z){if($[S]){if(J[S]=function(V){return new Promise(function(T,m){U.push([S,V,T,m])>1||K(S,V)})},z)J[S]=z(J[S])}}function K(S,z){try{q($[S](z))}catch(V){R(U[0][3],V)}}function q(S){S.value instanceof l7?Promise.resolve(S.value.v).then(N,L):R(U[0][2],S)}function N(S){K("next",S)}function L(S){K("throw",S)}function R(S,z){if(S(z),U.shift(),U.length)K(U[0][0],U[0][1])}},xAA=function(I){var C,F;return C={},$("next"),$("throw",function(J){throw J}),$("return"),C[Symbol.iterator]=function(){return this},C;function $(J,U){C[J]=I[J]?function(H){return(F=!F)?{value:l7(I[J](H)),done:!1}:U?U(H):H}:U}},gAA=function(I){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var C=I[Symbol.asyncIterator],F;return C?C.call(I):(I=typeof KN==="function"?KN(I):I[Symbol.iterator](),F={},$("next"),$("throw"),$("return"),F[Symbol.asyncIterator]=function(){return this},F);function $(U){F[U]=I[U]&&function(H){return new Promise(function(W,K){H=I[U](H),J(W,K,H.done,H.value)})}}function J(U,H,W,K){Promise.resolve(K).then(function(q){U({value:q,done:W})},H)}},bAA=function(I,C){if(Object.defineProperty)Object.defineProperty(I,"raw",{value:C});else I.raw=C;return I};var B=Object.create?function(I,C){Object.defineProperty(I,"default",{enumerable:!0,value:C})}:function(I,C){I.default=C},D=function(I){return D=Object.getOwnPropertyNames||function(C){var F=[];for(var $ in C)if(Object.prototype.hasOwnProperty.call(C,$))F[F.length]=$;return F},D(I)};yAA=function(I){if(I&&I.__esModule)return I;var C={};if(I!=null){for(var F=D(I),$=0;$<F.length;$++)if(F[$]!=="default")MN(C,I,F[$])}return B(C,I),C},fAA=function(I){return I&&I.__esModule?I:{default:I}},uAA=function(I,C,F,$){if(F==="a"&&!$)throw TypeError("Private accessor was defined without a getter");if(typeof C==="function"?I!==C||!$:!C.has(I))throw TypeError("Cannot read private member from an object whose class did not declare it");return F==="m"?$:F==="a"?$.call(I):$?$.value:C.get(I)},hAA=function(I,C,F,$,J){if($==="m")throw TypeError("Private method is not writable");if($==="a"&&!J)throw TypeError("Private accessor was defined without a setter");if(typeof C==="function"?I!==C||!J:!C.has(I))throw TypeError("Cannot write private member to an object whose class did not declare it");return $==="a"?J.call(I,F):J?J.value=F:C.set(I,F),F},mAA=function(I,C){if(C===null||typeof C!=="object"&&typeof C!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof I==="function"?C===I:I.has(C)},cAA=function(I,C,F){if(C!==null&&C!==void 0){if(typeof C!=="object"&&typeof C!=="function")throw TypeError("Object expected.");var $,J;if(F){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");$=C[Symbol.asyncDispose]}if($===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if($=C[Symbol.dispose],F)J=$}if(typeof $!=="function")throw TypeError("Object not disposable.");if(J)$=function(){try{J.call(this)}catch(U){return Promise.reject(U)}};I.stack.push({value:C,dispose:$,async:F})}else if(F)I.stack.push({async:!0});return C};var E=typeof SuppressedError==="function"?SuppressedError:function(I,C,F){var $=Error(F);return $.name="SuppressedError",$.error=I,$.suppressed=C,$};lAA=function(I){function C(U){I.error=I.hasError?new E(U,I.error,"An error was suppressed during disposal."):U,I.hasError=!0}var F,$=0;function J(){while(F=I.stack.pop())try{if(!F.async&&$===1)return $=0,I.stack.push(F),Promise.resolve().then(J);if(F.dispose){var U=F.dispose.call(F.value);if(F.async)return $|=2,Promise.resolve(U).then(J,function(H){return C(H),J()})}else $|=1}catch(H){C(H)}if($===1)return I.hasError?Promise.reject(I.error):Promise.resolve();if(I.hasError)throw I.error}return J()},dAA=function(I,C){if(typeof I==="string"&&/^\.\.?\//.test(I))return I.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(F,$,J,U,H){return $?C?".jsx":".js":J&&(!U||!H)?F:J+U+"."+H.toLowerCase()+"js"});return I},A("__extends",MAA),A("__assign",qAA),A("__rest",wAA),A("__decorate",NAA),A("__param",ZAA),A("__esDecorate",LAA),A("__runInitializers",RAA),A("__propKey",OAA),A("__setFunctionName",zAA),A("__metadata",VAA),A("__awaiter",SAA),A("__generator",TAA),A("__exportStar",jAA),A("__createBinding",MN),A("__values",KN),A("__read",dk),A("__spread",PAA),A("__spreadArrays",_AA),A("__spreadArray",vAA),A("__await",l7),A("__asyncGenerator",kAA),A("__asyncDelegator",xAA),A("__asyncValues",gAA),A("__makeTemplateObject",bAA),A("__importStar",yAA),A("__importDefault",fAA),A("__classPrivateFieldGet",uAA),A("__classPrivateFieldSet",hAA),A("__classPrivateFieldIn",mAA),A("__addDisposableResource",cAA),A("__disposeResources",lAA),A("__rewriteRelativeImportExtension",dAA)})});var iAA=k((pAA)=>{Object.defineProperty(pAA,"__esModule",{value:!0});pAA.resolveFetch=void 0;var fxA=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};pAA.resolveFetch=fxA});var pk=k((tAA)=>{Object.defineProperty(tAA,"__esModule",{value:!0});tAA.FunctionRegion=tAA.FunctionsHttpError=tAA.FunctionsRelayError=tAA.FunctionsFetchError=tAA.FunctionsError=void 0;class oH extends Error{constructor(A,Q="FunctionsError",B){super(A);this.name=Q,this.context=B}toJSON(){return{name:this.name,message:this.message,context:this.context}}}tAA.FunctionsError=oH;class oAA extends oH{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}tAA.FunctionsFetchError=oAA;class aAA extends oH{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}tAA.FunctionsRelayError=aAA;class sAA extends oH{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}tAA.FunctionsHttpError=sAA;var rAA;(function(A){A.Any="any",A.ApNortheast1="ap-northeast-1",A.ApNortheast2="ap-northeast-2",A.ApSouth1="ap-south-1",A.ApSoutheast1="ap-southeast-1",A.ApSoutheast2="ap-southeast-2",A.CaCentral1="ca-central-1",A.EuCentral1="eu-central-1",A.EuWest1="eu-west-1",A.EuWest2="eu-west-2",A.EuWest3="eu-west-3",A.SaEast1="sa-east-1",A.UsEast1="us-east-1",A.UsWest1="us-west-1",A.UsWest2="us-west-2"})(rAA||(tAA.FunctionRegion=rAA={}))});var DQA=k((QQA)=>{Object.defineProperty(QQA,"__esModule",{value:!0});QQA.FunctionsClient=void 0;var lxA=J8(),dxA=iAA(),d7=pk();class AQA{constructor(A,{headers:Q={},customFetch:B,region:D=d7.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=D,this.fetch=(0,dxA.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return lxA.__awaiter(this,arguments,void 0,function*(Q,B={}){var D;let E,I;try{let{headers:C,method:F,body:$,signal:J,timeout:U}=B,H={},{region:W}=B;if(!W)W=this.region;let K=new URL(`${this.url}/${Q}`);if(W&&W!=="any")H["x-region"]=W,K.searchParams.set("forceFunctionRegion",W);let q;if($&&(C&&!Object.prototype.hasOwnProperty.call(C,"Content-Type")||!C))if(typeof Blob<"u"&&$ instanceof Blob||$ instanceof ArrayBuffer)H["Content-Type"]="application/octet-stream",q=$;else if(typeof $==="string")H["Content-Type"]="text/plain",q=$;else if(typeof FormData<"u"&&$ instanceof FormData)q=$;else H["Content-Type"]="application/json",q=JSON.stringify($);else if($&&typeof $!=="string"&&!(typeof Blob<"u"&&$ instanceof Blob)&&!($ instanceof ArrayBuffer)&&!(typeof FormData<"u"&&$ instanceof FormData))q=JSON.stringify($);else q=$;let N=J;if(U)if(I=new AbortController,E=setTimeout(()=>I.abort(),U),J)N=I.signal,J.addEventListener("abort",()=>I.abort());else N=I.signal;let L=yield this.fetch(K.toString(),{method:F||"POST",headers:Object.assign(Object.assign(Object.assign({},H),this.headers),C),body:q,signal:N}).catch((V)=>{throw new d7.FunctionsFetchError(V)}),R=L.headers.get("x-relay-error");if(R&&R==="true")throw new d7.FunctionsRelayError(L);if(!L.ok)throw new d7.FunctionsHttpError(L);let S=((D=L.headers.get("Content-Type"))!==null&&D!==void 0?D:"text/plain").split(";")[0].trim(),z;if(S==="application/json")z=yield L.json();else if(S==="application/octet-stream"||S==="application/pdf")z=yield L.blob();else if(S==="text/event-stream")z=L;else if(S==="multipart/form-data")z=yield L.formData();else z=yield L.text();return{data:z,error:null,response:L}}catch(C){return{data:null,error:C,response:C instanceof d7.FunctionsHttpError||C instanceof d7.FunctionsRelayError?C.context:void 0}}finally{if(E)clearTimeout(E)}})}}QQA.FunctionsClient=AQA});var EQA=k((q$)=>{Object.defineProperty(q$,"__esModule",{value:!0});q$.FunctionRegion=q$.FunctionsRelayError=q$.FunctionsHttpError=q$.FunctionsFetchError=q$.FunctionsError=q$.FunctionsClient=void 0;var pxA=DQA();Object.defineProperty(q$,"FunctionsClient",{enumerable:!0,get:function(){return pxA.FunctionsClient}});var aH=pk();Object.defineProperty(q$,"FunctionsError",{enumerable:!0,get:function(){return aH.FunctionsError}});Object.defineProperty(q$,"FunctionsFetchError",{enumerable:!0,get:function(){return aH.FunctionsFetchError}});Object.defineProperty(q$,"FunctionsHttpError",{enumerable:!0,get:function(){return aH.FunctionsHttpError}});Object.defineProperty(q$,"FunctionsRelayError",{enumerable:!0,get:function(){return aH.FunctionsRelayError}});Object.defineProperty(q$,"FunctionRegion",{enumerable:!0,get:function(){return aH.FunctionRegion}})});function CQA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let D=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",E),B()},A);function E(){clearTimeout(D),B()}Q===null||Q===void 0||Q.addEventListener("abort",E)})}function rxA(A,Q,B,D){if(!D||B>=3)return!1;if(!GQA.includes(A))return!1;if(!ixA.includes(Q))return!1;return!0}function sH(A){return sH=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},sH(A)}function txA(A,Q){if(sH(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var D=B.call(A,Q||"default");if(sH(D)!="object")return D;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function exA(A){var Q=txA(A,"string");return sH(Q)=="symbol"?Q:Q+""}function AgA(A,Q,B){return(Q=exA(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function $QA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(A);Q&&(D=D.filter(function(E){return Object.getOwnPropertyDescriptor(A,E).enumerable})),B.push.apply(B,D)}return B}function wN(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?$QA(Object(B),!0).forEach(function(D){AgA(A,D,B[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):$QA(Object(B)).forEach(function(D){Object.defineProperty(A,D,Object.getOwnPropertyDescriptor(B,D))})}return A}var IQA=(A)=>Math.min(1000*2**A,30000),ixA,GQA,JQA,oxA=class{constructor(A){var Q,B,D,E,I;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=A.method,this.url=A.url,this.headers=new Headers(A.headers),this.schema=A.schema,this.body=A.body,this.shouldThrowOnError=(Q=A.shouldThrowOnError)!==null&&Q!==void 0?Q:!1,this.signal=A.signal,this.isMaybeSingle=(B=A.isMaybeSingle)!==null&&B!==void 0?B:!1,this.shouldStripNulls=(D=A.shouldStripNulls)!==null&&D!==void 0?D:!1,this.urlLengthLimit=(E=A.urlLengthLimit)!==null&&E!==void 0?E:8000,this.retryEnabled=(I=A.retry)!==null&&I!==void 0?I:!0,A.fetch)this.fetch=A.fetch;else this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(A,Q){return this.headers=new Headers(this.headers),this.headers.set(A,Q),this}retry(A){return this.retryEnabled=A,this}then(A,Q){var B=this;if(this.schema===void 0);else if(["GET","HEAD"].includes(this.method))this.headers.set("Accept-Profile",this.schema);else this.headers.set("Content-Profile",this.schema);if(this.method!=="GET"&&this.method!=="HEAD")this.headers.set("Content-Type","application/json");if(this.shouldStripNulls){let C=this.headers.get("Accept");if(C==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!C||C==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let D=this.fetch,I=(async()=>{let C=0;while(!0){let J=new Headers(B.headers);if(C>0)J.set("X-Retry-Count",String(C));let U;try{U=await D(B.url.toString(),{method:B.method,headers:J,body:JSON.stringify(B.body,(H,W)=>typeof W==="bigint"?W.toString():W),signal:B.signal})}catch(H){if((H===null||H===void 0?void 0:H.name)==="AbortError"||(H===null||H===void 0?void 0:H.code)==="ABORT_ERR")throw H;if(!GQA.includes(B.method))throw H;if(B.retryEnabled&&C<3){let W=IQA(C);C++,await CQA(W,B.signal);continue}throw H}if(rxA(B.method,U.status,C,B.retryEnabled)){var F,$;let H=(F=($=U.headers)===null||$===void 0?void 0:$.get("Retry-After"))!==null&&F!==void 0?F:null,W=H!==null?Math.max(0,parseInt(H,10)||0)*1000:IQA(C);await U.text(),C++,await CQA(W,B.signal);continue}return await B.processResponse(U)}})();if(!this.shouldThrowOnError)I=I.catch((C)=>{var F;let $="",J="",U="",H=C===null||C===void 0?void 0:C.cause;if(H){var W,K,q,N;let S=(W=H===null||H===void 0?void 0:H.message)!==null&&W!==void 0?W:"",z=(K=H===null||H===void 0?void 0:H.code)!==null&&K!==void 0?K:"";if($=`${(q=C===null||C===void 0?void 0:C.name)!==null&&q!==void 0?q:"FetchError"}: ${C===null||C===void 0?void 0:C.message}`,$+=`
|
|
94
|
+
`)}),this}_outputHelpIfRequested(A){let Q=this._getHelpOption();if(Q&&A.find((D)=>Q.is(D)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function _e(A){return A.map((Q)=>{if(!Q.startsWith("--inspect"))return Q;let B,D="127.0.0.1",E="9229",I;if((I=Q.match(/^(--inspect(-brk)?)$/))!==null)B=I[1];else if((I=Q.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(B=I[1],/^\d+$/.test(I[3]))E=I[3];else D=I[3];else if((I=Q.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)B=I[1],D=I[3],E=I[4];if(B&&E!=="0")return`${B}=${D}:${parseInt(E)+1}`;return Q})}function jk(){if(lD.env.NO_COLOR||lD.env.FORCE_COLOR==="0"||lD.env.FORCE_COLOR==="false")return!1;if(lD.env.FORCE_COLOR||lD.env.CLICOLOR_FORCE!==void 0)return!0;return}pkA.Command=Pk;pkA.useColor=jk});var be=k((akA)=>{var{Argument:ke}=BN(),{Command:_k}=ve(),{CommanderError:rkA,InvalidArgumentError:xe}=mH(),{Help:okA}=zk(),{Option:ge}=Vk();akA.program=new _k;akA.createCommand=(A)=>new _k(A);akA.createOption=(A,Q)=>new ge(A,Q);akA.createArgument=(A,Q)=>new ke(A,Q);akA.Command=_k;akA.Option=ge;akA.Argument=ke;akA.Help=okA;akA.CommanderError=rkA;akA.InvalidArgumentError=xe;akA.InvalidOptionArgumentError=xe});var Y1;var J9=SA(()=>{Y1={name:"@capgo/cli",type:"module",version:"7.95.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts"',"lint:fix":'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.5","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.0.0","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^18.3.28","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^5.2.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.3.3",qrcode:"^1.5.4",react:"^18.3.1"}}});var CN=k((fe)=>{Object.defineProperty(fe,"__esModule",{value:!0});fe.isNXMonorepo=fe.isMonorepo=fe.findPackageRelativePathInMonorepo=fe.findPackagePath=fe.findNXMonorepoRoot=fe.findMonorepoRoot=void 0;var cH=PA("node:fs"),K$=PA("node:path");function IN(A){let Q=(0,K$.join)(A,"package.json"),B=(0,K$.join)(A,"pnpm-workspace.yaml");if((0,cH.existsSync)(B)||(0,cH.existsSync)(Q)&&JSON.parse((0,cH.readFileSync)(Q,"utf-8")).workspaces)return A;let D=(0,K$.dirname)(A);if(D===A)throw Error("Monorepo root not found");return IN(D)}fe.findMonorepoRoot=IN;function vk(A){let Q=(0,K$.join)(A,"nx.json");if((0,cH.existsSync)(Q))return A;let B=(0,K$.dirname)(A);if(B===A)throw Error("Monorepo root not found");return vk(B)}fe.findNXMonorepoRoot=vk;function kk(A,Q,B){let D=(0,K$.join)(Q,"node_modules",A);if((0,cH.existsSync)(D))return D;if(Q===B)return null;let E=(0,K$.dirname)(Q);return kk(A,E,B)}fe.findPackagePath=kk;function GxA(A,Q){let B=IN(Q),D=kk(A,Q,B);if(D)return(0,K$.relative)(Q,D);return null}fe.findPackageRelativePathInMonorepo=GxA;function JxA(A){try{return IN(A),!0}catch(Q){return!1}}fe.isMonorepo=JxA;function YxA(A){try{return vk(A),!0}catch(Q){return!1}}fe.isNXMonorepo=YxA});import{existsSync as $8}from"fs";var lH=(A=".",Q="unknown")=>{let B=`${A}/bun.lockb`,D=`${A}/bun.lock`,E=`${A}/pnpm-lock.yaml`,I=`${A}/shrinkwrap.yaml`,C=`${A}/yarn.lock`,F=`${A}/package-lock.json`,$=`${A}/npm-shrinkwrap.json`;if($8(B)||$8(D))return"bun";if($8(E)||$8(I))return"pnpm";if($8(C))return"yarn";if($8(F)||$8($))return"npm";return Q},FN=(A=lH(),Q=!1)=>{switch(A){case"bun":return Q?"bun install":"install";case"pnpm":return Q?"pnpm install":"install";case"yarn":return Q?"yarn install":"install";case"npm":return Q?"npm install":"install";case"unknown":return Q?"unknown unknown":"unknown";default:return Q?"npm install":"install"}},he=(A=".",Q="npx")=>{let B=`${A}/bun.lockb`,D=`${A}/bun.lock`,E=`${A}/pnpm-lock.yaml`,I=`${A}/shrinkwrap.yaml`,C=`${A}/yarn.lock`,F=`${A}/package-lock.json`,$=`${A}/npm-shrinkwrap.json`;if($8(B)||$8(D))return"bunx";if($8(E)||$8(I))return"pnpm exec";if($8(C))return"yarn dlx";if($8(F)||$8($))return"npx";return Q};var me=()=>{};function $N(A,Q){if(isNaN(A)||isNaN(Q))throw Error("Cannot compare against non-numbers");return A===Q?0:A<Q?-1:1}function de(A=[],Q=[]){if(A.length&&!Q.length)return-1;if(!A.length&&Q.length)return 1;return 0}function gk(A=[],Q=[]){let B=Math.max(A.length,Q.length);for(let D=0;D<B;D++){let E=A[D],I=Q[D];if(E===void 0&&I===void 0)return 0;if(I===void 0)return 1;if(E===void 0)return-1;if(typeof E==="string"&&typeof I==="number")return 1;if(typeof E==="number"&&typeof I==="string")return-1;if(E<I)return-1;if(E>I)return 1}return 0}function bk(A){return typeof A==="number"&&!Number.isNaN(A)&&(!Number.isFinite(A)||0<=A&&A<=Number.MAX_SAFE_INTEGER)}function G8(A){return A.split(".").filter(Boolean).map((Q)=>{if(NxA.test(Q)){let B=Number(Q);if(bk(B))return B}return Q})}function nF(A){return A.split(".").filter(Boolean)}function JN(A,Q){let B=Number(A);if(!bk(B))throw TypeError(Q);return B}function a4(A){return Number.isNaN(A.major)&&Number.isNaN(A.minor)&&Number.isNaN(A.patch)&&(A.prerelease===void 0||A.prerelease.length===0)&&(A.build===void 0||A.build.length===0)}var m7="0|[1-9]\\d*",MxA="\\d*[a-zA-Z-][a-zA-Z0-9-]*",qxA,ce,pe,le="[0-9A-Za-z-]+",ne,ie,re,oe="(?:<|>)?=?",wxA="x|X|\\*",xk,GN,ae,se,yk=256,NxA;var u8=SA(()=>{qxA=`(?<major>${m7})\\.(?<minor>${m7})\\.(?<patch>${m7})`,ce=`(?:${m7}|${MxA})`,pe=`(?:-(?<prerelease>${ce}(?:\\.${ce})*))`,ne=`(?:\\+(?<buildmetadata>${le}(?:\\.${le})*))`,ie=`v?${qxA}${pe}?${ne}?`,re=new RegExp(`^${ie}$`),xk=`${m7}|${wxA}`,GN=`[v=\\s]*(?<major>${xk})(?:\\.(?<minor>${xk})(?:\\.(?<patch>${xk})${pe}?${ne}?)?)?`,ae=new RegExp(`^(?<operator>~>?|\\^|${oe})\\s*${GN}$`),se=new RegExp(`^(?<operator>${oe})\\s*(${ie})$|^$`);NxA=new RegExp(`^${m7}$`)});function b1(A,Q){if(A===Q)return 0;return $N(A.major,Q.major)||$N(A.minor,Q.minor)||$N(A.patch,Q.patch)||de(A.prerelease,Q.prerelease)||gk(A.prerelease,Q.prerelease)}var FC=SA(()=>{u8()});var te=SA(()=>{u8()});function fk(A){return A.toFixed(0)}function cI(A){let Q=fk(A.major),B=fk(A.minor),D=fk(A.patch),E=A.prerelease?.join(".")??"",I=A.build?.join(".")??"";return[[`${Q}.${B}.${D}`,E].filter(($)=>$).join("-"),I].filter(($)=>$).join("+")}function ZxA(A,Q){if(a4(Q))return!0;let B=b1(A,Q);switch(Q.operator){case"=":case void 0:return B===0;case"!=":return B!==0;case">":return B>0;case"<":return B<0;case">=":return B>=0;case"<=":return B<=0}}function YN(A,Q){for(let B of Q)if(!ZxA(A,B))return!1;if(!A.prerelease?.length)return!0;for(let B of Q){if(a4(B))continue;if(!B.prerelease?.length)continue;let{major:D,minor:E,patch:I}=B;if(A.major===D&&A.minor===E&&A.patch===I)return!0}return!1}var UN=SA(()=>{u8();FC()});function dH(A,Q){return Q.some((B)=>YN(A,B))}var pH=SA(()=>{UN()});function LxA(A=[]){let Q=[...A],B=Q.length;while(B>=0){let D=Q[B];if(typeof D==="number"){Q[B]=D+1;break}B-=1}if(B===-1)Q.push(0);return Q}function nH(A=[],Q){let B=LxA(A);if(!Q)return B;let D=G8(Q);if(D.every((E)=>typeof E==="string")){if(D.every((E,I)=>E===B[I])&&typeof B[D.length]==="number")return B;D=[...D,0]}return D}function M$(A,Q,B={}){let D=B.build!==void 0?nF(B.build):A.build??[];switch(Q){case"premajor":return{major:A.major+1,minor:0,patch:0,prerelease:nH(A.prerelease,B.prerelease),build:D};case"preminor":return{major:A.major,minor:A.minor+1,patch:0,prerelease:nH(A.prerelease,B.prerelease),build:D};case"prepatch":return{major:A.major,minor:A.minor,patch:A.patch+1,prerelease:nH(A.prerelease,B.prerelease),build:D};case"prerelease":{let I=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:I,prerelease:nH(A.prerelease,B.prerelease),build:D}}case"major":return{major:(A.prerelease??[]).length===0||A.minor!==0||A.patch!==0?A.major+1:A.major,minor:0,patch:0,prerelease:[],build:D};case"minor":{let I=(A.prerelease??[]).length===0||A.patch!==0?A.minor+1:A.minor;return{major:A.major,minor:I,patch:0,prerelease:[],build:D}}case"patch":{let I=(A.prerelease??[]).length===0?A.patch+1:A.patch;return{major:A.major,minor:A.minor,patch:I,prerelease:[],build:D}}case"pre":return{major:A.major,minor:A.minor,patch:A.patch,prerelease:nH(A.prerelease,B.prerelease),build:D};default:throw TypeError(`Cannot increment version: invalid argument ${Q}`)}}var ee=SA(()=>{u8()});var HN,c7;var iH=SA(()=>{HN={major:Number.NaN,minor:Number.NaN,patch:Number.NaN,prerelease:[],build:[]},c7={operator:void 0,...HN}});var uk=SA(()=>{iH();u8()});function hk(A,Q){return b1(A,Q)>0}var mk=SA(()=>{FC()});var AAA=SA(()=>{pH();mk()});function h8(A,Q){return b1(A,Q)<0}var ck=SA(()=>{FC()});var QAA=SA(()=>{pH();ck()});function RxA(A){let B=A.match(se)?.groups;if(!B)return null;let{operator:D}=B;return{operator:D||void 0,...HN}}function z0(A){return!A||A.toLowerCase()==="x"||A==="*"}function OxA(A){if(z0(A.major))return;if(z0(A.minor))return{operator:">=",major:+A.major,minor:0,patch:0,prerelease:[],build:[]};if(z0(A.patch))return{operator:">=",major:+A.major,minor:+A.minor,patch:0,prerelease:[],build:[]};return{operator:">=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:A.prerelease?G8(A.prerelease):[],build:[]}}function zxA(A){if(z0(A.major))return;if(z0(A.minor))return{operator:"<",major:+A.major+1,minor:0,patch:0,prerelease:[],build:[]};if(z0(A.patch))return{operator:"<",major:+A.major,minor:+A.minor+1,patch:0,prerelease:[],build:[]};if(A.prerelease)return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:G8(A.prerelease),build:[]};return{operator:"<=",major:+A.major,minor:+A.minor,patch:+A.patch,prerelease:[],build:[]}}function VxA(A){let Q=A.match(new RegExp(`^${GN}`)),B=Q?.groups;if(!B)return null;let D=Q[0].length,E=A.slice(D).match(/^\s+-\s+/);if(!E)return null;let I=E[0].length,F=A.slice(D+I).match(new RegExp(`^${GN}\\s*$`))?.groups,$=OxA(B),J=zxA(F);return[$,J].filter(Boolean)}function SxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D){if(E===0)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E+1,minor:0,patch:0}]}let F=G8(A.prerelease??"");if(E===0){if(I===0)return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I,patch:C+1}];return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I+1,patch:0}]}return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E+1,minor:0,patch:0}]}function TxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??"");return[{operator:">=",major:E,minor:I,patch:C,prerelease:F},{operator:"<",major:E,minor:I+1,patch:0}]}function jxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B){if(D)return[{operator:"<",major:E,minor:0,patch:0}];return[{operator:"<",major:E,minor:0,patch:0}]}if(D)return[{operator:"<",major:E,minor:I,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:"<",major:E,minor:I,patch:C,prerelease:F,build:$}]}function PxA(A){let Q=z0(A.minor),B=z0(A.patch),D=+A.major,E=+A.minor,I=+A.patch;if(Q)return[{operator:"<",major:D+1,minor:0,patch:0}];if(B)return[{operator:"<",major:D,minor:E+1,patch:0}];let C=G8(A.prerelease??""),F=nF(A.build??"");return[{operator:"<=",major:D,minor:E,patch:I,prerelease:C,build:F}]}function _xA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[{operator:"<",major:0,minor:0,patch:0}];if(B)return[{operator:">=",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:">",major:E,minor:I,patch:C,prerelease:F,build:$}]}function vxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:">=",major:E,minor:I,patch:C,prerelease:F,build:$}]}function kxA(A){let Q=z0(A.major),B=z0(A.minor),D=z0(A.patch),E=+A.major,I=+A.minor,C=+A.patch;if(Q)return[c7];if(B)return[{operator:">=",major:E,minor:0,patch:0},{operator:"<",major:E+1,minor:0,patch:0}];if(D)return[{operator:">=",major:E,minor:I,patch:0},{operator:"<",major:E,minor:I+1,patch:0}];let F=G8(A.prerelease??""),$=nF(A.build??"");return[{operator:A.operator==="="?"=":void 0,major:E,minor:I,patch:C,prerelease:F,build:$}]}function xxA(A){let Q=A.match(ae)?.groups;if(!Q)return RxA(A);switch(Q.operator){case"^":return SxA(Q);case"~":case"~>":return TxA(Q);case"<":return jxA(Q);case"<=":return PxA(Q);case">":return _xA(Q);case">=":return vxA(Q);default:return kxA(Q)}}function gxA(A){return A.split(/\s+/).flatMap(xxA)}function XN(A){let Q=A.replaceAll(/(?<=[<>=~^])(\s+)/g,"").split(/\s*\|\|\s*/).map((B)=>VxA(B)||gxA(B));if(Q.some((B)=>B.includes(null)))throw TypeError(`Cannot parse version range: range "${A}" is invalid`);return Q}var lk=SA(()=>{u8();iH()});function gB(A){if(typeof A!=="string")throw TypeError(`Cannot parse version as version must be a string: received ${typeof A}`);if(A.length>yk)throw TypeError(`Cannot parse version as version length is too long: length is ${A.length}, max length is ${yk}`);A=A.trim();let Q=A.match(re)?.groups;if(!Q)throw TypeError(`Cannot parse version: ${A}`);let B=JN(Q.major,`Cannot parse version ${A}: invalid major version`),D=JN(Q.minor,`Cannot parse version ${A}: invalid minor version`),E=JN(Q.patch,`Cannot parse version ${A}: invalid patch version`),I=Q.prerelease?G8(Q.prerelease):[],C=Q.buildmetadata?nF(Q.buildmetadata):[];return{major:B,minor:D,patch:E,prerelease:I,build:C}}var WN=SA(()=>{u8();u8()});function BAA(A,Q){let B=A.operator,D=Q.operator;if(B===void 0){if(a4(A))return!0;return dH(A,[[Q]])}if(D===void 0){if(a4(Q))return!0;return dH(Q,[[A]])}let E=b1(A,Q);return(B===">="||B===">")&&(D===">="||D===">")||(B==="<="||B==="<")&&(D==="<="||D==="<")||E===0&&((B===">="||B==="<=")&&(D===">="||D==="<="))||E===-1&&(B===">="||B===">")&&(D==="<="||D==="<")||E===1&&(B==="<="||B==="<")&&(D===">="||D===">")}function bxA(A){return A.every((Q)=>{return Q.some((B)=>yxA(B))})}function yxA(A){for(let Q=0;Q<A.length-1;Q++){let B=A[Q];for(let D of A.slice(Q+1))if(!BAA(B,D))return!1}return!0}function DAA(A,Q){return bxA([A,Q])&&A.some((B)=>{return Q.some((D)=>{return B.every((E)=>{return D.every((I)=>BAA(E,I))})})})}var EAA=SA(()=>{u8();FC();pH()});var IAA=SA(()=>{lk()});var CAA=SA(()=>{iH();iH();uk()});function rH(A){try{return gB(A),!0}catch{return!1}}var FAA=SA(()=>{WN()});var $AA=SA(()=>{WN()});var GAA=SA(()=>{u8()});var JAA=SA(()=>{FC()});var YAA=SA(()=>{FC()});var UAA=SA(()=>{UN();u8();FC()});function HAA(A,Q){return b1(A,Q)>=0}var XAA=SA(()=>{FC()});var WAA=SA(()=>{UN();u8();FC()});var KAA=SA(()=>{FC()});var iF=SA(()=>{FC();te();pH();ee();uk();AAA();QAA();lk();WN();EAA();IAA();CAA();FAA();$AA();GAA();JAA();YAA();mk();UAA();XAA();ck();WAA();KAA()});var J8=k((OjQ,qN)=>{var MAA,qAA,wAA,NAA,ZAA,LAA,RAA,OAA,zAA,VAA,SAA,TAA,jAA,KN,dk,PAA,_AA,vAA,l7,kAA,xAA,gAA,bAA,yAA,fAA,uAA,hAA,mAA,MN,cAA,lAA,dAA;(function(A){var Q=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(D){A(B(Q,B(D)))});else if(typeof qN==="object"&&typeof OjQ==="object")A(B(Q,B(OjQ)));else A(B(Q));function B(D,E){if(D!==Q)if(typeof Object.create==="function")Object.defineProperty(D,"__esModule",{value:!0});else D.__esModule=!0;return function(I,C){return D[I]=E?E(I,C):C}}})(function(A){var Q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,C){I.__proto__=C}||function(I,C){for(var F in C)if(Object.prototype.hasOwnProperty.call(C,F))I[F]=C[F]};MAA=function(I,C){if(typeof C!=="function"&&C!==null)throw TypeError("Class extends value "+String(C)+" is not a constructor or null");Q(I,C);function F(){this.constructor=I}I.prototype=C===null?Object.create(C):(F.prototype=C.prototype,new F)},qAA=Object.assign||function(I){for(var C,F=1,$=arguments.length;F<$;F++){C=arguments[F];for(var J in C)if(Object.prototype.hasOwnProperty.call(C,J))I[J]=C[J]}return I},wAA=function(I,C){var F={};for(var $ in I)if(Object.prototype.hasOwnProperty.call(I,$)&&C.indexOf($)<0)F[$]=I[$];if(I!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var J=0,$=Object.getOwnPropertySymbols(I);J<$.length;J++)if(C.indexOf($[J])<0&&Object.prototype.propertyIsEnumerable.call(I,$[J]))F[$[J]]=I[$[J]]}return F},NAA=function(I,C,F,$){var J=arguments.length,U=J<3?C:$===null?$=Object.getOwnPropertyDescriptor(C,F):$,H;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(I,C,F,$);else for(var W=I.length-1;W>=0;W--)if(H=I[W])U=(J<3?H(U):J>3?H(C,F,U):H(C,F))||U;return J>3&&U&&Object.defineProperty(C,F,U),U},ZAA=function(I,C){return function(F,$){C(F,$,I)}},LAA=function(I,C,F,$,J,U){function H(m){if(m!==void 0&&typeof m!=="function")throw TypeError("Function expected");return m}var W=$.kind,K=W==="getter"?"get":W==="setter"?"set":"value",q=!C&&I?$.static?I:I.prototype:null,N=C||(q?Object.getOwnPropertyDescriptor(q,$.name):{}),L,R=!1;for(var S=F.length-1;S>=0;S--){var z={};for(var V in $)z[V]=V==="access"?{}:$[V];for(var V in $.access)z.access[V]=$.access[V];z.addInitializer=function(m){if(R)throw TypeError("Cannot add initializers after decoration has completed");U.push(H(m||null))};var T=(0,F[S])(W==="accessor"?{get:N.get,set:N.set}:N[K],z);if(W==="accessor"){if(T===void 0)continue;if(T===null||typeof T!=="object")throw TypeError("Object expected");if(L=H(T.get))N.get=L;if(L=H(T.set))N.set=L;if(L=H(T.init))J.unshift(L)}else if(L=H(T))if(W==="field")J.unshift(L);else N[K]=L}if(q)Object.defineProperty(q,$.name,N);R=!0},RAA=function(I,C,F){var $=arguments.length>2;for(var J=0;J<C.length;J++)F=$?C[J].call(I,F):C[J].call(I);return $?F:void 0},OAA=function(I){return typeof I==="symbol"?I:"".concat(I)},zAA=function(I,C,F){if(typeof C==="symbol")C=C.description?"[".concat(C.description,"]"):"";return Object.defineProperty(I,"name",{configurable:!0,value:F?"".concat(F," ",C):C})},VAA=function(I,C){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(I,C)},SAA=function(I,C,F,$){function J(U){return U instanceof F?U:new F(function(H){H(U)})}return new(F||(F=Promise))(function(U,H){function W(N){try{q($.next(N))}catch(L){H(L)}}function K(N){try{q($.throw(N))}catch(L){H(L)}}function q(N){N.done?U(N.value):J(N.value).then(W,K)}q(($=$.apply(I,C||[])).next())})},TAA=function(I,C){var F={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},$,J,U,H=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return H.next=W(0),H.throw=W(1),H.return=W(2),typeof Symbol==="function"&&(H[Symbol.iterator]=function(){return this}),H;function W(q){return function(N){return K([q,N])}}function K(q){if($)throw TypeError("Generator is already executing.");while(H&&(H=0,q[0]&&(F=0)),F)try{if($=1,J&&(U=q[0]&2?J.return:q[0]?J.throw||((U=J.return)&&U.call(J),0):J.next)&&!(U=U.call(J,q[1])).done)return U;if(J=0,U)q=[q[0]&2,U.value];switch(q[0]){case 0:case 1:U=q;break;case 4:return F.label++,{value:q[1],done:!1};case 5:F.label++,J=q[1],q=[0];continue;case 7:q=F.ops.pop(),F.trys.pop();continue;default:if((U=F.trys,!(U=U.length>0&&U[U.length-1]))&&(q[0]===6||q[0]===2)){F=0;continue}if(q[0]===3&&(!U||q[1]>U[0]&&q[1]<U[3])){F.label=q[1];break}if(q[0]===6&&F.label<U[1]){F.label=U[1],U=q;break}if(U&&F.label<U[2]){F.label=U[2],F.ops.push(q);break}if(U[2])F.ops.pop();F.trys.pop();continue}q=C.call(I,F)}catch(N){q=[6,N],J=0}finally{$=U=0}if(q[0]&5)throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}},jAA=function(I,C){for(var F in I)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(C,F))MN(C,I,F)},MN=Object.create?function(I,C,F,$){if($===void 0)$=F;var J=Object.getOwnPropertyDescriptor(C,F);if(!J||("get"in J?!C.__esModule:J.writable||J.configurable))J={enumerable:!0,get:function(){return C[F]}};Object.defineProperty(I,$,J)}:function(I,C,F,$){if($===void 0)$=F;I[$]=C[F]},KN=function(I){var C=typeof Symbol==="function"&&Symbol.iterator,F=C&&I[C],$=0;if(F)return F.call(I);if(I&&typeof I.length==="number")return{next:function(){if(I&&$>=I.length)I=void 0;return{value:I&&I[$++],done:!I}}};throw TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},dk=function(I,C){var F=typeof Symbol==="function"&&I[Symbol.iterator];if(!F)return I;var $=F.call(I),J,U=[],H;try{while((C===void 0||C-- >0)&&!(J=$.next()).done)U.push(J.value)}catch(W){H={error:W}}finally{try{if(J&&!J.done&&(F=$.return))F.call($)}finally{if(H)throw H.error}}return U},PAA=function(){for(var I=[],C=0;C<arguments.length;C++)I=I.concat(dk(arguments[C]));return I},_AA=function(){for(var I=0,C=0,F=arguments.length;C<F;C++)I+=arguments[C].length;for(var $=Array(I),J=0,C=0;C<F;C++)for(var U=arguments[C],H=0,W=U.length;H<W;H++,J++)$[J]=U[H];return $},vAA=function(I,C,F){if(F||arguments.length===2){for(var $=0,J=C.length,U;$<J;$++)if(U||!($ in C)){if(!U)U=Array.prototype.slice.call(C,0,$);U[$]=C[$]}}return I.concat(U||Array.prototype.slice.call(C))},l7=function(I){return this instanceof l7?(this.v=I,this):new l7(I)},kAA=function(I,C,F){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var $=F.apply(I,C||[]),J,U=[];return J=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),W("next"),W("throw"),W("return",H),J[Symbol.asyncIterator]=function(){return this},J;function H(S){return function(z){return Promise.resolve(z).then(S,L)}}function W(S,z){if($[S]){if(J[S]=function(V){return new Promise(function(T,m){U.push([S,V,T,m])>1||K(S,V)})},z)J[S]=z(J[S])}}function K(S,z){try{q($[S](z))}catch(V){R(U[0][3],V)}}function q(S){S.value instanceof l7?Promise.resolve(S.value.v).then(N,L):R(U[0][2],S)}function N(S){K("next",S)}function L(S){K("throw",S)}function R(S,z){if(S(z),U.shift(),U.length)K(U[0][0],U[0][1])}},xAA=function(I){var C,F;return C={},$("next"),$("throw",function(J){throw J}),$("return"),C[Symbol.iterator]=function(){return this},C;function $(J,U){C[J]=I[J]?function(H){return(F=!F)?{value:l7(I[J](H)),done:!1}:U?U(H):H}:U}},gAA=function(I){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var C=I[Symbol.asyncIterator],F;return C?C.call(I):(I=typeof KN==="function"?KN(I):I[Symbol.iterator](),F={},$("next"),$("throw"),$("return"),F[Symbol.asyncIterator]=function(){return this},F);function $(U){F[U]=I[U]&&function(H){return new Promise(function(W,K){H=I[U](H),J(W,K,H.done,H.value)})}}function J(U,H,W,K){Promise.resolve(K).then(function(q){U({value:q,done:W})},H)}},bAA=function(I,C){if(Object.defineProperty)Object.defineProperty(I,"raw",{value:C});else I.raw=C;return I};var B=Object.create?function(I,C){Object.defineProperty(I,"default",{enumerable:!0,value:C})}:function(I,C){I.default=C},D=function(I){return D=Object.getOwnPropertyNames||function(C){var F=[];for(var $ in C)if(Object.prototype.hasOwnProperty.call(C,$))F[F.length]=$;return F},D(I)};yAA=function(I){if(I&&I.__esModule)return I;var C={};if(I!=null){for(var F=D(I),$=0;$<F.length;$++)if(F[$]!=="default")MN(C,I,F[$])}return B(C,I),C},fAA=function(I){return I&&I.__esModule?I:{default:I}},uAA=function(I,C,F,$){if(F==="a"&&!$)throw TypeError("Private accessor was defined without a getter");if(typeof C==="function"?I!==C||!$:!C.has(I))throw TypeError("Cannot read private member from an object whose class did not declare it");return F==="m"?$:F==="a"?$.call(I):$?$.value:C.get(I)},hAA=function(I,C,F,$,J){if($==="m")throw TypeError("Private method is not writable");if($==="a"&&!J)throw TypeError("Private accessor was defined without a setter");if(typeof C==="function"?I!==C||!J:!C.has(I))throw TypeError("Cannot write private member to an object whose class did not declare it");return $==="a"?J.call(I,F):J?J.value=F:C.set(I,F),F},mAA=function(I,C){if(C===null||typeof C!=="object"&&typeof C!=="function")throw TypeError("Cannot use 'in' operator on non-object");return typeof I==="function"?C===I:I.has(C)},cAA=function(I,C,F){if(C!==null&&C!==void 0){if(typeof C!=="object"&&typeof C!=="function")throw TypeError("Object expected.");var $,J;if(F){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");$=C[Symbol.asyncDispose]}if($===void 0){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");if($=C[Symbol.dispose],F)J=$}if(typeof $!=="function")throw TypeError("Object not disposable.");if(J)$=function(){try{J.call(this)}catch(U){return Promise.reject(U)}};I.stack.push({value:C,dispose:$,async:F})}else if(F)I.stack.push({async:!0});return C};var E=typeof SuppressedError==="function"?SuppressedError:function(I,C,F){var $=Error(F);return $.name="SuppressedError",$.error=I,$.suppressed=C,$};lAA=function(I){function C(U){I.error=I.hasError?new E(U,I.error,"An error was suppressed during disposal."):U,I.hasError=!0}var F,$=0;function J(){while(F=I.stack.pop())try{if(!F.async&&$===1)return $=0,I.stack.push(F),Promise.resolve().then(J);if(F.dispose){var U=F.dispose.call(F.value);if(F.async)return $|=2,Promise.resolve(U).then(J,function(H){return C(H),J()})}else $|=1}catch(H){C(H)}if($===1)return I.hasError?Promise.reject(I.error):Promise.resolve();if(I.hasError)throw I.error}return J()},dAA=function(I,C){if(typeof I==="string"&&/^\.\.?\//.test(I))return I.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(F,$,J,U,H){return $?C?".jsx":".js":J&&(!U||!H)?F:J+U+"."+H.toLowerCase()+"js"});return I},A("__extends",MAA),A("__assign",qAA),A("__rest",wAA),A("__decorate",NAA),A("__param",ZAA),A("__esDecorate",LAA),A("__runInitializers",RAA),A("__propKey",OAA),A("__setFunctionName",zAA),A("__metadata",VAA),A("__awaiter",SAA),A("__generator",TAA),A("__exportStar",jAA),A("__createBinding",MN),A("__values",KN),A("__read",dk),A("__spread",PAA),A("__spreadArrays",_AA),A("__spreadArray",vAA),A("__await",l7),A("__asyncGenerator",kAA),A("__asyncDelegator",xAA),A("__asyncValues",gAA),A("__makeTemplateObject",bAA),A("__importStar",yAA),A("__importDefault",fAA),A("__classPrivateFieldGet",uAA),A("__classPrivateFieldSet",hAA),A("__classPrivateFieldIn",mAA),A("__addDisposableResource",cAA),A("__disposeResources",lAA),A("__rewriteRelativeImportExtension",dAA)})});var iAA=k((pAA)=>{Object.defineProperty(pAA,"__esModule",{value:!0});pAA.resolveFetch=void 0;var fxA=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)};pAA.resolveFetch=fxA});var pk=k((tAA)=>{Object.defineProperty(tAA,"__esModule",{value:!0});tAA.FunctionRegion=tAA.FunctionsHttpError=tAA.FunctionsRelayError=tAA.FunctionsFetchError=tAA.FunctionsError=void 0;class oH extends Error{constructor(A,Q="FunctionsError",B){super(A);this.name=Q,this.context=B}toJSON(){return{name:this.name,message:this.message,context:this.context}}}tAA.FunctionsError=oH;class oAA extends oH{constructor(A){super("Failed to send a request to the Edge Function","FunctionsFetchError",A)}}tAA.FunctionsFetchError=oAA;class aAA extends oH{constructor(A){super("Relay Error invoking the Edge Function","FunctionsRelayError",A)}}tAA.FunctionsRelayError=aAA;class sAA extends oH{constructor(A){super("Edge Function returned a non-2xx status code","FunctionsHttpError",A)}}tAA.FunctionsHttpError=sAA;var rAA;(function(A){A.Any="any",A.ApNortheast1="ap-northeast-1",A.ApNortheast2="ap-northeast-2",A.ApSouth1="ap-south-1",A.ApSoutheast1="ap-southeast-1",A.ApSoutheast2="ap-southeast-2",A.CaCentral1="ca-central-1",A.EuCentral1="eu-central-1",A.EuWest1="eu-west-1",A.EuWest2="eu-west-2",A.EuWest3="eu-west-3",A.SaEast1="sa-east-1",A.UsEast1="us-east-1",A.UsWest1="us-west-1",A.UsWest2="us-west-2"})(rAA||(tAA.FunctionRegion=rAA={}))});var DQA=k((QQA)=>{Object.defineProperty(QQA,"__esModule",{value:!0});QQA.FunctionsClient=void 0;var lxA=J8(),dxA=iAA(),d7=pk();class AQA{constructor(A,{headers:Q={},customFetch:B,region:D=d7.FunctionRegion.Any}={}){this.url=A,this.headers=Q,this.region=D,this.fetch=(0,dxA.resolveFetch)(B)}setAuth(A){this.headers.Authorization=`Bearer ${A}`}invoke(A){return lxA.__awaiter(this,arguments,void 0,function*(Q,B={}){var D;let E,I;try{let{headers:C,method:F,body:$,signal:J,timeout:U}=B,H={},{region:W}=B;if(!W)W=this.region;let K=new URL(`${this.url}/${Q}`);if(W&&W!=="any")H["x-region"]=W,K.searchParams.set("forceFunctionRegion",W);let q;if($&&(C&&!Object.prototype.hasOwnProperty.call(C,"Content-Type")||!C))if(typeof Blob<"u"&&$ instanceof Blob||$ instanceof ArrayBuffer)H["Content-Type"]="application/octet-stream",q=$;else if(typeof $==="string")H["Content-Type"]="text/plain",q=$;else if(typeof FormData<"u"&&$ instanceof FormData)q=$;else H["Content-Type"]="application/json",q=JSON.stringify($);else if($&&typeof $!=="string"&&!(typeof Blob<"u"&&$ instanceof Blob)&&!($ instanceof ArrayBuffer)&&!(typeof FormData<"u"&&$ instanceof FormData))q=JSON.stringify($);else q=$;let N=J;if(U)if(I=new AbortController,E=setTimeout(()=>I.abort(),U),J)N=I.signal,J.addEventListener("abort",()=>I.abort());else N=I.signal;let L=yield this.fetch(K.toString(),{method:F||"POST",headers:Object.assign(Object.assign(Object.assign({},H),this.headers),C),body:q,signal:N}).catch((V)=>{throw new d7.FunctionsFetchError(V)}),R=L.headers.get("x-relay-error");if(R&&R==="true")throw new d7.FunctionsRelayError(L);if(!L.ok)throw new d7.FunctionsHttpError(L);let S=((D=L.headers.get("Content-Type"))!==null&&D!==void 0?D:"text/plain").split(";")[0].trim(),z;if(S==="application/json")z=yield L.json();else if(S==="application/octet-stream"||S==="application/pdf")z=yield L.blob();else if(S==="text/event-stream")z=L;else if(S==="multipart/form-data")z=yield L.formData();else z=yield L.text();return{data:z,error:null,response:L}}catch(C){return{data:null,error:C,response:C instanceof d7.FunctionsHttpError||C instanceof d7.FunctionsRelayError?C.context:void 0}}finally{if(E)clearTimeout(E)}})}}QQA.FunctionsClient=AQA});var EQA=k((q$)=>{Object.defineProperty(q$,"__esModule",{value:!0});q$.FunctionRegion=q$.FunctionsRelayError=q$.FunctionsHttpError=q$.FunctionsFetchError=q$.FunctionsError=q$.FunctionsClient=void 0;var pxA=DQA();Object.defineProperty(q$,"FunctionsClient",{enumerable:!0,get:function(){return pxA.FunctionsClient}});var aH=pk();Object.defineProperty(q$,"FunctionsError",{enumerable:!0,get:function(){return aH.FunctionsError}});Object.defineProperty(q$,"FunctionsFetchError",{enumerable:!0,get:function(){return aH.FunctionsFetchError}});Object.defineProperty(q$,"FunctionsHttpError",{enumerable:!0,get:function(){return aH.FunctionsHttpError}});Object.defineProperty(q$,"FunctionsRelayError",{enumerable:!0,get:function(){return aH.FunctionsRelayError}});Object.defineProperty(q$,"FunctionRegion",{enumerable:!0,get:function(){return aH.FunctionRegion}})});function CQA(A,Q){return new Promise((B)=>{if(Q===null||Q===void 0?void 0:Q.aborted){B();return}let D=setTimeout(()=>{Q===null||Q===void 0||Q.removeEventListener("abort",E),B()},A);function E(){clearTimeout(D),B()}Q===null||Q===void 0||Q.addEventListener("abort",E)})}function rxA(A,Q,B,D){if(!D||B>=3)return!1;if(!GQA.includes(A))return!1;if(!ixA.includes(Q))return!1;return!0}function sH(A){return sH=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},sH(A)}function txA(A,Q){if(sH(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var D=B.call(A,Q||"default");if(sH(D)!="object")return D;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function exA(A){var Q=txA(A,"string");return sH(Q)=="symbol"?Q:Q+""}function AgA(A,Q,B){return(Q=exA(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function $QA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(A);Q&&(D=D.filter(function(E){return Object.getOwnPropertyDescriptor(A,E).enumerable})),B.push.apply(B,D)}return B}function wN(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?$QA(Object(B),!0).forEach(function(D){AgA(A,D,B[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):$QA(Object(B)).forEach(function(D){Object.defineProperty(A,D,Object.getOwnPropertyDescriptor(B,D))})}return A}var IQA=(A)=>Math.min(1000*2**A,30000),ixA,GQA,JQA,oxA=class{constructor(A){var Q,B,D,E,I;if(this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=A.method,this.url=A.url,this.headers=new Headers(A.headers),this.schema=A.schema,this.body=A.body,this.shouldThrowOnError=(Q=A.shouldThrowOnError)!==null&&Q!==void 0?Q:!1,this.signal=A.signal,this.isMaybeSingle=(B=A.isMaybeSingle)!==null&&B!==void 0?B:!1,this.shouldStripNulls=(D=A.shouldStripNulls)!==null&&D!==void 0?D:!1,this.urlLengthLimit=(E=A.urlLengthLimit)!==null&&E!==void 0?E:8000,this.retryEnabled=(I=A.retry)!==null&&I!==void 0?I:!0,A.fetch)this.fetch=A.fetch;else this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(A,Q){return this.headers=new Headers(this.headers),this.headers.set(A,Q),this}retry(A){return this.retryEnabled=A,this}then(A,Q){var B=this;if(this.schema===void 0);else if(["GET","HEAD"].includes(this.method))this.headers.set("Accept-Profile",this.schema);else this.headers.set("Content-Profile",this.schema);if(this.method!=="GET"&&this.method!=="HEAD")this.headers.set("Content-Type","application/json");if(this.shouldStripNulls){let C=this.headers.get("Accept");if(C==="application/vnd.pgrst.object+json")this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped");else if(!C||C==="application/json")this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let D=this.fetch,I=(async()=>{let C=0;while(!0){let J=new Headers(B.headers);if(C>0)J.set("X-Retry-Count",String(C));let U;try{U=await D(B.url.toString(),{method:B.method,headers:J,body:JSON.stringify(B.body,(H,W)=>typeof W==="bigint"?W.toString():W),signal:B.signal})}catch(H){if((H===null||H===void 0?void 0:H.name)==="AbortError"||(H===null||H===void 0?void 0:H.code)==="ABORT_ERR")throw H;if(!GQA.includes(B.method))throw H;if(B.retryEnabled&&C<3){let W=IQA(C);C++,await CQA(W,B.signal);continue}throw H}if(rxA(B.method,U.status,C,B.retryEnabled)){var F,$;let H=(F=($=U.headers)===null||$===void 0?void 0:$.get("Retry-After"))!==null&&F!==void 0?F:null,W=H!==null?Math.max(0,parseInt(H,10)||0)*1000:IQA(C);await U.text(),C++,await CQA(W,B.signal);continue}return await B.processResponse(U)}})();if(!this.shouldThrowOnError)I=I.catch((C)=>{var F;let $="",J="",U="",H=C===null||C===void 0?void 0:C.cause;if(H){var W,K,q,N;let S=(W=H===null||H===void 0?void 0:H.message)!==null&&W!==void 0?W:"",z=(K=H===null||H===void 0?void 0:H.code)!==null&&K!==void 0?K:"";if($=`${(q=C===null||C===void 0?void 0:C.name)!==null&&q!==void 0?q:"FetchError"}: ${C===null||C===void 0?void 0:C.message}`,$+=`
|
|
95
95
|
|
|
96
96
|
Caused by: ${(N=H===null||H===void 0?void 0:H.name)!==null&&N!==void 0?N:"Error"}: ${S}`,z)$+=` (${z})`;if(H===null||H===void 0?void 0:H.stack)$+=`
|
|
97
97
|
${H.stack}`}else{var L;$=(L=C===null||C===void 0?void 0:C.stack)!==null&&L!==void 0?L:""}let R=this.url.toString().length;if((C===null||C===void 0?void 0:C.name)==="AbortError"||(C===null||C===void 0?void 0:C.code)==="ABORT_ERR"){if(U="",J="Request was aborted (timeout or manual cancellation)",R>this.urlLengthLimit)J+=`. Note: Your request URL is ${R} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`}else if((H===null||H===void 0?void 0:H.name)==="HeadersOverflowError"||(H===null||H===void 0?void 0:H.code)==="UND_ERR_HEADERS_OVERFLOW"){if(U="",J="HTTP headers exceeded server limits (typically 16KB)",R>this.urlLengthLimit)J+=`. Your request URL is ${R} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`}return{success:!1,error:{message:`${(F=C===null||C===void 0?void 0:C.name)!==null&&F!==void 0?F:"FetchError"}: ${C===null||C===void 0?void 0:C.message}`,details:$,hint:J,code:U},data:null,count:null,status:0,statusText:""}});return I.then(A,Q)}async processResponse(A){var Q=this;let B=null,D=null,E=null,I=A.status,C=A.statusText;if(A.ok){var F,$;if(Q.method!=="HEAD"){var J;let W=await A.text();if(W==="");else if(Q.headers.get("Accept")==="text/csv")D=W;else if(Q.headers.get("Accept")&&((J=Q.headers.get("Accept"))===null||J===void 0?void 0:J.includes("application/vnd.pgrst.plan+text")))D=W;else D=JSON.parse(W)}let U=(F=Q.headers.get("Prefer"))===null||F===void 0?void 0:F.match(/count=(exact|planned|estimated)/),H=($=A.headers.get("content-range"))===null||$===void 0?void 0:$.split("/");if(U&&H&&H.length>1)E=parseInt(H[1]);if(Q.isMaybeSingle&&Array.isArray(D))if(D.length>1)B={code:"PGRST116",details:`Results contain ${D.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},D=null,E=null,I=406,C="Not Acceptable";else if(D.length===1)D=D[0];else D=null}else{let U=await A.text();try{if(B=JSON.parse(U),Array.isArray(B)&&A.status===404)D=[],B=null,I=200,C="OK"}catch(H){if(A.status===404&&U==="")I=204,C="No Content";else B={message:U}}if(B&&Q.shouldThrowOnError)throw new JQA(B)}return{success:B===null,error:B,data:D,count:E,status:I,statusText:C}}returns(){return this}overrideTypes(){return this}},axA,FQA,p7,sxA=class{constructor(A,{headers:Q={},schema:B,fetch:D,urlLengthLimit:E=8000,retry:I}){this.url=A,this.headers=new Headers(Q),this.schema=B,this.fetch=D,this.urlLengthLimit=E,this.retry=I}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(A,Q){let{head:B=!1,count:D}=Q!==null&&Q!==void 0?Q:{},E=B?"HEAD":"GET",I=!1,C=(A!==null&&A!==void 0?A:"*").split("").map((J)=>{if(/\s/.test(J)&&!I)return"";if(J==='"')I=!I;return J}).join(""),{url:F,headers:$}=this.cloneRequestState();if(F.searchParams.set("select",C),D)$.append("Prefer",`count=${D}`);return new p7({method:E,url:F,headers:$,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(A,{count:Q,defaultToNull:B=!0}={}){var D;let E="POST",{url:I,headers:C}=this.cloneRequestState();if(Q)C.append("Prefer",`count=${Q}`);if(!B)C.append("Prefer","missing=default");if(Array.isArray(A)){let F=A.reduce(($,J)=>$.concat(Object.keys(J)),[]);if(F.length>0){let $=[...new Set(F)].map((J)=>`"${J}"`);I.searchParams.set("columns",$.join(","))}}return new p7({method:"POST",url:I,headers:C,schema:this.schema,body:A,fetch:(D=this.fetch)!==null&&D!==void 0?D:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(A,{onConflict:Q,ignoreDuplicates:B=!1,count:D,defaultToNull:E=!0}={}){var I;let C="POST",{url:F,headers:$}=this.cloneRequestState();if($.append("Prefer",`resolution=${B?"ignore":"merge"}-duplicates`),Q!==void 0)F.searchParams.set("on_conflict",Q);if(D)$.append("Prefer",`count=${D}`);if(!E)$.append("Prefer","missing=default");if(Array.isArray(A)){let J=A.reduce((U,H)=>U.concat(Object.keys(H)),[]);if(J.length>0){let U=[...new Set(J)].map((H)=>`"${H}"`);F.searchParams.set("columns",U.join(","))}}return new p7({method:"POST",url:F,headers:$,schema:this.schema,body:A,fetch:(I=this.fetch)!==null&&I!==void 0?I:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(A,{count:Q}={}){var B;let D="PATCH",{url:E,headers:I}=this.cloneRequestState();if(Q)I.append("Prefer",`count=${Q}`);return new p7({method:"PATCH",url:E,headers:I,schema:this.schema,body:A,fetch:(B=this.fetch)!==null&&B!==void 0?B:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:A}={}){var Q;let B="DELETE",{url:D,headers:E}=this.cloneRequestState();if(A)E.append("Prefer",`count=${A}`);return new p7({method:"DELETE",url:D,headers:E,schema:this.schema,fetch:(Q=this.fetch)!==null&&Q!==void 0?Q:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},YQA=class A{constructor(Q,{headers:B={},schema:D,fetch:E,timeout:I,urlLengthLimit:C=8000,retry:F}={}){this.url=Q,this.headers=new Headers(B),this.schemaName=D,this.urlLengthLimit=C;let $=E!==null&&E!==void 0?E:globalThis.fetch;if(I!==void 0&&I>0)this.fetch=(J,U)=>{let H=new AbortController,W=setTimeout(()=>H.abort(),I),K=U===null||U===void 0?void 0:U.signal;if(K){if(K.aborted)return clearTimeout(W),$(J,U);let q=()=>{clearTimeout(W),H.abort()};return K.addEventListener("abort",q,{once:!0}),$(J,wN(wN({},U),{},{signal:H.signal})).finally(()=>{clearTimeout(W),K.removeEventListener("abort",q)})}return $(J,wN(wN({},U),{},{signal:H.signal})).finally(()=>clearTimeout(W))};else this.fetch=$;this.retry=F}from(Q){if(!Q||typeof Q!=="string"||Q.trim()==="")throw Error("Invalid relation name: relation must be a non-empty string.");return new sxA(new URL(`${this.url}/${Q}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(Q){return new A(this.url,{headers:this.headers,schema:Q,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(Q,B={},{head:D=!1,get:E=!1,count:I}={}){var C;let F,$=new URL(`${this.url}/rpc/${Q}`),J,U=(K)=>K!==null&&typeof K==="object"&&(!Array.isArray(K)||K.some(U)),H=D&&Object.values(B).some(U);if(H)F="POST",J=B;else if(D||E)F=D?"HEAD":"GET",Object.entries(B).filter(([K,q])=>q!==void 0).map(([K,q])=>[K,Array.isArray(q)?`{${q.join(",")}}`:`${q}`]).forEach(([K,q])=>{$.searchParams.append(K,q)});else F="POST",J=B;let W=new Headers(this.headers);if(H)W.set("Prefer",I?`count=${I},return=minimal`:"return=minimal");else if(I)W.set("Prefer",`count=${I}`);return new p7({method:F,url:$,headers:W,schema:this.schemaName,body:J,fetch:(C=this.fetch)!==null&&C!==void 0?C:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};var UQA=SA(()=>{ixA=[520,503],GQA=["GET","HEAD","OPTIONS"],JQA=class extends Error{constructor(A){super(A.message);this.name="PostgrestError",this.details=A.details,this.hint=A.hint,this.code=A.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};axA=class extends oxA{select(A){let Q=!1,B=(A!==null&&A!==void 0?A:"*").split("").map((D)=>{if(/\s/.test(D)&&!Q)return"";if(D==='"')Q=!Q;return D}).join("");return this.url.searchParams.set("select",B),this.headers.append("Prefer","return=representation"),this}order(A,{ascending:Q=!0,nullsFirst:B,foreignTable:D,referencedTable:E=D}={}){let I=E?`${E}.order`:"order",C=this.url.searchParams.get(I);return this.url.searchParams.set(I,`${C?`${C},`:""}${A}.${Q?"asc":"desc"}${B===void 0?"":B?".nullsfirst":".nullslast"}`),this}limit(A,{foreignTable:Q,referencedTable:B=Q}={}){let D=typeof B>"u"?"limit":`${B}.limit`;return this.url.searchParams.set(D,`${A}`),this}range(A,Q,{foreignTable:B,referencedTable:D=B}={}){let E=typeof D>"u"?"offset":`${D}.offset`,I=typeof D>"u"?"limit":`${D}.limit`;return this.url.searchParams.set(E,`${A}`),this.url.searchParams.set(I,`${Q-A+1}`),this}abortSignal(A){return this.signal=A,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:A=!1,verbose:Q=!1,settings:B=!1,buffers:D=!1,wal:E=!1,format:I="text"}={}){var C;let F=[A?"analyze":null,Q?"verbose":null,B?"settings":null,D?"buffers":null,E?"wal":null].filter(Boolean).join("|"),$=(C=this.headers.get("Accept"))!==null&&C!==void 0?C:"application/json";if(this.headers.set("Accept",`application/vnd.pgrst.plan+${I}; for="${$}"; options=${F};`),I==="json")return this;else return this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(A){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${A}`),this}},FQA=new RegExp("[,()]"),p7=class extends axA{eq(A,Q){return this.url.searchParams.append(A,`eq.${Q}`),this}neq(A,Q){return this.url.searchParams.append(A,`neq.${Q}`),this}gt(A,Q){return this.url.searchParams.append(A,`gt.${Q}`),this}gte(A,Q){return this.url.searchParams.append(A,`gte.${Q}`),this}lt(A,Q){return this.url.searchParams.append(A,`lt.${Q}`),this}lte(A,Q){return this.url.searchParams.append(A,`lte.${Q}`),this}like(A,Q){return this.url.searchParams.append(A,`like.${Q}`),this}likeAllOf(A,Q){return this.url.searchParams.append(A,`like(all).{${Q.join(",")}}`),this}likeAnyOf(A,Q){return this.url.searchParams.append(A,`like(any).{${Q.join(",")}}`),this}ilike(A,Q){return this.url.searchParams.append(A,`ilike.${Q}`),this}ilikeAllOf(A,Q){return this.url.searchParams.append(A,`ilike(all).{${Q.join(",")}}`),this}ilikeAnyOf(A,Q){return this.url.searchParams.append(A,`ilike(any).{${Q.join(",")}}`),this}regexMatch(A,Q){return this.url.searchParams.append(A,`match.${Q}`),this}regexIMatch(A,Q){return this.url.searchParams.append(A,`imatch.${Q}`),this}is(A,Q){return this.url.searchParams.append(A,`is.${Q}`),this}isDistinct(A,Q){return this.url.searchParams.append(A,`isdistinct.${Q}`),this}in(A,Q){let B=Array.from(new Set(Q)).map((D)=>{if(typeof D==="string"&&FQA.test(D))return`"${D}"`;else return`${D}`}).join(",");return this.url.searchParams.append(A,`in.(${B})`),this}notIn(A,Q){let B=Array.from(new Set(Q)).map((D)=>{if(typeof D==="string"&&FQA.test(D))return`"${D}"`;else return`${D}`}).join(",");return this.url.searchParams.append(A,`not.in.(${B})`),this}contains(A,Q){if(typeof Q==="string")this.url.searchParams.append(A,`cs.${Q}`);else if(Array.isArray(Q))this.url.searchParams.append(A,`cs.{${Q.join(",")}}`);else this.url.searchParams.append(A,`cs.${JSON.stringify(Q)}`);return this}containedBy(A,Q){if(typeof Q==="string")this.url.searchParams.append(A,`cd.${Q}`);else if(Array.isArray(Q))this.url.searchParams.append(A,`cd.{${Q.join(",")}}`);else this.url.searchParams.append(A,`cd.${JSON.stringify(Q)}`);return this}rangeGt(A,Q){return this.url.searchParams.append(A,`sr.${Q}`),this}rangeGte(A,Q){return this.url.searchParams.append(A,`nxl.${Q}`),this}rangeLt(A,Q){return this.url.searchParams.append(A,`sl.${Q}`),this}rangeLte(A,Q){return this.url.searchParams.append(A,`nxr.${Q}`),this}rangeAdjacent(A,Q){return this.url.searchParams.append(A,`adj.${Q}`),this}overlaps(A,Q){if(typeof Q==="string")this.url.searchParams.append(A,`ov.${Q}`);else this.url.searchParams.append(A,`ov.{${Q.join(",")}}`);return this}textSearch(A,Q,{config:B,type:D}={}){let E="";if(D==="plain")E="pl";else if(D==="phrase")E="ph";else if(D==="websearch")E="w";let I=B===void 0?"":`(${B})`;return this.url.searchParams.append(A,`${E}fts${I}.${Q}`),this}match(A){return Object.entries(A).filter(([Q,B])=>B!==void 0).forEach(([Q,B])=>{this.url.searchParams.append(Q,`eq.${B}`)}),this}not(A,Q,B){return this.url.searchParams.append(A,`not.${Q}.${B}`),this}or(A,{foreignTable:Q,referencedTable:B=Q}={}){let D=B?`${B}.or`:"or";return this.url.searchParams.append(D,`(${A})`),this}filter(A,Q,B){return this.url.searchParams.append(A,`${Q}.${B}`),this}}});class nk{constructor(){}connect(){}disconnect(){}}function QgA(A,Q,B){let D=new URL(Q,A);if(B){for(let[E,I]of Object.entries(B))if(I!==void 0)D.searchParams.set(E,I)}return D.toString()}async function BgA(A){if(!A||A.type==="none")return{};if(A.type==="bearer")return{Authorization:`Bearer ${A.token}`};if(A.type==="header")return{[A.name]:A.value};if(A.type==="custom")return await A.getHeaders();return{}}function DgA(A){let Q=A.fetchImpl??globalThis.fetch;return{async request({method:B,path:D,query:E,body:I,headers:C}){let F=QgA(A.baseUrl,D,E),$=await BgA(A.auth),J=await Q(F,{method:B,headers:{...I?{"Content-Type":"application/json"}:{},...$,...C},body:I?JSON.stringify(I):void 0}),U=await J.text(),H=(J.headers.get("content-type")||"").includes("application/json"),W=H&&U?JSON.parse(U):U;if(!J.ok){let K=H?W:void 0,q=K?.error;throw new tH(q?.message??`Request failed with status ${J.status}`,{status:J.status,icebergType:q?.type,icebergCode:q?.code,details:K})}return{status:J.status,headers:J.headers,data:W}}}}function NN(A){return A.join("\x1F")}function n7(A){return A.join("\x1F")}var tH,EgA=class{constructor(A,Q=""){this.client=A,this.prefix=Q}async listNamespaces(A){let Q=A?{parent:NN(A.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:Q})).data.namespaces.map((D)=>({namespace:D}))}async createNamespace(A,Q){let B={namespace:A.namespace,properties:Q?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:B})).data}async dropNamespace(A){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${NN(A.namespace)}`})}async loadNamespaceMetadata(A){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${NN(A.namespace)}`})).data.properties}}async namespaceExists(A){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${NN(A.namespace)}`}),!0}catch(Q){if(Q instanceof tH&&Q.status===404)return!1;throw Q}}async createNamespaceIfNotExists(A,Q){try{return await this.createNamespace(A,Q)}catch(B){if(B instanceof tH&&B.status===409)return;throw B}}},IgA=class{constructor(A,Q="",B){this.client=A,this.prefix=Q,this.accessDelegation=B}async listTables(A){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables`})).data.identifiers}async createTable(A,Q){let B={};if(this.accessDelegation)B["X-Iceberg-Access-Delegation"]=this.accessDelegation;return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables`,body:Q,headers:B})).data.metadata}async updateTable(A,Q){let B=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables/${A.name}`,body:Q});return{"metadata-location":B.data["metadata-location"],metadata:B.data.metadata}}async dropTable(A,Q){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables/${A.name}`,query:{purgeRequested:String(Q?.purge??!1)}})}async loadTable(A){let Q={};if(this.accessDelegation)Q["X-Iceberg-Access-Delegation"]=this.accessDelegation;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables/${A.name}`,headers:Q})).data.metadata}async tableExists(A){let Q={};if(this.accessDelegation)Q["X-Iceberg-Access-Delegation"]=this.accessDelegation;try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${n7(A.namespace)}/tables/${A.name}`,headers:Q}),!0}catch(B){if(B instanceof tH&&B.status===404)return!1;throw B}}async createTableIfNotExists(A,Q){try{return await this.createTable(A,Q)}catch(B){if(B instanceof tH&&B.status===409)return await this.loadTable({namespace:A.namespace,name:Q.name});throw B}}},HQA=class{constructor(A){let Q="v1";if(A.catalogName)Q+=`/${A.catalogName}`;let B=A.baseUrl.endsWith("/")?A.baseUrl:`${A.baseUrl}/`;this.client=DgA({baseUrl:B,auth:A.auth,fetchImpl:A.fetch}),this.accessDelegation=A.accessDelegation?.join(","),this.namespaceOps=new EgA(this.client,Q),this.tableOps=new IgA(this.client,Q,this.accessDelegation)}async listNamespaces(A){return this.namespaceOps.listNamespaces(A)}async createNamespace(A,Q){return this.namespaceOps.createNamespace(A,Q)}async dropNamespace(A){await this.namespaceOps.dropNamespace(A)}async loadNamespaceMetadata(A){return this.namespaceOps.loadNamespaceMetadata(A)}async listTables(A){return this.tableOps.listTables(A)}async createTable(A,Q){return this.tableOps.createTable(A,Q)}async updateTable(A,Q){return this.tableOps.updateTable(A,Q)}async dropTable(A,Q){await this.tableOps.dropTable(A,Q)}async loadTable(A){return this.tableOps.loadTable(A)}async namespaceExists(A){return this.namespaceOps.namespaceExists(A)}async tableExists(A){return this.tableOps.tableExists(A)}async createNamespaceIfNotExists(A,Q){return this.namespaceOps.createNamespaceIfNotExists(A,Q)}async createTableIfNotExists(A,Q){return this.tableOps.createTableIfNotExists(A,Q)}};var XQA=SA(()=>{tH=class extends Error{constructor(A,Q){super(A);this.name="IcebergError",this.status=Q.status,this.icebergType=Q.icebergType,this.icebergCode=Q.icebergCode,this.details=Q.details,this.isCommitStateUnknown=Q.icebergType==="CommitStateUnknownException"||[500,502,504].includes(Q.status)&&Q.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}}});function AX(A){return AX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},AX(A)}function CgA(A,Q){if(AX(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var D=B.call(A,Q||"default");if(AX(D)!="object")return D;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function FgA(A){var Q=CgA(A,"string");return AX(Q)=="symbol"?Q:Q+""}function $gA(A,Q,B){return(Q=FgA(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function WQA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(A);Q&&(D=D.filter(function(E){return Object.getOwnPropertyDescriptor(A,E).enumerable})),B.push.apply(B,D)}return B}function qB(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?WQA(Object(B),!0).forEach(function(D){$gA(A,D,B[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):WQA(Object(B)).forEach(function(D){Object.defineProperty(A,D,Object.getOwnPropertyDescriptor(B,D))})}return A}function ON(A){return typeof A==="object"&&A!==null&&"__isStorageError"in A}function LN(A,Q,B){let D=qB({},A),E=Q.toLowerCase();for(let I of Object.keys(D))if(I.toLowerCase()===E)delete D[I];return D[E]=B,D}function GgA(A){let Q={};for(let[B,D]of Object.entries(A))Q[B.toLowerCase()]=D;return Q}async function eH(A,Q,B,D,E,I,C){return new Promise((F,$)=>{A(B,XgA(Q,D,E,I)).then((J)=>{if(!J.ok)throw J;if(D===null||D===void 0?void 0:D.noResolveJson)return J;if(C==="vectors"){let U=J.headers.get("content-type");if(J.headers.get("content-length")==="0"||J.status===204)return{};if(!U||!U.includes("application/json"))return{}}return J.json()}).then((J)=>F(J)).catch((J)=>HgA(J,$,D,C))})}function wQA(A="storage"){return{get:async(Q,B,D,E)=>{return eH(Q,"GET",B,D,E,void 0,A)},post:async(Q,B,D,E,I)=>{return eH(Q,"POST",B,E,I,D,A)},put:async(Q,B,D,E,I)=>{return eH(Q,"PUT",B,E,I,D,A)},head:async(Q,B,D,E)=>{return eH(Q,"HEAD",B,qB(qB({},D),{},{noResolveJson:!0}),E,void 0,A)},remove:async(Q,B,D,E,I)=>{return eH(Q,"DELETE",B,E,I,D,A)}}}var RN,ZN,qQA,JgA=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)},YgA=(A)=>{if(typeof A!=="object"||A===null)return!1;let Q=Object.getPrototypeOf(A);return(Q===null||Q===Object.prototype||Object.getPrototypeOf(Q)===null)&&!(Symbol.toStringTag in A)&&!(Symbol.iterator in A)},ik=(A)=>{if(Array.isArray(A))return A.map((B)=>ik(B));else if(typeof A==="function"||A!==Object(A))return A;let Q={};return Object.entries(A).forEach(([B,D])=>{let E=B.replace(/([-_][a-z])/gi,(I)=>I.toUpperCase().replace(/[-_]/g,""));Q[E]=ik(D)}),Q},UgA=(A)=>{if(!A||typeof A!=="string")return!1;if(A.length===0||A.length>100)return!1;if(A.trim()!==A)return!1;if(A.includes("/")||A.includes("\\"))return!1;return/^[\w!.\*'() &$@=;:+,?-]+$/.test(A)},KQA=(A)=>{var Q;return A.msg||A.message||A.error_description||(typeof A.error==="string"?A.error:(Q=A.error)===null||Q===void 0?void 0:Q.message)||JSON.stringify(A)},HgA=async(A,Q,B,D)=>{if(A!==null&&typeof A==="object"&&typeof A.json==="function"){let E=A,I=parseInt(E.status,10);if(!Number.isFinite(I))I=500;E.json().then((C)=>{let F=(C===null||C===void 0?void 0:C.statusCode)||(C===null||C===void 0?void 0:C.code)||I+"";Q(new ZN(KQA(C),I,F,D))}).catch(()=>{let C=I+"";Q(new ZN(E.statusText||`HTTP ${I} error`,I,C,D))})}else Q(new qQA(KQA(A),A,D))},XgA=(A,Q,B,D)=>{let E={method:A,headers:(Q===null||Q===void 0?void 0:Q.headers)||{}};if(A==="GET"||A==="HEAD"||!D)return qB(qB({},E),B);if(YgA(D)){var I;let C=(Q===null||Q===void 0?void 0:Q.headers)||{},F;for(let[$,J]of Object.entries(C))if($.toLowerCase()==="content-type")F=J;E.headers=LN(C,"Content-Type",(I=F)!==null&&I!==void 0?I:"application/json"),E.body=JSON.stringify(D)}else E.body=D;if(Q===null||Q===void 0?void 0:Q.duplex)E.duplex=Q.duplex;return qB(qB({},E),B)},WgA,QX,oC,rk,KgA,ok,m8,i7=class{constructor(A,Q={},B,D="storage"){this.shouldThrowOnError=!1,this.url=A,this.headers=GgA(Q),this.fetch=JgA(B),this.namespace=D}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(A,Q){return this.headers=LN(this.headers,A,Q),this}async handleOperation(A){var Q=this;try{return{data:await A(),error:null}}catch(B){if(Q.shouldThrowOnError)throw B;if(ON(B))return{data:null,error:B};throw B}}},MgA=class{constructor(A,Q){this.downloadFn=A,this.shouldThrowOnError=Q}then(A,Q){return this.execute().then(A,Q)}async execute(){var A=this;try{return{data:(await A.downloadFn()).body,error:null}}catch(Q){if(A.shouldThrowOnError)throw Q;if(ON(Q))return{data:null,error:Q};throw Q}}},NQA,qgA=class{constructor(A,Q){this.downloadFn=A,this.shouldThrowOnError=Q,this[NQA]="BlobDownloadBuilder",this.promise=null}asStream(){return new MgA(this.downloadFn,this.shouldThrowOnError)}then(A,Q){return this.getPromise().then(A,Q)}catch(A){return this.getPromise().catch(A)}finally(A){return this.getPromise().finally(A)}getPromise(){if(!this.promise)this.promise=this.execute();return this.promise}async execute(){var A=this;try{return{data:await(await A.downloadFn()).blob(),error:null}}catch(Q){if(A.shouldThrowOnError)throw Q;if(ON(Q))return{data:null,error:Q};throw Q}}},wgA,MQA,NgA,ZgA="2.105.1",BX,LgA,RgA,OgA,zgA,VgA,SgA,TgA,jgA,ZQA;var LQA=SA(()=>{XQA();RN=class extends Error{constructor(A,Q="storage",B,D){super(A);this.__isStorageError=!0,this.namespace=Q,this.name=Q==="vectors"?"StorageVectorsError":"StorageError",this.status=B,this.statusCode=D}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};ZN=class extends RN{constructor(A,Q,B,D="storage"){super(A,D,Q,B);this.name=D==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=Q,this.statusCode=B}toJSON(){return qB({},super.toJSON())}},qQA=class extends RN{constructor(A,Q,B="storage"){super(A,B);this.name=B==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=Q}};WgA=wQA("storage"),{get:QX,post:oC,put:rk,head:KgA,remove:ok}=WgA,m8=wQA("vectors");NQA=Symbol.toStringTag;wgA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},MQA={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1},NgA=class extends i7{constructor(A,Q={},B,D){super(A,Q,D,"storage");this.bucketId=B}async uploadOrUpdate(A,Q,B,D){var E=this;return E.handleOperation(async()=>{let I,C=qB(qB({},MQA),D),F=qB(qB({},E.headers),A==="POST"&&{"x-upsert":String(C.upsert)}),$=C.metadata;if(typeof Blob<"u"&&B instanceof Blob){if(I=new FormData,I.append("cacheControl",C.cacheControl),$)I.append("metadata",E.encodeMetadata($));I.append("",B)}else if(typeof FormData<"u"&&B instanceof FormData){if(I=B,!I.has("cacheControl"))I.append("cacheControl",C.cacheControl);if($&&!I.has("metadata"))I.append("metadata",E.encodeMetadata($))}else{if(I=B,F["cache-control"]=`max-age=${C.cacheControl}`,F["content-type"]=C.contentType,$)F["x-metadata"]=E.toBase64(E.encodeMetadata($));if((typeof ReadableStream<"u"&&I instanceof ReadableStream||I&&typeof I==="object"&&("pipe"in I)&&typeof I.pipe==="function")&&!C.duplex)C.duplex="half"}if(D===null||D===void 0?void 0:D.headers)for(let[W,K]of Object.entries(D.headers))F=LN(F,W,K);let J=E._removeEmptyFolders(Q),U=E._getFinalPath(J),H=await(A=="PUT"?rk:oC)(E.fetch,`${E.url}/object/${U}`,I,qB({headers:F},(C===null||C===void 0?void 0:C.duplex)?{duplex:C.duplex}:{}));return{path:J,id:H.Id,fullPath:H.Key}})}async upload(A,Q,B){return this.uploadOrUpdate("POST",A,Q,B)}async uploadToSignedUrl(A,Q,B,D){var E=this;let I=E._removeEmptyFolders(A),C=E._getFinalPath(I),F=new URL(E.url+`/object/upload/sign/${C}`);return F.searchParams.set("token",Q),E.handleOperation(async()=>{let $,J=qB(qB({},MQA),D),U=qB(qB({},E.headers),{"x-upsert":String(J.upsert)}),H=J.metadata;if(typeof Blob<"u"&&B instanceof Blob){if($=new FormData,$.append("cacheControl",J.cacheControl),H)$.append("metadata",E.encodeMetadata(H));$.append("",B)}else if(typeof FormData<"u"&&B instanceof FormData){if($=B,!$.has("cacheControl"))$.append("cacheControl",J.cacheControl);if(H&&!$.has("metadata"))$.append("metadata",E.encodeMetadata(H))}else{if($=B,U["cache-control"]=`max-age=${J.cacheControl}`,U["content-type"]=J.contentType,H)U["x-metadata"]=E.toBase64(E.encodeMetadata(H));if((typeof ReadableStream<"u"&&$ instanceof ReadableStream||$&&typeof $==="object"&&("pipe"in $)&&typeof $.pipe==="function")&&!J.duplex)J.duplex="half"}if(D===null||D===void 0?void 0:D.headers)for(let[W,K]of Object.entries(D.headers))U=LN(U,W,K);return{path:I,fullPath:(await rk(E.fetch,F.toString(),$,qB({headers:U},(J===null||J===void 0?void 0:J.duplex)?{duplex:J.duplex}:{}))).Key}})}async createSignedUploadUrl(A,Q){var B=this;return B.handleOperation(async()=>{let D=B._getFinalPath(A),E=qB({},B.headers);if(Q===null||Q===void 0?void 0:Q.upsert)E["x-upsert"]="true";let I=await oC(B.fetch,`${B.url}/object/upload/sign/${D}`,{},{headers:E}),C=new URL(B.url+I.url),F=C.searchParams.get("token");if(!F)throw new RN("No token returned by API");return{signedUrl:C.toString(),path:A,token:F}})}async update(A,Q,B){return this.uploadOrUpdate("PUT",A,Q,B)}async move(A,Q,B){var D=this;return D.handleOperation(async()=>{return await oC(D.fetch,`${D.url}/object/move`,{bucketId:D.bucketId,sourceKey:A,destinationKey:Q,destinationBucket:B===null||B===void 0?void 0:B.destinationBucket},{headers:D.headers})})}async copy(A,Q,B){var D=this;return D.handleOperation(async()=>{return{path:(await oC(D.fetch,`${D.url}/object/copy`,{bucketId:D.bucketId,sourceKey:A,destinationKey:Q,destinationBucket:B===null||B===void 0?void 0:B.destinationBucket},{headers:D.headers})).Key}})}async createSignedUrl(A,Q,B){var D=this;return D.handleOperation(async()=>{let E=D._getFinalPath(A),I=typeof(B===null||B===void 0?void 0:B.transform)==="object"&&B.transform!==null&&Object.keys(B.transform).length>0,C=await oC(D.fetch,`${D.url}/object/sign/${E}`,qB({expiresIn:Q},I?{transform:B.transform}:{}),{headers:D.headers}),F=new URLSearchParams;if(B===null||B===void 0?void 0:B.download)F.set("download",B.download===!0?"":B.download);if((B===null||B===void 0?void 0:B.cacheNonce)!=null)F.set("cacheNonce",String(B.cacheNonce));let $=F.toString();return{signedUrl:encodeURI(`${D.url}${C.signedURL}${$?`&${$}`:""}`)}})}async createSignedUrls(A,Q,B){var D=this;return D.handleOperation(async()=>{let E=await oC(D.fetch,`${D.url}/object/sign/${D.bucketId}`,{expiresIn:Q,paths:A},{headers:D.headers}),I=new URLSearchParams;if(B===null||B===void 0?void 0:B.download)I.set("download",B.download===!0?"":B.download);if((B===null||B===void 0?void 0:B.cacheNonce)!=null)I.set("cacheNonce",String(B.cacheNonce));let C=I.toString();return E.map((F)=>qB(qB({},F),{},{signedUrl:F.signedURL?encodeURI(`${D.url}${F.signedURL}${C?`&${C}`:""}`):null}))})}download(A,Q,B){let D=typeof(Q===null||Q===void 0?void 0:Q.transform)==="object"&&Q.transform!==null&&Object.keys(Q.transform).length>0?"render/image/authenticated":"object",E=new URLSearchParams;if(Q===null||Q===void 0?void 0:Q.transform)this.applyTransformOptsToQuery(E,Q.transform);if((Q===null||Q===void 0?void 0:Q.cacheNonce)!=null)E.set("cacheNonce",String(Q.cacheNonce));let I=E.toString(),C=this._getFinalPath(A);return new qgA(()=>QX(this.fetch,`${this.url}/${D}/${C}${I?`?${I}`:""}`,{headers:this.headers,noResolveJson:!0},B),this.shouldThrowOnError)}async info(A){var Q=this;let B=Q._getFinalPath(A);return Q.handleOperation(async()=>{return ik(await QX(Q.fetch,`${Q.url}/object/info/${B}`,{headers:Q.headers}))})}async exists(A){var Q=this;let B=Q._getFinalPath(A);try{return await KgA(Q.fetch,`${Q.url}/object/${B}`,{headers:Q.headers}),{data:!0,error:null}}catch(E){if(Q.shouldThrowOnError)throw E;if(ON(E)){var D;let I=E instanceof ZN?E.status:E instanceof qQA?(D=E.originalError)===null||D===void 0?void 0:D.status:void 0;if(I!==void 0&&[400,404].includes(I))return{data:!1,error:E}}throw E}}getPublicUrl(A,Q){let B=this._getFinalPath(A),D=new URLSearchParams;if(Q===null||Q===void 0?void 0:Q.download)D.set("download",Q.download===!0?"":Q.download);if(Q===null||Q===void 0?void 0:Q.transform)this.applyTransformOptsToQuery(D,Q.transform);if((Q===null||Q===void 0?void 0:Q.cacheNonce)!=null)D.set("cacheNonce",String(Q.cacheNonce));let E=D.toString(),I=typeof(Q===null||Q===void 0?void 0:Q.transform)==="object"&&Q.transform!==null&&Object.keys(Q.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${I}/public/${B}`)+(E?`?${E}`:"")}}}async remove(A){var Q=this;return Q.handleOperation(async()=>{return await ok(Q.fetch,`${Q.url}/object/${Q.bucketId}`,{prefixes:A},{headers:Q.headers})})}async list(A,Q,B){var D=this;return D.handleOperation(async()=>{let E=qB(qB(qB({},wgA),Q),{},{prefix:A||""});return await oC(D.fetch,`${D.url}/object/list/${D.bucketId}`,E,{headers:D.headers},B)})}async listV2(A,Q){var B=this;return B.handleOperation(async()=>{let D=qB({},A);return await oC(B.fetch,`${B.url}/object/list-v2/${B.bucketId}`,D,{headers:B.headers},Q)})}encodeMetadata(A){return JSON.stringify(A)}toBase64(A){if(typeof Buffer<"u")return Buffer.from(A).toString("base64");return btoa(A)}_getFinalPath(A){return`${this.bucketId}/${A.replace(/^\/+/,"")}`}_removeEmptyFolders(A){return A.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(A,Q){if(Q.width)A.set("width",Q.width.toString());if(Q.height)A.set("height",Q.height.toString());if(Q.resize)A.set("resize",Q.resize);if(Q.format)A.set("format",Q.format);if(Q.quality)A.set("quality",Q.quality.toString());return A}},BX={"X-Client-Info":`storage-js/${ZgA}`},LgA=class extends i7{constructor(A,Q={},B,D){let E=new URL(A);if(D===null||D===void 0?void 0:D.useNewHostname){if(/supabase\.(co|in|red)$/.test(E.hostname)&&!E.hostname.includes("storage.supabase."))E.hostname=E.hostname.replace("supabase.","storage.supabase.")}let I=E.href.replace(/\/$/,""),C=qB(qB({},BX),Q);super(I,C,B,"storage")}async listBuckets(A){var Q=this;return Q.handleOperation(async()=>{let B=Q.listBucketOptionsToQueryString(A);return await QX(Q.fetch,`${Q.url}/bucket${B}`,{headers:Q.headers})})}async getBucket(A){var Q=this;return Q.handleOperation(async()=>{return await QX(Q.fetch,`${Q.url}/bucket/${A}`,{headers:Q.headers})})}async createBucket(A,Q={public:!1}){var B=this;return B.handleOperation(async()=>{return await oC(B.fetch,`${B.url}/bucket`,{id:A,name:A,type:Q.type,public:Q.public,file_size_limit:Q.fileSizeLimit,allowed_mime_types:Q.allowedMimeTypes},{headers:B.headers})})}async updateBucket(A,Q){var B=this;return B.handleOperation(async()=>{return await rk(B.fetch,`${B.url}/bucket/${A}`,{id:A,name:A,public:Q.public,file_size_limit:Q.fileSizeLimit,allowed_mime_types:Q.allowedMimeTypes},{headers:B.headers})})}async emptyBucket(A){var Q=this;return Q.handleOperation(async()=>{return await oC(Q.fetch,`${Q.url}/bucket/${A}/empty`,{},{headers:Q.headers})})}async deleteBucket(A){var Q=this;return Q.handleOperation(async()=>{return await ok(Q.fetch,`${Q.url}/bucket/${A}`,{},{headers:Q.headers})})}listBucketOptionsToQueryString(A){let Q={};if(A){if("limit"in A)Q.limit=String(A.limit);if("offset"in A)Q.offset=String(A.offset);if(A.search)Q.search=A.search;if(A.sortColumn)Q.sortColumn=A.sortColumn;if(A.sortOrder)Q.sortOrder=A.sortOrder}return Object.keys(Q).length>0?"?"+new URLSearchParams(Q).toString():""}},RgA=class extends i7{constructor(A,Q={},B){let D=A.replace(/\/$/,""),E=qB(qB({},BX),Q);super(D,E,B,"storage")}async createBucket(A){var Q=this;return Q.handleOperation(async()=>{return await oC(Q.fetch,`${Q.url}/bucket`,{name:A},{headers:Q.headers})})}async listBuckets(A){var Q=this;return Q.handleOperation(async()=>{let B=new URLSearchParams;if((A===null||A===void 0?void 0:A.limit)!==void 0)B.set("limit",A.limit.toString());if((A===null||A===void 0?void 0:A.offset)!==void 0)B.set("offset",A.offset.toString());if(A===null||A===void 0?void 0:A.sortColumn)B.set("sortColumn",A.sortColumn);if(A===null||A===void 0?void 0:A.sortOrder)B.set("sortOrder",A.sortOrder);if(A===null||A===void 0?void 0:A.search)B.set("search",A.search);let D=B.toString(),E=D?`${Q.url}/bucket?${D}`:`${Q.url}/bucket`;return await QX(Q.fetch,E,{headers:Q.headers})})}async deleteBucket(A){var Q=this;return Q.handleOperation(async()=>{return await ok(Q.fetch,`${Q.url}/bucket/${A}`,{},{headers:Q.headers})})}from(A){var Q=this;if(!UgA(A))throw new RN("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");let B=new HQA({baseUrl:this.url,catalogName:A,auth:{type:"custom",getHeaders:async()=>Q.headers},fetch:this.fetch}),D=this.shouldThrowOnError;return new Proxy(B,{get(E,I){let C=E[I];if(typeof C!=="function")return C;return async(...F)=>{try{return{data:await C.apply(E,F),error:null}}catch($){if(D)throw $;return{data:null,error:$}}}}})}},OgA=class extends i7{constructor(A,Q={},B){let D=A.replace(/\/$/,""),E=qB(qB({},BX),{},{"Content-Type":"application/json"},Q);super(D,E,B,"vectors")}async createIndex(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/CreateIndex`,A,{headers:Q.headers})||{}})}async getIndex(A,Q){var B=this;return B.handleOperation(async()=>{return await m8.post(B.fetch,`${B.url}/GetIndex`,{vectorBucketName:A,indexName:Q},{headers:B.headers})})}async listIndexes(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/ListIndexes`,A,{headers:Q.headers})})}async deleteIndex(A,Q){var B=this;return B.handleOperation(async()=>{return await m8.post(B.fetch,`${B.url}/DeleteIndex`,{vectorBucketName:A,indexName:Q},{headers:B.headers})||{}})}},zgA=class extends i7{constructor(A,Q={},B){let D=A.replace(/\/$/,""),E=qB(qB({},BX),{},{"Content-Type":"application/json"},Q);super(D,E,B,"vectors")}async putVectors(A){var Q=this;if(A.vectors.length<1||A.vectors.length>500)throw Error("Vector batch size must be between 1 and 500 items");return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/PutVectors`,A,{headers:Q.headers})||{}})}async getVectors(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/GetVectors`,A,{headers:Q.headers})})}async listVectors(A){var Q=this;if(A.segmentCount!==void 0){if(A.segmentCount<1||A.segmentCount>16)throw Error("segmentCount must be between 1 and 16");if(A.segmentIndex!==void 0){if(A.segmentIndex<0||A.segmentIndex>=A.segmentCount)throw Error(`segmentIndex must be between 0 and ${A.segmentCount-1}`)}}return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/ListVectors`,A,{headers:Q.headers})})}async queryVectors(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/QueryVectors`,A,{headers:Q.headers})})}async deleteVectors(A){var Q=this;if(A.keys.length<1||A.keys.length>500)throw Error("Keys batch size must be between 1 and 500 items");return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/DeleteVectors`,A,{headers:Q.headers})||{}})}},VgA=class extends i7{constructor(A,Q={},B){let D=A.replace(/\/$/,""),E=qB(qB({},BX),{},{"Content-Type":"application/json"},Q);super(D,E,B,"vectors")}async createBucket(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/CreateVectorBucket`,{vectorBucketName:A},{headers:Q.headers})||{}})}async getBucket(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/GetVectorBucket`,{vectorBucketName:A},{headers:Q.headers})})}async listBuckets(A={}){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/ListVectorBuckets`,A,{headers:Q.headers})})}async deleteBucket(A){var Q=this;return Q.handleOperation(async()=>{return await m8.post(Q.fetch,`${Q.url}/DeleteVectorBucket`,{vectorBucketName:A},{headers:Q.headers})||{}})}},SgA=class extends VgA{constructor(A,Q={}){super(A,Q.headers||{},Q.fetch)}from(A){return new TgA(this.url,this.headers,A,this.fetch)}async createBucket(A){var Q=()=>super.createBucket,B=this;return Q().call(B,A)}async getBucket(A){var Q=()=>super.getBucket,B=this;return Q().call(B,A)}async listBuckets(A={}){var Q=()=>super.listBuckets,B=this;return Q().call(B,A)}async deleteBucket(A){var Q=()=>super.deleteBucket,B=this;return Q().call(B,A)}},TgA=class extends OgA{constructor(A,Q,B,D){super(A,Q,D);this.vectorBucketName=B}async createIndex(A){var Q=()=>super.createIndex,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName}))}async listIndexes(A={}){var Q=()=>super.listIndexes,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName}))}async getIndex(A){var Q=()=>super.getIndex,B=this;return Q().call(B,B.vectorBucketName,A)}async deleteIndex(A){var Q=()=>super.deleteIndex,B=this;return Q().call(B,B.vectorBucketName,A)}index(A){return new jgA(this.url,this.headers,this.vectorBucketName,A,this.fetch)}},jgA=class extends zgA{constructor(A,Q,B,D,E){super(A,Q,E);this.vectorBucketName=B,this.indexName=D}async putVectors(A){var Q=()=>super.putVectors,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName,indexName:B.indexName}))}async getVectors(A){var Q=()=>super.getVectors,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName,indexName:B.indexName}))}async listVectors(A={}){var Q=()=>super.listVectors,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName,indexName:B.indexName}))}async queryVectors(A){var Q=()=>super.queryVectors,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName,indexName:B.indexName}))}async deleteVectors(A){var Q=()=>super.deleteVectors,B=this;return Q().call(B,qB(qB({},A),{},{vectorBucketName:B.vectorBucketName,indexName:B.indexName}))}},ZQA=class extends LgA{constructor(A,Q={},B,D){super(A,Q,B,D)}from(A){return new NgA(this.url,this.headers,A,this.fetch)}get vectors(){return new SgA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new RgA(this.url+"/iceberg",this.headers,this.fetch)}}});class RQA{constructor(A){return this.options=A,new Proxy(this,_gA)}}var PgA=()=>Promise.resolve({data:{session:null,user:null},error:null}),_gA,ak;var sk=SA(()=>{_gA={get:(A,Q)=>{if(Q==="constructor")return A.constructor;if(Q==="then"||Q==="catch"||Q==="finally")return;if(typeof Q==="symbol")return;if(Q==="getSession")return()=>Promise.resolve({data:{session:null,user:null},error:null});if(Q==="onAuthStateChange")return()=>({data:{subscription:{unsubscribe:()=>{}}},error:null});return PgA}};ak=class ak extends RQA{}});function EX(A){return EX=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},EX(A)}function fgA(A,Q){if(EX(A)!="object"||!A)return A;var B=A[Symbol.toPrimitive];if(B!==void 0){var D=B.call(A,Q||"default");if(EX(D)!="object")return D;throw TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(A)}function ugA(A){var Q=fgA(A,"string");return EX(Q)=="symbol"?Q:Q+""}function hgA(A,Q,B){return(Q=ugA(Q))in A?Object.defineProperty(A,Q,{value:B,enumerable:!0,configurable:!0,writable:!0}):A[Q]=B,A}function OQA(A,Q){var B=Object.keys(A);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(A);Q&&(D=D.filter(function(E){return Object.getOwnPropertyDescriptor(A,E).enumerable})),B.push.apply(B,D)}return B}function XE(A){for(var Q=1;Q<arguments.length;Q++){var B=arguments[Q]!=null?arguments[Q]:{};Q%2?OQA(Object(B),!0).forEach(function(D){hgA(A,D,B[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(B)):OQA(Object(B)).forEach(function(D){Object.defineProperty(A,D,Object.getOwnPropertyDescriptor(B,D))})}return A}function dgA(A){return A.endsWith("/")?A:A+"/"}function pgA(A,Q){var B,D;let{db:E,auth:I,realtime:C,global:F}=A,{db:$,auth:J,realtime:U,global:H}=Q,W={db:XE(XE({},$),E),auth:XE(XE({},J),I),realtime:XE(XE({},U),C),storage:{},global:XE(XE(XE({},H),F),{},{headers:XE(XE({},(B=H===null||H===void 0?void 0:H.headers)!==null&&B!==void 0?B:{}),(D=F===null||F===void 0?void 0:F.headers)!==null&&D!==void 0?D:{})}),accessToken:async()=>""};if(A.accessToken)W.accessToken=A.accessToken;else delete W.accessToken;return W}function ngA(A){let Q=A===null||A===void 0?void 0:A.trim();if(!Q)throw Error("supabaseUrl is required.");if(!Q.match(/^https?:\/\//i))throw Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(dgA(Q))}catch(B){throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}function ogA(){if(typeof window<"u")return!1;let A=globalThis.process;if(!A)return!1;let Q=A.version;if(Q===void 0||Q===null)return!1;let B=Q.match(/^v(\d+)\./);if(!B)return!1;return parseInt(B[1],10)<=18}var aC,vgA="2.105.1",DX="",kgA,xgA,ggA,bgA,ygA,mgA=(A)=>{if(A)return(...Q)=>A(...Q);return(...Q)=>fetch(...Q)},cgA=()=>{return Headers},lgA=(A,Q,B)=>{let D=mgA(B),E=cgA();return async(I,C)=>{var F;let $=(F=await Q())!==null&&F!==void 0?F:A,J=new E(C===null||C===void 0?void 0:C.headers);if(!J.has("apikey"))J.set("apikey",A);if(!J.has("Authorization"))J.set("Authorization",`Bearer ${$}`);return D(I,XE(XE({},C),{},{headers:J}))}},igA,rgA=class{constructor(A,Q,B){var D,E;this.supabaseUrl=A,this.supabaseKey=Q;let I=ngA(A);if(!Q)throw Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",I),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",I),this.storageUrl=new URL("storage/v1",I),this.functionsUrl=new URL("functions/v1",I);let C=`sb-${I.hostname.split(".")[0]}-auth-token`,F={db:ggA,realtime:ygA,auth:XE(XE({},bgA),{},{storageKey:C}),global:xgA},$=pgA(B!==null&&B!==void 0?B:{},F);if(this.storageKey=(D=$.auth.storageKey)!==null&&D!==void 0?D:"",this.headers=(E=$.global.headers)!==null&&E!==void 0?E:{},!$.accessToken){var J;this.auth=this._initSupabaseAuthClient((J=$.auth)!==null&&J!==void 0?J:{},this.headers,$.global.fetch)}else this.accessToken=$.accessToken,this.auth=new Proxy({},{get:(U,H)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(H)} is not possible`)}});if(this.fetch=lgA(Q,this._getAccessToken.bind(this),$.global.fetch),this.realtime=this._initRealtimeClient(XE({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},$.realtime)),this.accessToken)Promise.resolve(this.accessToken()).then((U)=>this.realtime.setAuth(U)).catch((U)=>console.warn("Failed to set initial Realtime auth token:",U));if(this.rest=new YQA(new URL("rest/v1",I).href,{headers:this.headers,schema:$.db.schema,fetch:this.fetch,timeout:$.db.timeout,urlLengthLimit:$.db.urlLengthLimit}),this.storage=new ZQA(this.storageUrl.href,this.headers,this.fetch,B===null||B===void 0?void 0:B.storage),!$.accessToken)this._listenForAuthEvents()}get functions(){return new aC.FunctionsClient(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(A){return this.rest.from(A)}schema(A){return this.rest.schema(A)}rpc(A,Q={},B={head:!1,get:!1,count:void 0}){return this.rest.rpc(A,Q,B)}channel(A,Q={config:{}}){return this.realtime.channel(A,Q)}getChannels(){return this.realtime.getChannels()}removeChannel(A){return this.realtime.removeChannel(A)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var A=this,Q,B;if(A.accessToken)return await A.accessToken();let{data:D}=await A.auth.getSession();return(Q=(B=D.session)===null||B===void 0?void 0:B.access_token)!==null&&Q!==void 0?Q:A.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:A,persistSession:Q,detectSessionInUrl:B,storage:D,userStorage:E,storageKey:I,flowType:C,lock:F,debug:$,throwOnError:J,experimental:U},H,W){let K={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new igA({url:this.authUrl.href,headers:XE(XE({},K),H),storageKey:I,autoRefreshToken:A,persistSession:Q,detectSessionInUrl:B,storage:D,userStorage:E,flowType:C,lock:F,debug:$,throwOnError:J,experimental:U,fetch:W,hasCustomAuthorizationHeader:Object.keys(this.headers).some((q)=>q.toLowerCase()==="authorization")})}_initRealtimeClient(A){return new nk(this.realtimeUrl.href,XE(XE({},A),{},{params:XE(XE({},{apikey:this.supabaseKey}),A===null||A===void 0?void 0:A.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((A,Q)=>{this._handleTokenChanged(A,"CLIENT",Q===null||Q===void 0?void 0:Q.access_token)})}_handleTokenChanged(A,Q,B){if((A==="TOKEN_REFRESHED"||A==="SIGNED_IN")&&this.changedAccessToken!==B)this.changedAccessToken=B,this.realtime.setAuth(B);else if(A==="SIGNED_OUT"){if(this.realtime.setAuth(),Q=="STORAGE")this.auth.signOut();this.changedAccessToken=void 0}}},zQA=(A,Q,B)=>{return new rgA(A,Q,B)};var VQA=SA(()=>{UQA();LQA();sk();aC=pA(EQA(),1);sk();if(typeof Deno<"u")DX="deno";else if(typeof document<"u")DX="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")DX="react-native";else DX="node";kgA={"X-Client-Info":`supabase-js-${DX}/${vgA}`},xgA={headers:kgA},ggA={schema:"public"},bgA={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ygA={};igA=class extends ak{constructor(A){super(A)}};if(ogA())console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217")});var tk=k((NPQ,SQA)=>{SQA.exports={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}});var zN=k((jQA)=>{var TQA={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function agA(A){return function(...Q){if(Q.length)A=A.replace(/\{(\d)\}/g,(B,D)=>Q[D]||"");return Error("ADM-ZIP: "+A)}}for(let A of Object.keys(TQA))jQA[A]=agA(TQA[A])});var xQA=k((LPQ,kQA)=>{var sgA=PA("fs"),QI=PA("path"),PQA=tk(),tgA=zN(),egA=typeof process==="object"&&process.platform==="win32",_QA=(A)=>typeof A==="object"&&A!==null,vQA=new Uint32Array(256).map((A,Q)=>{for(let B=0;B<8;B++)if((Q&1)!==0)Q=3988292384^Q>>>1;else Q>>>=1;return Q>>>0});function WE(A){if(this.sep=QI.sep,this.fs=sgA,_QA(A)){if(_QA(A.fs)&&typeof A.fs.statSync==="function")this.fs=A.fs}}kQA.exports=WE;WE.prototype.makeDir=function(A){let Q=this;function B(D){let E=D.split(Q.sep)[0];D.split(Q.sep).forEach(function(I){if(!I||I.substr(-1,1)===":")return;E+=Q.sep+I;var C;try{C=Q.fs.statSync(E)}catch(F){if(F.message&&F.message.startsWith("ENOENT"))Q.fs.mkdirSync(E);else throw F}if(C&&C.isFile())throw tgA.FILE_IN_THE_WAY(`"${E}"`)})}B(A)};WE.prototype.writeFileTo=function(A,Q,B,D){let E=this;if(E.fs.existsSync(A)){if(!B)return!1;var I=E.fs.statSync(A);if(I.isDirectory())return!1}var C=QI.dirname(A);if(!E.fs.existsSync(C))E.makeDir(C);var F;try{F=E.fs.openSync(A,"w",438)}catch($){E.fs.chmodSync(A,438),F=E.fs.openSync(A,"w",438)}if(F)try{E.fs.writeSync(F,Q,0,Q.length,0)}finally{E.fs.closeSync(F)}return E.fs.chmodSync(A,D||438),!0};WE.prototype.writeFileToAsync=function(A,Q,B,D,E){if(typeof D==="function")E=D,D=void 0;let I=this;I.fs.exists(A,function(C){if(C&&!B)return E(!1);I.fs.stat(A,function(F,$){if(C&&$.isDirectory())return E(!1);var J=QI.dirname(A);I.fs.exists(J,function(U){if(!U)I.makeDir(J);I.fs.open(A,"w",438,function(H,W){if(H)I.fs.chmod(A,438,function(){I.fs.open(A,"w",438,function(K,q){I.fs.write(q,Q,0,Q.length,0,function(){I.fs.close(q,function(){I.fs.chmod(A,D||438,function(){E(!0)})})})})});else if(W)I.fs.write(W,Q,0,Q.length,0,function(){I.fs.close(W,function(){I.fs.chmod(A,D||438,function(){E(!0)})})});else I.fs.chmod(A,D||438,function(){E(!0)})})})})})};WE.prototype.findFiles=function(A){let Q=this;function B(D,E,I){if(typeof E==="boolean")I=E,E=void 0;let C=[];return Q.fs.readdirSync(D).forEach(function(F){let $=QI.join(D,F),J=Q.fs.statSync($);if(!E||E.test($))C.push(QI.normalize($)+(J.isDirectory()?Q.sep:""));if(J.isDirectory()&&I)C=C.concat(B($,E,I))}),C}return B(A,void 0,!0)};WE.prototype.findFilesAsync=function(A,Q){let B=this,D=[];B.fs.readdir(A,function(E,I){if(E)return Q(E);let C=I.length;if(!C)return Q(null,D);I.forEach(function(F){F=QI.join(A,F),B.fs.stat(F,function($,J){if($)return Q($);if(J){if(D.push(QI.normalize(F)+(J.isDirectory()?B.sep:"")),J.isDirectory())B.findFilesAsync(F,function(U,H){if(U)return Q(U);if(D=D.concat(H),!--C)Q(null,D)});else if(!--C)Q(null,D)}})})})};WE.prototype.getAttributes=function(){};WE.prototype.setAttributes=function(){};WE.crc32update=function(A,Q){return vQA[(A^Q)&255]^A>>>8};WE.crc32=function(A){if(typeof A==="string")A=Buffer.from(A,"utf8");let Q=A.length,B=-1;for(let D=0;D<Q;)B=WE.crc32update(B,A[D++]);return~B>>>0};WE.methodToString=function(A){switch(A){case PQA.STORED:return"STORED ("+A+")";case PQA.DEFLATED:return"DEFLATED ("+A+")";default:return"UNSUPPORTED ("+A+")"}};WE.canonical=function(A){if(!A)return"";let Q=QI.posix.normalize("/"+A.split("\\").join("/"));return QI.join(".",Q)};WE.zipnamefix=function(A){if(!A)return"";let Q=QI.posix.normalize("/"+A.split("\\").join("/"));return QI.posix.join(".",Q)};WE.findLast=function(A,Q){if(!Array.isArray(A))throw TypeError("arr is not array");let B=A.length>>>0;for(let D=B-1;D>=0;D--)if(Q(A[D],D,A))return A[D];return};WE.sanitize=function(A,Q){A=QI.resolve(QI.normalize(A));var B=Q.split("/");for(var D=0,E=B.length;D<E;D++){var I=QI.normalize(QI.join(A,B.slice(D,E).join(QI.sep)));if(I.indexOf(A)===0)return I}return QI.normalize(QI.join(A,QI.basename(Q)))};WE.toBuffer=function(Q,B){if(Buffer.isBuffer(Q))return Q;else if(Q instanceof Uint8Array)return Buffer.from(Q);else return typeof Q==="string"?B(Q):Buffer.alloc(0)};WE.readBigUInt64LE=function(A,Q){let B=A.readUInt32LE(Q);return A.readUInt32LE(Q+4)*4294967296+B};WE.fromDOS2Date=function(A){return new Date((A>>25&127)+1980,Math.max((A>>21&15)-1,0),Math.max(A>>16&31,1),A>>11&31,A>>5&63,(A&31)<<1)};WE.fromDate2DOS=function(A){let Q=0,B=0;if(A.getFullYear()>1979)Q=(A.getFullYear()-1980&127)<<9|A.getMonth()+1<<5|A.getDate(),B=A.getHours()<<11|A.getMinutes()<<5|A.getSeconds()>>1;return Q<<16|B};WE.isWin=egA;WE.crcTable=vQA});var bQA=k((RPQ,gQA)=>{var AbA=PA("path");gQA.exports=function(A,{fs:Q}){var B=A||"",D=I(),E=null;function I(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}if(B&&Q.existsSync(B))E=Q.statSync(B),D.directory=E.isDirectory(),D.mtime=E.mtime,D.atime=E.atime,D.executable=(73&E.mode)!==0,D.readonly=(128&E.mode)===0,D.hidden=AbA.basename(B)[0]===".";else console.warn("Invalid path: "+B);return{get directory(){return D.directory},get readOnly(){return D.readonly},get hidden(){return D.hidden},get mtime(){return D.mtime},get atime(){return D.atime},get executable(){return D.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:B,isDirectory:D.directory,isReadOnly:D.readonly,isHidden:D.hidden,isExecutable:D.executable,mTime:D.mtime,aTime:D.atime}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var fQA=k((OPQ,yQA)=>{yQA.exports={efs:!0,encode:(A)=>Buffer.from(A,"utf8"),decode:(A)=>A.toString("utf8")}});var o7=k((zPQ,r7)=>{r7.exports=xQA();r7.exports.Constants=tk();r7.exports.Errors=zN();r7.exports.FileAttr=bQA();r7.exports.decoder=fQA()});var hQA=k((VPQ,uQA)=>{var w$=o7(),gQ=w$.Constants;uQA.exports=function(){var A=20,Q=10,B=0,D=0,E=0,I=0,C=0,F=0,$=0,J=0,U=0,H=0,W=0,K=0,q=0;A|=w$.isWin?2560:768,B|=gQ.FLG_EFS;let N={extraLen:0},L=(z)=>Math.max(0,z)>>>0,R=(z)=>Math.max(0,z)&65535,S=(z)=>Math.max(0,z)&255;return E=w$.fromDate2DOS(new Date),{get made(){return A},set made(z){A=z},get version(){return Q},set version(z){Q=z},get flags(){return B},set flags(z){B=z},get flags_efs(){return(B&gQ.FLG_EFS)>0},set flags_efs(z){if(z)B|=gQ.FLG_EFS;else B&=~gQ.FLG_EFS},get flags_desc(){return(B&gQ.FLG_DESC)>0},set flags_desc(z){if(z)B|=gQ.FLG_DESC;else B&=~gQ.FLG_DESC},get method(){return D},set method(z){switch(z){case gQ.STORED:this.version=10;case gQ.DEFLATED:default:this.version=20}D=z},get time(){return w$.fromDOS2Date(this.timeval)},set time(z){z=new Date(z),this.timeval=w$.fromDate2DOS(z)},get timeval(){return E},set timeval(z){E=L(z)},get timeHighByte(){return S(E>>>8)},get crc(){return I},set crc(z){I=L(z)},get compressedSize(){return C},set compressedSize(z){C=L(z)},get size(){return F},set size(z){F=L(z)},get fileNameLength(){return $},set fileNameLength(z){$=z},get extraLength(){return J},set extraLength(z){J=z},get extraLocalLength(){return N.extraLen},set extraLocalLength(z){N.extraLen=z},get commentLength(){return U},set commentLength(z){U=z},get diskNumStart(){return H},set diskNumStart(z){H=L(z)},get inAttr(){return W},set inAttr(z){W=L(z)},get attr(){return K},set attr(z){K=L(z)},get fileAttr(){return(K||0)>>16&4095},get offset(){return q},set offset(z){q=L(z)},get encrypted(){return(B&gQ.FLG_ENC)===gQ.FLG_ENC},get centralHeaderSize(){return gQ.CENHDR+$+J+U},get realDataOffset(){return q+gQ.LOCHDR+N.fnameLen+N.extraLen},get localHeader(){return N},loadLocalHeaderFromBinary:function(z){var V=z.slice(q,q+gQ.LOCHDR);if(V.readUInt32LE(0)!==gQ.LOCSIG)throw w$.Errors.INVALID_LOC();N.version=V.readUInt16LE(gQ.LOCVER),N.flags=V.readUInt16LE(gQ.LOCFLG),N.flags_desc=(N.flags&gQ.FLG_DESC)>0,N.method=V.readUInt16LE(gQ.LOCHOW),N.time=V.readUInt32LE(gQ.LOCTIM),N.crc=V.readUInt32LE(gQ.LOCCRC),N.compressedSize=V.readUInt32LE(gQ.LOCSIZ),N.size=V.readUInt32LE(gQ.LOCLEN),N.fnameLen=V.readUInt16LE(gQ.LOCNAM),N.extraLen=V.readUInt16LE(gQ.LOCEXT);let T=q+gQ.LOCHDR+N.fnameLen,m=T+N.extraLen;return z.slice(T,m)},loadFromBinary:function(z){if(z.length!==gQ.CENHDR||z.readUInt32LE(0)!==gQ.CENSIG)throw w$.Errors.INVALID_CEN();A=z.readUInt16LE(gQ.CENVEM),Q=z.readUInt16LE(gQ.CENVER),B=z.readUInt16LE(gQ.CENFLG),D=z.readUInt16LE(gQ.CENHOW),E=z.readUInt32LE(gQ.CENTIM),I=z.readUInt32LE(gQ.CENCRC),C=z.readUInt32LE(gQ.CENSIZ),F=z.readUInt32LE(gQ.CENLEN),$=z.readUInt16LE(gQ.CENNAM),J=z.readUInt16LE(gQ.CENEXT),U=z.readUInt16LE(gQ.CENCOM),H=z.readUInt16LE(gQ.CENDSK),W=z.readUInt16LE(gQ.CENATT),K=z.readUInt32LE(gQ.CENATX),q=z.readUInt32LE(gQ.CENOFF)},localHeaderToBinary:function(){var z=Buffer.alloc(gQ.LOCHDR);return z.writeUInt32LE(gQ.LOCSIG,0),z.writeUInt16LE(Q,gQ.LOCVER),z.writeUInt16LE(B,gQ.LOCFLG),z.writeUInt16LE(D,gQ.LOCHOW),z.writeUInt32LE(E,gQ.LOCTIM),z.writeUInt32LE(I,gQ.LOCCRC),z.writeUInt32LE(C,gQ.LOCSIZ),z.writeUInt32LE(F,gQ.LOCLEN),z.writeUInt16LE($,gQ.LOCNAM),z.writeUInt16LE(N.extraLen,gQ.LOCEXT),z},centralHeaderToBinary:function(){var z=Buffer.alloc(gQ.CENHDR+$+J+U);return z.writeUInt32LE(gQ.CENSIG,0),z.writeUInt16LE(A,gQ.CENVEM),z.writeUInt16LE(Q,gQ.CENVER),z.writeUInt16LE(B,gQ.CENFLG),z.writeUInt16LE(D,gQ.CENHOW),z.writeUInt32LE(E,gQ.CENTIM),z.writeUInt32LE(I,gQ.CENCRC),z.writeUInt32LE(C,gQ.CENSIZ),z.writeUInt32LE(F,gQ.CENLEN),z.writeUInt16LE($,gQ.CENNAM),z.writeUInt16LE(J,gQ.CENEXT),z.writeUInt16LE(U,gQ.CENCOM),z.writeUInt16LE(H,gQ.CENDSK),z.writeUInt16LE(W,gQ.CENATT),z.writeUInt32LE(K,gQ.CENATX),z.writeUInt32LE(q,gQ.CENOFF),z},toJSON:function(){let z=function(V){return V+" bytes"};return{made:A,version:Q,flags:B,method:w$.methodToString(D),time:this.time,crc:"0x"+I.toString(16).toUpperCase(),compressedSize:z(C),size:z(F),fileNameLength:z($),extraLength:z(J),commentLength:z(U),diskNumStart:H,inAttr:W,attr:K,offset:q,centralHeaderSize:z(gQ.CENHDR+$+J+U)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var cQA=k((SPQ,mQA)=>{var a7=o7(),CE=a7.Constants;mQA.exports=function(){var A=0,Q=0,B=0,D=0,E=0;return{get diskEntries(){return A},set diskEntries(I){A=Q=I},get totalEntries(){return Q},set totalEntries(I){Q=A=I},get size(){return B},set size(I){B=I},get offset(){return D},set offset(I){D=I},get commentLength(){return E},set commentLength(I){E=I},get mainHeaderSize(){return CE.ENDHDR+E},loadFromBinary:function(I){if((I.length!==CE.ENDHDR||I.readUInt32LE(0)!==CE.ENDSIG)&&(I.length<CE.ZIP64HDR||I.readUInt32LE(0)!==CE.ZIP64SIG))throw a7.Errors.INVALID_END();if(I.readUInt32LE(0)===CE.ENDSIG)A=I.readUInt16LE(CE.ENDSUB),Q=I.readUInt16LE(CE.ENDTOT),B=I.readUInt32LE(CE.ENDSIZ),D=I.readUInt32LE(CE.ENDOFF),E=I.readUInt16LE(CE.ENDCOM);else A=a7.readBigUInt64LE(I,CE.ZIP64SUB),Q=a7.readBigUInt64LE(I,CE.ZIP64TOT),B=a7.readBigUInt64LE(I,CE.ZIP64SIZE),D=a7.readBigUInt64LE(I,CE.ZIP64OFF),E=0},toBinary:function(){var I=Buffer.alloc(CE.ENDHDR+E);return I.writeUInt32LE(CE.ENDSIG,0),I.writeUInt32LE(0,4),I.writeUInt16LE(A,CE.ENDSUB),I.writeUInt16LE(Q,CE.ENDTOT),I.writeUInt32LE(B,CE.ENDSIZ),I.writeUInt32LE(D,CE.ENDOFF),I.writeUInt16LE(E,CE.ENDCOM),I.fill(" ",CE.ENDHDR),I},toJSON:function(){let I=function(C,F){let $=C.toString(16).toUpperCase();while($.length<F)$="0"+$;return"0x"+$};return{diskEntries:A,totalEntries:Q,size:B+" bytes",offset:I(D,4),commentLength:E}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var ek=k((QbA)=>{QbA.EntryHeader=hQA();QbA.MainHeader=cQA()});var dQA=k((jPQ,lQA)=>{lQA.exports=function(A){var Q=PA("zlib"),B={chunkSize:(parseInt(A.length/1024)+1)*1024};return{deflate:function(){return Q.deflateRawSync(A,B)},deflateAsync:function(D){var E=Q.createDeflateRaw(B),I=[],C=0;E.on("data",function(F){I.push(F),C+=F.length}),E.on("end",function(){var F=Buffer.alloc(C),$=0;F.fill(0);for(var J=0;J<I.length;J++){var U=I[J];U.copy(F,$),$+=U.length}D&&D(F)}),E.end(A)}}}});var nQA=k((PPQ,pQA)=>{var EbA=+(process.versions?process.versions.node:"").split(".")[0]||0;pQA.exports=function(A,Q){var B=PA("zlib");let D=EbA>=15&&Q>0?{maxOutputLength:Q}:{};return{inflate:function(){return B.inflateRawSync(A,D)},inflateAsync:function(E){var I=B.createInflateRaw(D),C=[],F=0;I.on("data",function($){C.push($),F+=$.length}),I.on("end",function(){var $=Buffer.alloc(F),J=0;$.fill(0);for(var U=0;U<C.length;U++){var H=C[U];H.copy($,J),J+=H.length}E&&E($)}),I.end(A)}}}});var sQA=k((_PQ,aQA)=>{var{randomFillSync:iQA}=PA("crypto"),IbA=zN(),CbA=new Uint32Array(256).map((A,Q)=>{for(let B=0;B<8;B++)if((Q&1)!==0)Q=Q>>>1^3988292384;else Q>>>=1;return Q>>>0}),oQA=(A,Q)=>Math.imul(A,Q)>>>0,rQA=(A,Q)=>{return CbA[(A^Q)&255]^A>>>8},IX=()=>{if(typeof iQA==="function")return iQA(Buffer.alloc(12));else return IX.node()};IX.node=()=>{let A=Buffer.alloc(12),Q=A.length;for(let B=0;B<Q;B++)A[B]=Math.random()*256&255;return A};var VN={genSalt:IX};function SN(A){let Q=Buffer.isBuffer(A)?A:Buffer.from(A);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let B=0;B<Q.length;B++)this.updateKeys(Q[B])}SN.prototype.updateKeys=function(A){let Q=this.keys;return Q[0]=rQA(Q[0],A),Q[1]+=Q[0]&255,Q[1]=oQA(Q[1],134775813)+1,Q[2]=rQA(Q[2],Q[1]>>>24),A};SN.prototype.next=function(){let A=(this.keys[2]|2)>>>0;return oQA(A,A^1)>>8&255};function FbA(A){let Q=new SN(A);return function(B){let D=Buffer.alloc(B.length),E=0;for(let I of B)D[E++]=Q.updateKeys(I^Q.next());return D}}function $bA(A){let Q=new SN(A);return function(B,D,E=0){if(!D)D=Buffer.alloc(B.length);for(let I of B){let C=Q.next();D[E++]=I^C,Q.updateKeys(I)}return D}}function GbA(A,Q,B){if(!A||!Buffer.isBuffer(A)||A.length<12)return Buffer.alloc(0);let D=FbA(B),E=D(A.slice(0,12)),I=(Q.flags&8)===8?Q.timeHighByte:Q.crc>>>24;if(E[11]!==I)throw IbA.WRONG_PASSWORD();return D(A.slice(12))}function JbA(A){if(Buffer.isBuffer(A)&&A.length>=12)VN.genSalt=function(){return A.slice(0,12)};else if(A==="node")VN.genSalt=IX.node;else VN.genSalt=IX}function YbA(A,Q,B,D=!1){if(A==null)A=Buffer.alloc(0);if(!Buffer.isBuffer(A))A=Buffer.from(A.toString());let E=$bA(B),I=VN.genSalt();if(I[11]=Q.crc>>>24&255,D)I[10]=Q.crc>>>16&255;let C=Buffer.alloc(A.length+12);return E(I,C),E(A,C,12)}aQA.exports={decrypt:GbA,encrypt:YbA,_salter:JbA}});var tQA=k((UbA)=>{UbA.Deflater=dQA();UbA.Inflater=nQA();UbA.ZipCrypto=sQA()});var Qx=k((kPQ,eQA)=>{var oD=o7(),KbA=ek(),KE=oD.Constants,Ax=tQA();eQA.exports=function(A,Q){var B=new KbA.EntryHeader,D=Buffer.alloc(0),E=Buffer.alloc(0),I=!1,C=null,F=Buffer.alloc(0),$=Buffer.alloc(0),J=!0;let U=A,H=typeof U.decoder==="object"?U.decoder:oD.decoder;J=H.hasOwnProperty("efs")?H.efs:!1;function W(){if(!Q||!(Q instanceof Uint8Array))return Buffer.alloc(0);return $=B.loadLocalHeaderFromBinary(Q),Q.slice(B.realDataOffset,B.realDataOffset+B.compressedSize)}function K(z){if(!B.flags_desc&&!B.localHeader.flags_desc){if(oD.crc32(z)!==B.localHeader.crc)return!1}else{let V={},T=B.realDataOffset+B.compressedSize;if(Q.readUInt32LE(T)==KE.LOCSIG||Q.readUInt32LE(T)==KE.CENSIG)throw oD.Errors.DESCRIPTOR_NOT_EXIST();if(Q.readUInt32LE(T)==KE.EXTSIG)V.crc=Q.readUInt32LE(T+KE.EXTCRC),V.compressedSize=Q.readUInt32LE(T+KE.EXTSIZ),V.size=Q.readUInt32LE(T+KE.EXTLEN);else if(Q.readUInt16LE(T+12)===19280)V.crc=Q.readUInt32LE(T+KE.EXTCRC-4),V.compressedSize=Q.readUInt32LE(T+KE.EXTSIZ-4),V.size=Q.readUInt32LE(T+KE.EXTLEN-4);else throw oD.Errors.DESCRIPTOR_UNKNOWN();if(V.compressedSize!==B.compressedSize||V.size!==B.size||V.crc!==B.crc)throw oD.Errors.DESCRIPTOR_FAULTY();if(oD.crc32(z)!==V.crc)return!1}return!0}function q(z,V,T){if(typeof V>"u"&&typeof z==="string")T=z,z=void 0;if(I){if(z&&V)V(Buffer.alloc(0),oD.Errors.DIRECTORY_CONTENT_ERROR());return Buffer.alloc(0)}var m=W();if(m.length===0){if(z&&V)V(m);return m}if(B.encrypted){if(typeof T!=="string"&&!Buffer.isBuffer(T))throw oD.Errors.INVALID_PASS_PARAM();m=Ax.ZipCrypto.decrypt(m,B,T)}var p=Buffer.alloc(B.size);switch(B.method){case oD.Constants.STORED:if(m.copy(p),!K(p)){if(z&&V)V(p,oD.Errors.BAD_CRC());throw oD.Errors.BAD_CRC()}else{if(z&&V)V(p);return p}case oD.Constants.DEFLATED:var s=new Ax.Inflater(m,B.size);if(!z){if(s.inflate(p).copy(p,0),!K(p))throw oD.Errors.BAD_CRC(`"${H.decode(D)}"`);return p}else s.inflateAsync(function(c){if(c.copy(c,0),V)if(!K(c))V(c,oD.Errors.BAD_CRC());else V(c)});break;default:if(z&&V)V(Buffer.alloc(0),oD.Errors.UNKNOWN_METHOD());throw oD.Errors.UNKNOWN_METHOD()}}function N(z,V){if((!C||!C.length)&&Buffer.isBuffer(Q)){if(z&&V)V(W());return W()}if(C.length&&!I){var T;switch(B.method){case oD.Constants.STORED:if(B.compressedSize=B.size,T=Buffer.alloc(C.length),C.copy(T),z&&V)V(T);return T;default:case oD.Constants.DEFLATED:var m=new Ax.Deflater(C);if(!z){var p=m.deflate();return B.compressedSize=p.length,p}else m.deflateAsync(function(s){T=Buffer.alloc(s.length),B.compressedSize=s.length,s.copy(T),V&&V(T)});m=null;break}}else if(z&&V)V(Buffer.alloc(0));else return Buffer.alloc(0)}function L(z,V){return oD.readBigUInt64LE(z,V)}function R(z){try{var V=0,T,m,p;while(V+4<z.length)if(T=z.readUInt16LE(V),V+=2,m=z.readUInt16LE(V),V+=2,p=z.slice(V,V+m),V+=m,KE.ID_ZIP64===T)S(p)}catch(s){throw oD.Errors.EXTRA_FIELD_PARSE_ERROR()}}function S(z){var V,T,m,p;if(z.length>=KE.EF_ZIP64_SCOMP){if(V=L(z,KE.EF_ZIP64_SUNCOMP),B.size===KE.EF_ZIP64_OR_32)B.size=V}if(z.length>=KE.EF_ZIP64_RHO){if(T=L(z,KE.EF_ZIP64_SCOMP),B.compressedSize===KE.EF_ZIP64_OR_32)B.compressedSize=T}if(z.length>=KE.EF_ZIP64_DSN){if(m=L(z,KE.EF_ZIP64_RHO),B.offset===KE.EF_ZIP64_OR_32)B.offset=m}if(z.length>=KE.EF_ZIP64_DSN+4){if(p=z.readUInt32LE(KE.EF_ZIP64_DSN),B.diskNumStart===KE.EF_ZIP64_OR_16)B.diskNumStart=p}}return{get entryName(){return H.decode(D)},get rawEntryName(){return D},set entryName(z){D=oD.toBuffer(z,H.encode);var V=D[D.length-1];I=V===47||V===92,B.fileNameLength=D.length},get efs(){if(typeof J==="function")return J(this.entryName);else return J},get extra(){return F},set extra(z){F=z,B.extraLength=z.length,R(z)},get comment(){return H.decode(E)},set comment(z){if(E=oD.toBuffer(z,H.encode),B.commentLength=E.length,E.length>65535)throw oD.Errors.COMMENT_TOO_LONG()},get name(){var z=H.decode(D);return I?z.substr(z.length-1).split("/").pop():z.split("/").pop()},get isDirectory(){return I},getCompressedData:function(){return N(!1,null)},getCompressedDataAsync:function(z){N(!0,z)},setData:function(z){if(C=oD.toBuffer(z,oD.decoder.encode),!I&&C.length)B.size=C.length,B.method=oD.Constants.DEFLATED,B.crc=oD.crc32(z),B.changed=!0;else B.method=oD.Constants.STORED},getData:function(z){if(B.changed)return C;else return q(!1,null,z)},getDataAsync:function(z,V){if(B.changed)z(C);else q(!0,z,V)},set attr(z){B.attr=z},get attr(){return B.attr},set header(z){B.loadFromBinary(z)},get header(){return B},packCentralHeader:function(){B.flags_efs=this.efs,B.extraLength=F.length;var z=B.centralHeaderToBinary(),V=oD.Constants.CENHDR;return D.copy(z,V),V+=D.length,F.copy(z,V),V+=B.extraLength,E.copy(z,V),z},packLocalHeader:function(){let z=0;B.flags_efs=this.efs,B.extraLocalLength=$.length;let V=B.localHeaderToBinary(),T=Buffer.alloc(V.length+D.length+B.extraLocalLength);return V.copy(T,z),z+=V.length,D.copy(T,z),z+=D.length,$.copy(T,z),z+=$.length,T},toJSON:function(){let z=function(V){return"<"+(V&&V.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:B.toJSON(),compressedData:z(Q),data:z(C)}},toString:function(){return JSON.stringify(this.toJSON(),null,"\t")}}}});var BBA=k((xPQ,QBA)=>{var ABA=Qx(),MbA=ek(),lI=o7();QBA.exports=function(A,Q){var B=[],D={},E=Buffer.alloc(0),I=new MbA.MainHeader,C=!1,F=null;let $=new Set,J=Q,{noSort:U,decoder:H}=J;if(A)q(J.readEntries);else C=!0;function W(){let L=new Set;for(let R of Object.keys(D)){let S=R.split("/");if(S.pop(),!S.length)continue;for(let z=0;z<S.length;z++){let V=S.slice(0,z+1).join("/")+"/";L.add(V)}}for(let R of L)if(!(R in D)){let S=new ABA(J);S.entryName=R,S.attr=16,S.temporary=!0,B.push(S),D[S.entryName]=S,$.add(S)}}function K(){if(C=!0,D={},I.diskEntries>(A.length-I.offset)/lI.Constants.CENHDR)throw lI.Errors.DISK_ENTRY_TOO_LARGE();B=Array(I.diskEntries);var L=I.offset;for(var R=0;R<B.length;R++){var S=L,z=new ABA(J,A);if(z.header=A.slice(S,S+=lI.Constants.CENHDR),z.entryName=A.slice(S,S+=z.header.fileNameLength),z.header.extraLength)z.extra=A.slice(S,S+=z.header.extraLength);if(z.header.commentLength)z.comment=A.slice(S,S+z.header.commentLength);L+=z.header.centralHeaderSize,B[R]=z,D[z.entryName]=z}$.clear(),W()}function q(L){var R=A.length-lI.Constants.ENDHDR,S=Math.max(0,R-65535),z=S,V=A.length,T=-1,m=0;if(typeof J.trailingSpace==="boolean"?J.trailingSpace:!1)S=0;for(R;R>=z;R--){if(A[R]!==80)continue;if(A.readUInt32LE(R)===lI.Constants.ENDSIG){T=R,m=R,V=R+lI.Constants.ENDHDR,z=R-lI.Constants.END64HDR;continue}if(A.readUInt32LE(R)===lI.Constants.END64SIG){z=S;continue}if(A.readUInt32LE(R)===lI.Constants.ZIP64SIG){T=R,V=R+lI.readBigUInt64LE(A,R+lI.Constants.ZIP64SIZE)+lI.Constants.ZIP64LEAD;break}}if(T==-1)throw lI.Errors.INVALID_FORMAT();if(I.loadFromBinary(A.slice(T,V)),I.commentLength)E=A.slice(m+lI.Constants.ENDHDR);if(L)K()}function N(){if(B.length>1&&!U)B.sort((L,R)=>L.entryName.toLowerCase().localeCompare(R.entryName.toLowerCase()))}return{get entries(){if(!C)K();return B.filter((L)=>!$.has(L))},get comment(){return H.decode(E)},set comment(L){E=lI.toBuffer(L,H.encode),I.commentLength=E.length},getEntryCount:function(){if(!C)return I.diskEntries;return B.length},forEach:function(L){this.entries.forEach(L)},getEntry:function(L){if(!C)K();return D[L]||null},setEntry:function(L){if(!C)K();B.push(L),D[L.entryName]=L,I.totalEntries=B.length},deleteFile:function(L,R=!0){if(!C)K();let S=D[L];this.getEntryChildren(S,R).map((V)=>V.entryName).forEach(this.deleteEntry)},deleteEntry:function(L){if(!C)K();let R=D[L],S=B.indexOf(R);if(S>=0)B.splice(S,1),delete D[L],I.totalEntries=B.length},getEntryChildren:function(L,R=!0){if(!C)K();if(typeof L==="object")if(L.isDirectory&&R){let S=[],z=L.entryName;for(let V of B)if(V.entryName.startsWith(z))S.push(V);return S}else return[L];return[]},getChildCount:function(L){if(L&&L.isDirectory){let R=this.getEntryChildren(L);return R.includes(L)?R.length-1:R.length}return 0},compressToBuffer:function(){if(!C)K();N();let L=[],R=[],S=0,z=0;I.size=0,I.offset=0;let V=0;for(let p of this.entries){let s=p.getCompressedData();p.header.offset=z;let c=p.packLocalHeader(),AA=c.length+s.length;z+=AA,L.push(c),L.push(s);let i=p.packCentralHeader();R.push(i),I.size+=i.length,S+=AA+i.length,V++}S+=I.mainHeaderSize,I.offset=z,I.totalEntries=V,z=0;let T=Buffer.alloc(S);for(let p of L)p.copy(T,z),z+=p.length;for(let p of R)p.copy(T,z),z+=p.length;let m=I.toBinary();if(E)E.copy(m,lI.Constants.ENDHDR);return m.copy(T,z),A=T,C=!1,T},toAsyncBuffer:function(L,R,S,z){try{if(!C)K();N();let V=[],T=[],m=0,p=0,s=0;I.size=0,I.offset=0;let c=function(AA){if(AA.length>0){let i=AA.shift(),HA=i.entryName+i.extra.toString();if(S)S(HA);i.getCompressedDataAsync(function(UA){if(z)z(HA);i.header.offset=p;let qA=i.packLocalHeader(),n=qA.length+UA.length;p+=n,V.push(qA),V.push(UA);let P=i.packCentralHeader();T.push(P),I.size+=P.length,m+=n+P.length,s++,c(AA)})}else{m+=I.mainHeaderSize,I.offset=p,I.totalEntries=s,p=0;let i=Buffer.alloc(m);V.forEach(function(UA){UA.copy(i,p),p+=UA.length}),T.forEach(function(UA){UA.copy(i,p),p+=UA.length});let HA=I.toBinary();if(E)E.copy(HA,lI.Constants.ENDHDR);HA.copy(i,p),A=i,C=!1,L(i)}};c(Array.from(this.entries))}catch(V){R(V)}}}}});var Bx=k((gPQ,EBA)=>{var $E=o7(),FE=PA("path"),qbA=Qx(),wbA=BBA(),Y9=(...A)=>$E.findLast(A,(Q)=>typeof Q==="boolean"),DBA=(...A)=>$E.findLast(A,(Q)=>typeof Q==="string"),NbA=(...A)=>$E.findLast(A,(Q)=>typeof Q==="function"),ZbA={noSort:!1,readEntries:!1,method:$E.Constants.NONE,fs:null};EBA.exports=function(A,Q){let B=null,D=Object.assign(Object.create(null),ZbA);if(A&&typeof A==="object"){if(!(A instanceof Uint8Array)){if(Object.assign(D,A),A=D.input?D.input:void 0,D.input)delete D.input}if(Buffer.isBuffer(A))B=A,D.method=$E.Constants.BUFFER,A=void 0}Object.assign(D,Q);let E=new $E(D);if(typeof D.decoder!=="object"||typeof D.decoder.encode!=="function"||typeof D.decoder.decode!=="function")D.decoder=$E.decoder;if(A&&typeof A==="string")if(E.fs.existsSync(A))D.method=$E.Constants.FILE,D.filename=A,B=E.fs.readFileSync(A);else throw $E.Errors.INVALID_FILENAME();let I=new wbA(B,D),{canonical:C,sanitize:F,zipnamefix:$}=$E;function J(K){if(K&&I){var q;if(typeof K==="string")q=I.getEntry(FE.posix.normalize(K));if(typeof K==="object"&&typeof K.entryName<"u"&&typeof K.header<"u")q=I.getEntry(K.entryName);if(q)return q}return null}function U(K){let{join:q,normalize:N,sep:L}=FE.posix;return q(FE.isAbsolute(K)?"/":".",N(L+K.split("\\").join(L)+L))}function H(K){if(K instanceof RegExp)return function(q){return function(N){return q.test(N)}}(K);else if(typeof K!=="function")return()=>!0;return K}let W=(K,q)=>{let N=q.slice(-1);return N=N===E.sep?E.sep:"",FE.relative(K,q)+N};return{readFile:function(K,q){var N=J(K);return N&&N.getData(q)||null},childCount:function(K){let q=J(K);if(q)return I.getChildCount(q)},readFileAsync:function(K,q){var N=J(K);if(N)N.getDataAsync(q);else q(null,"getEntry failed for:"+K)},readAsText:function(K,q){var N=J(K);if(N){var L=N.getData();if(L&&L.length)return L.toString(q||"utf8")}return""},readAsTextAsync:function(K,q,N){var L=J(K);if(L)L.getDataAsync(function(R,S){if(S){q(R,S);return}if(R&&R.length)q(R.toString(N||"utf8"));else q("")});else q("")},deleteFile:function(K,q=!0){var N=J(K);if(N)I.deleteFile(N.entryName,q)},deleteEntry:function(K){var q=J(K);if(q)I.deleteEntry(q.entryName)},addZipComment:function(K){I.comment=K},getZipComment:function(){return I.comment||""},addZipEntryComment:function(K,q){var N=J(K);if(N)N.comment=q},getZipEntryComment:function(K){var q=J(K);if(q)return q.comment||"";return""},updateFile:function(K,q){var N=J(K);if(N)N.setData(q)},addLocalFile:function(K,q,N,L){if(E.fs.existsSync(K)){q=q?U(q):"";let R=FE.win32.basename(FE.win32.normalize(K));q+=N?N:R;let S=E.fs.statSync(K),z=S.isFile()?E.fs.readFileSync(K):Buffer.alloc(0);if(S.isDirectory())q+=E.sep;this.addFile(q,z,L,S)}else throw $E.Errors.FILE_NOT_FOUND(K)},addLocalFileAsync:function(K,q){K=typeof K==="object"?K:{localPath:K};let N=FE.resolve(K.localPath),{comment:L}=K,{zipPath:R,zipName:S}=K,z=this;E.fs.stat(N,function(V,T){if(V)return q(V,!1);R=R?U(R):"";let m=FE.win32.basename(FE.win32.normalize(N));if(R+=S?S:m,T.isFile())E.fs.readFile(N,function(p,s){if(p)return q(p,!1);return z.addFile(R,s,L,T),setImmediate(q,void 0,!0)});else if(T.isDirectory())return R+=E.sep,z.addFile(R,Buffer.alloc(0),L,T),setImmediate(q,void 0,!0)})},addLocalFolder:function(K,q,N){if(N=H(N),q=q?U(q):"",K=FE.normalize(K),E.fs.existsSync(K)){let L=E.findFiles(K),R=this;if(L.length)for(let S of L){let z=FE.join(q,W(K,S));if(N(z))R.addLocalFile(S,FE.dirname(z))}}else throw $E.Errors.FILE_NOT_FOUND(K)},addLocalFolderAsync:function(K,q,N,L){L=H(L),N=N?U(N):"",K=FE.normalize(K);var R=this;E.fs.open(K,"r",function(S){if(S&&S.code==="ENOENT")q(void 0,$E.Errors.FILE_NOT_FOUND(K));else if(S)q(void 0,S);else{var z=E.findFiles(K),V=-1,T=function(){if(V+=1,V<z.length){var m=z[V],p=W(K,m).split("\\").join("/");if(p=p.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),L(p))E.fs.stat(m,function(s,c){if(s)q(void 0,s);if(c.isFile())E.fs.readFile(m,function(AA,i){if(AA)q(void 0,AA);else R.addFile(N+p,i,"",c),T()});else R.addFile(N+p+"/",Buffer.alloc(0),"",c),T()});else process.nextTick(()=>{T()})}else q(!0,void 0)};T()}})},addLocalFolderAsync2:function(K,q){let N=this;K=typeof K==="object"?K:{localPath:K},localPath=FE.resolve(U(K.localPath));let{zipPath:L,filter:R,namefix:S}=K;if(R instanceof RegExp)R=function(T){return function(m){return T.test(m)}}(R);else if(typeof R!=="function")R=function(){return!0};if(L=L?U(L):"",S=="latin1")S=(T)=>T.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"");if(typeof S!=="function")S=(T)=>T;let z=(T)=>FE.join(L,S(W(localPath,T))),V=(T)=>FE.win32.basename(FE.win32.normalize(S(T)));E.fs.open(localPath,"r",function(T){if(T&&T.code==="ENOENT")q(void 0,$E.Errors.FILE_NOT_FOUND(localPath));else if(T)q(void 0,T);else E.findFilesAsync(localPath,function(m,p){if(m)return q(m);if(p=p.filter((s)=>R(z(s))),!p.length)q(void 0,!1);setImmediate(p.reverse().reduce(function(s,c){return function(AA,i){if(AA||i===!1)return setImmediate(s,AA,!1);N.addLocalFileAsync({localPath:c,zipPath:FE.dirname(z(c)),zipName:V(c)},s)}},q))})})},addLocalFolderPromise:function(K,q){return new Promise((N,L)=>{this.addLocalFolderAsync2(Object.assign({localPath:K},q),(R,S)=>{if(R)L(R);if(S)N(this)})})},addFile:function(K,q,N,L){K=$(K);let R=J(K),S=R!=null;if(!S)R=new qbA(D),R.entryName=K;R.comment=N||"";let z=typeof L==="object"&&L instanceof E.fs.Stats;if(z)R.header.time=L.mtime;var V=R.isDirectory?16:0;let T=R.isDirectory?16384:32768;if(z)T|=4095&L.mode;else if(typeof L==="number")T|=4095&L;else T|=R.isDirectory?493:420;if(V=(V|T<<16)>>>0,R.attr=V,R.setData(q),!S)I.setEntry(R);return R},getEntries:function(K){return I.password=K,I?I.entries:[]},getEntry:function(K){return J(K)},getEntryCount:function(){return I.getEntryCount()},forEach:function(K){return I.forEach(K)},extractEntryTo:function(K,q,N,L,R,S){L=Y9(!1,L),R=Y9(!1,R),N=Y9(!0,N),S=DBA(R,S);var z=J(K);if(!z)throw $E.Errors.NO_ENTRY();var V=C(z.entryName),T=F(q,S&&!z.isDirectory?S:N?V:FE.basename(V));if(z.isDirectory){var m=I.getEntryChildren(z);return m.forEach(function(c){if(c.isDirectory)return;var AA=c.getData();if(!AA)throw $E.Errors.CANT_EXTRACT_FILE();var i=C(c.entryName),HA=F(q,N?i:FE.basename(i));let UA=R?c.header.fileAttr:void 0;E.writeFileTo(HA,AA,L,UA)}),!0}var p=z.getData(I.password);if(!p)throw $E.Errors.CANT_EXTRACT_FILE();if(E.fs.existsSync(T)&&!L)throw $E.Errors.CANT_OVERRIDE();let s=R?K.header.fileAttr:void 0;return E.writeFileTo(T,p,L,s),!0},test:function(K){if(!I)return!1;for(var q in I.entries)try{if(q.isDirectory)continue;var N=I.entries[q].getData(K);if(!N)return!1}catch(L){return!1}return!0},extractAllTo:function(K,q,N,L){if(N=Y9(!1,N),L=DBA(N,L),q=Y9(!1,q),!I)throw $E.Errors.NO_ZIP();I.entries.forEach(function(R){var S=F(K,C(R.entryName));if(R.isDirectory){E.makeDir(S);return}var z=R.getData(L);if(!z)throw $E.Errors.CANT_EXTRACT_FILE();let V=N?R.header.fileAttr:void 0;E.writeFileTo(S,z,q,V);try{E.fs.utimesSync(S,R.header.time,R.header.time)}catch(T){throw $E.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(K,q,N,L){if(L=NbA(q,N,L),N=Y9(!1,N),q=Y9(!1,q),!L)return new Promise((T,m)=>{this.extractAllToAsync(K,q,N,function(p){if(p)m(p);else T(this)})});if(!I){L($E.Errors.NO_ZIP());return}K=FE.resolve(K);let R=(T)=>F(K,FE.normalize(C(T.entryName))),S=(T,m)=>Error(T+': "'+m+'"'),z=[],V=[];I.entries.forEach((T)=>{if(T.isDirectory)z.push(T);else V.push(T)});for(let T of z){let m=R(T),p=N?T.header.fileAttr:void 0;try{if(E.makeDir(m),p)E.fs.chmodSync(m,p);E.fs.utimesSync(m,T.header.time,T.header.time)}catch(s){L(S("Unable to create folder",m))}}V.reverse().reduce(function(T,m){return function(p){if(p)T(p);else{let s=FE.normalize(C(m.entryName)),c=F(K,s);m.getDataAsync(function(AA,i){if(i)T(i);else if(!AA)T($E.Errors.CANT_EXTRACT_FILE());else{let HA=N?m.header.fileAttr:void 0;E.writeFileToAsync(c,AA,q,HA,function(UA){if(!UA)T(S("Unable to write file",c));E.fs.utimes(c,m.header.time,m.header.time,function(qA){if(qA)T(S("Unable to set times",c));else T()})})}})}}},L)()},writeZip:function(K,q){if(arguments.length===1){if(typeof K==="function")q=K,K=""}if(!K&&D.filename)K=D.filename;if(!K)return;var N=I.compressToBuffer();if(N){var L=E.writeFileTo(K,N,!0);if(typeof q==="function")q(!L?Error("failed"):null,"")}},writeZipPromise:function(K,q){let{overwrite:N,perm:L}=Object.assign({overwrite:!0},q);return new Promise((R,S)=>{if(!K&&D.filename)K=D.filename;if(!K)S("ADM-ZIP: ZIP File Name Missing");this.toBufferPromise().then((z)=>{let V=(T)=>T?R(T):S("ADM-ZIP: Wasn't able to write zip file");E.writeFileToAsync(K,z,N,L,V)},S)})},toBufferPromise:function(){return new Promise((K,q)=>{I.toAsyncBuffer(K,q)})},toBuffer:function(K,q,N,L){if(typeof K==="function")return I.toAsyncBuffer(K,q,N,L),null;return I.compressToBuffer()}}}});var IBA=k((bPQ,LbA)=>{LbA.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Alpic",constant:"ALPIC",env:"ALPIC_HOST"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Cloudflare Pages",constant:"CLOUDFLARE_PAGES",env:"CF_PAGES"},{name:"Cloudflare Workers",constant:"CLOUDFLARE_WORKERS",env:"WORKERS_CI"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]});var JBA=k((Dx)=>{var CBA=IBA(),TE=process.env;Object.defineProperty(Dx,"_vendors",{value:CBA.map(function(A){return A.constant})});Dx.name=null;Dx.isPR=null;Dx.id=null;if(TE.CI!=="false")CBA.forEach(function(A){let B=(Array.isArray(A.env)?A.env:[A.env]).every(function(D){return FBA(D)});if(Dx[A.constant]=B,!B)return;Dx.name=A.name,Dx.isPR=RbA(A),Dx.id=A.constant});Dx.isCI=!!(TE.CI!=="false"&&(TE.BUILD_ID||TE.BUILD_NUMBER||TE.CI||TE.CI_APP_ID||TE.CI_BUILD_ID||TE.CI_BUILD_NUMBER||TE.CI_NAME||TE.CONTINUOUS_INTEGRATION||TE.RUN_ID||Dx.name||!1));function FBA(A){if(typeof A==="string")return!!TE[A];if("env"in A)return TE[A.env]&&TE[A.env].includes(A.includes);if("any"in A)return A.any.some(function(Q){return!!TE[Q]});return Object.keys(A).every(function(Q){return TE[Q]===A[Q]})}function RbA(A){switch(typeof A.pr){case"string":return!!TE[A.pr];case"object":if("env"in A.pr)if("any"in A.pr)return A.pr.any.some(function(Q){return TE[A.pr.env]===Q});else return A.pr.env in TE&&TE[A.pr.env]!==A.pr.ne;else if("any"in A.pr)return A.pr.any.some(function(Q){return!!TE[Q]});else return FBA(A.pr);default:return null}}});var XBA=k((fPQ,HBA)=>{var UBA={};HBA.exports=UBA;var YBA={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(YBA).forEach(function(A){var Q=YBA[A],B=UBA[A]=[];B.open="\x1B["+Q[0]+"m",B.close="\x1B["+Q[1]+"m"})});var KBA=k((uPQ,WBA)=>{WBA.exports=function(A,Q){Q=Q||process.argv;var B=Q.indexOf("--"),D=/^-{1,2}/.test(A)?"":"--",E=Q.indexOf(D+A);return E!==-1&&(B===-1?!0:E<B)}});var qBA=k((hPQ,MBA)=>{var zbA=PA("os"),sC=KBA(),y1=process.env,s7=void 0;if(sC("no-color")||sC("no-colors")||sC("color=false"))s7=!1;else if(sC("color")||sC("colors")||sC("color=true")||sC("color=always"))s7=!0;if("FORCE_COLOR"in y1)s7=y1.FORCE_COLOR.length===0||parseInt(y1.FORCE_COLOR,10)!==0;function VbA(A){if(A===0)return!1;return{level:A,hasBasic:!0,has256:A>=2,has16m:A>=3}}function SbA(A){if(s7===!1)return 0;if(sC("color=16m")||sC("color=full")||sC("color=truecolor"))return 3;if(sC("color=256"))return 2;if(A&&!A.isTTY&&s7!==!0)return 0;var Q=s7?1:0;if(process.platform==="win32"){var B=zbA.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(B[0])>=10&&Number(B[2])>=10586)return Number(B[2])>=14931?3:2;return 1}if("CI"in y1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(E){return E in y1})||y1.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in y1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(y1.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in y1){var D=parseInt((y1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(y1.TERM_PROGRAM){case"iTerm.app":return D>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(y1.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(y1.TERM))return 1;if("COLORTERM"in y1)return 1;if(y1.TERM==="dumb")return Q;return Q}function Ix(A){var Q=SbA(A);return VbA(Q)}MBA.exports={supportsColor:Ix,stdout:Ix(process.stdout),stderr:Ix(process.stderr)}});var NBA=k((mPQ,wBA)=>{wBA.exports=function(Q,B){var D="";Q=Q||"Run the trap, drop the bass",Q=Q.split("");var E={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return Q.forEach(function(I){I=I.toLowerCase();var C=E[I]||[" "],F=Math.floor(Math.random()*C.length);if(typeof E[I]<"u")D+=E[I][F];else D+=I}),D}});var LBA=k((cPQ,ZBA)=>{ZBA.exports=function(Q,B){Q=Q||" he is here ";var D={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},E=[].concat(D.up,D.down,D.mid);function I($){var J=Math.floor(Math.random()*$);return J}function C($){var J=!1;return E.filter(function(U){J=U===$}),J}function F($,J){var U="",H,W;J=J||{},J.up=typeof J.up<"u"?J.up:!0,J.mid=typeof J.mid<"u"?J.mid:!0,J.down=typeof J.down<"u"?J.down:!0,J.size=typeof J.size<"u"?J.size:"maxi",$=$.split("");for(W in $){if(C(W))continue;switch(U=U+$[W],H={up:0,down:0,mid:0},J.size){case"mini":H.up=I(8),H.mid=I(2),H.down=I(8);break;case"maxi":H.up=I(16)+3,H.mid=I(4)+1,H.down=I(64)+3;break;default:H.up=I(8)+1,H.mid=I(6)/2,H.down=I(8)+1;break}var K=["up","mid","down"];for(var q in K){var N=K[q];for(var L=0;L<=H[N];L++)if(J[N])U=U+D[N][I(D[N].length)]}}return U}return F(Q,B)}});var OBA=k((lPQ,RBA)=>{RBA.exports=function(A){return function(Q,B,D){if(Q===" ")return Q;switch(B%3){case 0:return A.red(Q);case 1:return A.white(Q);case 2:return A.blue(Q)}}}});var VBA=k((dPQ,zBA)=>{zBA.exports=function(A){return function(Q,B,D){return B%2===0?Q:A.inverse(Q)}}});var TBA=k((pPQ,SBA)=>{SBA.exports=function(A){var Q=["red","yellow","green","blue","magenta"];return function(B,D,E){if(B===" ")return B;else return A[Q[D++%Q.length]](B)}}});var PBA=k((nPQ,jBA)=>{jBA.exports=function(A){var Q=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(B,D,E){return B===" "?B:A[Q[Math.round(Math.random()*(Q.length-2))]](B)}}});var gBA=k((rPQ,xBA)=>{var JD={};xBA.exports=JD;JD.themes={};var TbA=PA("util"),U9=JD.styles=XBA(),_BA=Object.defineProperties,jbA=new RegExp(/[\r\n]+/g);JD.supportsColor=qBA().supportsColor;if(typeof JD.enabled>"u")JD.enabled=JD.supportsColor()!==!1;JD.enable=function(){JD.enabled=!0};JD.disable=function(){JD.enabled=!1};JD.stripColors=JD.strip=function(A){return(""+A).replace(/\x1B\[\d+m/g,"")};var iPQ=JD.stylize=function(Q,B){if(!JD.enabled)return Q+"";var D=U9[B];if(!D&&B in JD)return JD[B](Q);return D.open+Q+D.close},PbA=/[|\\{}()[\]^$+*?.]/g,_bA=function(A){if(typeof A!=="string")throw TypeError("Expected a string");return A.replace(PbA,"\\$&")};function vBA(A){var Q=function B(){return kbA.apply(B,arguments)};return Q._styles=A,Q.__proto__=vbA,Q}var kBA=function(){var A={};return U9.grey=U9.gray,Object.keys(U9).forEach(function(Q){U9[Q].closeRe=new RegExp(_bA(U9[Q].close),"g"),A[Q]={get:function(){return vBA(this._styles.concat(Q))}}}),A}(),vbA=_BA(function(){},kBA);function kbA(){var A=Array.prototype.slice.call(arguments),Q=A.map(function(C){if(C!=null&&C.constructor===String)return C;else return TbA.inspect(C)}).join(" ");if(!JD.enabled||!Q)return Q;var B=Q.indexOf(`
|
package/dist/package.json
CHANGED
package/dist/src/sdk.js
CHANGED
|
@@ -124,7 +124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
124
124
|
`)}),$.__defineSetter__("stack",function(X){return[X].concat($.stack).join(`
|
|
125
125
|
|
|
126
126
|
`)}),$}});var iv=R((Qt0,lv)=>{var B4=l("constants"),lG0=process.cwd,BQ=null,iG0=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!BQ)BQ=lG0.call(process);return BQ};try{process.cwd()}catch(D){}if(typeof process.chdir==="function"){if(WQ=process.chdir,process.chdir=function(D){BQ=null,WQ.call(process,D)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,WQ)}var WQ;lv.exports=pG0;function pG0(D){if(B4.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))$(D);if(!D.lutimes)X(D);if(D.chown=Q(D.chown),D.fchown=Q(D.fchown),D.lchown=Q(D.lchown),D.chmod=J(D.chmod),D.fchmod=J(D.fchmod),D.lchmod=J(D.lchmod),D.chownSync=F(D.chownSync),D.fchownSync=F(D.fchownSync),D.lchownSync=F(D.lchownSync),D.chmodSync=Y(D.chmodSync),D.fchmodSync=Y(D.fchmodSync),D.lchmodSync=Y(D.lchmodSync),D.stat=U(D.stat),D.fstat=U(D.fstat),D.lstat=U(D.lstat),D.statSync=Z(D.statSync),D.fstatSync=Z(D.fstatSync),D.lstatSync=Z(D.lstatSync),D.chmod&&!D.lchmod)D.lchmod=function(G,q,B){if(B)process.nextTick(B)},D.lchmodSync=function(){};if(D.chown&&!D.lchown)D.lchown=function(G,q,B,W){if(W)process.nextTick(W)},D.lchownSync=function(){};if(iG0==="win32")D.rename=typeof D.rename!=="function"?D.rename:function(G){function q(B,W,K){var H=Date.now(),L=0;G(B,W,function M(I){if(I&&(I.code==="EACCES"||I.code==="EPERM"||I.code==="EBUSY")&&Date.now()-H<60000){if(setTimeout(function(){D.stat(W,function(N,V){if(N&&N.code==="ENOENT")G(B,W,M);else K(I)})},L),L<100)L+=10;return}if(K)K(I)})}if(Object.setPrototypeOf)Object.setPrototypeOf(q,G);return q}(D.rename);D.read=typeof D.read!=="function"?D.read:function(G){function q(B,W,K,H,L,M){var I;if(M&&typeof M==="function"){var N=0;I=function(V,z,E){if(V&&V.code==="EAGAIN"&&N<10)return N++,G.call(D,B,W,K,H,L,I);M.apply(this,arguments)}}return G.call(D,B,W,K,H,L,I)}if(Object.setPrototypeOf)Object.setPrototypeOf(q,G);return q}(D.read),D.readSync=typeof D.readSync!=="function"?D.readSync:function(G){return function(q,B,W,K,H){var L=0;while(!0)try{return G.call(D,q,B,W,K,H)}catch(M){if(M.code==="EAGAIN"&&L<10){L++;continue}throw M}}}(D.readSync);function $(G){G.lchmod=function(q,B,W){G.open(q,B4.O_WRONLY|B4.O_SYMLINK,B,function(K,H){if(K){if(W)W(K);return}G.fchmod(H,B,function(L){G.close(H,function(M){if(W)W(L||M)})})})},G.lchmodSync=function(q,B){var W=G.openSync(q,B4.O_WRONLY|B4.O_SYMLINK,B),K=!0,H;try{H=G.fchmodSync(W,B),K=!1}finally{if(K)try{G.closeSync(W)}catch(L){}else G.closeSync(W)}return H}}function X(G){if(B4.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(q,B,W,K){G.open(q,B4.O_SYMLINK,function(H,L){if(H){if(K)K(H);return}G.futimes(L,B,W,function(M){G.close(L,function(I){if(K)K(M||I)})})})},G.lutimesSync=function(q,B,W){var K=G.openSync(q,B4.O_SYMLINK),H,L=!0;try{H=G.futimesSync(K,B,W),L=!1}finally{if(L)try{G.closeSync(K)}catch(M){}else G.closeSync(K)}return H};else if(G.futimes)G.lutimes=function(q,B,W,K){if(K)process.nextTick(K)},G.lutimesSync=function(){}}function J(G){if(!G)return G;return function(q,B,W){return G.call(D,q,B,function(K){if(O(K))K=null;if(W)W.apply(this,arguments)})}}function Y(G){if(!G)return G;return function(q,B){try{return G.call(D,q,B)}catch(W){if(!O(W))throw W}}}function Q(G){if(!G)return G;return function(q,B,W,K){return G.call(D,q,B,W,function(H){if(O(H))H=null;if(K)K.apply(this,arguments)})}}function F(G){if(!G)return G;return function(q,B,W){try{return G.call(D,q,B,W)}catch(K){if(!O(K))throw K}}}function U(G){if(!G)return G;return function(q,B,W){if(typeof B==="function")W=B,B=null;function K(H,L){if(L){if(L.uid<0)L.uid+=4294967296;if(L.gid<0)L.gid+=4294967296}if(W)W.apply(this,arguments)}return B?G.call(D,q,B,K):G.call(D,q,K)}}function Z(G){if(!G)return G;return function(q,B){var W=B?G.call(D,q,B):G.call(D,q);if(W){if(W.uid<0)W.uid+=4294967296;if(W.gid<0)W.gid+=4294967296}return W}}function O(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var q=!process.getuid||process.getuid()!==0;if(q){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var tv=R((Ft0,rv)=>{var pv=l("stream").Stream;rv.exports=rG0;function rG0(D){return{ReadStream:$,WriteStream:X};function $(J,Y){if(!(this instanceof $))return new $(J,Y);pv.call(this);var Q=this;this.path=J,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Y=Y||{};var F=Object.keys(Y);for(var U=0,Z=F.length;U<Z;U++){var O=F[U];this[O]=Y[O]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){Q._read()});return}D.open(this.path,this.flags,this.mode,function(G,q){if(G){Q.emit("error",G),Q.readable=!1;return}Q.fd=q,Q.emit("open",q),Q._read()})}function X(J,Y){if(!(this instanceof X))return new X(J,Y);pv.call(this),this.path=J,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Y=Y||{};var Q=Object.keys(Y);for(var F=0,U=Q.length;F<U;F++){var Z=Q[F];this[Z]=Y[Z]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=D.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var av=R((Ut0,ov)=>{ov.exports=oG0;var tG0=Object.getPrototypeOf||function(D){return D.__proto__};function oG0(D){if(D===null||typeof D!=="object")return D;if(D instanceof Object)var $={__proto__:tG0(D)};else var $=Object.create(null);return Object.getOwnPropertyNames(D).forEach(function(X){Object.defineProperty($,X,Object.getOwnPropertyDescriptor(D,X))}),$}});var uD=R((Zt0,SB)=>{var ED=l("fs"),aG0=iv(),sG0=tv(),eG0=av(),KQ=l("util"),$1,NQ;if(typeof Symbol==="function"&&typeof Symbol.for==="function")$1=Symbol.for("graceful-fs.queue"),NQ=Symbol.for("graceful-fs.previous");else $1="___graceful-fs.queue",NQ="___graceful-fs.previous";function Dq0(){}function ev(D,$){Object.defineProperty(D,$1,{get:function(){return $}})}var S8=Dq0;if(KQ.debuglog)S8=KQ.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))S8=function(){var D=KQ.format.apply(KQ,arguments);D="GFS4: "+D.split(/\n/).join(`
|
|
127
|
-
GFS4: `),console.error(D)};if(!ED[$1]){if(TB=global[$1]||[],ev(ED,TB),ED.close=function(D){function $(X,J){return D.call(ED,X,function(Y){if(!Y)sv();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty($,NQ,{value:D}),$}(ED.close),ED.closeSync=function(D){function $(X){D.apply(ED,arguments),sv()}return Object.defineProperty($,NQ,{value:D}),$}(ED.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){S8(ED[$1]),l("assert").equal(ED[$1].length,0)})}var TB;if(!global[$1])ev(global,ED[$1]);SB.exports=CB(eG0(ED));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ED.__patched)SB.exports=CB(ED),ED.__patched=!0;function CB(D){aG0(D),D.gracefulify=CB,D.createReadStream=z,D.createWriteStream=E;var $=D.readFile;D.readFile=X;function X(A,v,P){if(typeof v==="function")P=v,v=null;return g(A,v,P);function g(m,p,k,j){return $(m,p,function(S){if(S&&(S.code==="EMFILE"||S.code==="ENFILE"))z5([g,[m,p,k],S,j||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var J=D.writeFile;D.writeFile=Y;function Y(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return J(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var Q=D.appendFile;if(Q)D.appendFile=F;function F(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return Q(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var U=D.copyFile;if(U)D.copyFile=Z;function Z(A,v,P,g){if(typeof P==="function")g=P,P=0;return m(A,v,P,g);function m(p,k,j,S,u){return U(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var O=D.readdir;D.readdir=q;var G=/^v[0-5]\./;function q(A,v,P){if(typeof v==="function")P=v,v=null;var g=G.test(process.version)?function(k,j,S,u){return O(k,m(k,j,S,u))}:function(k,j,S,u){return O(k,j,m(k,j,S,u))};return g(A,v,P);function m(p,k,j,S){return function(u,f){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))z5([g,[p,k,j],u,S||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof j==="function")j.call(this,u,f)}}}}if(process.version.substr(0,4)==="v0.8"){var B=sG0(D);M=B.ReadStream,N=B.WriteStream}var W=D.ReadStream;if(W)M.prototype=Object.create(W.prototype),M.prototype.open=I;var K=D.WriteStream;if(K)N.prototype=Object.create(K.prototype),N.prototype.open=V;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(A){M=A},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return N},set:function(A){N=A},enumerable:!0,configurable:!0});var H=M;Object.defineProperty(D,"FileReadStream",{get:function(){return H},set:function(A){H=A},enumerable:!0,configurable:!0});var L=N;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(A){L=A},enumerable:!0,configurable:!0});function M(A,v){if(this instanceof M)return W.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var A=this;_(A.path,A.flags,A.mode,function(v,P){if(v){if(A.autoClose)A.destroy();A.emit("error",v)}else A.fd=P,A.emit("open",P),A.read()})}function N(A,v){if(this instanceof N)return K.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function V(){var A=this;_(A.path,A.flags,A.mode,function(v,P){if(v)A.destroy(),A.emit("error",v);else A.fd=P,A.emit("open",P)})}function z(A,v){return new D.ReadStream(A,v)}function E(A,v){return new D.WriteStream(A,v)}var x=D.open;D.open=_;function _(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return x(p,k,j,function(f,h){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}return D}function z5(D){S8("ENQUEUE",D[0].name,D[1]),ED[$1].push(D),PB()}var HQ;function sv(){var D=Date.now();for(var $=0;$<ED[$1].length;++$)if(ED[$1][$].length>2)ED[$1][$][3]=D,ED[$1][$][4]=D;PB()}function PB(){if(clearTimeout(HQ),HQ=void 0,ED[$1].length===0)return;var D=ED[$1].shift(),$=D[0],X=D[1],J=D[2],Y=D[3],Q=D[4];if(Y===void 0)S8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-Y>=60000){S8("TIMEOUT",$.name,X);var F=X.pop();if(typeof F==="function")F.call(null,J)}else{var U=Date.now()-Q,Z=Math.max(Q-Y,1),O=Math.min(Z*1.2,100);if(U>=O)S8("RETRY",$.name,X),$.apply(null,X.concat([Y]));else ED[$1].push(D)}if(HQ===void 0)HQ=setTimeout(PB,0)}});var $u=R((Ot0,Du)=>{function q$(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.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)}Du.exports=q$;q$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};q$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};q$.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,Y=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)Y.unref();return!0};q$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};q$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};q$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};q$.prototype.start=q$.prototype.try;q$.prototype.errors=function(){return this._errors};q$.prototype.attempts=function(){return this._attempts};q$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var J=0;J<this._errors.length;J++){var Y=this._errors[J],Q=Y.message,F=(D[Q]||0)+1;if(D[Q]=F,F>=X)$=Y,X=F}return $}});var Ju=R((Xq0)=>{var $q0=$u();Xq0.operation=function(D){var $=Xq0.timeouts(D);return new $q0($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};Xq0.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var Y=0;Y<$.retries;Y++)J.push(this.createTimeout(Y,$));if(D&&D.forever&&!J.length)J.push(this.createTimeout(Y,$));return J.sort(function(Q,F){return Q-F}),J};Xq0.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,J=Math.round(X*$.minTimeout*Math.pow($.factor,D));return J=Math.min(J,$.maxTimeout),J};Xq0.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var J in D)if(typeof D[J]==="function")X.push(J)}for(var Y=0;Y<X.length;Y++){var Q=X[Y],F=D[Q];D[Q]=function(Z){var O=Xq0.operation($),G=Array.prototype.slice.call(arguments,1),q=G.pop();G.push(function(B){if(O.retry(B))return;if(B)arguments[0]=O.mainError();q.apply(this,arguments)}),O.attempt(function(){Z.apply(D,G)})}.bind(D,F),D[Q].options=$}}});var Yu=R((qt0,zQ)=>{zQ.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")zQ.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")zQ.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var LQ=R((Bt0,w5)=>{var LD=global.process,x8=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!x8(LD))w5.exports=function(){return function(){}};else{if(xB=l("assert"),v8=Yu(),vB=/^win/i.test(LD.platform),V5=l("events"),typeof V5!=="function")V5=V5.EventEmitter;if(LD.__signal_exit_emitter__)lD=LD.__signal_exit_emitter__;else lD=LD.__signal_exit_emitter__=new V5,lD.count=0,lD.emitted={};if(!lD.infinite)lD.setMaxListeners(1/0),lD.infinite=!0;w5.exports=function(D,$){if(!x8(global.process))return function(){};if(xB.equal(typeof D,"function","a callback must be provided for exit handler"),u8===!1)VQ();var X="exit";if($&&$.alwaysLast)X="afterexit";var J=function(){if(lD.removeListener(X,D),lD.listeners("exit").length===0&&lD.listeners("afterexit").length===0)F2()};return lD.on(X,D),J},F2=function(){if(!u8||!x8(global.process))return;u8=!1,v8.forEach(function($){try{LD.removeListener($,U2[$])}catch(X){}}),LD.emit=Z2,LD.reallyExit=wQ,lD.count-=1},w5.exports.unload=F2,W4=function($,X,J){if(lD.emitted[$])return;lD.emitted[$]=!0,lD.emit($,X,J)},U2={},v8.forEach(function(D){U2[D]=function(){if(!x8(global.process))return;var X=LD.listeners(D);if(X.length===lD.count){if(F2(),W4("exit",null,D),W4("afterexit",null,D),vB&&D==="SIGHUP")D="SIGINT";LD.kill(LD.pid,D)}}}),w5.exports.signals=function(){return v8},u8=!1,VQ=function(){if(u8||!x8(global.process))return;u8=!0,lD.count+=1,v8=v8.filter(function($){try{return LD.on($,U2[$]),!0}catch(X){return!1}}),LD.emit=_B,LD.reallyExit=uB},w5.exports.load=VQ,wQ=LD.reallyExit,uB=function($){if(!x8(global.process))return;LD.exitCode=$||0,W4("exit",LD.exitCode,null),W4("afterexit",LD.exitCode,null),wQ.call(LD,LD.exitCode)},Z2=LD.emit,_B=function($,X){if($==="exit"&&x8(global.process)){if(X!==void 0)LD.exitCode=X;var J=Z2.apply(this,arguments);return W4("exit",LD.exitCode,null),W4("afterexit",LD.exitCode,null),J}else return Z2.apply(this,arguments)}}var xB,v8,vB,V5,lD,F2,W4,U2,u8,VQ,wQ,uB,Z2,_B});var Fu=R((Zq0,kB)=>{var Qu=Symbol();function Fq0(D,$,X){let J=$[Qu];if(J)return $.stat(D,(Q,F)=>{if(Q)return X(Q);X(null,F.mtime,J)});let Y=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,Y,Y,(Q)=>{if(Q)return X(Q);$.stat(D,(F,U)=>{if(F)return X(F);let Z=U.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,Qu,{value:Z}),X(null,U.mtime,Z)})})}function Uq0(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}Zq0.probe=Fq0;Zq0.getMtime=Uq0});var qu=R((zq0,G2)=>{var qq0=l("path"),bB=uD(),Bq0=Ju(),Wq0=LQ(),Uu=Fu(),P6={};function O2(D,$){return $.lockfilePath||`${D}.lock`}function hB(D,$,X){if(!$.realpath)return X(null,qq0.resolve(D));$.fs.realpath(D,X)}function yB(D,$,X){let J=O2(D,$);$.fs.mkdir(J,(Y)=>{if(!Y)return Uu.probe(J,$.fs,(Q,F,U)=>{if(Q)return $.fs.rmdir(J,()=>{}),X(Q);X(null,F,U)});if(Y.code!=="EEXIST")return X(Y);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(J,(Q,F)=>{if(Q){if(Q.code==="ENOENT")return yB(D,{...$,stale:0},X);return X(Q)}if(!Zu(F,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));Ou(D,$,(U)=>{if(U)return X(U);yB(D,{...$,stale:0},X)})})})}function Zu(D,$){return D.mtime.getTime()<Date.now()-$.stale}function Ou(D,$,X){$.fs.rmdir(O2(D,$),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function MQ(D,$){let X=P6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(J,Y)=>{let Q=X.lastUpdate+$.stale<Date.now();if(J){if(J.code==="ENOENT"||Q)return fB(D,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,MQ(D,$)}if(X.mtime.getTime()!==Y.mtime.getTime())return fB(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let U=Uu.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,U,U,(Z)=>{let O=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(Z){if(Z.code==="ENOENT"||O)return fB(D,X,Object.assign(Z,{code:"ECOMPROMISED"}));return X.updateDelay=1000,MQ(D,$)}X.mtime=U,X.lastUpdate=Date.now(),X.updateDelay=null,MQ(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function fB(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(P6[D]===$)delete P6[D];$.options.onCompromised(X)}function Kq0(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:bB,onCompromised:(J)=>{throw J},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),hB(D,$,(J,Y)=>{if(J)return X(J);let Q=Bq0.operation($.retries);Q.attempt(()=>{yB(Y,$,(F,U,Z)=>{if(Q.retry(F))return;if(F)return X(Q.mainError());let O=P6[Y]={lockfilePath:O2(Y,$),mtime:U,mtimePrecision:Z,options:$,lastUpdate:Date.now()};MQ(Y,$),X(null,(G)=>{if(O.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Gu(Y,{...$,realpath:!1},G)})})})})}function Gu(D,$,X){$={fs:bB,realpath:!0,...$},hB(D,$,(J,Y)=>{if(J)return X(J);let Q=P6[Y];if(!Q)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Q.updateTimeout&&clearTimeout(Q.updateTimeout),Q.released=!0,delete P6[Y],Ou(Y,$,X)})}function Hq0(D,$,X){$={stale:1e4,realpath:!0,fs:bB,...$},$.stale=Math.max($.stale||0,2000),hB(D,$,(J,Y)=>{if(J)return X(J);$.fs.stat(O2(Y,$),(Q,F)=>{if(Q)return Q.code==="ENOENT"?X(null,!1):X(Q);return X(null,!Zu(F,$))})})}function Nq0(){return P6}Wq0(()=>{for(let D in P6){let $=P6[D].options;try{$.fs.rmdirSync(O2(D,$))}catch(X){}}});zq0.lock=Kq0;zq0.unlock=Gu;zq0.check=Hq0;zq0.getLocks=Nq0});var Wu=R((Wt0,Bu)=>{var Iq0=uD();function Aq0(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((J)=>{X[J]=(...Y)=>{let Q=Y.pop(),F;try{F=D[`${J}Sync`](...Y)}catch(U){return Q(U)}Q(null,F)}}),X}function Rq0(D){return(...$)=>new Promise((X,J)=>{$.push((Y,Q)=>{if(Y)J(Y);else X(Q)}),D(...$)})}function Eq0(D){return(...$)=>{let X,J;if($.push((Y,Q)=>{X=Y,J=Q}),D(...$),X)throw X;return J}}function jq0(D){if(D={...D},D.fs=Aq0(D.fs||Iq0),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}Bu.exports={toPromise:Rq0,toSync:Eq0,toSyncOptions:jq0}});var Hu=R((Kt0,K4)=>{var L5=qu(),{toPromise:IQ,toSync:AQ,toSyncOptions:gB}=Wu();async function Ku(D,$){let X=await IQ(L5.lock)(D,$);return IQ(X)}function Tq0(D,$){let X=AQ(L5.lock)(D,gB($));return AQ(X)}function Cq0(D,$){return IQ(L5.unlock)(D,$)}function Pq0(D,$){return AQ(L5.unlock)(D,gB($))}function Sq0(D,$){return IQ(L5.check)(D,$)}function xq0(D,$){return AQ(L5.check)(D,gB($))}K4.exports=Ku;K4.exports.lock=Ku;K4.exports.unlock=Cq0;K4.exports.lockSync=Tq0;K4.exports.unlockSync=Pq0;K4.exports.check=Sq0;K4.exports.checkSync=xq0});var Iu=R((Lu)=>{Object.defineProperty(Lu,"__esModule",{value:!0});Lu.canStoreURLs=Lu.FileUrlStorage=void 0;var Nu=l("fs"),vq0=_q0(nv()),zu=uq0(Hu());function wu(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return(wu=function(J){return J?X:$})(D)}function uq0(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=wu($);if(X&&X.has(D))return X.get(D);var J={__proto__:null},Y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Q in D)if(Q!=="default"&&{}.hasOwnProperty.call(D,Q)){var F=Y?Object.getOwnPropertyDescriptor(D,Q):null;F&&(F.get||F.set)?Object.defineProperty(J,Q,F):J[Q]=D[Q]}return J.default=D,X&&X.set(D,J),J}function _q0(D){return D&&D.__esModule?D:{default:D}}function q2(D){return q2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},q2(D)}function kq0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Vu(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,yq0(J.key),J)}}function fq0(D,$,X){if($)Vu(D.prototype,$);if(X)Vu(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function yq0(D){var $=bq0(D,"string");return q2($)=="symbol"?$:$+""}function bq0(D,$){if(q2(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(q2(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Ht0=Lu.canStoreURLs=!0,Nt0=Lu.FileUrlStorage=function(){function D($){kq0(this,D),this.path=$}return fq0(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,Y){X._getItems("tus::",function(Q,F){if(Q)Y(Q);else J(F)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(Y,Q){J._getItems("tus::".concat(X),function(F,U){if(F)Q(F);else Y(U)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(Y,Q){J._removeItem(X,function(F){if(F)Q(F);else Y()})})}},{key:"addUpload",value:function(X,J){var Y=this,Q=Math.round(Math.random()*1000000000000),F="tus::".concat(X,"::").concat(Q);return new Promise(function(U,Z){Y._setItem(F,J,function(O){if(O)Z(O);else U(F)})})}},{key:"_setItem",value:function(X,J,Y){var Q=this;zu.lock(this.path,this._lockfileOptions()).then(function(F){Y=Q._releaseAndCb(F,Y),Q._getData(function(U,Z){if(U){Y(U);return}Z[X]=J,Q._writeData(Z,function(O){return Y(O)})})}).catch(Y)}},{key:"_getItems",value:function(X,J){this._getData(function(Y,Q){if(Y){J(Y);return}var F=Object.keys(Q).filter(function(U){return U.startsWith(X)}).map(function(U){var Z=Q[U];return Z.urlStorageKey=U,Z});J(null,F)})}},{key:"_removeItem",value:function(X,J){var Y=this;zu.lock(this.path,this._lockfileOptions()).then(function(Q){J=Y._releaseAndCb(Q,J),Y._getData(function(F,U){if(F){J(F);return}delete U[X],Y._writeData(U,function(Z){return J(Z)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(Y){if(Y){X().then(function(){return J(Y)}).catch(function(Q){return J((0,vq0.default)([Y,Q]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var Y={encoding:"utf8",mode:432,flag:"w"};(0,Nu.writeFile)(this.path,JSON.stringify(X),Y,function(Q){return J(Q)})}},{key:"_getData",value:function(X){(0,Nu.readFile)(this.path,"utf8",function(J,Y){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{Y=!Y.trim().length?{}:JSON.parse(Y)}catch(Q){X(Q);return}X(null,Y)})}}])}()});var EQ=R((H4)=>{Object.defineProperty(H4,"__esModule",{value:!0});Object.defineProperty(H4,"DefaultHttpStack",{enumerable:!0,get:function(){return ju.default}});Object.defineProperty(H4,"DetailedError",{enumerable:!0,get:function(){return gq0.default}});Object.defineProperty(H4,"FileUrlStorage",{enumerable:!0,get:function(){return Tu.FileUrlStorage}});Object.defineProperty(H4,"StreamSource",{enumerable:!0,get:function(){return lq0.default}});H4.Upload=void 0;Object.defineProperty(H4,"canStoreURLs",{enumerable:!0,get:function(){return Tu.canStoreURLs}});H4.defaultOptions=void 0;Object.defineProperty(H4,"enableDebugLog",{enumerable:!0,get:function(){return mq0.enableDebugLog}});H4.isSupported=void 0;var gq0=_8(gq()),mq0=mq(),cq0=_8(HS()),mB=_8(rS()),dq0=_8(Kx()),nq0=_8(wx()),ju=_8(kx()),lq0=_8(sq()),Tu=Iu();function _8(D){return D&&D.__esModule?D:{default:D}}function I5(D){return I5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},I5(D)}function iq0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Au(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,Pu(J.key),J)}}function pq0(D,$,X){if($)Au(D.prototype,$);if(X)Au(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function rq0(D,$,X){return $=RQ($),tq0(D,Cu()?Reflect.construct($,X||[],RQ(D).constructor):$.apply(D,X))}function tq0(D,$){if($&&(I5($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return oq0(D)}function oq0(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function Cu(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(Cu=function(){return!!D})()}function RQ(D){return RQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},RQ(D)}function aq0(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)cB(D,$)}function cB(D,$){return cB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,Y){return J.__proto__=Y,J},cB(D,$)}function Ru(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);$&&(J=J.filter(function(Y){return Object.getOwnPropertyDescriptor(D,Y).enumerable})),X.push.apply(X,J)}return X}function M5(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?Ru(Object(X),!0).forEach(function(J){sq0(D,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):Ru(Object(X)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor(X,J))})}return D}function sq0(D,$,X){if($=Pu($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function Pu(D){var $=eq0(D,"string");return I5($)=="symbol"?$:$+""}function eq0(D,$){if(I5(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(I5(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Eu=H4.defaultOptions=M5(M5({},mB.default.defaultOptions),{},{httpStack:new ju.default,fileReader:new dq0.default,urlStorage:new cq0.default,fingerprint:nq0.default}),Vt0=H4.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return iq0(this,$),J=M5(M5({},Eu),J),rq0(this,$,[X,J])}return aq0($,D),pq0($,null,[{key:"terminate",value:function(J){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Y=M5(M5({},Eu),Y),mB.default.terminate(J,Y)}}])}(mB.default),wt0=H4.isSupported=!0});var S$;var B2=r(()=>{S$={name:"@capgo/cli",type:"module",version:"7.94.8",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts"',"lint:fix":'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.5","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.0.0","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^18.3.28","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^5.2.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.3.3",qrcode:"^1.5.4",react:"^18.3.1"}}});async function jQ(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,J=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!J.ok)return null;return(await J.json())["dist-tags"]?.latest||null}catch{return null}}async function $B0(){let D=await jQ("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:S$.version,latestVersion:D,isOutdated:!!D&&D!==S$.version,majorVersion:$}}async function GD(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await $B0();if(D)w.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} it's not the latest version.
|
|
127
|
+
GFS4: `),console.error(D)};if(!ED[$1]){if(TB=global[$1]||[],ev(ED,TB),ED.close=function(D){function $(X,J){return D.call(ED,X,function(Y){if(!Y)sv();if(typeof J==="function")J.apply(this,arguments)})}return Object.defineProperty($,NQ,{value:D}),$}(ED.close),ED.closeSync=function(D){function $(X){D.apply(ED,arguments),sv()}return Object.defineProperty($,NQ,{value:D}),$}(ED.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){S8(ED[$1]),l("assert").equal(ED[$1].length,0)})}var TB;if(!global[$1])ev(global,ED[$1]);SB.exports=CB(eG0(ED));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ED.__patched)SB.exports=CB(ED),ED.__patched=!0;function CB(D){aG0(D),D.gracefulify=CB,D.createReadStream=z,D.createWriteStream=E;var $=D.readFile;D.readFile=X;function X(A,v,P){if(typeof v==="function")P=v,v=null;return g(A,v,P);function g(m,p,k,j){return $(m,p,function(S){if(S&&(S.code==="EMFILE"||S.code==="ENFILE"))z5([g,[m,p,k],S,j||Date.now(),Date.now()]);else if(typeof k==="function")k.apply(this,arguments)})}}var J=D.writeFile;D.writeFile=Y;function Y(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return J(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var Q=D.appendFile;if(Q)D.appendFile=F;function F(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return Q(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var U=D.copyFile;if(U)D.copyFile=Z;function Z(A,v,P,g){if(typeof P==="function")g=P,P=0;return m(A,v,P,g);function m(p,k,j,S,u){return U(p,k,j,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}var O=D.readdir;D.readdir=q;var G=/^v[0-5]\./;function q(A,v,P){if(typeof v==="function")P=v,v=null;var g=G.test(process.version)?function(k,j,S,u){return O(k,m(k,j,S,u))}:function(k,j,S,u){return O(k,j,m(k,j,S,u))};return g(A,v,P);function m(p,k,j,S){return function(u,f){if(u&&(u.code==="EMFILE"||u.code==="ENFILE"))z5([g,[p,k,j],u,S||Date.now(),Date.now()]);else{if(f&&f.sort)f.sort();if(typeof j==="function")j.call(this,u,f)}}}}if(process.version.substr(0,4)==="v0.8"){var B=sG0(D);M=B.ReadStream,N=B.WriteStream}var W=D.ReadStream;if(W)M.prototype=Object.create(W.prototype),M.prototype.open=I;var K=D.WriteStream;if(K)N.prototype=Object.create(K.prototype),N.prototype.open=V;Object.defineProperty(D,"ReadStream",{get:function(){return M},set:function(A){M=A},enumerable:!0,configurable:!0}),Object.defineProperty(D,"WriteStream",{get:function(){return N},set:function(A){N=A},enumerable:!0,configurable:!0});var H=M;Object.defineProperty(D,"FileReadStream",{get:function(){return H},set:function(A){H=A},enumerable:!0,configurable:!0});var L=N;Object.defineProperty(D,"FileWriteStream",{get:function(){return L},set:function(A){L=A},enumerable:!0,configurable:!0});function M(A,v){if(this instanceof M)return W.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function I(){var A=this;_(A.path,A.flags,A.mode,function(v,P){if(v){if(A.autoClose)A.destroy();A.emit("error",v)}else A.fd=P,A.emit("open",P),A.read()})}function N(A,v){if(this instanceof N)return K.apply(this,arguments),this;else return N.apply(Object.create(N.prototype),arguments)}function V(){var A=this;_(A.path,A.flags,A.mode,function(v,P){if(v)A.destroy(),A.emit("error",v);else A.fd=P,A.emit("open",P)})}function z(A,v){return new D.ReadStream(A,v)}function E(A,v){return new D.WriteStream(A,v)}var x=D.open;D.open=_;function _(A,v,P,g){if(typeof P==="function")g=P,P=null;return m(A,v,P,g);function m(p,k,j,S,u){return x(p,k,j,function(f,h){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))z5([m,[p,k,j,S],f,u||Date.now(),Date.now()]);else if(typeof S==="function")S.apply(this,arguments)})}}return D}function z5(D){S8("ENQUEUE",D[0].name,D[1]),ED[$1].push(D),PB()}var HQ;function sv(){var D=Date.now();for(var $=0;$<ED[$1].length;++$)if(ED[$1][$].length>2)ED[$1][$][3]=D,ED[$1][$][4]=D;PB()}function PB(){if(clearTimeout(HQ),HQ=void 0,ED[$1].length===0)return;var D=ED[$1].shift(),$=D[0],X=D[1],J=D[2],Y=D[3],Q=D[4];if(Y===void 0)S8("RETRY",$.name,X),$.apply(null,X);else if(Date.now()-Y>=60000){S8("TIMEOUT",$.name,X);var F=X.pop();if(typeof F==="function")F.call(null,J)}else{var U=Date.now()-Q,Z=Math.max(Q-Y,1),O=Math.min(Z*1.2,100);if(U>=O)S8("RETRY",$.name,X),$.apply(null,X.concat([Y]));else ED[$1].push(D)}if(HQ===void 0)HQ=setTimeout(PB,0)}});var $u=R((Ot0,Du)=>{function q$(D,$){if(typeof $==="boolean")$={forever:$};if(this._originalTimeouts=JSON.parse(JSON.stringify(D)),this._timeouts=D,this._options=$||{},this._maxRetryTime=$&&$.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)}Du.exports=q$;q$.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};q$.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};q$.prototype.retry=function(D){if(this._timeout)clearTimeout(this._timeout);if(!D)return!1;var $=new Date().getTime();if(D&&$-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(D);var X=this._timeouts.shift();if(X===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),X=this._timeouts.shift();else return!1;var J=this,Y=setTimeout(function(){if(J._attempts++,J._operationTimeoutCb){if(J._timeout=setTimeout(function(){J._operationTimeoutCb(J._attempts)},J._operationTimeout),J._options.unref)J._timeout.unref()}J._fn(J._attempts)},X);if(this._options.unref)Y.unref();return!0};q$.prototype.attempt=function(D,$){if(this._fn=D,$){if($.timeout)this._operationTimeout=$.timeout;if($.cb)this._operationTimeoutCb=$.cb}var X=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){X._operationTimeoutCb()},X._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};q$.prototype.try=function(D){console.log("Using RetryOperation.try() is deprecated"),this.attempt(D)};q$.prototype.start=function(D){console.log("Using RetryOperation.start() is deprecated"),this.attempt(D)};q$.prototype.start=q$.prototype.try;q$.prototype.errors=function(){return this._errors};q$.prototype.attempts=function(){return this._attempts};q$.prototype.mainError=function(){if(this._errors.length===0)return null;var D={},$=null,X=0;for(var J=0;J<this._errors.length;J++){var Y=this._errors[J],Q=Y.message,F=(D[Q]||0)+1;if(D[Q]=F,F>=X)$=Y,X=F}return $}});var Ju=R((Xq0)=>{var $q0=$u();Xq0.operation=function(D){var $=Xq0.timeouts(D);return new $q0($,{forever:D&&D.forever,unref:D&&D.unref,maxRetryTime:D&&D.maxRetryTime})};Xq0.timeouts=function(D){if(D instanceof Array)return[].concat(D);var $={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var X in D)$[X]=D[X];if($.minTimeout>$.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var J=[];for(var Y=0;Y<$.retries;Y++)J.push(this.createTimeout(Y,$));if(D&&D.forever&&!J.length)J.push(this.createTimeout(Y,$));return J.sort(function(Q,F){return Q-F}),J};Xq0.createTimeout=function(D,$){var X=$.randomize?Math.random()+1:1,J=Math.round(X*$.minTimeout*Math.pow($.factor,D));return J=Math.min(J,$.maxTimeout),J};Xq0.wrap=function(D,$,X){if($ instanceof Array)X=$,$=null;if(!X){X=[];for(var J in D)if(typeof D[J]==="function")X.push(J)}for(var Y=0;Y<X.length;Y++){var Q=X[Y],F=D[Q];D[Q]=function(Z){var O=Xq0.operation($),G=Array.prototype.slice.call(arguments,1),q=G.pop();G.push(function(B){if(O.retry(B))return;if(B)arguments[0]=O.mainError();q.apply(this,arguments)}),O.attempt(function(){Z.apply(D,G)})}.bind(D,F),D[Q].options=$}}});var Yu=R((qt0,zQ)=>{zQ.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")zQ.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")zQ.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var LQ=R((Bt0,w5)=>{var LD=global.process,x8=function(D){return D&&typeof D==="object"&&typeof D.removeListener==="function"&&typeof D.emit==="function"&&typeof D.reallyExit==="function"&&typeof D.listeners==="function"&&typeof D.kill==="function"&&typeof D.pid==="number"&&typeof D.on==="function"};if(!x8(LD))w5.exports=function(){return function(){}};else{if(xB=l("assert"),v8=Yu(),vB=/^win/i.test(LD.platform),V5=l("events"),typeof V5!=="function")V5=V5.EventEmitter;if(LD.__signal_exit_emitter__)lD=LD.__signal_exit_emitter__;else lD=LD.__signal_exit_emitter__=new V5,lD.count=0,lD.emitted={};if(!lD.infinite)lD.setMaxListeners(1/0),lD.infinite=!0;w5.exports=function(D,$){if(!x8(global.process))return function(){};if(xB.equal(typeof D,"function","a callback must be provided for exit handler"),u8===!1)VQ();var X="exit";if($&&$.alwaysLast)X="afterexit";var J=function(){if(lD.removeListener(X,D),lD.listeners("exit").length===0&&lD.listeners("afterexit").length===0)F2()};return lD.on(X,D),J},F2=function(){if(!u8||!x8(global.process))return;u8=!1,v8.forEach(function($){try{LD.removeListener($,U2[$])}catch(X){}}),LD.emit=Z2,LD.reallyExit=wQ,lD.count-=1},w5.exports.unload=F2,W4=function($,X,J){if(lD.emitted[$])return;lD.emitted[$]=!0,lD.emit($,X,J)},U2={},v8.forEach(function(D){U2[D]=function(){if(!x8(global.process))return;var X=LD.listeners(D);if(X.length===lD.count){if(F2(),W4("exit",null,D),W4("afterexit",null,D),vB&&D==="SIGHUP")D="SIGINT";LD.kill(LD.pid,D)}}}),w5.exports.signals=function(){return v8},u8=!1,VQ=function(){if(u8||!x8(global.process))return;u8=!0,lD.count+=1,v8=v8.filter(function($){try{return LD.on($,U2[$]),!0}catch(X){return!1}}),LD.emit=_B,LD.reallyExit=uB},w5.exports.load=VQ,wQ=LD.reallyExit,uB=function($){if(!x8(global.process))return;LD.exitCode=$||0,W4("exit",LD.exitCode,null),W4("afterexit",LD.exitCode,null),wQ.call(LD,LD.exitCode)},Z2=LD.emit,_B=function($,X){if($==="exit"&&x8(global.process)){if(X!==void 0)LD.exitCode=X;var J=Z2.apply(this,arguments);return W4("exit",LD.exitCode,null),W4("afterexit",LD.exitCode,null),J}else return Z2.apply(this,arguments)}}var xB,v8,vB,V5,lD,F2,W4,U2,u8,VQ,wQ,uB,Z2,_B});var Fu=R((Zq0,kB)=>{var Qu=Symbol();function Fq0(D,$,X){let J=$[Qu];if(J)return $.stat(D,(Q,F)=>{if(Q)return X(Q);X(null,F.mtime,J)});let Y=new Date(Math.ceil(Date.now()/1000)*1000+5);$.utimes(D,Y,Y,(Q)=>{if(Q)return X(Q);$.stat(D,(F,U)=>{if(F)return X(F);let Z=U.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty($,Qu,{value:Z}),X(null,U.mtime,Z)})})}function Uq0(D){let $=Date.now();if(D==="s")$=Math.ceil($/1000)*1000;return new Date($)}Zq0.probe=Fq0;Zq0.getMtime=Uq0});var qu=R((zq0,G2)=>{var qq0=l("path"),bB=uD(),Bq0=Ju(),Wq0=LQ(),Uu=Fu(),P6={};function O2(D,$){return $.lockfilePath||`${D}.lock`}function hB(D,$,X){if(!$.realpath)return X(null,qq0.resolve(D));$.fs.realpath(D,X)}function yB(D,$,X){let J=O2(D,$);$.fs.mkdir(J,(Y)=>{if(!Y)return Uu.probe(J,$.fs,(Q,F,U)=>{if(Q)return $.fs.rmdir(J,()=>{}),X(Q);X(null,F,U)});if(Y.code!=="EEXIST")return X(Y);if($.stale<=0)return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));$.fs.stat(J,(Q,F)=>{if(Q){if(Q.code==="ENOENT")return yB(D,{...$,stale:0},X);return X(Q)}if(!Zu(F,$))return X(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:D}));Ou(D,$,(U)=>{if(U)return X(U);yB(D,{...$,stale:0},X)})})})}function Zu(D,$){return D.mtime.getTime()<Date.now()-$.stale}function Ou(D,$,X){$.fs.rmdir(O2(D,$),(J)=>{if(J&&J.code!=="ENOENT")return X(J);X()})}function MQ(D,$){let X=P6[D];if(X.updateTimeout)return;if(X.updateDelay=X.updateDelay||$.update,X.updateTimeout=setTimeout(()=>{X.updateTimeout=null,$.fs.stat(X.lockfilePath,(J,Y)=>{let Q=X.lastUpdate+$.stale<Date.now();if(J){if(J.code==="ENOENT"||Q)return fB(D,X,Object.assign(J,{code:"ECOMPROMISED"}));return X.updateDelay=1000,MQ(D,$)}if(X.mtime.getTime()!==Y.mtime.getTime())return fB(D,X,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let U=Uu.getMtime(X.mtimePrecision);$.fs.utimes(X.lockfilePath,U,U,(Z)=>{let O=X.lastUpdate+$.stale<Date.now();if(X.released)return;if(Z){if(Z.code==="ENOENT"||O)return fB(D,X,Object.assign(Z,{code:"ECOMPROMISED"}));return X.updateDelay=1000,MQ(D,$)}X.mtime=U,X.lastUpdate=Date.now(),X.updateDelay=null,MQ(D,$)})})},X.updateDelay),X.updateTimeout.unref)X.updateTimeout.unref()}function fB(D,$,X){if($.released=!0,$.updateTimeout)clearTimeout($.updateTimeout);if(P6[D]===$)delete P6[D];$.options.onCompromised(X)}function Kq0(D,$,X){$={stale:1e4,update:null,realpath:!0,retries:0,fs:bB,onCompromised:(J)=>{throw J},...$},$.retries=$.retries||0,$.retries=typeof $.retries==="number"?{retries:$.retries}:$.retries,$.stale=Math.max($.stale||0,2000),$.update=$.update==null?$.stale/2:$.update||0,$.update=Math.max(Math.min($.update,$.stale/2),1000),hB(D,$,(J,Y)=>{if(J)return X(J);let Q=Bq0.operation($.retries);Q.attempt(()=>{yB(Y,$,(F,U,Z)=>{if(Q.retry(F))return;if(F)return X(Q.mainError());let O=P6[Y]={lockfilePath:O2(Y,$),mtime:U,mtimePrecision:Z,options:$,lastUpdate:Date.now()};MQ(Y,$),X(null,(G)=>{if(O.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));Gu(Y,{...$,realpath:!1},G)})})})})}function Gu(D,$,X){$={fs:bB,realpath:!0,...$},hB(D,$,(J,Y)=>{if(J)return X(J);let Q=P6[Y];if(!Q)return X(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));Q.updateTimeout&&clearTimeout(Q.updateTimeout),Q.released=!0,delete P6[Y],Ou(Y,$,X)})}function Hq0(D,$,X){$={stale:1e4,realpath:!0,fs:bB,...$},$.stale=Math.max($.stale||0,2000),hB(D,$,(J,Y)=>{if(J)return X(J);$.fs.stat(O2(Y,$),(Q,F)=>{if(Q)return Q.code==="ENOENT"?X(null,!1):X(Q);return X(null,!Zu(F,$))})})}function Nq0(){return P6}Wq0(()=>{for(let D in P6){let $=P6[D].options;try{$.fs.rmdirSync(O2(D,$))}catch(X){}}});zq0.lock=Kq0;zq0.unlock=Gu;zq0.check=Hq0;zq0.getLocks=Nq0});var Wu=R((Wt0,Bu)=>{var Iq0=uD();function Aq0(D){let $=["mkdir","realpath","stat","rmdir","utimes"],X={...D};return $.forEach((J)=>{X[J]=(...Y)=>{let Q=Y.pop(),F;try{F=D[`${J}Sync`](...Y)}catch(U){return Q(U)}Q(null,F)}}),X}function Rq0(D){return(...$)=>new Promise((X,J)=>{$.push((Y,Q)=>{if(Y)J(Y);else X(Q)}),D(...$)})}function Eq0(D){return(...$)=>{let X,J;if($.push((Y,Q)=>{X=Y,J=Q}),D(...$),X)throw X;return J}}function jq0(D){if(D={...D},D.fs=Aq0(D.fs||Iq0),typeof D.retries==="number"&&D.retries>0||D.retries&&typeof D.retries.retries==="number"&&D.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return D}Bu.exports={toPromise:Rq0,toSync:Eq0,toSyncOptions:jq0}});var Hu=R((Kt0,K4)=>{var L5=qu(),{toPromise:IQ,toSync:AQ,toSyncOptions:gB}=Wu();async function Ku(D,$){let X=await IQ(L5.lock)(D,$);return IQ(X)}function Tq0(D,$){let X=AQ(L5.lock)(D,gB($));return AQ(X)}function Cq0(D,$){return IQ(L5.unlock)(D,$)}function Pq0(D,$){return AQ(L5.unlock)(D,gB($))}function Sq0(D,$){return IQ(L5.check)(D,$)}function xq0(D,$){return AQ(L5.check)(D,gB($))}K4.exports=Ku;K4.exports.lock=Ku;K4.exports.unlock=Cq0;K4.exports.lockSync=Tq0;K4.exports.unlockSync=Pq0;K4.exports.check=Sq0;K4.exports.checkSync=xq0});var Iu=R((Lu)=>{Object.defineProperty(Lu,"__esModule",{value:!0});Lu.canStoreURLs=Lu.FileUrlStorage=void 0;var Nu=l("fs"),vq0=_q0(nv()),zu=uq0(Hu());function wu(D){if(typeof WeakMap!="function")return null;var $=new WeakMap,X=new WeakMap;return(wu=function(J){return J?X:$})(D)}function uq0(D,$){if(!$&&D&&D.__esModule)return D;if(D===null||typeof D!="object"&&typeof D!="function")return{default:D};var X=wu($);if(X&&X.has(D))return X.get(D);var J={__proto__:null},Y=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Q in D)if(Q!=="default"&&{}.hasOwnProperty.call(D,Q)){var F=Y?Object.getOwnPropertyDescriptor(D,Q):null;F&&(F.get||F.set)?Object.defineProperty(J,Q,F):J[Q]=D[Q]}return J.default=D,X&&X.set(D,J),J}function _q0(D){return D&&D.__esModule?D:{default:D}}function q2(D){return q2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},q2(D)}function kq0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Vu(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,yq0(J.key),J)}}function fq0(D,$,X){if($)Vu(D.prototype,$);if(X)Vu(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function yq0(D){var $=bq0(D,"string");return q2($)=="symbol"?$:$+""}function bq0(D,$){if(q2(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(q2(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Ht0=Lu.canStoreURLs=!0,Nt0=Lu.FileUrlStorage=function(){function D($){kq0(this,D),this.path=$}return fq0(D,[{key:"findAllUploads",value:function(){var X=this;return new Promise(function(J,Y){X._getItems("tus::",function(Q,F){if(Q)Y(Q);else J(F)})})}},{key:"findUploadsByFingerprint",value:function(X){var J=this;return new Promise(function(Y,Q){J._getItems("tus::".concat(X),function(F,U){if(F)Q(F);else Y(U)})})}},{key:"removeUpload",value:function(X){var J=this;return new Promise(function(Y,Q){J._removeItem(X,function(F){if(F)Q(F);else Y()})})}},{key:"addUpload",value:function(X,J){var Y=this,Q=Math.round(Math.random()*1000000000000),F="tus::".concat(X,"::").concat(Q);return new Promise(function(U,Z){Y._setItem(F,J,function(O){if(O)Z(O);else U(F)})})}},{key:"_setItem",value:function(X,J,Y){var Q=this;zu.lock(this.path,this._lockfileOptions()).then(function(F){Y=Q._releaseAndCb(F,Y),Q._getData(function(U,Z){if(U){Y(U);return}Z[X]=J,Q._writeData(Z,function(O){return Y(O)})})}).catch(Y)}},{key:"_getItems",value:function(X,J){this._getData(function(Y,Q){if(Y){J(Y);return}var F=Object.keys(Q).filter(function(U){return U.startsWith(X)}).map(function(U){var Z=Q[U];return Z.urlStorageKey=U,Z});J(null,F)})}},{key:"_removeItem",value:function(X,J){var Y=this;zu.lock(this.path,this._lockfileOptions()).then(function(Q){J=Y._releaseAndCb(Q,J),Y._getData(function(F,U){if(F){J(F);return}delete U[X],Y._writeData(U,function(Z){return J(Z)})})}).catch(J)}},{key:"_lockfileOptions",value:function(){return{realpath:!1,retries:{retries:5,minTimeout:20}}}},{key:"_releaseAndCb",value:function(X,J){return function(Y){if(Y){X().then(function(){return J(Y)}).catch(function(Q){return J((0,vq0.default)([Y,Q]))});return}X().then(J).catch(J)}}},{key:"_writeData",value:function(X,J){var Y={encoding:"utf8",mode:432,flag:"w"};(0,Nu.writeFile)(this.path,JSON.stringify(X),Y,function(Q){return J(Q)})}},{key:"_getData",value:function(X){(0,Nu.readFile)(this.path,"utf8",function(J,Y){if(J){if(J.code==="ENOENT")X(null,{});else X(J);return}try{Y=!Y.trim().length?{}:JSON.parse(Y)}catch(Q){X(Q);return}X(null,Y)})}}])}()});var EQ=R((H4)=>{Object.defineProperty(H4,"__esModule",{value:!0});Object.defineProperty(H4,"DefaultHttpStack",{enumerable:!0,get:function(){return ju.default}});Object.defineProperty(H4,"DetailedError",{enumerable:!0,get:function(){return gq0.default}});Object.defineProperty(H4,"FileUrlStorage",{enumerable:!0,get:function(){return Tu.FileUrlStorage}});Object.defineProperty(H4,"StreamSource",{enumerable:!0,get:function(){return lq0.default}});H4.Upload=void 0;Object.defineProperty(H4,"canStoreURLs",{enumerable:!0,get:function(){return Tu.canStoreURLs}});H4.defaultOptions=void 0;Object.defineProperty(H4,"enableDebugLog",{enumerable:!0,get:function(){return mq0.enableDebugLog}});H4.isSupported=void 0;var gq0=_8(gq()),mq0=mq(),cq0=_8(HS()),mB=_8(rS()),dq0=_8(Kx()),nq0=_8(wx()),ju=_8(kx()),lq0=_8(sq()),Tu=Iu();function _8(D){return D&&D.__esModule?D:{default:D}}function I5(D){return I5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},I5(D)}function iq0(D,$){if(!(D instanceof $))throw TypeError("Cannot call a class as a function")}function Au(D,$){for(var X=0;X<$.length;X++){var J=$[X];if(J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J)J.writable=!0;Object.defineProperty(D,Pu(J.key),J)}}function pq0(D,$,X){if($)Au(D.prototype,$);if(X)Au(D,X);return Object.defineProperty(D,"prototype",{writable:!1}),D}function rq0(D,$,X){return $=RQ($),tq0(D,Cu()?Reflect.construct($,X||[],RQ(D).constructor):$.apply(D,X))}function tq0(D,$){if($&&(I5($)==="object"||typeof $==="function"))return $;else if($!==void 0)throw TypeError("Derived constructors may only return object or undefined");return oq0(D)}function oq0(D){if(D===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function Cu(){try{var D=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch($){}return(Cu=function(){return!!D})()}function RQ(D){return RQ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},RQ(D)}function aq0(D,$){if(typeof $!=="function"&&$!==null)throw TypeError("Super expression must either be null or a function");if(D.prototype=Object.create($&&$.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),Object.defineProperty(D,"prototype",{writable:!1}),$)cB(D,$)}function cB(D,$){return cB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(J,Y){return J.__proto__=Y,J},cB(D,$)}function Ru(D,$){var X=Object.keys(D);if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(D);$&&(J=J.filter(function(Y){return Object.getOwnPropertyDescriptor(D,Y).enumerable})),X.push.apply(X,J)}return X}function M5(D){for(var $=1;$<arguments.length;$++){var X=arguments[$]!=null?arguments[$]:{};$%2?Ru(Object(X),!0).forEach(function(J){sq0(D,J,X[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(X)):Ru(Object(X)).forEach(function(J){Object.defineProperty(D,J,Object.getOwnPropertyDescriptor(X,J))})}return D}function sq0(D,$,X){if($=Pu($),$ in D)Object.defineProperty(D,$,{value:X,enumerable:!0,configurable:!0,writable:!0});else D[$]=X;return D}function Pu(D){var $=eq0(D,"string");return I5($)=="symbol"?$:$+""}function eq0(D,$){if(I5(D)!="object"||!D)return D;var X=D[Symbol.toPrimitive];if(X!==void 0){var J=X.call(D,$||"default");if(I5(J)!="object")return J;throw TypeError("@@toPrimitive must return a primitive value.")}return($==="string"?String:Number)(D)}var Eu=H4.defaultOptions=M5(M5({},mB.default.defaultOptions),{},{httpStack:new ju.default,fileReader:new dq0.default,urlStorage:new cq0.default,fingerprint:nq0.default}),Vt0=H4.Upload=function(D){function $(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return iq0(this,$),J=M5(M5({},Eu),J),rq0(this,$,[X,J])}return aq0($,D),pq0($,null,[{key:"terminate",value:function(J){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Y=M5(M5({},Eu),Y),mB.default.terminate(J,Y)}}])}(mB.default),wt0=H4.isSupported=!0});var S$;var B2=r(()=>{S$={name:"@capgo/cli",type:"module",version:"7.95.0",description:"A CLI to upload to capgo servers",author:"Martin martin@capgo.app",license:"Apache 2.0",homepage:"https://github.com/Cap-go/capgo/tree/main/cli#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/capgo.git",directory:"cli"},bugs:{url:"https://github.com/Cap-go/capgo/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli","sdk","tanstack-intent"],exports:{".":{import:"./dist/index.js",require:"./dist/index.js"},"./sdk":{types:"./dist/src/sdk.d.ts",import:"./dist/src/sdk.js"}},main:"dist/index.js",types:"dist/src/index.d.ts",bin:{capgo:"dist/index.js"},files:["!skills/_artifacts","dist","skills"],engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && bun build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",typecheck:"tsc --noEmit",lint:'eslint "src/**/*.ts"',"lint:fix":'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js","generate-docs":"node dist/index.js generate-docs README.md","test:bundle":"bun test/test-bundle.mjs","test:functional":"bun test/test-functional.mjs","test:semver":"bun test/test-semver-validation.mjs","test:version-edge-cases":"bun test/test-version-validation.mjs","test:regex":"bun test/test-regex-validation.mjs","test:upload":"bun test/test-upload-validation.mjs","test:credentials":"bun test/test-credentials.mjs","test:credentials-validation":"bun test/test-credentials-validation.mjs","test:build-zip-filter":"bun test/test-build-zip-filter.mjs","test:checksum":"bun test/test-checksum-algorithm.mjs","test:ci-prompts":"bun test/test-ci-prompts.mjs","test:onboarding-recovery":"bun test/test-onboarding-recovery.mjs","test:onboarding-run-targets":"bun test/test-onboarding-run-targets.mjs","test:run-device-command":"bun test/test-run-device-command.mjs","test:init-app-conflict":"bun test/test-init-app-conflict.mjs","test:init-guardrails":"bun test/test-init-guardrails.mjs","test:prompt-preferences":"bun test/test-prompt-preferences.mjs","test:esm-sdk":"node test/test-sdk-esm.mjs","test:mcp":"node test/test-mcp.mjs","test:version-detection":"node test/test-get-installed-version.mjs","test:version-detection:setup":"./test/fixtures/setup-test-projects.sh","test:platform-paths":"bun test/test-platform-paths.mjs","test:payload-split":"bun test/test-payload-split.mjs",test:"bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"},devDependencies:{"@antfu/eslint-config":"^7.0.0","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client@0.9.5","@capacitor/cli":"^8.0.0","@capgo/find-package-manager":"^0.0.18","@clack/prompts":"^1.0.0","@modelcontextprotocol/sdk":"^1.25.3","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver@1.0.8","@supabase/supabase-js":"^2.79.0","@tanstack/intent":"^0.0.23","@types/adm-zip":"^0.5.7","@types/jsonwebtoken":"^9.0.10","@types/node":"^25.0.0","@types/node-forge":"^1.3.14","@types/prettyjson":"^0.0.33","@types/qrcode":"^1.5.6","@types/react":"^18.3.28","@types/tmp":"^0.2.6","@types/ws":"^8.18.1","@vercel/ncc":"^0.38.4","adm-zip":"^0.5.16","ci-info":"^4.3.1",commander:"^14.0.2",eslint:"^9.38.0","git-format-staged":"4.0.1",husky:"^9.1.7","is-wsl":"^3.1.0",micromatch:"^4.0.8",open:"^11.0.0",partysocket:"^1.1.11",prettyjson:"^1.2.5",tmp:"^0.2.5","tus-js-client":"^4.3.1",typescript:"^5.9.3",ws:"^8.18.3",zod:"^4.3.6"},dependencies:{"@inkjs/ui":"^2.0.0",ink:"^5.2.1","ink-spinner":"^5.0.0",jsonwebtoken:"^9.0.3","node-forge":"^1.3.3",qrcode:"^1.5.4",react:"^18.3.1"}}});async function jQ(D){try{let X=`https://registry.npmjs.org/${encodeURIComponent(D.toLowerCase())}`,J=await fetch(X,{headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"}});if(!J.ok)return null;return(await J.json())["dist-tags"]?.latest||null}catch{return null}}async function $B0(){let D=await jQ("@capgo/cli")??"",$=D?.split(".")[0]??"";return{currentVersion:S$.version,latestVersion:D,isOutdated:!!D&&D!==S$.version,majorVersion:$}}async function GD(){let{isOutdated:D,currentVersion:$,latestVersion:X,majorVersion:J}=await $B0();if(D)w.warning(`\uD83D\uDEA8 You are using @capgo/cli@${$} it's not the latest version.
|
|
128
128
|
Please use @capgo/cli@${X}" or @capgo/cli@${J} to keep up to date with the latest features and bug fixes.`)}var w1=r(()=>{_0();B2()});async function uu(D,$,X,J,Y,Q="✅"){await E0(X,{channel:D,event:J,icon:Q,user_id:$,...Y?{tags:{"app-id":Y}}:{},notify:!1})}var _u=r(()=>{_0();M6();w1();k0()});import{Buffer as ku}from"node:buffer";import{createHash as XB0}from"node:crypto";function YB0(D){let $=4294967295;for(let X=0;X<D.length;X++){let J=D[X];$=JB0[($^J)&255]^$>>>8}return $=$^4294967295,($>>>0).toString(16).padStart(8,"0")}async function N4(D,$="sha256"){let X=ku.isBuffer(D)?D:ku.from(D);if($==="crc32")return YB0(X);let J=XB0($);return J.update(X),J.digest("hex")}var JB0;var W2=r(()=>{JB0=(()=>{let D=[];for(let $=0;$<256;$++){let X=$;for(let J=0;J<8;J++)X=X&1?3988292384^X>>>1:X>>>1;D[$]=X}return D})()});var yu=R((kt0,fu)=>{var A5=1000,R5=A5*60,E5=R5*60,k8=E5*24,QB0=k8*7,FB0=k8*365.25;fu.exports=function(D,$){$=$||{};var X=typeof D;if(X==="string"&&D.length>0)return UB0(D);else if(X==="number"&&isFinite(D))return $.long?OB0(D):ZB0(D);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(D))};function UB0(D){if(D=String(D),D.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(D);if(!$)return;var X=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return X*FB0;case"weeks":case"week":case"w":return X*QB0;case"days":case"day":case"d":return X*k8;case"hours":case"hour":case"hrs":case"hr":case"h":return X*E5;case"minutes":case"minute":case"mins":case"min":case"m":return X*R5;case"seconds":case"second":case"secs":case"sec":case"s":return X*A5;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return X;default:return}}function ZB0(D){var $=Math.abs(D);if($>=k8)return Math.round(D/k8)+"d";if($>=E5)return Math.round(D/E5)+"h";if($>=R5)return Math.round(D/R5)+"m";if($>=A5)return Math.round(D/A5)+"s";return D+"ms"}function OB0(D){var $=Math.abs(D);if($>=k8)return TQ(D,$,k8,"day");if($>=E5)return TQ(D,$,E5,"hour");if($>=R5)return TQ(D,$,R5,"minute");if($>=A5)return TQ(D,$,A5,"second");return D+" ms"}function TQ(D,$,X,J){var Y=$>=X*1.5;return Math.round(D/X)+" "+J+(Y?"s":"")}});var dB=R((ft0,bu)=>{function GB0(D){X.debug=X,X.default=X,X.coerce=Z,X.disable=F,X.enable=Y,X.enabled=U,X.humanize=yu(),X.destroy=O,Object.keys(D).forEach((G)=>{X[G]=D[G]}),X.names=[],X.skips=[],X.formatters={};function $(G){let q=0;for(let B=0;B<G.length;B++)q=(q<<5)-q+G.charCodeAt(B),q|=0;return X.colors[Math.abs(q)%X.colors.length]}X.selectColor=$;function X(G){let q,B=null,W,K;function H(...L){if(!H.enabled)return;let M=H,I=Number(new Date),N=I-(q||I);if(M.diff=N,M.prev=q,M.curr=I,q=I,L[0]=X.coerce(L[0]),typeof L[0]!=="string")L.unshift("%O");let V=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(E,x)=>{if(E==="%%")return"%";V++;let _=X.formatters[x];if(typeof _==="function"){let A=L[V];E=_.call(M,A),L.splice(V,1),V--}return E}),X.formatArgs.call(M,L),(M.log||X.log).apply(M,L)}if(H.namespace=G,H.useColors=X.useColors(),H.color=X.selectColor(G),H.extend=J,H.destroy=X.destroy,Object.defineProperty(H,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(B!==null)return B;if(W!==X.namespaces)W=X.namespaces,K=X.enabled(G);return K},set:(L)=>{B=L}}),typeof X.init==="function")X.init(H);return H}function J(G,q){let B=X(this.namespace+(typeof q>"u"?":":q)+G);return B.log=this.log,B}function Y(G){X.save(G),X.namespaces=G,X.names=[],X.skips=[];let q=(typeof G==="string"?G:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let B of q)if(B[0]==="-")X.skips.push(B.slice(1));else X.names.push(B)}function Q(G,q){let B=0,W=0,K=-1,H=0;while(B<G.length)if(W<q.length&&(q[W]===G[B]||q[W]==="*"))if(q[W]==="*")K=W,H=B,W++;else B++,W++;else if(K!==-1)W=K+1,H++,B=H;else return!1;while(W<q.length&&q[W]==="*")W++;return W===q.length}function F(){let G=[...X.names,...X.skips.map((q)=>"-"+q)].join(",");return X.enable(""),G}function U(G){for(let q of X.skips)if(Q(G,q))return!1;for(let q of X.names)if(Q(G,q))return!0;return!1}function Z(G){if(G instanceof Error)return G.stack||G.message;return G}function O(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return X.enable(X.load()),X}bu.exports=GB0});var gu=R((hu,CQ)=>{hu.formatArgs=BB0;hu.save=WB0;hu.load=KB0;hu.useColors=qB0;hu.storage=HB0();hu.destroy=(()=>{let D=!1;return()=>{if(!D)D=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();hu.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function qB0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let D;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(D=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(D[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function BB0(D){if(D[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+D[0]+(this.useColors?"%c ":" ")+"+"+CQ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;D.splice(1,0,$,"color: inherit");let X=0,J=0;D[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(X++,Y==="%c")J=X}),D.splice(J,0,$)}hu.log=console.debug||console.log||(()=>{});function WB0(D){try{if(D)hu.storage.setItem("debug",D);else hu.storage.removeItem("debug")}catch($){}}function KB0(){let D;try{D=hu.storage.getItem("debug")||hu.storage.getItem("DEBUG")}catch($){}if(!D&&typeof process<"u"&&"env"in process)D=process.env.DEBUG;return D}function HB0(){try{return localStorage}catch(D){}}CQ.exports=dB()(hu);var{formatters:NB0}=CQ.exports;NB0.j=function(D){try{return JSON.stringify(D)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var cu=R((bt0,mu)=>{mu.exports=(D,$=process.argv)=>{let X=D.startsWith("-")?"":D.length===1?"-":"--",J=$.indexOf(X+D),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var lu=R((ht0,nu)=>{var RB0=l("os"),du=l("tty"),B$=cu(),{env:tD}=process,z4;if(B$("no-color")||B$("no-colors")||B$("color=false")||B$("color=never"))z4=0;else if(B$("color")||B$("colors")||B$("color=true")||B$("color=always"))z4=1;if("FORCE_COLOR"in tD)if(tD.FORCE_COLOR==="true")z4=1;else if(tD.FORCE_COLOR==="false")z4=0;else z4=tD.FORCE_COLOR.length===0?1:Math.min(parseInt(tD.FORCE_COLOR,10),3);function nB(D){if(D===0)return!1;return{level:D,hasBasic:!0,has256:D>=2,has16m:D>=3}}function lB(D,$){if(z4===0)return 0;if(B$("color=16m")||B$("color=full")||B$("color=truecolor"))return 3;if(B$("color=256"))return 2;if(D&&!$&&z4===void 0)return 0;let X=z4||0;if(tD.TERM==="dumb")return X;if(process.platform==="win32"){let J=RB0.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in tD){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in tD))||tD.CI_NAME==="codeship")return 1;return X}if("TEAMCITY_VERSION"in tD)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(tD.TEAMCITY_VERSION)?1:0;if(tD.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in tD){let J=parseInt((tD.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(tD.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(tD.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(tD.TERM))return 1;if("COLORTERM"in tD)return 1;return X}function EB0(D){let $=lB(D,D&&D.isTTY);return nB($)}nu.exports={supportsColor:EB0,stdout:nB(lB(!0,du.isatty(1))),stderr:nB(lB(!0,du.isatty(2)))}});var tu=R((pu,SQ)=>{var jB0=l("tty"),PQ=l("util");pu.init=uB0;pu.log=SB0;pu.formatArgs=CB0;pu.save=xB0;pu.load=vB0;pu.useColors=TB0;pu.destroy=PQ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");pu.colors=[6,2,3,4,5,1];try{let D=lu();if(D&&(D.stderr||D).level>=2)pu.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(D){}pu.inspectOpts=Object.keys(process.env).filter((D)=>{return/^debug_/i.test(D)}).reduce((D,$)=>{let X=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,Q)=>{return Q.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return D[X]=J,D},{});function TB0(){return"colors"in pu.inspectOpts?Boolean(pu.inspectOpts.colors):jB0.isatty(process.stderr.fd)}function CB0(D){let{namespace:$,useColors:X}=this;if(X){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),Q=` ${Y};1m${$} \x1B[0m`;D[0]=Q+D[0].split(`
|
|
129
129
|
`).join(`
|
|
130
130
|
`+Q),D.push(Y+"m+"+SQ.exports.humanize(this.diff)+"\x1B[0m")}else D[0]=PB0()+$+" "+D[0]}function PB0(){if(pu.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function SB0(...D){return process.stderr.write(PQ.formatWithOptions(pu.inspectOpts,...D)+`
|